Skip to content

[fix] Qwen3.5 AWQ quantization startup crash#29

Open
yyj6666667 wants to merge 1 commit into
kvcache-ai:mainfrom
yyj6666667:fix/qwen3-5-awq
Open

[fix] Qwen3.5 AWQ quantization startup crash#29
yyj6666667 wants to merge 1 commit into
kvcache-ai:mainfrom
yyj6666667:fix/qwen3-5-awq

Conversation

@yyj6666667

Copy link
Copy Markdown

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:

RuntimeError: gptq_marlin_repack.cuh:309: size_n = 32 is not divisible by tile_n_size = 64

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: Added hf_to_sglang_mapper override for Qwen3_5ForConditionalGeneration and Qwen3_5MoeForConditionalGeneration so quant ignore names match correctly and in_proj_a/in_proj_b layers are not mistakenly quantized.
  • model_runner.py: Added Blackwell backend guard to auto-switch from flashinfer to triton for 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.

Copilot AI review requested due to automatic review settings April 5, 2026 07:23
@yyj6666667
yyj6666667 requested a review from hnyls2002 as a code owner April 5, 2026 07:23
@yyj6666667 yyj6666667 changed the title qwen3 awq working [fix] Qwen3.5 AWQ quantization startup crash Apr 5, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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_mapper overrides for Qwen3_5ForConditionalGeneration and Qwen3_5MoeForConditionalGeneration to keep quant ignore-name mapping consistent with Qwen3.5 layer names.
  • In ModelRunner.model_specific_adjustment(), auto-switch attention backend from flashinfer to triton for 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants