Repository navigation
Implement online nvfp4 quantization #26083
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
Merged
Merged
Changes from 21 commits
Commits
Show all changes
27 commits
Select commit
Hold shift + click to select a range
8409b4b
Initial impl
zianglih 75cc832
Allow fp8 ckpt by qdq
zianglih 9c29590
Fix ue8m0
zianglih c627dd5
Address online NVFP4 review feedback
zianglih 232b03a
Simplify online NVFP4 scale helper
zianglih 17c9214
Optimize online NVFP4 weight loading
zianglih c273310
Enable TP for online per-token NVFP4
zianglih f56e995
Restrict online NVFP4 FP8 detection to CUDA dtypes
zianglih 0ca5f9c
Move online NVFP4 MoE method to its own file
zianglih db371d9
Rename online NVFP4 quantization module
zianglih 031bd0c
Move online NVFP4 config to owner module
zianglih 3e56409
Set FlashInfer FP4 fast math env for online NVFP4
zianglih 610086c
Polish FP4 ignored layers docs
zianglih 834bda6
Simplify per-token activation config
zianglih d9262ae
Clean up online NVFP4 config access
zianglih 2e08590
Use 4over6 in test since already supported
zianglih 14be601
Align online NVFP4 scales with 4over6 config
zianglih 9f4eda9
Keep 4over6 E4M3 override activation-scoped
zianglih eef16b4
Revert "Keep 4over6 E4M3 override activation-scoped"
zianglih bf92fe0
Refactor online modelopt FP4 quantization path
zianglih 422e697
Revert "Refactor online modelopt FP4 quantization path"
zianglih 78e203b
Rename NVFP4 per-token activation interface
zianglih 82455c7
Drop NVFP4 activation registry unit test
zianglih 385c822
Rename online NVFP4 quantization interface
zianglih b21f646
Document nvfp4_online design
zianglih f3dc2bb
Clarify FP4 ignored layers example
zianglih 73ee07c
Merge branch 'main' into online-per-token-fp4
zianglih File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Some comments aren't visible on the classic Files Changed page.
There are no files selected for viewing
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
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
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
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
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
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Can we try to move it into a new file, for fp4 online quantization. Since this file is getting very long now
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.
Done in
930908d8d. I moved the implementation-heavyModelOptPerTokenNvFp4FusedMoEMethodintomodelopt_nvfp4_online.py;PerTokenNvFp4Confignow lazily imports it only for the FusedMoE online FP4 path. I also re-ran the focused registered test on the B200 devbox:TestFlashinferTrtllmGenMoeBackendOnlinePerTokenNVFP4passed with GSM8K score 0.945.