Repository navigation
Own Float8 and NVFP4 quantized autograd - #4820
Merged
Merged
Conversation
[ghstack-poisoned]
anijain2305
added a commit
that referenced
this pull request
Sep 21, 2026
Move Float8 and NVFP4 into packages matching the MXFP8 layout, with optional dependency handling limited to package imports. TorchTitan now owns dense and grouped Float8 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels. ghstack-source-id: a3f5d7b Pull-Request: #4820
anijain2305
added a commit
that referenced
this pull request
Sep 21, 2026
Move Float8 and NVFP4 into packages matching the MXFP8 layout, with optional dependency handling limited to package imports. TorchTitan now owns dense and grouped Float8 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels. ghstack-source-id: bb315d9 Pull-Request: #4820
anijain2305
added a commit
that referenced
this pull request
Sep 21, 2026
Move Float8 and NVFP4 into packages matching the MXFP8 layout, with optional dependency handling limited to package imports. TorchTitan now owns dense and grouped Float8 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels. ghstack-source-id: af0d9bf Pull-Request: #4820
anijain2305
marked this pull request as ready for review
September 21, 2026 19:37
anijain2305
requested review from
fegin,
tianyu-l,
wconstab and
wwwjn
as code owners
September 21, 2026 19:37
tianyu-l
approved these changes
Sep 22, 2026
tianyu-l
left a comment
Contributor
There was a problem hiding this comment.
didn't read carefully, patterns seem following mxfp8
|
|
||
| For scaling strategy, we support rowwise dynamic scaling (alpha). | ||
|
|
||
| ### TorchAO and TorchTitan boundary |
Contributor
There was a problem hiding this comment.
I wonder if we only need one such disclaimer under quantization/ for multiple formats
| _nvfp4_linear_import_error = import_error | ||
|
|
||
|
|
||
| def nvfp4_bf16_tail_fqns(num_layers: int, bf16_tail_fraction: float) -> list[str]: |
Contributor
There was a problem hiding this comment.
sounds like should go to nvfp4/utils.py
| - [Interoperable checkpoints](docs/checkpoint.md) which can be loaded directly into [`torchtune`](https://github.com/pytorch/torchtune) for fine-tuning | ||
| 5. `torch.compile` support | ||
| 6. [Float8](https://discuss.pytorch.org/t/distributed-w-torchtitan-enabling-float8-all-gather-in-fsdp2/209323) support ([how-to](torchtitan/quantization/float8.md)) | ||
| 6. [Float8](https://discuss.pytorch.org/t/distributed-w-torchtitan-enabling-float8-all-gather-in-fsdp2/209323) support ([how-to](torchtitan/quantization/float8/README.md)) |
Contributor
There was a problem hiding this comment.
maybe unify float8, nvfp4, mxfp8 under a single quantization bullet point
| * [torchtitan/distributed/pipeline_parallel.py](torchtitan/distributed/pipeline_parallel.py) - helpers for applying Pipeline Parallel to the model | ||
| * [torchtitan/components/checkpointer/dcp.py](torchtitan/components/checkpointer/dcp.py) - utils for saving/loading distributed checkpoints | ||
| * [torchtitan/quantization/float8.py](torchtitan/quantization/float8.py) - utils for applying Float8 techniques | ||
| * [torchtitan/quantization/float8/](torchtitan/quantization/float8/) - Float8 training components |
Contributor
There was a problem hiding this comment.
very outdated, let's remove this section
anijain2305
added a commit
that referenced
this pull request
Sep 22, 2026
Move Float8 and NVFP4 into packages matching the MXFP8 layout, with optional dependency handling limited to package imports. TorchTitan now owns dense and grouped Float8 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels. ghstack-source-id: 69b9005 Pull-Request: #4820
[ghstack-poisoned]
anijain2305
added a commit
that referenced
this pull request
Sep 22, 2026
Move Float8 and NVFP4 into packages matching the MXFP8 layout, with optional dependency handling limited to package imports. TorchTitan now owns dense and grouped Float8 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels. ghstack-source-id: ae864b3 Pull-Request: #4820
anijain2305
added a commit
that referenced
this pull request
Sep 22, 2026
Move Float8 and NVFP4 into packages matching the MXFP8 layout, with optional dependency handling limited to package imports. TorchTitan now owns dense and grouped Float8 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels. ghstack-source-id: 40ca836 Pull-Request: #4820
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.
Stack from ghstack (oldest at bottom):
TorchTitan now owns dense and grouped Float8/NVFP4 autograd and FSDP-managed weight operands; TorchAO supplies only low-level quantization and GEMM kernels.
Ran bitwise tests to check equivalence
This PR just moves the impl to titan. We should also do another pass on what to deprecate.