-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
[Bugfix] Fix quark fp8 format loading on AMD GPUs #12612
base: main
Are you sure you want to change the base?
Conversation
👋 Hi! Thank you for contributing to the vLLM project. Once the PR is approved and ready to go, your PR reviewer(s) can run CI to test the changes comprehensively before merging. To run CI, PR reviewers can do one of these:
🚀 |
@fxmarty-amd let's update this PR with fix we discussed internally. |
18b597e
to
1eacf30
Compare
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.
ok
41507b1
to
82ed62b
Compare
This pull request has merge conflicts that must be resolved before it can be |
Signed-off-by: Felix Marty <[email protected]>
Signed-off-by: Felix Marty <[email protected]>
Signed-off-by: Felix Marty <[email protected]>
82ed62b
to
735fb92
Compare
Signed-off-by: Felix Marty <[email protected]>
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.
LGTM!
#10765 was merged into vllm to support Quark quantized models. Unfortunately, tests are somewhat limited and the issue fixed in this PR was not catched by the tests. Namely, if you compare
vllm/vllm/model_executor/layers/quantization/fp8.py
Lines 303 to 317 in 7a8987d
and
vllm/vllm/model_executor/layers/quantization/quark/schemes/quark_w8a8_fp8.py
Lines 34 to 51 in 7a8987d
We see that the call order of
normalize_e4m3fn_to_e4m3fnuz
andrequantize_with_max_scale
is swapped for quark. This eventually loads in weights being different in case a checkpoint uses"quant_method": "quark"
and is loaded in vllm.We might want to add more tests or extend https://github.com/vllm-project/vllm/blob/main/tests/quantization/test_quark.py in this PR or in a later PR.