[Qwen3.5] Calibration support and NVFP4 Example#2482
Conversation
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 integrates support for the Qwen3.5 Mixture-of-Experts (MoE) model, enabling its quantization using the NVFP4 scheme. It includes a new example demonstrating the end-to-end quantization process, from model loading and dataset preparation to applying the quantization recipe and saving the compressed model. Key architectural adjustments were made to handle Qwen3.5's specific weight structures and ensure compatibility with the latest 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
|
There was a problem hiding this comment.
Code Review
This pull request adds calibration support for the Qwen3.5 model and includes an NVFP4 quantization example. The changes introduce a new calibration module for Qwen3.5 MoE layers, an example script demonstrating its use, and several compatibility updates for transformers v5. My review identified a few issues, including a hardcoded configuration that limits functionality, a significant performance issue in the new calibration logic, a misleading comment in the example script, and a minor code style inconsistency. I have provided specific feedback and code suggestions to address these points.
|
👋 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. |
|
Thanks for snagging and getting this added @dsikka . Your note about next steps, is that still valid to MTP. I also wonder how this will hold up when Quanting a non MOE Qwen3.5. Today, QWEN3.5-27B Text only has several bugs in both vllm and llm_compressor, where it behaves weirdly. I surmise this will not solve those, but I might try to requant with this PR. Thanks again! |
Thanks for bringing this up! Another community member put up an example PR for this: #2467 If you have any specific issues, do you mind opening an issue and we can investigate? |
SUMMARY:
generate_gparamcalculation to handle NaNs and Infs compressed-tensors#637Closes: #2458
Checkpoint:
https://huggingface.co/RedHatAI/Qwen3.5-122B-A10B-NVFP4
Next Steps: