Fix GLM 5.2 mxfp4 MTP loading issue#1022
Open
amd-xiaoyu12 wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
quantization_config.exclude.Motivation
GLM-5.2 MXFP4 checkpoints can keep the MTP layer unquantized while quantizing the main MoE layers. The Quark config currently honors
excludefor linear layers, but the MTP draft layer is constructed as aFusedMoEmodule. As a result, vLLM allocates MXFP4-packed expert weights for an unquantized bf16 MTP layer and fails during weight loading with:Test Plan
Verified GLM-5.2 MXFP4 MTP serving on MI355X, TP=4:
vllm serve /data/colizeng/GLM-5.2-mxfp4-ptpcfp8-attn/
--quantization quark
--trust-remote-code
--tensor-parallel-size 4
--speculative-config '{"method":"mtp","num_speculative_tokens":5}'
--gpu-memory-utilization 0.55
--max-model-len 32768
--port 8011
--no-enable-prefix-caching
Confirmed server reached /health.
Confirmed old MoE load failure no longer occurs:
RuntimeError: The size of tensor a (256) must match the size of tensor b (512)
Ran completion smoke test and confirmed spec decode metrics increased.
Ran TP=4 MTP throughput smoke benchmark:
vllm bench serve
--model /data/colizeng/GLM-5.2-mxfp4-ptpcfp8-attn/
--base-url http://localhost:8011
--dataset-name random
--random-input 8000
--random-output 1024
--request-rate 10
--num-prompts 32
--ignore-eos
Benchmark completed with 32/32 successful requests and emitted MTP counters:
Test Result
Draft tokens: 119285
Accepted tokens: 8899
Acceptance rate: 7.46%