Added TorchAO INT4 weight-only quantization + Linear, FLUX, and Qwen examples - #4588
Closed
micwill755 wants to merge 1 commit into
Closed
Added TorchAO INT4 weight-only quantization + Linear, FLUX, and Qwen examples#4588micwill755 wants to merge 1 commit into
micwill755 wants to merge 1 commit into
Conversation
…examples Keep group-wise INT4 as packed TRT INT4 constants (symmetric DQ) instead of folding weights to BF16, and document the Linear / FLUX / Qwen3 export paths.
micwill755
force-pushed
the
torchao-workflows
branch
from
August 26, 2026 08:27
5b9b7af to
9099fe5
Compare
Collaborator
Author
|
Closing this fork-headed PR so we can reopen the same commits from |
3 tasks
Collaborator
Author
|
Replacement (same-repo stack 2/2): #4590 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
torchao.dequantize_affineso group-wise INT4 is re-packed totrt.DataType.INT4(symmetric zero-point; blocked DQ currently FP32 then cast).pytorch/Qwen3-8B-INT4).This sits on top of #4577 (TorchAO FP8). INT4 compile needs
immutable_weights=True.Review note: GitHub native stacks do not support PRs from forks, so this is a regular PR with base
torchao-workflows. Please review the latest commit (abe9274) — the INT4 delta vs #4577. After #4577 merges, the remaining diff vsmainshould be that commit only.Test plan
tests/py/dynamo/models/test_torchao_fp8_woq.py::test_linear_int4_woq(CUDA)python examples/dynamo/torchao/quantize_linear_int4_woq.py