Repository navigation
Conversation
|
👋 Hi chw001! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
…NVFP4 loads
K-EXAONE-2.0-750B-A37B-NVFP4 cannot be served on vLLM 0.28.0 or 0.29.0:
vocab_parallel_embedding.py weight_loader
RuntimeError: The size of tensor a (3072) must match the size of tensor b
(6144) at non-singleton dimension 1
vllm/model_executor/models/exaone_moe.py constructs ParallelLMHead without a
`prefix`, so it defaults to "". VocabParallelEmbedding.__init__ then calls
quant_config.get_quant_method(self, prefix=""), and is_layer_excluded("")
matches none of the checkpoint's 223 exclusion patterns. lm_head is therefore
quantized and allocated as a packed NVFP4 param [vocab, hidden/2], which
rejects the checkpoint's unquantized BF16 lm_head.weight [153600, 6144].
Adds the vLLM patch directory and the apply step (patch --fuzz=5 -p1 into
site-packages, applied in filename order, cuda only), matching the mechanism
used for the SGLang/vLLM hotfixes elsewhere.
Verified:
- patch applies at exact offsets to vLLM 0.28.0
- raw vllm serve + patch: loads 53/53 shards, KV cache 3,475,818 tokens,
coherent output, finish_reason=stop
- Dynamo DGD + patch on B200 TP4: worker Ready, coherent through the frontend
- without the patch, three separate runs crash at shard 53 (DGD with and
without --quantization modelopt_fp4, and raw vLLM 0.29.0)
Upstream fix should land in vLLM (exaone_moe.py already imports maybe_prefix
and uses it for "model"; qwen3_moe.py and exaone4.py both pass the prefix
correctly). This patch is a bridge until then.
c51bd6a to
73fa6a1
Compare
|
/ok to test 73fa6a1 |
|
Closing in favour of #14599, which targets Same two files (the The upstream one-line fix in |
Summary
LGAI-EXAONE/K-EXAONE-2.0-750B-A37B-NVFP4cannot be served on vLLM 0.28.0 or 0.29.0 — it fails during weight load:This adds the vLLM patch directory plus the apply step, and one patch fixing it.
Root cause
vllm/model_executor/models/exaone_moe.pyconstructsParallelLMHeadwithout aprefix, so it defaults to"".VocabParallelEmbedding.__init__then callsquant_config.get_quant_method(self, prefix=""), andModelOptNvFp4Config.is_layer_excluded("")matches none of the checkpoint's 223 exclusion patterns.lm_headis therefore quantized and allocated as a packed NVFP4 param[vocab, hidden/2]=[.., 3072], which rejects the checkpoint's unquantized BF16lm_head.weight[153600, 6144].Verified CPU-only against the checkpoint's own quantization config:
The header weights confirm the checkpoint is correct —
lm_head.weightandmodel.embed_tokens.weightare bothBF16 [153600, 6144], and both are listed inignore/exclude_modules.This only manifests for checkpoints that exclude
lm_headfrom quantization, which is why BF16-validated upstream support PRs never hit it.Changes
container/deps/vllm/patches/+ apply step invllm_runtime.Dockerfile(patch --fuzz=5 -p1into site-packages, filename order, cuda only) — same mechanism used for the SGLang/vLLM hotfixes elsewhere.01-exaone-moe-lm-head-prefix.patch— addsprefix=maybe_prefix(prefix, "lm_head").Test plan / results
--quantization modelopt_fp4vllm serve0.28.0finish_reason=stop, coherentPatch verified to apply at exact offsets to vLLM 0.28.0 (no fuzz needed).
Upstream
The real fix belongs in vLLM:
exaone_moe.pyalready importsmaybe_prefixand uses it for"model"a few lines above, andqwen3_moe.py/exaone4.pyboth pass the prefix correctly —exaone_moe.pyis the outlier. Current vLLMmainis still unfixed (and has since droppedorg_num_embeddings/padding_sizefrom the same call). I'll file the upstream one-liner; this patch is a bridge until it lands and a base image carries it.Note
Draft to trigger the build pipeline. Overlaps in intent with #12513, which introduces the same patch directory on its own branch — whichever merges second needs a trivial renumber/rebase.
🤖 Generated with Claude Code