Skip to content

[Model Loader] Keep norm layers neutral under dummy weight init - #61323

Merged
WoosukKwon merged 1 commit into
mainfrom
woosuk/dummy-norm-neutral
Oct 13, 2026
Merged

WoosukKwon merged 1 commit into
mainfrom
woosuk/dummy-norm-neutral

Conversation

@WoosukKwon

@WoosukKwon WoosukKwon commented Oct 13, 2026 •

Copy link
Copy Markdown
Collaborator

Overview

Keep normalization layers neutral under --load-format dummy: RMSNorm, LayerNorm, RMSNormGated and GemmaRMSNorm tag their parameters with dummy_weight_value (their identity value), so dummy init no longer fills them with ±1e-3. Follow-up to #61134 (dtype-aware dummy init).

Claims

  • Dummy-loaded norms are identity-like (weight 1, bias 0; Gemma's 1 + w weight 0) instead of random ±1e-3.
  • Activations then keep a realistic scale, so data-dependent kernels time like they do with real weights. On DeepSeek-V4.1-Flash prefill, the sparse indexer's topKPerRowPrefill takes 27.8 ms per forward with dummy weights on main, 10.7 ms with this PR, and 10.6 ms with real weights.
  • Only dummy initialization changes; checkpoint loading is unaffected.

Validation

DeepSeek-V4.1-Flash (40 layers), TP4 + EP on 4x GB200, MegaMoE, FlashInfer sparse MLA, MXFP4 indexer cache. One prefill step: 8 requests x 1024 new tokens at ~100K context each. GPU kernel time per forward from a profiled CUDA-graph replay of the model forward (3 replays):

Weights topKPerRowPrefill (ms/forward) Forward (ms, median of 100 replays)
dummy, main (norms ±1e-3) 27.84 136.0
dummy, this PR 10.68 120.3
real checkpoint 10.64 124.1

The remaining forward gap to real weights is MoE routing (real routing from random token IDs vs. a balanced fixture), not this change. All other kernels differ by under 1 ms between this PR and real weights.

These numbers come from an exact-shape forward benchmark that isn't upstream yet; the per-kernel effect can also be seen in an nsys profile of any long-context DeepSeek-V4.1 prefill with --load-format dummy.

Unit test (in .buildkite/test_areas/model_executor.yaml):

pytest tests/model_executor/test_weight_utils.py -q
43 passed

test_dummy_norm_weights_are_neutral fails on main (RMSNorm weight stays random) and passes with this PR.

No model evaluation: only --load-format dummy values change.

Details

  • Root cause. With norm weights in ±1e-3, every normalized sublayer input shrinks by ~1000x and loses structure. DeepSeek-V4.1's indexer query ends up near zero, and after FP8/MXFP4 quantization its logits collapse onto a few values with many exact ties. topKPerRowPrefill is a data-dependent radix select, so these degenerate logits are its slow case; real models never produce them.
  • Mechanism. Reuses the existing dummy_weight_value hook in initialize_single_dummy_weight, as DeepSeek-V4.1's engram already does for its own weights. Each norm declares the value its constructor already uses.
  • Limitation. Model-local norm classes that don't build on these four layers keep random dummy values.
  • Behavior change. Dummy-weight benchmarks of models with data-dependent kernels (sparse top-k, etc.) shift toward their real-weight timings.

Pull Request Checklist
  • I used vLLM's /pr-checklist skill. (Mandatory for agents, optional for humans).

  • AI assistance was used during the creation of this PR.

  • Design Fit: Minimizes impact on core components, reuses existing functionality, and justifies added complexity.

  • Testing and Validation: Validates the change and ensures any added tests are meaningful and reliable, with CI coverage or documented CI resource constraints and validation performed outside CI.

  • Code Quality and Style: Keeps code and comments clear and concise, and updates relevant documentation and examples.

  • Pull Request Contents: Includes a brief summary and relevant links, supports claims with evidence, explains root causes and implementation trade-offs, and follows the contributing guide.

Not a duplicate: open PRs were searched for dummy norm initialization (dummy RMSNorm weight, dummy_weight_value norm, dummy init layernorm, load-format dummy norm weights); none change it.

AI assistance (Claude Code) was used to write this change and to run the tests and validation above.

🤖 Generated with Claude Code

Random +-1e-3 norm weights shrink every activation, which makes
data-dependent kernels (e.g. sparse indexer top-k) time far from real
weights. Norm layers now declare their identity value as
dummy_weight_value.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
@WoosukKwon WoosukKwon added the ready ONLY add when PR is ready to merge/full CI is needed label Oct 13, 2026
@WoosukKwon
WoosukKwon marked this pull request as ready for review October 13, 2026 03:51

@claude claude 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.

Claude Code Review

This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.

Tip: disable this comment in your organization's Code Review settings.

@WoosukKwon

Copy link
Copy Markdown
Collaborator Author

/ci run

@github-actions

Copy link
Copy Markdown

✅ Triggered Buildkite CI #94370 for commit 52774a958c42.

@khluu

khluu commented Oct 13, 2026

Copy link
Copy Markdown
Member

Main CI found a related regression after #61134 merged, so this PR needs exact E2E Core validation before merge.

In main #94362, both NVIDIA H200 MIG18 E2E Core shard 1 and AMD MI250 E2E Core fail:

  • tests/v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv1
  • tests/v1/e2e/general/test_mamba_prefix_cache.py::test_mamba_prefix_cache_mrv1_async

Both platforms report ValueError: Mamba state is not equal for key: 576 at index 0. The tests use --load-format dummy with Qwen/Qwen3-Next-80B-A3B-Instruct-FP8. #61134's PR build #94334 did not run these lanes; they first reappeared in #94362.

This norm-neutral change may or may not repair the failure—the causal boundary still needs a hardware gate. Please run and require both exact H200 e2e-core-1-gpu shards and AMD amd-e2e-core-1-gpu, and confirm the two MRV1 tests pass on this head.

@vllm-agent

Copy link
Copy Markdown
Collaborator

CI selector (shadow): 141 test steps (187 jobs) instead of 64 (80 jobs)

Shadow mode: this changes nothing about what CI runs. It shows what the evidence-based selector would pick for this PR, next to today's rules. How it works.

Feedback welcome: reply here if it would skip a step this change needs, or runs something unrelated.

steps (jobs) Today's rules Selector Would skip Would add
NVIDIA, CPU and others 64 (80) 141 (187) 6 (11) 83 (118)
AMD mirrors 73 (103) 132 (184) 6 (6) 65 (87)
Selector would run (141)
  • amd-kernels-mi355
  • amd-lm-eval-small-models-harness
  • amd-qwen3-next-mtp-async-eplb-accuracy
  • async-engine-inputs-utils-worker
  • basic-correctness ×2
  • basic-correctness-cpu-offload
  • basic-correctness-cumem
  • basic-correctness-prefetch-offload
  • basic-correctness-sleep-mode
  • basic-models-test-other-cpu
  • basic-models-tests-extra-initialization ×14
  • basic-models-tests-initialization
  • basic-models-tests-other
  • batch-invariance-b200
  • batch-invariance-h100
  • benchmarks-cli-test
  • cpu-multimodal-config
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus
  • cudagraph
  • distributed-compile-comm-4-gpus
  • distributed-compile-rpc-tests-2-gpus
  • distributed-compile-unit-tests-2xh100
  • distributed-dp-tests-2-gpus
  • distributed-dp-tests-4-gpus
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus
  • distributed-model-tests-2-gpus ×3
  • distributed-mooncakeconnector-pd-accuracy-4-gpus
  • distributed-nixlconnector-pd-accuracy-4-gpus
  • distributed-torchrun-examples-4-gpus
  • distributed-torchrun-shutdown-tests-2-gpus
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus
  • e2e-core-1-gpu
  • e2e-core-large-memory
  • e2e-scheduling-1-gpu
  • e2e-scheduling-accuracy-1-gpu
  • elastic-ep-scaling-test
  • engine
  • engine-1-gpu
  • entrypoints-integration-api-server ×4
  • entrypoints-integration-api-server-generate
  • entrypoints-integration-api-server-openai-chat_completion
  • entrypoints-integration-api-server-openai-completion
  • entrypoints-integration-llm
  • entrypoints-integration-multimodal
  • entrypoints-integration-pooling
  • entrypoints-integration-responses-api
  • entrypoints-integration-speech_to_text
  • entrypoints-unit-tests
  • examples
  • extract-hidden-states-integration
  • extract-hidden-states-integration-2-gpus
  • fault-tolerance-e2e-2xh100
  • fusion-e2e-config-sweep-h100
  • fusion-e2e-quick-h100
  • fusion-e2e-tp2-ar-rms-config-sweep-h100
  • fusion-e2e-tp2-ar-rms-dynamo-partition-amd
  • fusion-e2e-tp2-ar-rms-inductor-partition-amd
  • fusion-e2e-tp2-b200
  • fusion-e2e-tp2-quick-h100
  • glm5next-unit-tests
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus
  • kernels-b200 ×3
  • kernels-core-operation-test ×3
  • kernels-deepgemm-test-h100
  • kernels-fla-ops-test-b200
  • kernels-mamba-test
  • kernels-mhc-test-b200
  • kernels-root-misc-test-b200
  • kimi-k3-prefix-cache-4xb200 ×2
  • kv-offload-large
  • kv-offload-medium
  • kv-offload-small
  • language-models-tests-extra-standard ×2
  • language-models-tests-granite-l4-compatibility
  • language-models-tests-hybrid ×2
  • language-models-tests-standard
  • lm-eval-dspark-watermark-2xh100
  • lm-eval-small-models
  • lm-eval-turboquant-k3v4nc
  • lm-eval-turboquant-k8v4
  • lm-eval-turboquant-t3nc
  • lm-eval-turboquant-t4nc
  • lm-eval-watermarking
  • lora ×4
  • lora-tp-distributed ×4
  • metrics-tracing-2-gpus
  • model-executor
  • mooncake-ec-tcp-e2e-2-gpus
  • mrcr-eval-small-models
  • multi-modal-accuracy-eval-small-models
  • multi-modal-models-standard-1-qwen2
  • multi-modal-models-standard-2-qwen3-gemma
  • multi-modal-models-standard-3-llava-qwen2-vl
  • multi-modal-models-standard-4-other-whisper
  • multi-modal-processor ×4
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus
  • nixlconnector-pd-edge-cases-2-gpus
  • openai-api-correctness
  • pipeline-context-parallelism-4-gpus
  • plugin-tests-2-gpus
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus
  • pytorch-compilation-dynamic-shapes
  • pytorch-compilation-passes-unit-tests
  • pytorch-compilation-unit-tests
  • pytorch-compilation-unit-tests-h100
  • pytorch-fullgraph-cudagraph-l4-compatibility
  • pytorch-fullgraph-test
  • quantization ×4
  • quantized-models-test
  • quantized-moe-test-b200
  • rayexecutorv2-4-gpus
  • regression
  • replayssm-e2e
  • rust-frontend-core-correctness
  • rust-frontend-distributed
  • rust-frontend-openai-coverage
  • rust-frontend-serve-admin-coverage
  • rust-frontend-tool-use
  • samplers-multimodal-beam-search
  • samplers-test
  • scale-out-ec-e2e-2-gpus
  • sharded-rdt-weight-transfer
  • spec-decode-draft-model ×4
  • spec-decode-eagle-1-deepseek-qwen
  • spec-decode-eagle-2-llama3-qwen-vl-other
  • spec-decode-mtp-deepseek-mimo
  • spec-decode-mtp-gemma4
  • spec-decode-mtp-qwen3-5
  • spec-decode-ngram-suffix
  • spec-decode-speculators
  • v1-attention-b200 ×2
  • v1-attention-h100-mi300 ×2
  • v1-core
  • v1-executor-worker
  • v1-kv-connectors ×4
  • v1-logits-oracle
  • v1-metrics-lmeval
  • v1-sample
  • v1-spec-decode
Would skip (today's rules run them) (6)
  • ascend-npu-test
  • cpu-language-generation-and-pooling-model-tests ×3
  • fusion-and-compile-unit-tests-2xb200
  • multi-modal-processor-cpu ×4
  • rl-entrypoints-tests
  • v1-kv-offload
Would add (today's rules do not run them) (83)
  • amd-kernels-mi355 (Python record)
  • amd-lm-eval-small-models-harness (Python record)
  • amd-qwen3-next-mtp-async-eplb-accuracy (Python record)
  • basic-models-tests-extra-initialization ×14 (Python record)
  • cpu-multimodal-config (Python record)
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • cudagraph (Python record)
  • distributed-compile-comm-4-gpus (Python record)
  • distributed-compile-rpc-tests-2-gpus (Python record)
  • distributed-dp-tests-2-gpus (Python record)
  • distributed-dp-tests-4-gpus (Python record)
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-model-tests-2-gpus ×3 (Python record)
  • distributed-mooncakeconnector-pd-accuracy-4-gpus (Python record)
  • distributed-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-torchrun-examples-4-gpus (Python record)
  • distributed-torchrun-shutdown-tests-2-gpus (Python record)
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • e2e-core-1-gpu (Python record)
  • e2e-core-large-memory (Python record)
  • e2e-scheduling-1-gpu (Python record)
  • e2e-scheduling-accuracy-1-gpu (Python record)
  • elastic-ep-scaling-test (Python record)
  • engine (Python record)
  • engine-1-gpu (Python record)
  • entrypoints-unit-tests (Python record)
  • examples (Python record)
  • extract-hidden-states-integration (Python record)
  • extract-hidden-states-integration-2-gpus (Python record)
  • fault-tolerance-e2e-2xh100 (Python record)
  • glm5next-unit-tests (Python record)
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus (Python record)
  • kernels-b200 ×3 (Python record)
  • kernels-core-operation-test ×3 (code map)
  • kernels-deepgemm-test-h100 (Python record)
  • kernels-mamba-test (code map)
  • kimi-k3-prefix-cache-4xb200 ×2 (Python record)
  • kv-offload-large (Python record)
  • kv-offload-medium (Python record)
  • kv-offload-small (Python record)
  • language-models-tests-extra-standard ×2 (Python record)
  • lm-eval-dspark-watermark-2xh100 (Python record)
  • lm-eval-small-models (Python record)
  • lm-eval-turboquant-k3v4nc (Python record)
  • lm-eval-turboquant-k8v4 (Python record)
  • lm-eval-turboquant-t3nc (Python record)
  • lm-eval-turboquant-t4nc (Python record)
  • lm-eval-watermarking (Python record)
  • lora ×4 (Python record)
  • lora-tp-distributed ×4 (Python record)
  • mooncake-ec-tcp-e2e-2-gpus (Python record)
  • mrcr-eval-small-models (Python record)
  • multi-modal-accuracy-eval-small-models (Python record)
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus (Python record)
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus (Python record)
  • nixlconnector-pd-edge-cases-2-gpus (Python record)
  • openai-api-correctness (Python record)
  • pipeline-context-parallelism-4-gpus (Python record)
  • plugin-tests-2-gpus (Python record)
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus (Python record)
  • quantization ×4 (Python record)
  • quantized-models-test (Python record)
  • quantized-moe-test-b200 (Python record)
  • rayexecutorv2-4-gpus (Python record)
  • replayssm-e2e (Python record)
  • rust-frontend-core-correctness (Python record)
  • rust-frontend-distributed (Python record)
  • rust-frontend-openai-coverage (Python record)
  • rust-frontend-serve-admin-coverage (Python record)
  • rust-frontend-tool-use (Python record)
  • scale-out-ec-e2e-2-gpus (Python record)
  • sharded-rdt-weight-transfer (Python record)
  • spec-decode-draft-model ×4 (Python record)
  • spec-decode-eagle-1-deepseek-qwen (Python record)
  • spec-decode-eagle-2-llama3-qwen-vl-other (Python record)
  • spec-decode-mtp-deepseek-mimo (Python record)
  • spec-decode-mtp-gemma4 (Python record)
  • spec-decode-mtp-qwen3-5 (Python record)
  • spec-decode-ngram-suffix (Python record)
  • spec-decode-speculators (Python record)
  • v1-attention-b200 ×2 (Python record)
  • v1-attention-h100-mi300 ×2 (Python record)
AMD mirrors: would skip (6)
  • batch-invariance-a100
  • batch-invariance-b200
  • batch-invariance-h100
  • platform-tests
  • rl-entrypoints-tests
  • v1-kv-offload
AMD mirrors: would add (65)
  • crosslayer-kv-layout-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • cudagraph (Python record)
  • distributed-compile-comm-4-gpus (Python record)
  • distributed-compile-rpc-tests-2-gpus (Python record)
  • distributed-dp-tests-2-gpus (Python record)
  • distributed-dp-tests-4-gpus (Python record)
  • distributed-flashinfer-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-mooncakeconnector-pd-accuracy-4-gpus (Python record)
  • distributed-nixlconnector-pd-accuracy-4-gpus (Python record)
  • distributed-torchrun-examples-4-gpus (Python record)
  • distributed-torchrun-shutdown-tests-2-gpus (Python record)
  • dp-ep-distributed-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • e2e-core-1-gpu (Python record)
  • e2e-core-large-memory (Python record)
  • e2e-scheduling-1-gpu (Python record)
  • e2e-scheduling-accuracy-1-gpu (Python record)
  • engine (Python record)
  • engine-1-gpu (Python record)
  • entrypoints-unit-tests (Python record)
  • examples (Python record)
  • extract-hidden-states-integration (Python record)
  • extract-hidden-states-integration-2-gpus (Python record)
  • glm5next-unit-tests (Python record)
  • hybrid-ssm-nixlconnector-pd-accuracy-tests-4-gpus (Python record)
  • hybrid-ssm-nixlconnector-pd-prefix-cache-2-gpus (Python record)
  • jit-monitor-no-runtime-jit (Python record)
  • kernels-core-operation-test ×3 (code map)
  • kernels-mamba-test (code map)
  • kernels-moe-test ×5 (Python record)
  • kernels-quantization-test ×6 (Python record)
  • kv-offload-large (Python record)
  • kv-offload-medium (Python record)
  • kv-offload-small (Python record)
  • lm-eval-dspark-watermark-2xh100 (Python record)
  • lm-eval-small-models (Python record)
  • lm-eval-turboquant-k3v4nc (Python record)
  • lm-eval-turboquant-k8v4 (Python record)
  • lm-eval-turboquant-t3nc (Python record)
  • lm-eval-turboquant-t4nc (Python record)
  • lm-eval-watermarking (Python record)
  • lora ×4 (Python record)
  • lora-tp-distributed ×4 (Python record)
  • mooncake-ec-tcp-e2e-2-gpus (Python record)
  • mrcr-eval-small-models (Python record)
  • multi-modal-accuracy-eval-small-models (Python record)
  • multiconnector-nixl-offloading-pd-accuracy-2-gpus (Python record)
  • multiconnector-nixl-offloading-pd-edge-cases-2-gpus (Python record)
  • nixlconnector-pd-edge-cases-2-gpus (Python record)
  • nixlconnector-pd-spec-decode-acceptance-2-gpus (Python record)
  • plugin-tests-2-gpus (Python record)
  • push-nixlconnector-pp-prefill-pd-accuracy-4-gpus (Python record)
  • quantization ×4 (Python record)
  • quantized-models-test (Python record)
  • quantized-moe-test-b200 (Python record)
  • qwen4-exp-unit-tests (code map)
  • rayexecutorv2-4-gpus (Python record)
  • rust-frontend-core-correctness (Python record)
  • rust-frontend-distributed (Python record)
  • rust-frontend-openai-coverage (Python record)
  • rust-frontend-serve-admin-coverage (Python record)
  • rust-frontend-tool-use (Python record)
  • scale-out-ec-e2e-2-gpus (Python record)
  • sharded-rdt-weight-transfer (Python record)
  • v1-attention-b200 ×2 (Python record)
  • v1-attention-h100-mi300 ×2 (Python record)

2 changed files · base df6c7ad031 · head 52774a958c · Python record: build 93039 at 1e5d0ea888 · kernel record: table fe341a5 (build 94315), map fe341a5 · not counted: 11 build steps, 5 A100 steps the generator no longer emits, 113 optional steps the selector would also run

@khluu

khluu commented Oct 13, 2026

Copy link
Copy Markdown
Member

Update: the automatic MI250 replacement in main #94362 also failed both MRV1 variants with the identical key-576 mismatch. We now have three independent exact failures (H200 once, MI250 twice), so this is deterministic rather than retry noise.

The selector shadow on this PR confirms e2e-core-1-gpu is only in Would add; today's rules will not run it. A normal green /ci run therefore will not establish the fix. Please explicitly unblock/run H200 E2E Core shard 1/2 and AMD E2E Core on this head and verify both MRV1 variants before merge.

@WoosukKwon
WoosukKwon merged commit ac71b17 into main Oct 13, 2026
183 checks passed
@WoosukKwon
WoosukKwon deleted the woosuk/dummy-norm-neutral branch October 13, 2026 15:54
AndreasKaratzas pushed a commit to AndreasKaratzas/vllm that referenced this pull request Oct 16, 2026
…-project#61323)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>

Signed-off-by: Andreas Karatzas <AndreasKaratzas@users.noreply.github.com>
michael-gpu pushed a commit to practical-inference/vllm-ampere-extended that referenced this pull request Oct 20, 2026
…-project#61323)

Signed-off-by: Woosuk Kwon <woosuk@inferact.ai>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

3 participants