-
Notifications
You must be signed in to change notification settings - Fork 341
Remove Float8Linear from quant_api.py #3085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/3085
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New FailuresAs of commit 5e88d65 with merge base d2fae7a ( NEW FAILURES - The following jobs have failed:
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lg if CI is green
I don't think it's as simple as just removing it? @jainapurva might have more context on why this is needed IIRC |
This code was added to enable quantization using quantize_ api of torchao's fp8 trained model, which is a Float8Linear Tensor. To remove this, we need to test the following flow: TorchAO's Fp8 pre-trained model (model will have Float8Linear layer), then quantize the model using quantize_ api. |
The code being removed dequantizes the model (swaps Float8Linear -> nn.Linear) using the quantize_ api. Why do we need the quantize_ api to do this? |
The quantize_ api would only worked for linear layers, hence first we used
to convert Float8Linear into Linear layers, and then those linear layers
would be quantized
…On Mon, Sep 29, 2025 at 9:49 PM Daniel Vega-Myhre ***@***.***> wrote:
*danielvegamyhre* left a comment (pytorch/ao#3085)
<#3085 (comment)>
I don't think it's as simple as just removing it? @jainapurva
<https://github.com/jainapurva> might have more context on why this is
needed IIRC
This code was added to enable quantization using quantize_ api of
torchao's fp8 trained model, which is a Float8Linear Tensor. To remove
this, we need to test the following flow: TorchAO's Fp8 pre-trained model
(model will have Float8Linear layer), then quantize the model using
quantize_ api.
The code being removed *dequantizes* the model (swaps Float8Linear ->
nn.Linear) using the quantize_ api. Why do we need the quantize_ api to do
this?
—
Reply to this email directly, view it on GitHub
<#3085 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEVCDALVPE2ODJKSYBRXBYD3VIDU7AVCNFSM6AAAAACHUIT6WCVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTGNBZHE3DMNRVGY>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
It does not make sense to me to put workflow-specific logic in a general utility such as |
I agree with this.... I will look into the test failures and fix before landing |
Fixes #3069
Discussed issue with @vkuzo offline, references to Float8Linear in quant_api.py conversion code are technical debt that can be removed.