-
Notifications
You must be signed in to change notification settings - Fork 338
Add mx_fp4 path #2201
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
Add mx_fp4 path #2201
Conversation
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
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/ao/2201
Note: Links to docs will display an error until the docs builds have been completed. ❗ 1 Active SEVsThere are 1 currently active SEVs. If your PR is affected, please view them below: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
drisspg
added a commit
that referenced
this pull request
May 12, 2025
stack-info: PR: #2201, branch: drisspg/stack/54
vkuzo
reviewed
May 13, 2025
vkuzo
approved these changes
May 13, 2025
drisspg
added a commit
that referenced
this pull request
May 13, 2025
stack-info: PR: #2201, branch: drisspg/stack/54
drisspg
added a commit
that referenced
this pull request
May 13, 2025
stack-info: PR: #2201, branch: drisspg/stack/54
drisspg
added a commit
that referenced
this pull request
May 13, 2025
stack-info: PR: #2201, branch: drisspg/stack/54
drisspg
added a commit
that referenced
this pull request
May 13, 2025
stack-info: PR: #2201, branch: drisspg/stack/54
stack-info: PR: #2201, branch: drisspg/stack/54
vkuzo
added a commit
that referenced
this pull request
May 14, 2025
Summary: #2201 broke CI: 1. some MX tests for fp4 are running on A10G instances, with skipping not being properly applied (https://hud.pytorch.org/pytorch/ao/commit/4bfd7c09ef4592eacbbf990aea6d6bda608865c1#42164784332-box) 2. some SQNR thresholds were to tight for fp4 (https://hud.pytorch.org/pytorch/ao/commit/4bfd7c09ef4592eacbbf990aea6d6bda608865c1#42164784332-box) This PR fixes both of these to get CI back to green (I hope). Note that I can't repro 1 locally, so we'll have to land and see if it works. Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
drisspg
pushed a commit
that referenced
this pull request
May 14, 2025
Summary: #2201 broke CI: 1. some MX tests for fp4 are running on A10G instances, with skipping not being properly applied (https://hud.pytorch.org/pytorch/ao/commit/4bfd7c09ef4592eacbbf990aea6d6bda608865c1#42164784332-box) 2. some SQNR thresholds were to tight for fp4 (https://hud.pytorch.org/pytorch/ao/commit/4bfd7c09ef4592eacbbf990aea6d6bda608865c1#42164784332-box) This PR fixes both of these to get CI back to green (I hope). Note that I can't repro 1 locally, so we'll have to land and see if it works. Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
liangel-02
pushed a commit
that referenced
this pull request
Aug 25, 2025
stack-info: PR: #2201, branch: drisspg/stack/54
liangel-02
pushed a commit
that referenced
this pull request
Aug 25, 2025
Summary: #2201 broke CI: 1. some MX tests for fp4 are running on A10G instances, with skipping not being properly applied (https://hud.pytorch.org/pytorch/ao/commit/4bfd7c09ef4592eacbbf990aea6d6bda608865c1#42164784332-box) 2. some SQNR thresholds were to tight for fp4 (https://hud.pytorch.org/pytorch/ao/commit/4bfd7c09ef4592eacbbf990aea6d6bda608865c1#42164784332-box) This PR fixes both of these to get CI back to green (I hope). Note that I can't repro 1 locally, so we'll have to land and see if it works. Test Plan: CI Reviewers: Subscribers: Tasks: Tags:
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
CLA Signed
This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
mx
topic: new feature
Use this tag if this PR adds a new feature
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.
Stacked PRs:
Add mx_fp4 path
BF16 70B MLP: https://fburl.com/aeqm5s4v~ 1300 us
MXFP8 70B MLP: https://fburl.com/uxgoju4r ~ 723us
MXFP4 70B MLP: https://fburl.com/u95f6f39 ~ 600us
Looks like we need to do some more kernel tuning since the gemm kernel is only about 70% the execution time instead of of 50%
Benchmarks
Baseline Model
Throughput: 56.68 requests/s, 24053.96 total tokens/s, 11590.20 output tokens/s
Total num prompt tokens: 225190
Total num output tokens: 209407
MXFP8:
Throughput: 50.52 requests/s, 21443.10 total tokens/s, 10332.18 output tokens/s
Total num prompt tokens: 225190
Total num output tokens: 209407
MXFP4:
python /home/drisspg/meta/vllm/benchmarks/benchmark_throughput.py
--backend vllm
--model "/home/drisspg/meta/scripts/data/mxfp4-Qwen2-7B-Instruct"
--dataset-name sharegpt
--dataset-path /home/drisspg/meta/scripts/data/ShareGPT_V3_unfiltered_cleaned_split.json
--num-prompts 1024
--disable-log-stats
--gpu-memory-utilization=0.9
--seed 42
70b
Base
Throughput: 26.28 requests/s, 11154.41 total tokens/s, 5374.66 output tokens/s
Total num prompt tokens: 225190
Total num output tokens: 209407
MXFP4
Throughput: 25.96 requests/s, 11018.18 total tokens/s, 5309.02 output tokens/s
Total num prompt tokens: 225190
Total num output tokens: 209407