[fix] Qwen3.5 AWQ quantization startup crash#29
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces model-specific adjustments for Qwen3.5 models on Blackwell GPUs. It includes logic to automatically switch the attention backend to triton for Qwen3.5 hybrid GDN models on Blackwell hardware and adds a WeightsMapper to ensure correct weight name mapping for quantization. I have no feedback to provide.
There was a problem hiding this comment.
Pull request overview
Cherry-picks an upstream fix to prevent Qwen3.5 AWQ quantized model startup crashes by ensuring quantization “ignore” module-name patterns align with Qwen3.5’s internal naming, and adds a hardware-specific backend adjustment for Blackwell GPUs when running Qwen3.5 hybrid GDN models.
Changes:
- Add
hf_to_sglang_mapperoverrides forQwen3_5ForConditionalGenerationandQwen3_5MoeForConditionalGenerationto keep quant ignore-name mapping consistent with Qwen3.5 layer names. - In
ModelRunner.model_specific_adjustment(), auto-switch attention backend fromflashinfertotritonfor Qwen3.5 hybrid GDN on Blackwell.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| python/sglang/srt/models/qwen3_5.py | Overrides weight-name mapping to keep AWQ quant ignore lists matching Qwen3.5 module names (avoids unintended quantization of sensitive layers). |
| python/sglang/srt/model_executor/model_runner.py | Adds a Blackwell-specific guard to select a compatible attention backend for Qwen3.5 hybrid GDN. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Here's a filled-in PR description for cherry-picking the Qwen3.5 AWQ fix:
Motivation
Cherry-pick fix from sgl-project/sglang#20370 to resolve Qwen3.5 AWQ quantization startup crash:
The upstream PR has not been merged yet. Bringing the fix in early so our fork can support Qwen3.5 AWQ models now.
Modifications
qwen3_5.py: Addedhf_to_sglang_mapperoverride forQwen3_5ForConditionalGenerationandQwen3_5MoeForConditionalGenerationso quant ignore names match correctly andin_proj_a/in_proj_blayers are not mistakenly quantized.model_runner.py: Added Blackwell backend guard to auto-switch fromflashinfertotritonfor Qwen3.5 GDN models.All changes are identical to upstream PR #20370.
Accuracy Tests
See upstream PR for results (4B AWQ 4-bit: 74.4 on C-Eval vs 75.3 original).
Benchmarking and Profiling
N/A — bug fix only, no performance impact expected.