executor: extend registry shim + parity diagnostic (Phase 4 step 2)#40
Merged
Merged
Conversation
…ity log Phase 4 incremental step 2 — align the Phase-2 WeightRegistry shim with the StoragePlanner enumeration landed in #38. New registry handles: - Per-layer w_{gate,up,down}_shared (TensorKind W_GATE/W_UP/W_DOWN) — Nemotron / DeepSeek / Qwen3.5-MoE shared-expert FFN - Top-level tok_emb_ (TOK_EMBED) New TensorID fields: TransformerLayer::{w_gate,w_up,w_down}_shared_id, Model::tok_emb_id. Default kInvalidTensorID, no consumer uses them yet. Phase-4 parity diagnostic: at end of pre_dequant_weights, compare the registry handle count against the number of plan entries at wcache- capable tiers (FP16/FP8/NVFP4/CUTLASS_NVFP4/MXFP4). FP32-only kinds (norms, rope_freqs) are excluded to make the comparison apples-to-apples. Observed on Qwen3-4B Q4_K_M: registry=38 handles vs plan=254 wcache-tier entries (diff=216). This is expected — the shim still only registers the short canonical field list. The diagnostic is what drives the next step: extending registration until the diff converges to 0. No behavioral change. 160/160 unit tests pass. Real-model smoke test on Qwen3-4B: coherent output, ~128 tok/s decode (no regression).
This was referenced Apr 23, 2026
kekzl
added a commit
that referenced
this pull request
Apr 30, 2026
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
pre_dequant_weightsto register shared-expert FFN (w_{gate,up,down}_shared) and the token embedding, matching the StoragePlanner enumeration landed in storage-planner: enumerate shared-expert FFN + top-level embeddings/LM head #38.TensorIDfields toTransformerLayer(w_{gate,up,down}_shared_id) andModel(tok_emb_id). DefaultkInvalidTensorID; no consumer reads them yet.registry_.size()against the count of plan entries at wcache-capable tiers. FP32-only kinds (norms, rope_freqs) are filtered out so the comparison is apples-to-apples.Observed signal
On Qwen3-4B Q4_K_M today the diagnostic prints:
A real, actionable gap. Subsequent steps extend the registry until this converges to 0 — which is the exit condition for the Phase-4 storage flip.
Test plan
imp-testsfull unit filter: 160 / 160 pass (2 model-dependent skipped)