Repository navigation
fix(container/vllm): patch exaone_moe lm_head prefix + bump vLLM to v0.28.0 for K-EXAONE - #14599
Conversation
|
👋 Hi chw001! Thank you for contributing to ai-dynamo/dynamo. Just a reminder: The 🚀 |
9271d88 to
c1cb39a
Compare
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 an NVFP4 checkpoint's exclusion patterns. lm_head is therefore
quantized and allocated as a packed NVFP4 param [vocab, hidden/2], which
rejects an unquantized BF16 lm_head.weight and fails weight load:
RuntimeError: The size of tensor a (3072) must match the size of tensor b
(6144) at non-singleton dimension 1
Adds the vLLM patch directory plus the apply step (patch --fuzz=5 -p1 into
site-packages, filename order, cuda only).
Verified on K-EXAONE-2.0-750B-A37B-NVFP4:
- patch applies to both vLLM 0.26.0 (this branch's pin) and 0.28.0
- with patch: 53/53 shards load, server reaches Application startup complete
- without patch: three separate runs crash at shard 53
exaone_moe.py already imports maybe_prefix and uses it for "model";
qwen3_moe.py and exaone4.py both pass the prefix correctly.
Signed-off-by: Cheng Wang <[email protected]>
c1cb39a to
55ca918
Compare
|
/ok to test 55ca918 |
…upport vLLM v0.26.0 registers the K-EXAONE MoE architecture under the misspelled key "ExaoneMoEForCausalLM", while both LGAI-EXAONE/K-EXAONE-236B-A23B and K-EXAONE-2.0-750B-A37B declare architectures: ["ExaoneMoeForCausalLM"]. _ModelRegistry._normalize_arch does an exact dict lookup with no case folding. The result is not a clean failure. Verified against the real checkpoint on vllm/vllm-openai:v0.26.0-ubuntu2404: architectures: ['ExaoneMoeForCausalLM'] RESOLVED OK -> TransformersMoEForCausalLM It silently falls back to the generic Transformers backend, so the native exaone_moe implementation is never loaded, the optimized NVFP4 MoE path is bypassed, and the lm_head patch in this PR would be dead code. v0.28.0 carries the corrected registry key (fixed upstream in the same PR that added K-EXAONE 2.0 support, vllm-project/vllm#50524, merged 2026-08-03) and is the version the patch was validated against: - 53/53 shards load, KV cache 3,475,818 tokens, Application startup complete - coherent output through both raw vLLM and a Dynamo DGD Signed-off-by: Cheng Wang <[email protected]>
|
/ok to test 7ba2828 |
|
Added a second commit bumping the vLLM base image Why it is required, not cosmetic. v0.26.0 registers the architecture under the misspelled key It does not fail cleanly. Verified against the real checkpoint on It silently falls back to the generic Transformers backend — the native v0.28.0 has the corrected registry key (fixed upstream in vllm-project/vllm#50524, the same PR that added K-EXAONE 2.0 support) and is the version this patch was validated on: 53/53 shards load, KV cache 3,475,818 tokens, coherent output through both raw vLLM and a Dynamo DGD. Flagging for maintainers: this changes the base image for everything built from this release branch, not just K-EXAONE. If that is too broad for a post-release branch, the alternative is a K-EXAONE-specific dev image — but on v0.26.0 the branch cannot serve either K-EXAONE model through its native path. |
CI container verified on B200Pulled the image this PR built ( Compare against the same probe on the pre-bump pin ( So both commits are doing their job: the bump restores the native Ready for review from my side. |
|
/ok to test f505bbe |
|
/ok to test b472a97 |
b472a97 to
7ba2828
Compare
|
/ok to test 7ba2828 |
The patch-apply step could not fail. Two ways, both verified in a Linux container against
GNU patch 2.8:
- a `for` loop returns the status of its LAST command, so a patch that fails anywhere but
at the end was swallowed and the RUN exited 0;
- `ls /tmp/vllm_patches/*.patch 2>/dev/null` makes a missing, empty or renamed patch
directory expand to nothing, so the loop body never ran and the RUN exited 0 with zero
patches applied.
Either path produces an image that builds green and is simply not patched. That is the worst
possible outcome here, because the defect 01-exaone-moe-lm-head-prefix.patch fixes is itself
silent: an unpatched image starts normally and then dies during weight load with
RuntimeError: The size of tensor a (3072) must match the size of tensor b (6144)
which gives no hint that a container patch went missing.
Now: an unmatched glob is an error, a failing patch is an error, and the step logs each patch
it applies plus a final count. Kept POSIX -- the Dockerfile sets no SHELL, so RUN is /bin/sh
(dash) and shopt/pipefail are unavailable. Dropped `ls | sort`: shell glob expansion is
already lexically sorted, so filename ordering is preserved without parsing ls.
Verified all three paths in a container: one good patch -> exit 0, "applied 1 vLLM patch(es)";
first of two patches fails -> exit 1; empty patches dir -> exit 1.
…28.0 exactly The hunk was hand-trimmed and had drifted from the file it targets. Its header said @@ -513,6 +513,7 @@ -- correct counts for a 3+1+3 hunk -- but the body carried only two leading context lines, and the ParallelLMHead construction is at line 520 in v0.28.0, not 513. It still applied, because --fuzz=5 absorbed both problems. It was just matching approximately where it could match exactly: vLLM v0.28.0 (this branch's pin) before: offset 8 lines after: exact, no fuzz/offset vLLM v0.26.0 before: fuzz 2, offset -131 after: fuzz 1, offset -139 Note fuzz 2 on 0.26.0 is exactly GNU patch's default limit, so --fuzz=5 was not gratuitous -- but leaving no margin on the version we actually pin is a poor trade when the fix is free. Regenerated with `diff -u` against the real vllm/model_executor/models/exaone_moe.py from the upstream v0.28.0 tag. No change to what the patch does: the added line is identical. Commit message header above the hunk kept verbatim. Verified in a container with GNU patch 2.8 against both tags: applies, inserts exactly one prefix=maybe_prefix(prefix, "lm_head") line, and the patched file still parses as valid Python.
|
/ok to test 3fa9517 |
Image reference moves from a placeholder nvcr.io tag (which does not exist -- verified HTTP 404)
to the dev image that the published numbers were actually measured on, pinned by digest:
dynamoci.azurecr.io/ai-dynamo/dynamo@sha256:79a9d1b1... A digest is honest about what was run
where a mutable tag is not, and the tag is recorded in a comment beside it.
Two consequences of using a digest, both caught by server-side dry-run rather than by reading:
- the DGD CRD derives the runtime version from the image TAG, so a digest-only reference
fails validation with "runtimeVersionOverride is required when the specified main container
image has no parseable semantic-version tag". Added runtimeVersionOverride: "1.4.1" per
component.
- the dev registry is private, so imagePullSecrets has to come back. Both it and the override
are commented as belonging to the dev image and to be dropped with the public swap.
README follows the shipped-recipe structure (configurations, supported features, prerequisites,
quick start, performance, accuracy, configuration notes, limitations). It leads with the blocker
rather than burying it: these recipes cannot be run externally until ai-dynamo#14599 merges and a public
tag is cut.
Things the README states that are easy to get wrong and expensive to discover:
- the model is a reasoning model -- evaluate at temperature 0.6, not greedy, and read
.content // .reasoning_content, or a healthy deployment prints null
- first start is 40-120 minutes and silence is not a hang
- 8.8% KV reuse on the trace is capacity-bound, not misconfiguration, and is why KV-aware
routing shows no gain
- synthetic benchmarks report ~3x higher throughput for this model; do not compare them
- VLLM_SERVER_DEV_MODE is not shipped, so /reset_prefix_cache 404s -- restart between
measurement points instead of clearing in place
Verified: both manifests pass server-side dry-run; every flag value asserted in the README
matches the yaml; every linked path exists; both DGD names in the quick start exist in the
manifests. HF repo-ID resolution under HF_HOME/HF_HUB_OFFLINE was tested separately against a
staged HF cache layout -- AutoConfig, AutoTokenizer and chat_template all resolve.
Disaggregated trace results are still pending and marked as such.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Image reference moves from a placeholder nvcr.io tag (which does not exist -- verified HTTP 404)
to the dev image that the published numbers were actually measured on, pinned by digest:
dynamoci.azurecr.io/ai-dynamo/dynamo@sha256:79a9d1b1... A digest is honest about what was run
where a mutable tag is not, and the tag is recorded in a comment beside it.
Two consequences of using a digest, both caught by server-side dry-run rather than by reading:
- the DGD CRD derives the runtime version from the image TAG, so a digest-only reference
fails validation with "runtimeVersionOverride is required when the specified main container
image has no parseable semantic-version tag". Added runtimeVersionOverride: "1.4.1" per
component.
- the dev registry is private, so imagePullSecrets has to come back. Both it and the override
are commented as belonging to the dev image and to be dropped with the public swap.
README follows the shipped-recipe structure (configurations, supported features, prerequisites,
quick start, performance, accuracy, configuration notes, limitations). It leads with the blocker
rather than burying it: these recipes cannot be run externally until ai-dynamo#14599 merges and a public
tag is cut.
Things the README states that are easy to get wrong and expensive to discover:
- the model is a reasoning model -- evaluate at temperature 0.6, not greedy, and read
.content // .reasoning_content, or a healthy deployment prints null
- first start is 40-120 minutes and silence is not a hang
- 8.8% KV reuse on the trace is capacity-bound, not misconfiguration, and is why KV-aware
routing shows no gain
- synthetic benchmarks report ~3x higher throughput for this model; do not compare them
- VLLM_SERVER_DEV_MODE is not shipped, so /reset_prefix_cache 404s -- restart between
measurement points instead of clearing in place
Verified: both manifests pass server-side dry-run; every flag value asserted in the README
matches the yaml; every linked path exists; both DGD names in the quick start exist in the
manifests. HF repo-ID resolution under HF_HOME/HF_HUB_OFFLINE was tested separately against a
staged HF cache layout -- AutoConfig, AutoTokenizer and chat_template all resolve.
Disaggregated trace results are still pending and marked as such.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Image reference moves from a placeholder nvcr.io tag (which does not exist -- verified HTTP 404)
to the dev image that the published numbers were actually measured on, pinned by digest:
dynamoci.azurecr.io/ai-dynamo/dynamo@sha256:79a9d1b1... A digest is honest about what was run
where a mutable tag is not, and the tag is recorded in a comment beside it.
Two consequences of using a digest, both caught by server-side dry-run rather than by reading:
- the DGD CRD derives the runtime version from the image TAG, so a digest-only reference
fails validation with "runtimeVersionOverride is required when the specified main container
image has no parseable semantic-version tag". Added runtimeVersionOverride: "1.4.1" per
component.
- the dev registry is private, so imagePullSecrets has to come back. Both it and the override
are commented as belonging to the dev image and to be dropped with the public swap.
README follows the shipped-recipe structure (configurations, supported features, prerequisites,
quick start, performance, accuracy, configuration notes, limitations). It leads with the blocker
rather than burying it: these recipes cannot be run externally until ai-dynamo#14599 merges and a public
tag is cut.
Things the README states that are easy to get wrong and expensive to discover:
- the model is a reasoning model -- evaluate at temperature 0.6, not greedy, and read
.content // .reasoning_content, or a healthy deployment prints null
- first start is 40-120 minutes and silence is not a hang
- 8.8% KV reuse on the trace is capacity-bound, not misconfiguration, and is why KV-aware
routing shows no gain
- synthetic benchmarks report ~3x higher throughput for this model; do not compare them
- VLLM_SERVER_DEV_MODE is not shipped, so /reset_prefix_cache 404s -- restart between
measurement points instead of clearing in place
Verified: both manifests pass server-side dry-run; every flag value asserted in the README
matches the yaml; every linked path exists; both DGD names in the quick start exist in the
manifests. HF repo-ID resolution under HF_HOME/HF_HUB_OFFLINE was tested separately against a
staged HF cache layout -- AutoConfig, AutoTokenizer and chat_template all resolve.
Disaggregated trace results are still pending and marked as such.
Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
The frontend routes traffic and loads no weights, so it does not need the model-specific vLLM runtime build. Both targets now run nvcr.io/nvidia/ai-dynamo/dynamo-frontend:1.4.1 -- the same version the other 1.4.1 recipes use -- which makes the frontend half of each recipe publicly pullable and lets its podSpec drop runtimeVersionOverride (the tag is semver-parseable) and imagePullSecrets (no private registry). The workers still reference the interim internal build; that is unchanged and remains blocked on ai-dynamo#14599. Also fixes the Fern catalog, which advertised nvcr.io/nvidia/ai-dynamo/vllm-runtime:1.5.0-k-exaone-2.0-dev.1 for both targets. That tag does not exist -- the repo has no k-exaone tag at all, and 1.5.0 404s while 1.4.0/1.4.1 return 200 -- so the docs site was pointing at an unpullable image. The catalog now carries the same worker reference as the manifests, with the gap recorded. Verified: server-side dry-run accepts both manifests; the frontend image pulls anonymously on-cluster and `python3 -m dynamo.frontend` runs in it; the proof-of-life agg deployment is serving on it. Signed-off-by: Cheng Wang <[email protected]>
6a9d50d
into
ai-dynamo:release/1.4.1-k-exaone-2.0-750b-post.1
|
/ok to test 3fa9517 |
…ng image Points the aggregated recipe at nvcr.io/nvstaging/ai-dynamo/vllm-runtime:1.4.1-k-exaone-2.0-750b-post.1-rc.1, replacing the dynamoci.azurecr.io digest. Correct registry family and a tag that matches the release branch this work targets, so it is the reference to hand QA. Two things this does NOT do, stated plainly rather than implied: nvstaging is not anonymously pullable -- it returns 401 -- so this is still not a reproducible reference for an external reader, and the pull secret stays, renamed from acr-token-secret to ngc-secret with instructions. The recipe is reproducible only once a public nvcr.io/nvidia/ai-dynamo tag exists, which is blocked on ai-dynamo#14599. And rc.1 is NOT the build every published number was measured on. It differs from the validated image in 30 of 65 layers, with one real size change (layer 52, 26.6 -> 27.1 MB); rc.0 was byte-identical to the validated digest, rc.1 is not. The -rc tag is mutable by construction, so the index digest is recorded in a comment and must be pinned before this ships. The disaggregated target deliberately stays on the validated ACR digest until rc.1 has been sanity-run, so the two are not silently conflated. Signed-off-by: Cheng Wang <[email protected]>
Container PR on the
release/1.4.1-k-exaone-2.0-750b-post.1branch (per request to file container PRs on release branches).Problem
vllm/model_executor/models/exaone_moe.pyconstructsParallelLMHeadwithout aprefix, so it defaults to"".VocabParallelEmbedding.__init__then callsquant_config.get_quant_method(self, prefix=""), andis_layer_excluded("")matches none of an NVFP4 checkpoint's exclusion patterns.lm_headis therefore quantized and allocated as a packed NVFP4 param[vocab, hidden/2], which rejects an unquantized BF16lm_head.weight:Proven CPU-only against the checkpoint's own quantization config:
Only manifests for checkpoints that exclude
lm_headfrom quantization, which is why BF16-validated support PRs never hit it.Changes
Three files:
container/deps/vllm/patches/01-exaone-moe-lm-head-prefix.patch(new) — addsprefix=maybe_prefix(prefix, "lm_head").container/templates/vllm_runtime.Dockerfile— appliescontainer/deps/vllm/patches/*.patchinto site-packages (patch --fuzz=5 -p1, filename order, cuda only).container/context.yaml—runtime_image_tagv0.26.0-ubuntu2404→v0.28.0-ubuntu2404. See "Scope of the base-image bump" below; this is the part most worth a maintainer's attention.Patch verified to apply to both vLLM 0.26.0 and 0.28.0;
maybe_prefixis already imported in both.Scope of the base-image bump
The bump is not incidental to the patch — it is required, and it affects every framework user of this branch, so please review it on its own terms.
Why it is needed: this branch pinned vLLM
v0.26.0, whose model-registry key is misspelled —registry.pyhas"ExaoneMoEForCausalLM"(capitalEinMoE), while bothLGAI-EXAONE/K-EXAONE-236B-A23BandK-EXAONE-2.0-750B-A37Bdeclarearchitectures: ["ExaoneMoeForCausalLM"]._ModelRegistry._normalize_archdoes an exact dict lookup with no case folding, so the architecture never resolves on 0.26.0. v0.28.0 has the corrected key. Thelm_headpatch alone is therefore not sufficient on this branch.What that means for review: this is a two-minor-version jump on a release branch. The test evidence below is K-EXAONE-specific; I have not validated other models against 0.28.0 on this branch. If that is a concern, the alternative is cherry-picking the registry-key fix onto 0.26.0 instead of bumping — happy to do that if preferred.
Test results (K-EXAONE-2.0-750B-A37B-NVFP4, B200 TP4)
--quantizationvllm serve0.28.0Extended soak on the image built from this PR head. The CI image for
7ba2828b(…:1.4.1-ci-7ba2828b…-vllm-runtime) has since served K-EXAONE-2.0-750B-A37B-NVFP4 continuously for several days on 4×/8× B200, aggregated and disaggregated, covering:No load-path or numerical issue attributable to the patch or to the 0.28.0 bump appeared in any of it.
CI status
Checks are red, and I believe none of it is attributable to this change. Evidence:
sglang-runtime / Test cuda13.0, amd64andtrtllm-runtime / Test cuda13.1, amd64fail with the identical error, and this PR touches neither. The diff is three files, all vLLM-specific: a new patch, the vLLM Dockerfile's apply step, and thevllm:block ofcontainer/context.yaml.The error in every case is a local composite action failing to resolve, after the image has built and passed its sanity check:
.github/actions/pytest-local/action.ymlis present on the base branch, so this is a workspace/checkout problem on the runner, not a missing file.Same commit, same workflow:
sglang-runtime / Test arm64andtrtllm-runtime / Test arm64pass while their amd64 counterparts fail. A defect in the diff would not be arch-selective like that.fix(container/vllm): patch exaone_moe lm_head prefix so K-EXAONE 2.0 NVFP4 loads #14569 — the same code change against
main— fails a similardynamo-runtime+ status-check family, which suggests a shared pre-existing condition rather than anything specific to this branch.I have re-run the failed jobs. If they stay red, I would appreciate a maintainer re-running them from an in-repo branch, since this is a fork PR and that is the most likely difference.
This patch is a bridge
The real fix belongs upstream in vLLM —
exaone_moe.pyalready importsmaybe_prefixand uses it for"model"a few lines above, andqwen3_moe.py/exaone4.pyboth pass the prefix correctly. Current vLLMmainis still unfixed.Related: #14569 is the same change targeting
main.🤖 Generated with Claude Code