[Examples] Add Qwen3.5-27B NVFP4A16 and MXFP4A16 quantization examples#2467
[Examples] Add Qwen3.5-27B NVFP4A16 and MXFP4A16 quantization examples#2467dsikka merged 4 commits intovllm-project:mainfrom
Conversation
|
👋 Hi! Thank you for contributing to llm-compressor. Please add the ready label when the PR is ready for review. Note: This is required to complete the testing suite, please only add the label once the PR is code complete and local testing has been performed. |
Summary of ChangesHello, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request introduces new examples demonstrating how to apply two different FP4 quantization techniques, NVFP4A16 and MXFP4A16, to the Qwen3.5-27B large language model within the llmcompressor framework. These examples are designed to showcase the quantization process while explicitly ignoring specific model components that are either incompatible or not intended for quantization, such as the lm_head and visual encoder. The changes aim to expand the utility of llmcompressor by providing practical, ready-to-use scripts for a prominent model, pending an update to the transformers library for full compatibility. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. Changelog
Activity
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for GitHub and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
04c3fd7 to
4c84571
Compare
There was a problem hiding this comment.
Code Review
This pull request adds two new example scripts for quantizing the Qwen3.5-27B model using MXFP4A16 and NVFP4A16 schemes. The examples are clear and follow the existing structure. My main feedback is to address the significant code duplication between the two new files. I've suggested refactoring them into a single, parameterized script to improve maintainability. This would make the examples more concise and easier to manage in the long run.
Signed-off-by: Ziming <frankziming26@outlook.com>
4c84571 to
df3ad83
Compare
Thanks, but this follows the existing repo convention — all examples (llama3, qwen3) are separate self-contained scripts per scheme. Keeping it consistent. |
Thanks @dsikka! Here are the checkpoints generated from the 9B variant (only have access to a single 5090 right now, so tested with 9B instead of 27B): NVFP4A16: https://huggingface.co/2imi9/Qwen3.5-9B-NVFP4A16 |
Thank you! I made small updates to properly load the model and processor. |
brian-dellabetta
left a comment
There was a problem hiding this comment.
Thank you for the contribution!
Summary
w4a16_fp4/nvfp4)w4a16_fp4/mxfp4)Ignore list includes:
lm_head— output headre:.*visual.*— vision encoder (Qwen3.5 is a VLM)re:.*linear_attn.*— Gated DeltaNet fused projections incompatible with microscale formats (ref feat: add Qwen3.5 MoE calibration module #2383)re:.*mtp.*— multi-token prediction modulesTest plan