Skip to content

Conversation

Isotr0py
Copy link
Member

@Isotr0py Isotr0py commented Aug 24, 2025

Purpose

Test Plan

python examples/offline_inference/basic/generate.py --model Qwen/Qwen3-30B-A3B-GPTQ-Int4/ --max-model-len 4096 --enforce-eager

Test Result

Processed prompts: 100%|███████████████████████████████████████████████████████████████████████| 4/4 [00:00<00:00,  7.06it/s, est. speed input: 38.87 toks/s, output: 113.07 toks/s]
--------------------------------------------------
Prompt: 'Hello, my name is'
Generated text: ' John, and I am 12 years old. I am currently in the'
--------------------------------------------------
Prompt: 'The president of the United States is'
Generated text: ' the commander-in-chief of the United States military. The president is also the head'
--------------------------------------------------
Prompt: 'The capital of France is'
Generated text: ' Paris. The capital of Germany is Berlin. The capital of the United Kingdom is'
--------------------------------------------------
Prompt: 'The future of AI is'
Generated text: ' not just about the technology itself, but also the way it is integrated into our'
--------------------------------------------------

(Optional) Documentation Update


Essential Elements of an Effective PR Description Checklist
  • The purpose of the PR, such as "Fix some issue (link existing issues this PR will resolve)".
  • The test plan, such as providing test command.
  • The test results, such as pasting the results comparison before and after, or e2e results
  • (Optional) The necessary documentation update, such as updating supported_models.md and examples for a new model.

Signed-off-by: Isotr0py <[email protected]>
@Isotr0py Isotr0py requested a review from sighingnow as a code owner August 24, 2025 12:17
@mergify mergify bot added the qwen Related to Qwen models label Aug 24, 2025
Copy link
Contributor

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

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 a fix for GPTQ inference on Qwen3 MoE models. The core change is to prevent the quantization of the 'gate' layer within the MoE blocks when using GPTQ or GPTQ-Marlin quantization. This is achieved by adding a check that passes a None quantization configuration to the gate's ReplicatedLinear layer for these specific quantization methods. This is a common practice for MoE models where the gating mechanism is sensitive and often kept at a higher precision. The changes are well-contained and appear correct for the stated purpose. I have not found any high or critical severity issues in this pull request.

@Isotr0py Isotr0py enabled auto-merge (squash) August 25, 2025 05:39
@github-actions github-actions bot added the ready ONLY add when PR is ready to merge/full CI is needed label Aug 25, 2025
Signed-off-by: Isotr0py <[email protected]>
@simon-mo simon-mo merged commit a9082a4 into vllm-project:main Aug 25, 2025
38 of 40 checks passed
@Isotr0py Isotr0py deleted the qwen3moe-gptq branch August 25, 2025 13:41
epwalsh pushed a commit to epwalsh/vllm that referenced this pull request Aug 28, 2025
xiao-llm pushed a commit to xiao-llm/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Aug 28, 2025
zhewenl pushed a commit to zhewenl/vllm that referenced this pull request Sep 3, 2025
ekagra-ranjan pushed a commit to ekagra-ranjan/vllm that referenced this pull request Sep 4, 2025
FeiDaLI pushed a commit to FeiDaLI/vllm that referenced this pull request Sep 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

qwen Related to Qwen models ready ONLY add when PR is ready to merge/full CI is needed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: PR #22017 break Qwen3 MoE GPTQ loading

4 participants