-
Notifications
You must be signed in to change notification settings - Fork 18
Support DeepSeekV3-style block FP8 quantization #372
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
Conversation
Signed-off-by: mgoin <[email protected]>
Signed-off-by: mgoin <[email protected]>
Signed-off-by: mgoin <[email protected]>
Signed-off-by: mgoin <[email protected]>
Signed-off-by: mgoin <[email protected]>
Signed-off-by: mgoin <[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.
Can you produce a test model to nm-testing andd it to this PR?
src/compressed_tensors/compressors/quantized_compressors/nvfp4_quantized.py
Outdated
Show resolved
Hide resolved
Signed-off-by: shanjiaz <[email protected]>
Signed-off-by: shanjiaz <[email protected]>
Signed-off-by: shanjiaz <[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.
Looks good!
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.
awesome work! clear with nice tests
Quite a few things packed into one here, but the goal is to support the 128x128 weight and 1x128 input quantization adopted by deepseekv3 and qwen3 models. See examples: https://huggingface.co/deepseek-ai/DeepSeek-V3 and https://huggingface.co/Qwen/Qwen3-0.6B-FP8
block_structure
was previously treated as an“NxM”
string so that it now uses a Python list of two integers (e.g.[128, 128]
). I added a pydantic validator that can convert this automatically for old checkpoints that use the string.Here is the scheme I am proposing to support this:
Added this model to hugging face: nm-testing/Qwen3-0.6B-FP8-BLOCK