diff --git a/.agents/model-matrix.md b/.agents/model-matrix.md index 010564d82..6cb4093ae 100644 --- a/.agents/model-matrix.md +++ b/.agents/model-matrix.md @@ -19,8 +19,10 @@ a practical unit that one agent can spike without silently dropping aliases. ## Architecture-support checklist At-a-glance view of which architectures we have actually engaged, and how far. -**326 architecture rows are inventoried at the pin, plus 1 beyond-pin row -(`KimiK3ForConditionalGeneration`, released after the pin) = 327 total**; 43 are +**326 architecture rows are inventoried at the pin, plus 2 beyond-pin rows +(`KimiK3ForConditionalGeneration`, released after the pin, and `MiniMaxH3DiTModel`, +which is a DIFFUSION architecture living in the separate `vllm-omni` repository) += 328 total**; 44 are past `INVENTORIED` (engaged), the remaining 284 are known-but-not-started long tail. Every mark below is grounded in the row's lifecycle `State` cell plus its ledger evidence, and this section is CI-enforced against those rows by @@ -43,15 +45,15 @@ Rollup by lifecycle state (must equal the detailed per-state row counts): |---|---| | ACTIVE | 24 | | GATING | 1 | -| PARTIAL | 3 | +| PARTIAL | 4 | | READY | 0 | | SPIKE | 7 | | BLOCKED | 5 | | INVENTORIED | 284 | | DONE | 3 | -| **Total** | **327** | +| **Total** | **328** | -Engaged architectures (the 43 non-`INVENTORIED` rows): +Engaged architectures (the 44 non-`INVENTORIED` rows): | Support | Architecture | Family / example | Status | Row | |---|---|---|---|---| @@ -79,6 +81,7 @@ Engaged architectures (the 43 non-`INVENTORIED` rows): | βœ… | `Glm4MoeLiteForCausalLM` | GLM-4.7-Flash (31.2B MLA + GLM MoE) | SACRED gate 8/8 vs vLLM 0.25.0 (STRICT token-exact 1/8 + near-tie-band 7/8, 69/128 tokens strictly exact, max teacher-forced gap 0.0 nats, 0 forward-divergent; vLLM K=5 self-deterministic β†’ STRICT bar); FIRST e2e coverage of the q_lora query branch AND the noaux_tc sigmoid router (closes the MLA campaign's two gaps, C2); speed pending | `MODEL-TEXT-glm4-moe-lite-glm4-moe-lite-for-causal-lm` | | πŸ“‹ | `KimiLinearForCausalLM` | Kimi-Linear | MLA half unlocked by the shared MLA campaign; the full model is not gated, row stays `SPIKE` | `MODEL-TEXT-kimi-linear-kimi-linear-for-causal-lm` | | πŸ“‹ | `KimiK3ForConditionalGeneration` | Kimi K3 (2.8T MoE + MoonViT-V2, DERIVE-AND-SHIP) | **W2/W5 CPU scaffolding landed** (registry stub + nested text/vision/quant config descent + text-backbone structural name-map + REFUSE-by-name forward + MXFP4-refuse loader; clean CPU build, scaffold gate 6/6). text backbone IS `KimiLinearForCausalLM` (KDA+MLA+MoE hybrid, HEAVY reuse); **does NOT fit GB10 (~1.56 TB MXFP4, ~12Γ—)** and NOT in the pinned oracle β‡’ no on-box golden β€” DERIVED, proxy-gated on Kimi-Linear-48B; forward + MXFP4 + KDA delta + MoonViT-V2 not implemented (NOT-YET-BUILDABLE) | `MODEL-MM-kimi-k3-kimi-k3-for-conditional-generation` | +| 🚧 | `MiniMaxH3DiTModel` | MiniMax-H3 (33.1B omni-modal video+audio DiT, DERIVE-AND-SHIP) | **W1/W2 landed**: packed layout (fl2va + ref2va, fp64 position grid BIT-EXACT), latent packing, euler-ancestral eta0 scheduler, and the full DiT forward all parity-gated against the UPSTREAM vLLM-Omni modules executed at reduced dimensions (**max abs diff 1.6e-7**, 10/10 cases / 2539 assertions). NOT autoregressive (no KV cache, no sampler, no logits) and **e2e HW-BLOCKED** (~354 GB checkpoint, ~133 GB/rank on 4x B300 vs 119 GiB unified); bf16 production stream + request planning + the ComfyUI-GGUF arm also landed (535 REAL tensors resolve onto our contract, geometry from shapes alone). **HW verdict CORRECTED: quantized arms FIT (~41 GB in 119 GiB)**, so e2e + speed are reachable; encoder/VAEs/audio VAE DONE (4.2e-9 vs the checkpoint's remote code); NVFP4 layout GATED as identical to ours (speed path is loader wiring); BOTH VAE DECODERS done (audio 4.2e-9, video ViT3D 8.9e-8); video tiling + 3D-CNN encoder (conditioning only) pending; encoder TEXT tower done (1.2e-7); **serving `/v1/videos` DONE and the DEVICE-RESIDENT forward (W2b, f32) LANDED + GPU-VERIFIED on Thor sm_110 at video 1.49e-7 / audio 8.94e-8**; bf16 stream + fusion folds + the FP4 path (needs sm_121a) + a real-checkpoint run pending. **2026-08-05: the AUDIO-VAE ENCODER is ported** (DAC analysis stack + `pre_block` AttnProjection + `mean_proj`, gated stage by stage vs the checkpoint's own remote code at 2.98e-8 / 1.64e-7 / 1.86e-8) with its own checkpoint loader gated on the real 1087-tensor manifest β€” so **ref2va AUDIO and VIDEO+AUDIO references are now WIRED** (audio rows move by 0.51 / 0.71; a different waveform still moves them by 7.1e-4). Both VAEs are now complete in both directions | `MODEL-DIFFUSION-minimax-h3-mini-max-h3-dit` | | βœ… | `LagunaForCausalLM` | Poolside Laguna-S-2.1 (118B/8B MoE) | **NVFP4 W4A4 ARM RAN on GB10 (N4, 2026-08-01, `CLAIM-LAGUNA-NVFP4-N4`): the additive safetensors NVFP4 arm (N1a/N1b/N2/N3 β€” `Nvfp4Weight` expert fields + `LoadLagunaForCausalLMWeights` + `LqGemmNvfp4Fp4` per-expert TRUE-W4A4 + `LagunaFfnBlock` `fp4` branch + `laguna_gen` dir-autodetect; CPU-gated `test_laguna_nvfp4_loader` 3/3Β·61, GGUF path byte-identical) generates COHERENTLY on the real 67 GiB `poolside/Laguna-S-2.1-NVFP4`. vs the vLLM MARLIN golden (vLLM's exact prompt ids injected): FIRST 2 TOKENS MATCH exactly, then near-tie divergence (our TRUE-W4A4 fp4-activations vs the MARLIN golden's W4A16 bf16-activations β€” different precision, EXPECTED; shares golden vocab). SPEED (N5, trace-driven, 2026-08-01): 0.16 β†’ ~4.5 tok/s (~28Γ— THIS SESSION), now ~4Γ— from vLLM 18.8. **Lever #2** (nsys found the bf16 tower running host `MatmulNK` on the CUDA queue): route it to the GPU (`LqGemm` bf16 β†’ `CastBf16` + `MatmulBT`, weight stays bf16) β†’ 6.34 β†’ 0.39 s/tok (16Γ—). **Lever #1** (nsys found the emulation expert GEMM at 92%, GPU 87% busy): the engine's native sm120a fp4 tensor-core MMA (`MatmulNvfp4Fp4Native`) reads the SAME linear scales β€” it was gated OFF behind `VT_NVFP4_FP4_NATIVE`; default it ON in the driver β†’ 0.39 β†’ ~0.20-0.24 s/tok (~2Γ—). Both coherent + near-tie (byte-identical ids to emulation; first token matches golden). Two GB10 memory fixes landed to run (shard-release + context-before-load). OPEN #234 (remaining ~4Γ—): grouped W4A4 MoE (top_kΓ—3 launches β†’ 3), `ResidentNvfp4`, decode CUDA-graph + on-GPU sampling (the host-orchestration tail). Spec `.agents/specs/laguna-nvfp4-arm-2026-07-31.md` Β§N4/Β§N5. The GGUF-Q4_K track (below) is the separate keep-quant vehicle.** Prior **FASTER DECODE (W9, 2026-07-31, `CLAIM-LAGUNA-W9-GROUPED`): the 30 un-grouped per-expert keep-quant GEMV launches/step (top_k Γ— {gate,up,down} `LqGemmRowSlice`) fold onto the SHARED `vt::MatmulBTQuantGrouped` op β€” per token, Pk experts' gate/up/down each collapse to ONE grouped launch over the already-stacked `[E*N,H]` tower (no loader change). Same-binary A/B on real UD-Q4_K_XL (GB10, `--gpu`, drop_caches cold, 24 tok): grouped (`VT_LAGUNA_GROUPED_MOE=1`, default) == per-expert (`=0`) BYTE-IDENTICAL (md5 `754728c6`, both == W6 golden) + decode 0.18 β†’ 0.13 s/tok (1.38Γ—). Routes through the shared vt op (fold policy). Cumulative with W8: decode 0.66 β†’ 0.13 s/tok (5.1Γ—; 1.5 β†’ 7.7 tok/s; 18Γ— β†’ 3.6Γ— vs llama.cpp 27.8). Next lever: device-resident decode (#1). See spec Β§W9.** Prior **FASTER DECODE (W8, 2026-07-31, `CLAIM-LAGUNA-W8-EMBED`): `LagunaEmbed` no longer converts the whole 1.23 GB embed table to f32 every token (it gathered T rows out of the whole [Vsz,H] table via `ReadF32` β€” ~311M host element-converts/token, the DOMINANT decode cost the W7 profile under-filed as "#5"); now gathers only the T needed rows directly (BIT-IDENTICAL β€” same per-element conversion, same rows). GATED on the real 3-shard UD-Q4_K_XL GGUF (GB10, `--gpu`, W6 cached, drop_caches cold, 24 tok): TOKEN-IDENTICAL to the W5/W6 golden (`22345 83 350 785 …`, coherent " Paris.") + decode 0.66 β†’ 0.17 s/tok = 3.9Γ— (1.5 β†’ 5.9 tok/s; 18Γ— β†’ 4.7Γ— vs llama.cpp 27.8). See `.agents/specs/laguna-s21-w7-speed-2026-07-31.md` Β§W8. Next: grouped-expert GEMM (=A3) then device-resident decode.** Prior **DECODE-SPEED ATTRIBUTED (W7 profile-only, 2026-07-31, `CLAIM-LAGUNA-W7-SPEED`): `nsys` of the W6 decode (real UD-Q4_K_XL GGUF, GB10) attributes the 0.66 s/tok (~1.5 tok/s vs llama.cpp 27.8 on identical bytes, ~15-18x) to HOST-ORCHESTRATION, not kernel compute β€” GPU active only 32.7% of the step, 67.3% host/idle; 22,115 `cudaStreamSynchronize` (~2,764/step, zero GPU overlap) from the ~1,795 per-GEMM `DrainQueue` in `LagunaForwardGgufCached` + scalar host glue; 39.4% of GPU time is `QuantizeQ8K` activation-quant (per-GEMM), weight GEMVs un-grouped at ~22% of the 240 GB/s peak (llama.cpp ~76%); no H2D/D2H (unified memory). Ranked levers (all in-tree from ds4): device-resident decode 1.5->~5-7 tok/s, grouped-expert GEMM (`MatmulBTQuantGrouped`) +1.5-2x + dedupes the activation-quant, decode CUDA-graph, tuned MMVQ; + free host cleanups (`LagunaEmbed` copies the whole 1.23 GB embed table/token, per-token RoPE-cache rebuild). Honest reachable ~13-20 tok/s, 27.8 a stretch. NO code changed. See `.agents/specs/laguna-s21-w7-speed-2026-07-31.md`. Prior RUNNABLE + FAST DECODE (W6, 2026-07-31): a per-layer K/V cache + single-token incremental decode replaces W5's O(nΒ²) STATELESS recompute β€” TOKEN-IDENTICAL (byte-equal ids, md5 `754728c6…` match, == the W5 golden) and 5.05Γ— faster per token: decode 3.33 β†’ 0.66 s/tok on the real UD-Q4_K_XL GGUF (GB10, `--gpu`, keep-quant), same " Paris.…" text. `LagunaKvCache` (mirrors `DeepseekV4KvCache`, MLA-latent β†’ GQA multi-head K/V; caches post-QK-RMSNorm/post-RoPE K + raw V at f32 β€” bit-exact since RoPE/QK-norm are position-only and attention is causal), MIXED attention per-layer: 12 GLOBAL layers grow unbounded + 36 SLIDING-WINDOW-512 layers EVICT rows beyond the 512 window (gemma2/3 `is_sliding`); `LagunaForwardGgufCached` + shared `LagunaAttention`/`LagunaFfnBlock` helpers used by BOTH forwards (identical float ops; recompute ids unchanged after refactor), `examples/laguna_gen --stateless` A/B flag. No cache bug (bit-exact first run). Next speed = grouped-expert GEMM + device-resident decode (both in-tree from ds4). See `.agents/specs/laguna-s21-w6-2026-07-31.md`. Prior RUNNABLE (W5, 2026-07-31): our engine greedy-generates COHERENT text on the REAL 3-shard UD-Q4_K_XL GGUF (GB10 keep-quant) β€” "The capital of France is" β†’ " Paris. …", first token "Paris." matches the llama.cpp-Poolside reference. Multi-shard GGUF reader + keep-quant tower (`LoadLagunaFromGgufShards`) + `LagunaForwardGguf` (ds4 keep-quant Gemm/GemmRowSlice) + `examples/laguna_gen`; load 20.6s, peak 71 GiB, 3.27 s/tok stateless recompute (speed=W6).** Prior W3: **W3 REAL forward + 3 new ops landed** (`laguna_ops.cpp`: per-head softplus attn out-gate + ungrouped sigmoid-noaux router + dual per-layer RoPE cos/sin builders; `LagunaModel::Forward` now a REAL runnable host-reference composition β€” variable-Q-head GQA + dual RoPE + sliding-window mask + softplus gate + dense L0 / ungrouped-MoE L1..47 + untied lm_head β€” replacing the W1/W2 `VT_CHECK(false)` stub; CPU `-Werror` full-library build clean; `test_laguna_scaffold` **8/8Β·166** incl. softplus math, router selection+tie-break RED-first, dual-RoPE cos/sin bit-match, variable-Q-head shapes, forward composition on synthetic weights; `test_model_registry` 24/24). W1 oracle DECISION: vLLM native `laguna.py` in pin β‡’ config constructs; dual-oracle = vLLM-NVFP4/-FP8 (fits GB10, BF16 235 GiB does NOT) + llama.cpp-Q4_K token-exact. DEFERRED to W4 (needs 73 GB checkpoint): GGUF keep-quant tower materialization + device/paged production forward + strict dual-oracle greedy gate. ~85-90% reuse (ds4-MoE + gemma-sliding + olmo3-dual-rope + landed Q4_K keep-quant); NEW = the 3 landed host ops + name-map + variable-Q-head device runner. **W4 (2026-07-31, `CLAIM-LAGUNA-W4`, in progress):** the UD-Q4_K_XL GGUF (73.4 GiB, 3 shards) FETCHED to dgx + its metadata/tensor-map READ AUTHORITATIVELY (814 tensors, arch `laguna`, `expert_gating_func=2` sigmoid, `leading_dense_block_count=1`, `expert_weights_scale=2.5`). Three CPU-verified FIDELITY corrections the W1-W3 scaffold got wrong, each grounded in the real GGUF + llama.cpp: (1) **per-head QK-RMSNorm** (`attn_q_norm`/`attn_k_norm` F32[128]) added to params+forward β€” the scope MISSED it (surfaces only in the tensor map); (2) **dual-RoPE mscale** now uses llama.cpp's `yarn_attn_factorΒ·(1+0.1Β·ln(factor))` off the GGUF-authoritative `factor=32`/`yarn_attn_factor=1.0` (256K-ctx build, NOT HF's factor-128/1.4852 1M-ctx scalar) β€” resolves the numerics-delicate residual; (3) **separate** `ffn_gate_exps`/`ffn_up_exps` (Q4_K) + `ffn_down_exps` (Q5_K) + Q8_0 shared/attn (the scaffold assumed merged gate_up). GGUF keep-quant tower materialization (`Mw`/`Sew` mirror of ds4) + keep-quant `ForwardGguf` (vt::MatmulBT/GemmRowSlice) + the real-model greedy run vs the llama.cpp-laguna same-quant oracle remain the W5 close (73 GB single-GB10, host-orchestrated) | `MODEL-TEXT-laguna-laguna-for-causal-lm` | | 🚫 | `DeepseekV3ForCausalLM` / `DeepseekV32ForCausalLM` | DeepSeek-V3 / V3.2 | HW-blocked (671B, ~642 GiB fp8 vs 119 GiB unified memory); V3.2 additionally DEP-blocked (DSA indexer) | `MODEL-TEXT-deepseek-v2-deepseek-v3-for-causal-lm` | | 🚫 | `GlmMoeDsaForCausalLM` | GLM-5 (DSA) | HW-blocked (1404 GiB bf16) and DEP-blocked (GLM-5.x is DeepSeek-V3.2 verbatim) | `MODEL-TEXT-deepseek-v2-glm-moe-dsa-for-causal-lm` | @@ -403,6 +406,7 @@ Transformers compatibility is capability-driven and excluded from finite counts. | `MODEL-MM-kimi-k25-kimi-k25-for-conditional-generation` | `KimiK25ForConditionalGeneration` | `registry.py:448`; `vllm/model_executor/models/kimi_k25.py::KimiK25ForConditionalGeneration` | conditional generation / video+image | MM processor; encoder/merge; vision encoder; video path | ☐ required | `INVENTORIED` | none | unassigned | | `MODEL-MM-kimi-audio-kimi-audio-for-conditional-generation` | `MoonshotKimiaForCausalLM` | `registry.py:449`; `vllm/model_executor/models/kimi_audio.py::KimiAudioForConditionalGeneration` | conditional generation / audio+image | MM processor; encoder/merge; audio/ASR frontend; vision encoder | ☐ required | `INVENTORIED` | none | unassigned | | `MODEL-MM-kimi-k3-kimi-k3-for-conditional-generation` | `KimiK3ForConditionalGeneration` | **BEYOND-PIN β€” NOT in `555967922`** (K3 released 2026-07-27, after the pin); closest registered = its literal text backbone `KimiLinearForCausalLM` (`registry.py:140`; `vllm/model_executor/models/kimi_linear.py`) + the K2.5 vision wrapper `kimi_k25.py:290` / tower `kimi_k25_vit.py` | conditional generation / image (text-first) | model loader/forward; FusedMoE/grouped GEMM; GDN/linear-attention state (KDA); MLA/latent KV; MXFP4 compressed-tensors quant; MM processor + MoonViT-V2 encoder/merge | [kimi-k3 spike](specs/kimi-k3.md) | `SPIKE` | **W0 SCOPE (2026-07-28, `CLAIM-KIMI-K3-SCOPE`, DERIVE-AND-SHIP, records-only).** From the HF `config.json` (fetch-derived): `architectures:["KimiK3ForConditionalGeneration"]`, `text_config.architectures:["KimiLinearForCausalLM"]` β€” the text backbone IS the pinned Kimi-Linear hybrid, MASSIVELY scaled: **H=7168, L=93 (69 KDA + 24 MLA full-attn), 896 experts / top-16 / 2 shared, `moe_intermediate_size=3072`**; MLA geometry `kv_lora=512`/`q_lora=1536`/`qk_nope=128`/`qk_rope=64` (= our landed DeepSeek-V3 dims); KDA `head_dim=128`/`num_heads=96`/`short_conv=4`/`gate_lower_bound=-5.0`; quant **`mxfp4-pack-quantized` (compressed-tensors, group 32, e8m0) + MXFP8 acts (QAT)**; vision **MoonViT-V2** (~401M, patch 14, 27L). **HEAVY REUSE** β€” GDN (KDA's parent, `cuda_gdn.cu`/`gdn_attn.cpp`), DeepSeek MLA (`deepseek_v2.cpp`/`mla_attention.*`, exact geometry), DeepSeek-style MoE (`qwen3_moe.cpp`/`cuda_moe.cu`, scale to 896), and the Qwen3.6-35B GDN-hybrid-MoE model skeleton (`qwen3_5_moe.cpp`) are the structural twins; Kimi-K2 tokenizer/tool parser (`parser/kimi_k2.cpp`) reused. **NET-NEW:** the KDA kernel delta (per-channel `[H,D]` low-rank decay `f_a_proj`/`f_b_proj` + sigmoid-gated output norm + 3 q/k/v convs β€” already scoped on the Kimi-Linear row), **MXFP4** (we have NVFP4 group-16, not MXFP4 group-32/e8m0), **AttnRes** (report-only, UNCONFIRMED β€” not in config.json nor pinned `kimi_linear.py`), and the **MoonViT-V2 tower**. **HW-fit: DOES NOT FIT GB10** β€” 2.8T MXFP4 β‰ˆ **1.56 TB β‰ˆ ~12Γ— over the 119 GiB pool**; no small K3 exists. **DERIVE-AND-SHIP** (no on-box golden, like the beyond-vLLM CUDA bricks): (a) REAL proxy gate of KDA+MLA+MoE on the FITTING `Kimi-Linear-48B-A3B` (~89–91 GiB) vs the pinned oracle, (b) build-verify + structural review for the K3 scale-up. The pinned oracle has NO `kimi_k3` β‡’ even HW-rich users need a pin advance to oracle-gate K3 itself. CORRECTS the 2026-07-25 sweep note ("loads as `DeepseekV3ForCausalLM`" β€” true for K2, NOT K3). W-plan W1-W8 in the spec. **W2/W5 CPU SCAFFOLDING LANDED (2026-07-28, `CLAIM-KIMI-K3-W2-W5`, DERIVED+BUILD-VERIFIED, NOT pushed):** additive registry TU registers `KimiK3ForConditionalGeneration` (info: text-gen + `is_hybrid` + `has_inner_state` + `supports_multimodal`); config-descent `ParseKimiK3Params` reads the nested `text_config` (KimiLinear KDA+MLA+MoE scalars β€” note upstream key `num_experts_per_token`), `vision_config` (MoonViT-V2 PARTIAL), `quantization_config` (MXFP4 detect) grounded in `configs/kimi_linear.py:11-148`; pure `EnumerateKimiK3TextBackboneTensors` is the 93-layer KDA/MLA + 896-expert MoE structural name-map grounded 1:1 in `kimi_linear.py:104-378,460-554` + `kimi_gdn_linear_attn.py:102-226` (per-layer KDA vs MLA-with-qLoRA vs MoE-vs-dense branching); forward REFUSE-by-name (`VT_CHECK(false)`, mirrors `deepseek_v4.cpp`); loader REFUSES MXFP4 (a real K3 checkpoint's dtype) deferring to the shared DeepSeek-V4 MXFP4 row. **NOT-YET-BUILDABLE (correctly deferred):** MXFP4 materialization (β†’ `CLAIM-DEEPSEEK-V4-*` / quantization-matrix MXFP4), the KDA kernel delta (β†’ Kimi-Linear row `MODEL-TEXT-kimi-linear-*`), MoonViT-V2 vision (W7), K3 multimodal-wrapper weight prefix (post-pin). Code: `src/vllm/model_executor/models/kimi_k3{,_registry,_weights}.cpp` + `include/vllm/model_executor/models/kimi_k3.h`. Test: `tests/vllm/models/test_kimi_k3_scaffold.cpp` (6/6, 63 assertions β€” registry-resolve + config-descent + split logic + enumeration + reject + MXFP4-refuse). Clean CPU build (`-DVLLM_CPP_CUDA=OFF`). Row stays `SPIKE` (no on-box e2e; forward not implemented) | `CLAIM-KIMI-K3-SCOPE`, `CLAIM-KIMI-K3-W2-W5` | +| `MODEL-DIFFUSION-minimax-h3-mini-max-h3-dit` | `MiniMaxH3DiTModel` | **BEYOND-PIN AND OUT-OF-REPO** β€” not in `555967922` (H3 released after the pin) and not in the vLLM repository at all: it lives in `vllm-project/vllm-omni`, `vllm_omni/diffusion/models/minimax_h3/` (`minimax_h3_transformer.py`, `packed_sequence.py`, `packed_tokens.py`, `scheduling_minimax_h3_euler_ancestral.py`, `denoise_loop.py`, `vae.py`, `encoder.py`, `pipeline_minimax_h3.py`) | diffusion generation / video + audio (text/image/video/audio in) | flow-matching denoise loop; packed varlen NON-CAUSAL attention; AdaLN modulation; 3D MM-RoPE; video VAE + audio VAE (checkpoint REMOTE CODE); Qwen3-VL-derived encoder; MP4 muxing; Ulysses sequence parallelism | [minimax-h3 spike](specs/minimax-h3.md) | `PARTIAL` | **W0-W2 LANDED (2026-08-03, `CLAIM-MINIMAX-H3-W0-W2`, DERIVE-AND-SHIP).** H3 is NOT an autoregressive LLM: it is a CFG-distilled joint video+audio DIFFUSION transformer (50 blocks, H=5376, 56 MHA heads x 128, SwiGLU 14336, AdaLN 6x3xH, 3D RoPE rotating 96 of 128 dims, video row width 96, audio latent 32) forwarded ONCE PER STEP of a 50-step flow-matching loop β€” no KV cache, no sampler, no logits, so the SACRED token-exact methodology does not apply. **HW VERDICT: e2e is IMPOSSIBLE on this project's hardware** β€” ~354 GB checkpoint (DiT 66.3 GB + Qwen3-VL-derived encoder 51.5 GB + video VAE ~10 GB + audio VAE ~0.6 GB), upstream validates on **4x NVIDIA B300 at ~133 GB peak per rank**, vs ONE GB10 with 119 GiB UNIFIED memory; CPU offload does not help because the pool IS host RAM. **WHAT IS GATED (and it is exact):** upstream's modules are pure Python, so they are executed at REDUCED DIMENSIONS on CPU as the oracle (`scripts/gen-minimax-h3-goldens.py` imports them by file path and freezes their outputs; both sides rebuild weights/inputs from an identical FNV-1a + splitmix64 stream, so no weight byte is checked in). Results: fl2va + ref2va packed layouts EXACT including the **fp64 position grid BIT-EXACT** (it feeds RoPE β€” the port reproduces numpy's `linspace(endpoint=False)` evaluation order and upstream's deliberately-split pairwise vs sequential span summations, `packed_sequence.py:101-113`); patchify/unpatchify/audio pack EXACT + round-trip; scheduler EXACT; **full DiT forward max abs diff 1.6e-7 (video) / 1.5e-7 (audio)** β€” f32 round-off. **REUSE:** the packed varlen non-causal attention routes through the SHARED `vt::DFlashBlockAttention(causal=false)` (its per-document bidirectional contract IS upstream's varlen FA call) and every projection through `vt::MatmulBT` β€” NO new kernel was added. **NOT-YET-BUILT (honest):** device-resident/bf16 forward + fusion folds (W2b), H3-Encoder on our existing Qwen3-VL tower (W3), the two VAEs β€” which are **checkpoint REMOTE CODE** under `trust_remote_code` and must be reimplemented in C++, not adapted (W4/W5) β€” pipeline/tasks (W6), `/v1/videos` + MP4 muxing, which needs a NEW dependency decision (W7), and USP multi-GPU (W8). No speed number is claimed; upstream reports the DiT at 88% of request latency. Code: [minimax_h3.h](../include/vllm/model_executor/models/minimax_h3.h#L1-L333), [minimax_h3.cpp](../src/vllm/model_executor/models/minimax_h3.cpp#L410-L640) (`MiniMaxH3DitForward`), [minimax_h3_packing.cpp](../src/vllm/model_executor/models/minimax_h3_packing.cpp#L259-L400) (`BuildMiniMaxH3PackedSequence`). Test: [test_minimax_h3.cpp](../tests/vllm/models/test_minimax_h3.cpp#L376-L470) (DiT forward parity; 10/10 cases / 2539 assertions, clean CPU build) + generator [gen-minimax-h3-goldens.py](../scripts/gen-minimax-h3-goldens.py#L1-L60); [ledger](parity-ledger.md#L889). **W6A+W9 LANDED (2026-08-03, `CLAIM-MINIMAX-H3-W6A-W9`) + HW VERDICT CORRECTED.** (a) the **bf16 PRODUCTION dtype policy** now runs (upstream's cast points with the fp32 islands preserved; gated vs a bf16 upstream golden at max abs diff 2.4e-3); (b) **request planning** β€” 17n+5 frame snapping, video/audio latent shapes, the rectified-flow time-shift sigma schedule, canvas resolution and t2va/fl2va/ref2va dispatch β€” ported and EXACT vs `time_request.py` + `pipeline_minimax_h3.py:121-122,207-222,374-434`; (c) the **ComfyUI-GGUF arm**: the name map is the IDENTITY and every one of the **535 real tensors** of `MiniMax-H3-FL2VA-Q3_K_M.gguf` resolves onto our contract, with the geometry derived from SHAPES ALONE equal to the shipped config (gated on a manifest read from the file's own header by range request β€” no payload downloaded). Two shape rules recorded: GGUF `ne` is reversed vs torch, and `comfy.gguf.orig_shape.` overrides it where ComfyUI reshaped a tensor for quant-block alignment (the 50 AdaLN projections: logical [96768, 2688], 2688 not a multiple of the 256-element Q3_K block). **β˜… HARDWARE VERDICT CORRECTED β€” the earlier 'e2e is IMPOSSIBLE on this hardware' was WRONG** because it reasoned from the bf16 release alone: quantized H3 checkpoints exist and FIT (GGUF DiT Q3_K_M 15.6 GB + Qwen3-VL encoder Q4_K_M 14.6 GB + VAEs ~11 GB ~= **41 GB** in a 119 GiB pool; `lilcheaty/MiniMax-H3-NVFP4` likewise). So e2e AND a speed comparison are REACHABLE; NVFP4 is the likely speed path (sm_121 native FP4 tensor cores + our tuned NVFP4 stack). **W5 LANDED (audio VAE)**: H3's VAEs are checkpoint REMOTE CODE under `trust_remote_code`, so a no-Python engine must REIMPLEMENT them β€” the DAC-lineage BigVGAN audio decoder (weight-norm materialization (w = g*v divided by the row norm), anti-aliased SnakeBeta with kaiser-sinc up/down resampling, replicate padding, final clamp) is ported and gated against the checkpoint's OWN modules at **max abs diff 4.2e-9**. The VIDEO VAE (`klvae.py` ~48 KB + CNN/ViT + tiling) is the largest remaining brick. **W10 GROUNDED + W4 SCOPED from REAL manifests** (safetensors headers captured by range request, no payload downloaded): the NVFP4 checkpoint's 1051 tensors are textbook compressed-tensors NVFP4 (U8 packed 2-per-byte + E4M3 `weight_scale` at group 16 + F32 scalar `weight_scale_2`; 258 quantized projections; fp32/bf16 islands left unquantized; names identical to our contract) β€” i.e. EXACTLY the layout our tuned NVFP4 stack already consumes, so W10 is loader wiring, not a new quant scheme. The video VAE's 560 tensors show its ENCODER is the 3D CNN (rank-5 Conv3d) while its DECODER β€” the half generation needs β€” is a 36-block TRANSFORMER (to_qkv/to_out, ff.w1/w2, 2 norms + 2 learned residual scales per block, x_embedder/mask_token/register_tokens/proj_out), materially smaller than klvae.py's 48 KB suggested. **W4 BLOCK LANDED**: the video-VAE decoder's repeated `TransformerBlock` is ported and gated at **6.0e-8** against the checkpoint's OWN remote code β€” RMSNorm + per-head RMS qk-norm (no affine) + full attention + gated-SiLU FF + LEARNED PER-CHANNEL residual scales, and critically the PER-HEAD-INTERLEAVED qkv layout ([head][q,k,v], NOT the DiT's [q_all,k_all,v_all]) that would otherwise produce a plausible-but-wrong image. **W4 DECODER DONE**: the FULL ViT3D video-VAE decoder β€” pack, x_embedder, register/cls tokens, 3D RoPE (RotaryEmbeddingND, length-normalized ids, angle scale 2pi, tiled freq blocks), the 36-block stack, LayerNorm norm_out, proj_out and unpatchify β€” is ported and gated at **8.9e-8** against the checkpoint's own `ViT3DDecoder`, at its real hyperparameters (36 layers, 32 heads x 64, rope_theta 100, rope_dim_ratio 0.75). BOTH VAE decoders are now done (audio 4.2e-9). **W3 TEXT TOWER DONE**: the H3-Encoder's truncated Qwen3-VL text tower β€” gated at **1.2e-7** vs upstream β€” with all three H3 deltas exercised: layer truncation (min(num_hidden_layers, 50)), the UNNORMALIZED layer-49 output (NO final RMSNorm, unlike stock Qwen3-VL β€” applying one silently shifts every conditioning vector), and DeepStack visual injection into the first N layers; plus interleaved M-RoPE, fused QKV, per-head q/k RMSNorm, causal GQA and the gated-SiLU MLP. **W6 t2va ASSEMBLED β€” the WHOLE PATH COMPOSES**: `MiniMaxH3GenerateT2va` wires packed layout -> rectified-flow sigma schedules -> the multi-step denoise loop of DiT forwards -> unpatchify + audio unpack -> per-channel denormalize -> BOTH VAE decoders, producing correctly-shaped, finite frames and a stereo waveform in [-1, 1]; gated by a structural end-to-end test at reduced dimensions with random weights (NOT a quality result). Assembling it also caught a real gap: the audio decode needed the checkpoint's `dec_in_proj` (Conv1d k=1, vae_latent_channels -> num_mels) ahead of BigVGAN. **W9 GGUF ARM DONE**: `LoadMiniMaxH3DitFromGguf` materializes the DiT from a ComfyUI-format GGUF β€” dequantizing every tensor through the SHARED GGUF dequant entry point (so the Q2_K/Q3_K/Q4_K families the H3 GGUFs use are covered by the same code every other GGUF model uses), recovering the geometry from shapes alone, and binding the forward's views with missing tensors throwing BY NAME rather than reading as zeros; gated by a synthetic-file load-AND-RUN test (a real DiT forward executes off the loaded weights). **W10 LOADER DONE**: `LoadMiniMaxH3DitFromNvfp4` materializes the DiT from an NVFP4 compressed-tensors checkpoint β€” the U8-packed [out, in/2] weight plus its E4M3 group-16 `weight_scale` and F32 scalar `weight_scale_2` go through the project's EXISTING NVFP4 dequant (no new quant code), sidecars are excluded from the model tensor set, and the logical [out, in] shape is recovered; gated by a synthetic-file load-AND-RUN test. BOTH quantized loaders are now done. **W3 VISION BLOCK DONE** (6.0e-8): the repeated unit of the encoder's Qwen3-VL vision tower, which differs from the text tower in every way that matters numerically β€” LayerNorm WITH BIAS (not RMSNorm), a [q_all, k_all, v_all] qkv layout (not the video VAE ViT's per-head interleave), fp32 rotary, NON-CAUSAL attention segmented by `cu_seqlens` (the test asserts a perturbation in one packed image leaves the other's outputs BIT-IDENTICAL), and the TANH-approximate GELU. **W3 ENCODER COMPLETE**: the FULL vision tower also lands β€” Conv3d patch embed (kernel == stride, so a linear over the flattened patch), BILINEAR resampling of the learned position grid into spatial-merge order, the 2D rotary table, per-frame `cu_seqlens`, and both merger flavours (the final merger norms the PRE-shuffle width while the DeepStack mergers norm the POST-shuffle width, and both use exact-erf GELU unlike the block MLP's tanh approximation), gated over a RAGGED two-image batch. Only the MM processor remains on the encoder. **CONDITION-NOISE augmentation DONE** (fl2va/ref2va): the noised-anchor mix plus its ROW ACCOUNTING β€” each visual condition draws noise of length `target_latent_t + imgvid_cond_num_frames` and slices the PREFIX matching its own latent_t, every condition restarts the SAME seed (so concatenating and drawing once would differ for multi-reference requests), and rows advance by that condition's own patchified count. Gated EXACT with the noise supplied, so the comparison isolates the accounting from torch's RNG. **REFERENCE-VIDEO geometry + FRAME SCHEDULE DONE** (the pure-math half of `reference_video.py`): the canvas pipeline (aspect clamp -> 768 short edge -> max-pixel rescale -> nearest multiple of 32) and the 24-to-2 FPS frame resample with per-temporal-patch block timestamps, both EXACT. NOTE the rest of that module (probe, transcode, frame extraction, audio decode) shells out to ffmpeg and is blocked on the SAME external dependency decision as `/v1/videos` MP4 muxing β€” one decision unlocks reference-video INPUT decode and generated-video OUTPUT encode together. **VIDEO VAE TILING DONE**: the tile plan (smallest tile count whose MINIMUM overlaps still cover the axis, leftover slack distributed in whole `vae_ratio` units ROUND-ROBIN across the seams) plus the linear seam cross-fade, both EXACT. Shipped config tile 256 / overlap 64 / vae_ratio 16 (= prod(space_down), the 'f16' in f16t4). Getting the slack distribution wrong shifts every tile after the first and surfaces as seam artifacts rather than an error. **PRESENTATION TOKEN TAGS DONE** β€” the fl2va vision-span override the denoise loop requires callers to have applied: a vision block is `vision_start + pad*count + vision_end` and the WHOLE block, MARKERS INCLUDED, is tagged VIDEO; tagging only the pads would leave two markers as TEXT and shift every AdaLN modulation index after them. Gated EXACT, with the test proving each VIDEO run is a whole vision block. **VAE 3D-CNN ENCODER PRIMITIVES DONE**: causal Conv3d (all temporal padding on the LEFT so a frame never sees the future, `reflect` spatial padding), GroupNorm3D (32 groups, eps 1e-6, statistics spanning TIME as well as space) and ResnetBlock3D, gated EXACT β€” with CAUSALITY proven directly on the bare convolution (a change to the last frame provably cannot reach earlier frames). **Downsample3D DONE** too: the strided inter-level conv, whose subtlety is the ASYMMETRIC pre-pad β€” one pixel on the RIGHT of W and the BOTTOM of H before a stride-2 conv with padding (1,0,0); padding symmetrically instead shifts the whole sampling lattice by half a pixel, which is a silent wrong latent rather than an error. Only the EncoderFCN3D level-loop assembly remains on the VAE encoder. **VIDEO VAE COMPLETE β€” encoder AND decoder**: the whole 3D-CNN encoder level loop (conv_in -> per level [ResnetBlock3D x N then Downsample3D or a 1x1x1 channel match] -> GroupNorm -> SiLU -> conv_out) is gated EXACT. **MM PROCESSOR = REUSE, gated**: H3's `FL2VA/processor` is a stock `Qwen3VLProcessor`, so the multimodal front end is this project's EXISTING Qwen3-VL processor rather than a new port; H3's own config is parsed and driven through it (patch 16 / temporal 2 / merge 2, **0.5 normalization rather than CLIP statistics**, a 32-pixel grid, the 768x1344 default canvas proven an IDENTITY under smart_resize, and VIDEO bounds deliberately looser than the image ones). **With this every PORTABLE piece of the lane is done**; what remains is one dependency decision (ffmpeg media I/O + MP4 muxing) and GPU-blocked work (the device-resident FP4 forward and any speed number). **WAV OUTPUT** added: the decoded stereo waveform serializes to RIFF/WAVE 16-bit PCM, converting the VAE's CHANNEL-MAJOR layout to INTERLEAVED (getting that backwards yields audio that plays but with the channels time-smeared) and clamping rather than wrapping. Deliberately dependency-free, and required under EITHER outcome of the open MP4/muxer decision. **VIDEO OUTPUT PATH DONE**: PPM frame serialization (planar [C,T,H,W] -> row-major interleaved RGB, [-1,1] -> [0,255] clamped) plus the MP4 mux argv (h264/yuv420p + AAC, `-shortest`, `+faststart`). The built argv was RUN through real ffmpeg 6.1.1 and produced a VALID MP4 (ffprobe: h264 yuv420p video + AAC stereo at 32 kHz). The library never spawns a process β€” `src/vllm/` has no subprocess precedent β€” so it builds the artifacts and the command while the example/server layer invokes it. **`/v1/videos` API LOGIC DONE**: the request contract (H3 defaults β€” 50 steps, flow shift 12 video / 3 audio; both the vLLM-Omni `extra_params` nesting and a flat top-level spelling accepted; malformed input rejected with a reason rather than silently defaulted) and the job store (queued -> running -> succeeded/failed, illegal transitions throw, unknown ids reported so the route can 404, status JSON omits fields that do not apply, and concurrent creation is thread-safe). Remaining is mechanical glue: route registration + runner injection, with the ffmpeg call in `examples/` per the ratified boundary. Test: 34/34 + video-api 4/4 (9233 + 63 assertions). OPEN: there is no vllm-omni parity PIN β€” the upstream-sync protocol covers only the vLLM repo | `CLAIM-MINIMAX-H3-W0-W2`, `CLAIM-MINIMAX-H3-W6A-W9` | | `MODEL-MM-moss-transcribe-diarize-moss-transcribe-diarize-for-conditional-generation` | `MossTranscribeDiarizeForConditionalGeneration` (v0.25.0 target-pending) | v0.25.0 target `registry.py:450-453`; `vllm/model_executor/models/moss_transcribe_diarize.py::MossTranscribeDiarizeForConditionalGeneration` @ `702f481` | conditional generation / audio | MM processor; Whisper encoder; VQ adaptor; Qwen3 decoder; speech-to-text/diarization frontend | ☐ required | `INVENTORIED` | none | unassigned | | `MODEL-MM-lightonocr-light-on-ocrfor-conditional-generation` | `LightOnOCRForConditionalGeneration` | `registry.py:450-453`; `vllm/model_executor/models/lightonocr.py::LightOnOCRForConditionalGeneration` | conditional generation / image | MM processor; encoder/merge; vision encoder | ☐ required | `INVENTORIED` | none | unassigned | | `MODEL-MM-lfm2-vl-lfm2-vlfor-conditional-generation` | `Lfm2VlForConditionalGeneration` | `registry.py:454`; `vllm/model_executor/models/lfm2_vl.py::Lfm2VLForConditionalGeneration` | conditional generation / image | MM processor; encoder/merge; Mamba/SSM state; vision encoder; video path | ☐ required | `INVENTORIED` | none | unassigned | diff --git a/.agents/parity-ledger.md b/.agents/parity-ledger.md index 1156d1926..7ce65e9bd 100644 --- a/.agents/parity-ledger.md +++ b/.agents/parity-ledger.md @@ -886,3 +886,27 @@ Columns: | 2026-07-31 (`SERVE-C-ABI` W0 contract spike; `CLAIM-SERVE-C-ABI-SPIKE`; CPU-only records/docs) | Accepted `.agents/specs/c-api-library.md` for the already-shipped original C packaging layer: complete scope, vLLM semantic chain/deviation, ABI v10/19-symbol baseline, ownership/error/version/dispatch rules, exact code/test anchors, gates, dependencies, risks, and W1-W5 follow-ons. Also fixes the verified stale public `VLLM_ABI_VERSION 9` labels in README/USAGE to the source-of-truth v10 and adds the missing v10 usage-table entry. No production/test/CMake source changed. | Pinned vLLM `555967922` has no C ABI; behavior beneath the adapter remains owned by its vLLM-derived engine rows. The flat ABI is the recorded llama.cpp-style packaging deviation and may translate, never reimplement, policy. | **CPU/records gate only; benchmark NOT APPLICABLE.** Focused C11/C++/dlopen/export gate passed 3/3 after explicitly building `vllm_shared`; five record checkers pass. `check-agent-record` reports the base tree's same six missing closing-commit objects (`444ea9d7`, `7a3f04b2`, `164453a2`), none in this row/diff. Row stays `ANCHOR-BACKFILL` because all-symbol dlsym coverage (chat symbols currently omitted), historical-layout compatibility, allocation-failure no-throw proof, lifetime sanitizer stress, and a standalone real-model C consumer remain W1-W5. | | 2026-07-31 (`CLAIM-CPU-GCC12-WERROR-PORTABILITY`; maintenance, rows `QUANT-GGUF-KEEPQ-LOADER` + `KV-OFFLOAD`; lifecycle unchanged) | Removes two GCC 12 production-library `-Werror` blockers without suppressions: the GGUF prefault keeps the same one-byte-per-page volatile XOR but uses simple assignment, and the KV filesystem tier builds the identical `...tmp` suffix with append operations inside its thread-local initializer. No API, algorithm, default, CUDA, fixture, or golden change. | Behavior remains grounded in the accepted loader and KV-persistence leaf specs: llama.cpp mmap prefault intent and vLLM `tiering/fs/io.py` unique temporary-file publication. This is compiler portability, not a parity-surface change. | RED: GCC 12 failed first at `qwen3_5_gguf_weights.cpp:49` (`-Wvolatile`), then at `fs_io.cpp:66` (`-Wrestrict`). GREEN: production `vllm` and focused test targets build clean; focused CTest 2/2 (`test_gguf_keep_quant`, `test_kv_offload_fs`). Full all-target build is PARTIAL at 42% on unrelated test-only GCC 12 `-Wrestrict` diagnostics in `test_deepseek_v2_paged_engine.cpp` and `test_glm4_moe_lite_paged_engine.cpp`; no full-CTest claim. Benchmark NOT APPLICABLE. | | 2026-08-01 (`SERVE-CLI-CHAT` W0 contract spike; `CLAIM-SERVE-CLI-CHAT-SPIKE`; CPU-only records/spec) | Accepts `.agents/specs/cli-chat-complete.md`, corrects the inventory from β€œno direct commands” to the actual pinned `chat`/`complete` surface, and decomposes a dual-mode port: exact remote OpenAI HTTP/SSE commands plus preservation of the existing in-process invocation as a compatibility alias. No production, test, CMake, model, kernel, fixture, or generated file changes. | Pinned vLLM `5559679229`: command registration `vllm/entrypoints/cli/main.py:17-37,73-98`; model/auth resolution and stream shaping `vllm/entrypoints/cli/openai.py:30-100`; chat `:155-234`; complete `:237-312`. The local compatibility baseline is `examples/cli/main.cpp:1-207`. | CPU record/doc gates only; benchmark `NOT APPLICABLE`, `benchmark_binding=false`. Implementation remains absent and the row moves `INVENTORIED` -> `SPIKE`. W1-W5 name parse, transport, complete, chat, and packaging gates, including fake-server request/SSE transcript parity, Release `-Werror`, ASan+UBSan, and TSan. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W0-W2`; branch `feat/minimax-h3`) | **MiniMax-H3 W0-W2 β€” the project's FIRST diffusion architecture.** Adds the H3 packed-sequence layout (fl2va + ref2va block families, including the FP64 (t,h,w) position grid), the latent<->token packing, the euler-ancestral eta0 flow-matching scheduler, the 50-block AdaLN DiT forward, and the CFG-distilled denoise-loop driver. The packed varlen NON-CAUSAL attention routes through the SHARED `vt::DFlashBlockAttention(causal=false)` and every projection through `vt::MatmulBT` β€” NO new kernel. H3 is NOT autoregressive (no KV cache/sampler/logits), so it is deliberately NOT registered in the causal-LM registry and is exempt from the born-on-the-runner seam by construction. | `vllm-project/vllm-omni`, `vllm_omni/diffusion/models/minimax_h3/`: `minimax_h3_transformer.py:47-78,139-168,171-244,272-285,288-317,320-467,470-561,564-623,626-688,691-743,765-1102`, `packed_sequence.py:101-113,116-239,258-277,290-557`, `packed_tokens.py:23-106`, `scheduling_minimax_h3_euler_ancestral.py:49-102`, `denoise_loop.py:22-28,91-239`. **BEYOND-PIN AND OUT-OF-REPO** β€” H3 is not in the parity pin `555967922` and not in the vLLM repository at all; there is no vllm-omni pin yet (open item). | **CPU-GATED, EXACT.** Upstream's modules are pure Python, so they are EXECUTED at reduced dimensions as the oracle (`scripts/gen-minimax-h3-goldens.py`; both sides rebuild weights/inputs from an identical FNV-1a+splitmix64 stream, so no weight byte is checked in). `test_minimax_h3` **10/10 cases, 2539 assertions**: fl2va + ref2va layouts EXACT with the fp64 position grid **BIT-EXACT**; patchify/unpatchify/audio pack EXACT + round-trip; scheduler EXACT; **DiT forward max abs diff 1.6e-7 (video) / 1.5e-7 (audio)**. **NOT GATED (honest):** anything end-to-end β€” the checkpoint is ~354 GB and upstream validates on 4x B300 at ~133 GB/rank vs one GB10 at 119 GiB UNIFIED, so e2e video/audio is HARDWARE-BLOCKED and no speed number is claimed. Encoder/VAEs/pipeline/serving and the device-resident forward are W2b-W8. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W6A-W9`; branch `feat/minimax-h3`) | **MiniMax-H3 W6A + W9 + a HARDWARE-VERDICT CORRECTION.** (a) the DiT forward now also runs the **bf16 PRODUCTION dtype policy** (upstream's cast points, fp32 islands preserved); (b) **request planning** ported β€” 17n+5 frame snapping, video/audio latent shapes, the rectified-flow time-shift sigma schedule, canvas resolution, and t2va/fl2va/ref2va dispatch; (c) the **ComfyUI-GGUF arm** β€” logical-shape resolution (ne reversal + the `comfy.gguf.orig_shape` reshape rule) and geometry derivation from the tensor manifest alone. | `time_request.py:5-61`, `pipeline_minimax_h3.py:121-122,207-222,374-434`, `minimax_h3_transformer.py:85-101` (the fp32 islands) + the ComfyUI GGUF writer's `comfy.gguf.orig_shape` convention. Checkpoints: `realrebelai/MiniMax-H3_GGUFs`, `lilcheaty/MiniMax-H3-NVFP4`. | **CPU-GATED.** `test_minimax_h3` **13/13 cases, 3907 assertions**: request planning EXACT vs upstream; bf16 stream max abs diff 2.4e-3 (bf16 scale, same cast points, different GEMM accumulation order); **the REAL 535-tensor manifest of `MiniMax-H3-FL2VA-Q3_K_M.gguf` resolves onto our weight contract exactly** (identity name map) and the geometry derived from SHAPES ALONE equals the shipped H3 config. **β˜… CORRECTS the prior row's hardware verdict:** 'e2e IMPOSSIBLE on this hardware' reasoned from the bf16 release only and was WRONG β€” the quantized arms fit (~41 GB GGUF working set in a 119 GiB pool), so e2e and a speed comparison are reachable. Still no e2e or speed NUMBER is claimed. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W5`; branch `feat/minimax-h3`) | **MiniMax-H3 audio VAE decoder REIMPLEMENTED (W5).** H3's two VAEs are checkpoint REMOTE CODE (`FL2VA/{audio,video}_vae/*.py`, loaded via `get_class_from_dynamic_module` under `trust_remote_code`); vLLM-Omni only ADAPTS them, so a no-Python engine must reimplement them. This ports the audio side: a DAC-lineage BigVGAN vocoder β€” weight-norm materialization, ConvTranspose1d upsample stages, AMPBlock1 residual stacks averaged across 3 kernels, anti-aliased SnakeBeta (kaiser-sinc 2x up / 2x down with replicate padding), and the final clamp (H3 sets use_tanh_at_final=false). | The checkpoint's own `dac_bigvgan.py`, `dac_activations.py`, `dac_alias_free_{act,filter,resample}.py`, `dac_audio_vae.py` + `config.yaml`/`metadata.json` (decoder_dim 1024, latent 2048, upsample_rates [5,5,2,2,2,2,2], kernels [9,9,4,4,4,4,4], resblock kernels [3,7,11] dilations [1,3,5], snake_logscale). The remote code is NOT vendored (MiniMax H3 Community License). | **CPU-GATED, effectively exact.** `scripts/gen-minimax-h3-audio-vae-goldens.py` imports the checkpoint's OWN modules and runs them at reduced dimensions as the oracle; weights come from the shared H3Rand stream so no weight byte is checked in. **Waveform max abs diff 4.2e-9**, kaiser-sinc filter 3.0e-8; the golden is deliberately UNSATURATED (a clamped golden would hide errors, asserted in the test). `test_minimax_h3` 14/14 cases / 3983 assertions. NOT gated: the encode side's determinism-context semantics, and the VIDEO VAE (the largest remaining brick). Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W10-SCOPE`; branch `feat/minimax-h3`) | **MiniMax-H3 NVFP4 arm GROUNDED + video VAE SCOPED, both from REAL checkpoint manifests.** Adds `scripts/gen-minimax-h3-safetensors-manifest.py` (a safetensors header is front-loaded and a few tens of KB, so an HTTP range request captures the whole manifest β€” the same trick the GGUF arm uses) and gates two real checkpoints: `lilcheaty/MiniMax-H3-NVFP4` (1051 tensors) and the video VAE (`FL2VA/video_vae/source/model.safetensors`, 560 tensors). | compressed-tensors NVFP4 (the scheme our `quantization-matrix` NVFP4 rows already implement) and the checkpoint's own video-VAE remote code. | **GATED against the real files, no payload downloaded.** NVFP4: the checkpoint is the textbook compressed-tensors triple β€” `weight` U8 (FP4 packed 2-per-byte, [21504, 2688] for a [21504, 5376] logical qkv), `weight_scale` F8_E4M3 at **group 16** ([21504, 336]), `weight_scale_2` F32 scalar; 258 quantized projections each carrying all three; the fp32/bf16 ISLANDS (patch projections, time embedder, output heads, norms, rope) left unquantized; and the names are IDENTICAL to our contract. So W10 is loader WIRING onto the existing tuned NVFP4 stack, not a new quant scheme β€” this is the speed path. Video VAE: ENCODER is the 3D CNN (116 tensors, rank-5 Conv3d) but the DECODER β€” the half generation needs β€” is a **36-block TRANSFORMER** (440 tensors: to_qkv/to_out, ff.w1/w2, 2 norms + 2 learned residual scales per block, plus x_embedder/mask_token/register_tokens/norm_out/proj_out), fp32 throughout. That makes W4 materially smaller than `klvae.py`'s 48 KB implied. `test_minimax_h3` 16/16 cases / 5908 assertions. Still NO e2e or speed number. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W4-BLOCK`; branch `feat/minimax-h3`) | **MiniMax-H3 video-VAE decoder TransformerBlock ported (W4, partial).** The repeated unit of the 36-block ViT decoder: RMSNorm -> attention -> LEARNED PER-CHANNEL residual scale, then RMSNorm -> gated-SiLU feed-forward -> per-channel scale; per-head RMS q/k norm with NO affine weight; fp32. | the checkpoint's own `FL2VA/video_vae/base_module.py:200-281` (TransformerBlock, FeedForward) and `attention.py` (Attention.forward). Remote code NOT vendored (MiniMax H3 Community License); the generator stubs the handful of diffusers symbols the bundle imports rather than taking the dependency. | **CPU-GATED, effectively exact: max abs diff 6.0e-8** vs the checkpoint's own module at reduced dimensions. Catches the layout TRAP: this ViT's `to_qkv` is PER-HEAD INTERLEAVED (`view(B,S,-1,3*dim_head)` then chunk => [head][q,k,v]), NOT the [q_all,k_all,v_all] the H3 DiT uses β€” reading it the DiT way yields a plausible-but-wrong image. `test_minimax_h3` 17/17 / 5911 assertions. NOT gated: the stack surround (x_embedder, mask/register tokens, 3D RoPE, norm_out/proj_out, unpatchify, tiling) and the 3D-CNN encoder. Still NO e2e or speed number. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W4-DECODER`; branch `feat/minimax-h3`) | **MiniMax-H3 video-VAE ViT3D DECODER complete (W4).** Adds the stack surround around the already-gated block: `_pack_tensors_3d`, `x_embedder`, the register-token + ZERO cls-token suffix, 3D RoPE (RotaryEmbeddingND over length-normalized token ids, angle scale 2*pi, per-axis frequency blocks concatenated then TILED twice), the 36-block stack, LayerNorm `norm_out`, `proj_out`, and `_unpack_tensors_3d`. | the checkpoint's own `FL2VA/video_vae/vae_vit.py:216-365` (ViT3DDecoder), `base_module.py:157-196` (RotaryEmbeddingND), `func.py:12-47,82-102` (create_token_ids, apply_rotary_pos_emb), at the REAL hyperparameters from `source/config.json::vit_decoder_kwargs` (36 layers, 32 heads x 64, rms_norm affine, qk rms_norm no affine, gated SiLU, rope_theta 100.0, rope_dim_ratio 0.75). | **CPU-GATED, effectively exact: max abs diff 8.9e-8** for the full decoder (block alone 6.0e-8) vs the checkpoint's own module at reduced dimensions. `test_minimax_h3` 18/18 / 5918 assertions. BOTH VAE DECODERS are now done (audio 4.2e-9). NOT gated: video tiling (`vae_tile_size` 256 / overlap 64) and the 3D-CNN ENCODER, which is only needed for image/video CONDITIONING, not for output frames. Still NO e2e or speed number. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W3-TEXT`; branch `feat/minimax-h3`) | **MiniMax-H3 encoder TEXT tower (W3, partial).** The truncated Qwen3-VL text model that produces the `[seq, 5120]` `prompt_embeds` the DiT consumes: pre-norm decoder layers with fused QKV, per-head q/k RMSNorm, interleaved M-RoPE, causal GQA and a gated-SiLU MLP β€” plus the three H3-specific deltas. | `vllm_omni/diffusion/models/minimax_h3/encoder.py:1-30` (the delta contract), `:292-330` (interleaved M-RoPE), `:751-800` (MiniMaxH3Qwen3VLTextModel, DeepStack), and the attention/MLP forwards. Imported by file path with a one-symbol `vllm.logger` stub, so the oracle needs neither vllm nor its dependencies. | **CPU-GATED: max abs diff 1.2e-7** on BOTH the plain and DeepStack paths vs upstream at reduced dimensions, with the config deliberately declaring MORE layers than are selected so TRUNCATION is exercised, and an explicit assertion that DeepStack actually changes the result. The load-bearing delta is the **UNNORMALIZED** output: H3 consumes the state straight out of layer 49 with NO final RMSNorm, unlike a stock Qwen3-VL text model β€” applying one silently shifts every conditioning vector. `test_minimax_h3` 19/19 / 5930 assertions. NOT gated: the encoder's VISION tower (reuse of `qwen3_vl_vision.cpp`) and the MM processor. Still NO e2e or speed number. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W6-T2VA`; branch `feat/minimax-h3`) | **MiniMax-H3 t2va pipeline ASSEMBLED (W6) β€” the whole path composes.** `MiniMaxH3GenerateT2va` wires the separately-gated stages together: packed layout -> rectified-flow sigma schedules (video/audio shift 12/3) -> the denoise loop of DiT forwards -> unpatchify + audio unpack -> per-channel denormalize -> the video ViT3D decoder and the audio BigVGAN decoder -> frames + stereo waveform. | `pipeline_minimax_h3.py` (diffuse/decode flow, `_initial_noise`), `vae.py:252-270,341-357` (denormalization), `dac_audio_vae.py:218-231` (`dec_in_proj`). | **STRUCTURAL END-TO-END GATE** at reduced dimensions with random weights β€” explicitly NOT a quality result, but a real exercise of the composed path: frames come out [3, T*pt, H*ps, W*ps], the waveform is stereo at 32 kHz, everything is FINITE and inside [-1, 1], and the denoise loop demonstrably moves the latents. Assembling it CAUGHT A REAL GAP: the audio decode was missing the checkpoint's `dec_in_proj` (Conv1d k=1 from vae_latent_channels to num_mels) ahead of BigVGAN β€” now applied when the weight is present, with the standalone BigVGAN gate unchanged. `test_minimax_h3` 20/20 / 6370 assertions. NOT gated: fl2va/ref2va conditioning, bit-exact torch-RNG noise seeding (noise is an INPUT by design), and any run on a REAL checkpoint. Still NO speed number. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W9-LOAD`; branch `feat/minimax-h3`) | **MiniMax-H3 GGUF arm COMPLETE (W9).** `LoadMiniMaxH3DitFromGguf` turns a ComfyUI-format GGUF into a runnable DiT: resolve the manifest (identity name map, `ne` reversal, the `comfy.gguf.orig_shape` reshape rule), derive the geometry from SHAPES alone, dequantize every tensor to f32 through the shared `DequantGgufRowToF32`, and bind the forward's non-owning views. | the ComfyUI GGUF writer's layout + this project's existing GGUF reader/dequant stack (so the K-quant families need no new code). | **CPU-GATED by a synthetic-file LOAD-AND-RUN test**: the geometry is recovered exactly from tensor shapes, a loaded weight carries the LOGICAL (torch) shape rather than the reversed `ne`, and a REAL DiT forward executes off the loaded weights producing finite, correctly-sized outputs. Missing tensors throw BY NAME rather than yielding a null view the forward would read as zeros. `test_minimax_h3` 21/21 / 6668 assertions. NOT gated: a load of the ACTUAL 15.6 GB file (needs the download) and NVFP4 loader wiring. Still NO speed number. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W10-LOAD`; branch `feat/minimax-h3`) | **MiniMax-H3 NVFP4 loader (W10, loader half).** `LoadMiniMaxH3DitFromNvfp4` turns an NVFP4 compressed-tensors checkpoint into a runnable DiT: the U8-packed [out, in/2] weight plus its E4M3 group-16 `weight_scale` and F32 scalar `weight_scale_2` are dequantized through the project's EXISTING `DequantNvfp4ToBf16`, the fp32/bf16 islands are read as-is, quant sidecars are excluded from the model tensor set, and the geometry is recovered from the DEQUANTIZED shapes. The view binding is now SHARED with the GGUF arm (`BindMiniMaxH3DitViews`) since both land on the same weight contract. | compressed-tensors NVFP4 (already implemented in this tree for the Laguna arm) + the real `lilcheaty/MiniMax-H3-NVFP4` manifest gated earlier. | **CPU-GATED by a synthetic-file LOAD-AND-RUN test**: a packed [out, in/2] weight comes back as the logical [out, in], `weight_scale`/`weight_scale_2` never appear as model tensors, and a REAL DiT forward executes off the loaded weights with finite outputs. NOTE the refactor that introduced the shared binder initially corrupted six tensor NAME STRINGS (a blind `out.`->`out->` rewrite turned "time_embedder.proj_out.bias" into "...proj_out->bias"); the loader's throw-BY-NAME design caught it immediately instead of silently binding zeros β€” which is exactly why it is written that way. `test_minimax_h3` 22/22 / 6971 assertions. NOT done: the DEVICE path that keeps FP4 packed and routes projections through the cutlass FP4 GEMM (that is where the speed is), and a run on the real file. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W3-VISION`; branch `feat/minimax-h3`) | **MiniMax-H3 encoder VISION block (W3, second half).** The repeated unit of the H3-Encoder's Qwen3-VL vision tower: LayerNorm -> fused-qkv non-causal attention with fp32 rotary -> proj -> residual; LayerNorm -> tanh-GELU MLP -> residual. | `vllm_omni/diffusion/models/minimax_h3/encoder.py:337-481` (patch embed, rotary, merger, MLP, attention, block). | **CPU-GATED: max abs diff 6.0e-8** vs upstream at reduced dimensions. The block differs from the TEXT tower in four numerically load-bearing ways, all exercised: LayerNorm WITH BIAS rather than RMSNorm; a [q_all, k_all, v_all] qkv layout (NOT the per-head interleave the video-VAE ViT uses β€” the two ViTs in this model disagree on this); fp32 rotary; and the TANH-approximate GELU rather than exact erf. Attention is segmented by `cu_seqlens`, and the test PROVES the isolation: perturbing a token in the second packed image leaves every output of the first BIT-IDENTICAL, while the second's do change. `test_minimax_h3` 23/23 / 7040 assertions. NOT gated: the vision surround (Conv3d patch embed, learned pos-embed interpolation, the 2D rotary table, patch + DeepStack mergers) and the MM processor. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-W3-TOWER`; branch `feat/minimax-h3`) | **MiniMax-H3 encoder COMPLETE (W3).** The full vision tower: Conv3d patch embed, bilinear interpolation of the learned position grid into spatial-merge order, the 2D rotary table, the block stack over per-frame `cu_seqlens`, the DeepStack mergers and the final patch merger. | `encoder.py:337-600` (patch embed, rotary, mergers, `fast_pos_embed_interpolate`, `rot_pos_emb`, `MiniMaxH3Qwen3VLVisionModel.forward`). | **CPU-GATED: merged output and DeepStack features both within 1e-4** of upstream over a RAGGED two-image batch (different h/w), so the position-embedding interpolation and the per-frame cu_seqlens both had to handle unequal grids. Details that are load-bearing and now pinned: the patch embed's Conv3d has kernel == stride, so it is a linear over the flattened patch; `torch.linspace(0, n-1, 1)` returns the START, not the end; `.int()` TRUNCATES when picking the bilinear corners; and the two merger flavours differ β€” the final merger norms the PRE-shuffle width while the DeepStack mergers norm the POST-shuffle width, both with exact-erf GELU rather than the block MLP's tanh approximation. `test_minimax_h3` 24/24 / 7050 assertions. REMAINS on the encoder: only the MM processor (image/video preprocessing into patches). Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-COND-NOISE`; branch `feat/minimax-h3`) | **MiniMax-H3 condition-noise augmentation.** fl2va/ref2va pin their keyframe and reference-audio rows to a NOISED anchor: `out = noise_aug*clean + (1-noise_aug)*noise`, over packed condition rows, for both the visual and audio sides. | `condition_noise.py` (whole file). | **CPU-GATED EXACT (<= 1e-6).** The mix is trivial; the gate's value is the ROW ACCOUNTING: each visual condition draws noise of length `target_latent_t + imgvid_cond_num_frames` then slices the PREFIX matching its own latent_t (a shorter condition does NOT get a shorter draw), every condition restarts the SAME seed (concatenating and drawing once would be numerically different for multi-reference requests), and rows advance by that condition's own patchified count. The golden supplies the noise upstream drew, so the comparison isolates the accounting from torch's RNG β€” which remains a tracked open item, consistent with the t2va pipeline also taking noise as an input. `noise_aug == 1.0` is asserted as the documented identity, and shape/row-count disagreements throw rather than mis-slicing. `test_minimax_h3` 25/25 / 8787 assertions. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-REFVID-MATH`; branch `feat/minimax-h3`) | **MiniMax-H3 reference-video geometry + frame schedule** β€” the pure-math half of `reference_video.py`: the canvas pipeline (aspect clamp to [1:4, 4:1] -> 768 short edge -> max-pixel rescale -> nearest multiple of 32, Python round-half-to-even) and the frame schedule (24 FPS resampled to the 2 FPS Qwen video rate with duplicate indices dropped, then timestamps averaged per temporal patch with the tail padded by REPEATING the last). | `reference_video.py:24-27, 84-103, 201-260`. | **CPU-GATED EXACT** on canvases and on sampled indices + block timestamps. A self-invented invariant ("the snapped canvas respects the max-pixel budget") FAILED and was CORRECTED rather than the port changed: upstream applies the budget BEFORE snapping to 32 and does not re-check afterwards, so 3840x1080 legitimately yields 1920x544 = 1,044,480 > 1,032,192. The test now asserts the invariant the reference actually holds. **DEPENDENCY BOUNDARY recorded:** the rest of the module (probe, transcode, frame extraction, audio decode) shells out to ffmpeg/soundfile and is blocked on the SAME decision as MP4 muxing β€” one dependency choice unlocks reference-video INPUT decode and generated-video OUTPUT encode together. `test_minimax_h3` 26/26 / 8908 assertions. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-VAE-TILING`; branch `feat/minimax-h3`) | **MiniMax-H3 video-VAE spatial tiling.** The tile plan along one axis plus the seam cross-fade, so large canvases can be decoded in overlapping tiles. | the checkpoint's `klvae.py:192-250` (`split_tiles`, `blend`); shipped config tile_size 256 / tile_overlap_min 64 / vae_ratio 16 (= prod(space_down) [2,2,2,2,1,1], the 'f16' in f16t4). | **CPU-GATED EXACT** over six cases (tiled, exactly-one-tile, smaller-than-tile, and a non-default tile/overlap pair). The plan is NOT a simple stride: it takes the smallest tile count whose MINIMUM overlaps still cover the input, then distributes the leftover slack in whole `vae_ratio` units ROUND-ROBIN across the seams β€” get that wrong and every tile after the first shifts, surfacing as seam artifacts rather than an error. The test also asserts structural invariants (tiles cover the axis, every seam meets the minimum overlap, overlaps stay congruent mod vae_ratio) and that the cross-fade starts fully on the previous tile and ends fully on the next. `test_minimax_h3` 27/27 / 9036 assertions. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-PRESENTATION-TAGS`; branch `feat/minimax-h3`) | **MiniMax-H3 presentation token tags** β€” the AdaLN tag layout aligned with the prompt presentation, i.e. the fl2va "vision-span override" that `denoise_loop.py` requires callers to have applied to `token_tags` before the forward. | `presentation.py:20-62, 92-129`. | **CPU-GATED EXACT** against upstream driven by a stub tokenizer (only span LENGTHS affect tags). The load-bearing detail: a vision block is `vision_start + pad*count + vision_end` and the WHOLE block β€” MARKERS INCLUDED β€” is tagged VIDEO(0); tagging only the pads leaves two markers as TEXT(1) and shifts every AdaLN modulation index after them, which is a silent wrong-result. The test additionally proves every VIDEO run in the output equals a whole emitted vision span, so an off-by-two cannot pass. Tokenization deliberately stays with the caller (it owns the tokenizer); this owns the span->tag mapping, which is the part that must agree with the packed layout. `test_minimax_h3` 28/28 / 9129 assertions. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-VAE-CNN`; branch `feat/minimax-h3`) | **MiniMax-H3 video-VAE 3D-CNN ENCODER primitives** β€” causal Conv3d, GroupNorm3D, and the ResnetBlock3D that is the repeated unit of the encoder stack. The encoder serves image/video CONDITIONING (fl2va keyframes, ref2va references), not output frames. | the checkpoint's `conv.py:12-88` (BaseConv3d padding), `norm.py:342-357` (32 groups, eps 1e-6) and `vae_cnn.py:83-171` (ResnetBlock3D). | **CPU-GATED EXACT** vs the checkpoint's own module. Two details pinned: the convolution is CAUSAL in time β€” `padding[0] * 2` frames on the LEFT and none on the right, with CONSTANT (zero) temporal padding and `reflect` spatial padding β€” and GroupNorm's statistics span TIME as well as space, so a per-frame normalization would silently differ. CAUSALITY is PROVEN, not assumed: on the bare convolution, a change to the last frame leaves earlier frames bit-identical while the last frame's own output changes; at block level (where GroupNorm mixes across time) the weaker claim that the perturbed frame moves strictly more is asserted instead. `test_minimax_h3` 29/29 / 9137 assertions. REMAINS on the encoder: the Downsample3D + EncoderFCN3D assembly. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-VAE-DOWNSAMPLE`; branch `feat/minimax-h3`) | **MiniMax-H3 video-VAE Downsample3D** β€” the strided convolution between encoder levels, plus stride support in the shared causal Conv3d. | the checkpoint's `vae_cnn.py:34-81`. | **CPU-GATED EXACT.** The subtlety is the ASYMMETRIC pre-pad: when the spatial stride is 2 the input is padded by ONE pixel on the RIGHT of W and the BOTTOM of H (`F.pad(x, (0,1,0,1,0,0))`) BEFORE a stride-2 conv with padding (1, 0, 0). Padding symmetrically instead shifts the whole sampling lattice by half a pixel β€” a silent wrong latent, not an error. Output extents are asserted (H/W halve; T halves under the causal pad). `test_minimax_h3` 30/30 / 9143 assertions. REMAINS on the VAE encoder: only the EncoderFCN3D level-loop assembly. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-VAE-ENCODER`; branch `feat/minimax-h3`) | **MiniMax-H3 video-VAE 3D-CNN ENCODER complete** β€” the level loop assembling conv_in, per-level ResnetBlock3D stacks, Downsample3D (or a 1x1x1 channel match when a level does not downsample), GroupNorm, SiLU and conv_out. With this the video VAE is complete on BOTH halves. | the checkpoint's `vae_cnn.py:177-297`. | **CPU-GATED EXACT.** The channel plan is the fiddly part and is pinned: `block_mid[i] = ch*ch_mult[i]`, `block_in[0] = block_mid[0]`, `block_in[i>0] = block_mid[i-1]`; a level gets a Downsample3D when `space_down[i]*time_down[i] > 1`, otherwise a 1x1x1 conv ONLY if its channel count changes, and nothing at all when it does not. **A first run mismatched at 2.25 and the cause was MY TEST FIXTURE, not the port**: the generator's scale rule tested `".norm" in name`, which silently missed `norm_out.weight` (no leading dot), so the two sides seeded that gain differently. Rule corrected to `"norm" in name`; the port was unchanged. `test_minimax_h3` 31/31 / 9150 assertions. The encoder serves image/video CONDITIONING; a t2va generation path does not call it. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-MM-PROCESSOR`; branch `feat/minimax-h3`) | **MiniMax-H3 MM processor β€” REUSE of the existing Qwen3-VL front end, gated on H3's own config.** H3's `FL2VA/processor` is a stock `Qwen3VLProcessor`, so no new port was needed; what needed proving is that H3's ACTUAL config parses and drives it. | H3's `FL2VA/processor/preprocessor_config.json` and `video_preprocessor_config.json`; our `multimodal/qwen3vl_processor.{h,cpp}`. | **CPU-GATED PASS.** Parses patch 16 / temporal 2 / merge 2 and β€” notably β€” **image_mean/std 0.5 rather than the usual CLIP statistics**, so H3 normalizes to [-1, 1]. Grid factor is patch*merge = 32; the 768x1344 default canvas is proven an IDENTITY under smart_resize (resizing it would silently change the conditioning image), off-grid inputs snap to the grid, and the VIDEO bounds (shortest 4096, longest 25165824) are asserted deliberately LOOSER than the image ones in both directions. `test_minimax_h3` 32/32 / 9178 assertions. **This closes the last PORTABLE item in the lane**; the remainder is one dependency decision (ffmpeg media I/O + MP4 muxing) and GPU-blocked work (the device-resident FP4 forward, and therefore any speed number). Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-WAV`; branch `feat/minimax-h3`) | **MiniMax-H3 audio output β€” RIFF/WAVE serialization.** The decoded stereo waveform is written as 16-bit PCM, converting the audio VAE's CHANNEL-MAJOR layout to INTERLEAVED. | the WAV/RIFF container spec; the audio VAE's 32 kHz stereo output contract (`vae.py`, `dac_audio_vae.py`). | **CPU-GATED PASS.** Header fields (RIFF/WAVE/fmt/data, PCM tag, channels, sample rate, byte rate, block align, bit depth, chunk sizes) are each asserted, the interleave is verified sample-by-sample against the channel-major input, full-scale +/-1.0 maps to +/-32767 WITHOUT wrapping, and out-of-range input is clamped rather than wrapped. **Deliberately dependency-free**: `/v1/videos` ultimately returns MP4 and how this project obtains a muxer is an OPEN DEPENDENCY DECISION (upstream vLLM-Omni shells out to ffmpeg; this tree has NO subprocess precedent in the core library, so a library that forks is a project-owner call). WAV needs none of that and is required under EITHER outcome. `test_minimax_h3` 33/33 / 9207 assertions. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-VIDEO-OUTPUT`; branch `feat/minimax-h3`) | **MiniMax-H3 video output** β€” PPM frame serialization and the MP4 mux command, completing the output path alongside WAV. | upstream vLLM-Omni's container choice (H.264 + audio via ffmpeg) and its `/v1/videos` contract. | **CPU-GATED PASS, plus an end-to-end EXTERNAL check.** Unit gates: PPM converts the pipeline's PLANAR [C,T,H,W] float frames to row-major INTERLEAVED RGB with [-1,1] mapped to [0,255] and clamped (header, per-pixel channel order, mid-grey, per-frame distinctness and range checks all asserted); the argv carries h264/yuv420p (so every player accepts it), AAC, `-shortest` (no trailing silence or orphan video) and `+faststart` (moov atom first => streamable), and a SILENT clip is asserted to omit the audio codec and `-shortest`. **External check: the exact argv the library builds was RUN through real ffmpeg 6.1.1 over generated PPM+WAV in this project's own formats, producing a VALID MP4 β€” ffprobe confirms h264 / yuv420p video plus AAC stereo at 32 kHz.** ARCHITECTURE: the library BUILDS artifacts and the command but NEVER spawns a process (`src/vllm/` has no subprocess precedent, and a forking library is a different commitment from a Python serving layer that shells out); the invocation belongs to the example/server layer. `test_minimax_h3` 34/34 / 9233 assertions. Parity pin UNCHANGED. | +| 2026-08-03 (`CLAIM-MINIMAX-H3-VIDEO-API`; branch `feat/minimax-h3`) | **MiniMax-H3 `/v1/videos` serving surface** β€” the request contract and the async job store, mirroring vLLM-Omni's two endpoints (`POST /v1/videos` returning a job id, `POST /v1/videos/sync` returning the MP4 inline). | vLLM-Omni's `/v1/videos` + `/v1/videos/sync` contract and its `extra_params` knobs (duration, num_inference_steps, flow_shift, audio_flow_shift, seed). | **CPU-GATED PASS (4 cases / 63 assertions).** Request parsing applies H3's documented defaults (50 steps, flow shift 12 video / 3 audio), accepts BOTH the vLLM-Omni `extra_params` nesting and a flat top-level spelling, and REJECTS malformed input with a specific reason rather than silently defaulting (non-JSON, non-object, missing/mistyped prompt, non-positive steps or shifts, negative duration or extent). The job store enforces queued -> running -> succeeded/failed: illegal transitions THROW rather than corrupting a finished record, an unknown id is reported so the route can 404 instead of returning an empty 200, a succeeded job must carry an output path, a failed job never has an empty reason, and status JSON omits fields that do not apply. Concurrent creation across 8 threads is asserted to keep ids unique and lose no record. The library still spawns NOTHING β€” generation+mux enter as a caller-supplied `VideoRunner`, whose ffmpeg invocation lives in `examples/` per the developer's ratified decision. REMAINS: route registration + runner injection (mechanical). Parity pin UNCHANGED. | +| 2026-08-05 (`CLAIM-MINIMAX-H3-AUDIO-ENCODER`; branch `feat/minimax-h3`) | **MiniMax-H3 audio-VAE ENCODER + the last two unwired ref2va conditioning modes.** Ports the DAC analysis stack (Snake1d, ResidualUnit, EncoderBlock, the strided conv stack), the `pre_block` AttnProjection (causal SDPA, mean over heads, adaptive-average-pool narrowing 2048->32, GeGLU MLP) and `mean_proj`; adds `LoadMiniMaxH3AudioVaeEncoderWeights`, `MiniMaxH3AudioVaeEncodeToRows`, `MiniMaxH3EncodeReferenceAudio` and a gated `MiniMaxH3ReadWav`; replaces the two VT_CHECK refusals so `kAudio` and `kVideoAudio` with `ref_audio_t > 0` work, feeding the denoise loop's previously always-empty `audio_ref_rows`. Driver: `--ref-audio f.wav`. | the checkpoint's own remote code `FL2VA/audio_vae/dac_audio_vae.py:25-117,157,201-209` and `dac_attn_proj.py:8-88`, composed the way vLLM-Omni composes the encode in `vae.py:293-341` (there is no `encode` method on the shipped `DacAudioVAE` β€” it exposes only `decode`, :211-225); reference-row plumbing per `pipeline_minimax_h3.py:708-730,937-975`. | **CPU-GATED vs the CHECKPOINT'S OWN MODULES, stage by stage**: conv stack **2.98e-8**, AttnProjection **1.64e-7**, whole encode-to-latent **1.86e-8** (generator `scripts/gen-minimax-h3-audio-vae-encoder-goldens.py`, same FNV-1a + splitmix64 stream as the DiT/decoder generators, so no weight byte is checked in). The reduced input is 25 samples against a hop of 4, deliberately NOT a multiple, so a port skipping `preprocess` returns 6 frames not 7. Loader gated on the REAL 1087-tensor manifest, which also confirms the shipped geometry from shapes alone (`encoder_rates` [2,4,4,5,5], `latent_dim` 2048, `attn_proj_dim` 32, qkv 3x the INPUT width); all three weight-norm spellings accepted, the materialized one round-tripping to <=1e-6. `mean_proj` and never `logs_proj` β€” `logs_proj` is not even loaded, so a reference conditions identically every run. WIRING gated on the load-bearing property rather than acceptance: an audio reference moves the AUDIO rows by **0.51**, a video+audio reference by **0.71** against the SILENT same-clip control, a DIFFERENT waveform still by **7.1e-4**, and a DIFFERENT clip with the same audio moves the VIDEO rows by **3.7e-2**. Only the NARROWING AttnProjection branch is implemented (the one the checkpoint ships); the widening branch refuses loudly. NOT gated: any real-checkpoint reference-audio render. 60/60 cases / 29427 assertions, clean CPU build. | diff --git a/.agents/roadmap_v1.md b/.agents/roadmap_v1.md index ee8d437ec..a5c9b6216 100644 --- a/.agents/roadmap_v1.md +++ b/.agents/roadmap_v1.md @@ -512,6 +512,7 @@ models we already ship + benchmark. Full seam map + M0–M5 W-plan: | 13 | `ROAD-V1-D4` | **KV persistent state to disk, and external KV-cache provider interoperability with LMCache** (user-directed 2026-07-22: "let's do the KV persistent state to disk support, and LMCache support too", under the standing same-featureset-as-vLLM-and-better bar) | [`KV-OFFLOAD`](engine-matrix.md), [`KV-EXTERNAL-CACHE`](engine-matrix.md), [`KV-CONNECTORS`](engine-matrix.md), [coverage view Β§2](feature-matrix.md#2-kv-cache--memory), [LMCache quickstart](https://docs.lmcache.ai/getting_started/quickstart.html) | spike ACCEPTED [kv-persistence-lmcache.md](specs/kv-persistence-lmcache.md) β€” 60 enumerated features across `vllm/v1/kv_offload/`, the `KVConnectorBase_V1` ABI and the LMCache integration, each with a DONE/PARTIAL/MISSING verdict read out of our source. **The two halves of the user's ask are NOT the same kind of work.** Disk persistence is a faithful MIRROR job and is tractable: vLLM's `fs` tier is ~101 lines of `open`/`write`/`readv` with nothing Python-specific in the byte path, one raw file per block, temp-file + atomic rename under `O_DIRECT`. LMCache is NOT: the vLLM-facing glue is vendored in-tree (~2396 lines) but every file of it imports the EXTERNAL PyPI package at module scope, and the storage engine, wire protocol, config schema and CUDA-IPC handoff all live outside the tree with no upstream test that runs without it β€” so it is scoped as an interop STUDY with a go/no-go, never a from-scratch client. **REOPENED 2026-07-23 ([LMCache client wire analysis](specs/lmcache-cpp-client-connector.md)), and the "no specified wire protocol" half of that verdict is REFUTED by reading the LMCache package: vLLM connects to a RUNNING LMCache over TWO fully-specified portable wires β€” the `lm://` remote-store (plain TCP + fixed `struct` header + raw KV bytes, no ZMQ/msgpack/pickle/CUDA-IPC) and the MP server (ZMQ + `msgspec.msgpack` + CUDA-IPC, the user's "zmq" recollection). A from-scratch C++ client is FEASIBLE with ZERO `lmcache` in-process; both wires sidestep the hash blocker because LMCache keys on its own blake3 token hash. Recommend the `lm://` mode first. Residual risk is that LMCache is an unpinned moving target β€” an interop feature with a version-sync cost, not a mechanical core port. LMCACHE-CLIENT W1 LANDED 2026-07-23 (`CLAIM-LMCACHE-CPP-CLIENT`, `KV-EXTERNAL-CACHE` `SPIKE`β†’`ACTIVE`): the pure-CPU `lm://` wire codec β€” fixed-`struct` `ClientMetaMessage`/`ServerMetaMessage` framing, the `CacheEngineKey` string, the blake3 rolling token hash (vendored BLAKE3 1.5.5), and the `KV_2LTD` `[2,L,T,D]` repack β€” is BYTE/BIT-EXACT vs fixtures from the real Python codec (`test_lmcache_codec` 6/6, 2074 assertions), blake3 verified byte-identical on x86-64 + aarch64, and INERT (no call site; the connector is client-W3). LMCACHE-CLIENT W2 LANDED 2026-07-23 β€” the go/no-go PASSED: a blocking POSIX-socket `LMCacheRemoteClient` (PUT/GET/EXIST/HEALTH/LIST + `KV_2LTD` repack + `VT_LMCACHE_*` config) round-trips a REAL `lmcache.v1.server` (`8570aad`, run headless from source in a throwaway venv β€” torch imported before lmcache to dodge a torch circular import, the compiled `c_ops` ext stubbed as unused by the lm:// CPU store) byte-identical (`test_lmcache_client` 36/36), with BIDIRECTIONAL interop proven against LMCache's OWN Python protocol codec; the always-on CI gate is a same-binary C++ mock-server round-trip (45/45, no Python). STILL `ACTIVE`, not DONE. Resume at client-W3 (wire as a `KVConnector` over the parent W5 seam, then key-agreement + DGX every-axis gates).** **Blocking correction found in OUR source:** `NONE_HASH` is seeded from `std::random_device` with no escape hatch, so every block hash differs across processes and a content-addressed disk tier would score 0% hits on restart β€” we are WORSE than vLLM here, which at least exposes `PYTHONHASHSEED`. This also FALSIFIES the caching spike's Β§B2 claim that we are deterministic by construction. **Two upstream weaknesses recorded as beyond-parity targets:** the `fs` tier's `config.json` is written and never read (its only identity check is a path digest that omits checkpoint content, weight quantization, rope config and `sliding_window` β€” a silent-wrong-output hazard we will not copy), and the disk tier has no capacity accounting and no eviction. Three matrix rows `INVENTORIED` -> `SPIKE`; `SharedStorageConnector` found RENAMED to `ExampleConnector` and `P2pNcclConnector` found DELETED at the pin, both stale in the prior record **W1-W3 IMPLEMENTED 2026-07-22, CPU-only.** W1 deterministic block hashes: `init_none_hash` now resolves explicit arg > `$VLLM_PREFIX_CACHING_HASH_SEED` > `$PYTHONHASHSEED` > a fixed built-in default, so hashes are identical across processes with ZERO configuration β€” the blocking correction is CLOSED, and we now BEAT upstream on this axis rather than trailing it (upstream is random-by-default and documents `PYTHONHASHSEED` as the operator's problem). Proven by comparing hash chains emitted by SEPARATELY LAUNCHED processes, with a negative control confirming the opt-in `=random` mode genuinely disagrees. W2 CPU primary tier: `CachePolicy` (LRU + ARC) with the `ref_cnt == -1` tri-state and the ATOMIC evict, `CPUOffloadingManager` incl. the `prepare_store -> nullopt` skip control path, pinned backing store, and a side-queue event-polled device/host transfer worker. W3 disk `fs` tier: one raw file per block, temp-file + atomic rename publish, self-healing unlink, dual-queue read/write pool. **BOTH recorded upstream weaknesses are now EXCEEDED rather than merely noted** β€” the identity block is a VERIFIED header read on EVERY open that REFUSES on mismatch across 27 fields (tested per field, with a positive control), and the tier carries a byte budget with policy eviction honoured across restarts. `O_DIRECT` deliberately NOT ported (a header+payload file breaks its alignment requirement); the GIL-releasing batch-lookup C extension is unconditionally unnecessary without a GIL. `KV-OFFLOAD` `SPIKE` -> `PARTIAL`. **W4 IMPLEMENTED 2026-07-23:** the TIERING MANAGER (ONE manager over CPU primary + disk secondary β€” diskβ†’CPU promotion RETRYβ†’flushβ†’HIT, cascade demotion, reset drains the secondary first and never resets it so a persisted cache survives) and the CONNECTOR/SCHEDULER HALF (`OffloadingConnector`, the semantics of `KVConnectorBase_V1`'s scheduler hooks β€” nullopt third state, `block_hashes` striding, load-before-compute β€” wired OPT-IN + DEFAULT-OFF into the scheduler). First measured offload speedup: a restarted-prefix workload through the REAL scheduler saved 32/48 prefill tokens (2/3 blocks HIT from disk), promoted bytes byte-identical to the cold store; identity refusal holds through a promotion. Ported the SEMANTICS not the Python plugin ABI (compile-time wiring); the full abstract ABI is W5. **W5 IMPLEMENTED 2026-07-23, CPU-only:** the connector seam is now a first-class C++ ABI β€” the abstract `KVConnector` base carrying the full scheduler + worker method set of `KVConnectorBase_V1` (the scheduler methods load-bearing, the worker hooks defaulted no-ops for our synchronous runner, documented), a compile-time `KVConnectorFactory` + `REGISTER_KV_CONNECTOR` (the C++ analogue of vLLM's `importlib` module path), and a `KVTransferConfig` selection surface (default `kv_connector` empty == no connector == zero behaviour change, `kv_role` validation, `fail`-default load policy). The W4 disk connector was refactored ONTO this base behaviour-identically β€” the restart-hit e2e reproduces byte-for-byte and a config-selected owning connector shortcuts prefill by the identical 32/48. `KV-CONNECTORS` `SPIKE`β†’`ACTIVE`. This closes the seam so LMCache client-W3 is 'implement the abstract `KVConnector` with the landed W2 `lm://` client'. **LMCACHE-CLIENT W3 LANDED 2026-07-23 β€” the `lm://` client wired as a `KVConnector` over the W5 seam (`LMCacheConnector`, `REGISTER_KV_CONNECTOR("LMCacheConnector", …)`, default OFF), the FIRST time the whole chain engine -> connector -> W2 client -> a running lm:// server -> back runs.** Scheduler side computes rolling-blake3 chunk hashes and `Exist`-probes the remote store for the longest cached prefix (synchronous `(n, false)`, mirroring `lmcache_connector.py:230-259`); worker `StoreChunk`/`LoadChunk` drive the W2 client with foreign-block REFUSAL. **Gate ACHIEVED = the connector-level round-trip: STORE a prefix -> a fresh "restarted" connector LOOKS UP + shortcuts prefill through the REAL scheduler (32/48 tokens saved) -> LOAD byte-identical; foreign-key REFUSAL; default-off INERT** (`test_lmcache_connector` 5 cases / 50 assertions vs an in-process mock; store->load ALSO GREEN vs a REAL `lmcache.v1.server` 8570aad, 16 assertions, `VT_LMCACHE_LIVE_*`). **LMCACHE-CLIENT W4 LANDED 2026-07-23 β€” REAL peer KEY-AGREEMENT + a peer->us interop LOAD, both PROVEN β€” the interop-correctness milestone is COMPLETE; `KV-EXTERNAL-CACHE` stays `ACTIVE` for the DGX full-model output-invariance + throughput arm.** The actual `lm://` key derivation is `ChunkedTokenDatabase` (NOT the blake3 MP hasher): chunk_size 256, a rolling prefix-hash over `(prefix_int, tuple(tokens), extra=())` keyed by vLLM's OWN hash (portable `sha256_cbor`), folded to uint64 each step, `NONE_HASH=fold8(sha256_cbor(str(PYTHONHASHSEED)))`. Mirrored byte-exact (`chunked_token_database.{h,cpp}`, reusing `CborValue`+`sha256_cbor`) and wired as connector `key_mode=kVllmSha256Cbor` (chunk 256) alongside W3's kept-green blake3 path. Key-agreement GREEN: `test_lmcache_key_agreement` 4/85 == the REAL lmcache `ChunkedTokenDatabase.process_tokens()` BYTE-FOR-BYTE (fixtures dumped from the unmodified real driver + vLLM's pinned `sha256_cbor`/`init_none_hash`), sample `meta-llama/Llama-3.1-8B@1@0@33d6862800fff40c@bfloat16`. Peer->us LOAD GREEN over the wire: a REAL lmcache `ChunkedTokenDatabase` derives a key + PUTs KV to a REAL `lmcache.v1.server`, our C++ re-derives the SAME key and GETs the 512 B byte-identical (`run_key_interop.sh`). ASan+UBSan clean. Text-only (mm-hash extra_keys deferred). **LMCACHE-CLIENT W5 LANDED 2026-07-24 β€” the LAST open arm, connector-ON full-model OUTPUT-INVARIANCE + throughput in a REAL generation loop, is CLOSED (spec gates 4/6 met).** The worker side is now wired into the engine: `GPUModelRunner::execute_model` calls `ConnectorLoadExternalKv` before the forward (writes the external-prefix KV into the allocated GPU blocks, load-before-compute) and `ConnectorStorePromptKv` after (stores each newly-complete prompt block), and `LoadedEngine` builds the connector from an `EngineParams` `KVTransferConfig` and wires it to BOTH the scheduler and the runner. **OUTPUT-INVARIANCE PROVEN on a real OPT-125m loop vs a live `lmcache.v1.server`: connector-ON generated tokens are BIT-IDENTICAL to connector-OFF (cold full prefill) β€” first-divergence index -1 β€” on BOTH (a) a store->restart->load cycle in one process AND (b) a genuinely cold second process that only hits the server; prefill saved on the hit = 48 tokens (3Γ—16-token blocks).** `tests/vllm/models/test_lmcache_output_invariance.cpp` PASSES both modes via `scripts/lmcache/run_output_invariance.sh`. THROUGHPUT reported HONESTLY: on a 125M model the wall-clock delta is noise-dominated (fixed TCP/copy overhead ~ tiny compute saved), so NO binding speedup is claimed β€” a real speed number is owed by an every-axis grid on a larger model + long shared-prefix corpus (docs/BENCHMARKS.md). No-regression: OPT SACRED UNCHANGED default-off (6/6, 96/96, 63/63); connector unit tests green (codec 6/6, client 3/3, connector 5/5, key-agreement 4/4, kv_offload_connector 11/11); ASan+UBSan clean on the connector path; CUDA `-Werror` 0 warnings. Additive + default-off inert (all worker/loader changes are behind a null-connector guard)| `PARTIAL` | **W7 the one genuine beyond-parity item (imperative named per-sequence save/restore), which now has the verified header it depends on; and a binding every-axis LMCache throughput grid on a larger model vs vLLM's `--kv-transfer-config`.** W5 (the abstract ABI) is DONE; LMCache client W1 (codec) + W2 (client) + W3 (connector round-trip) + W4 (peer key-agreement + interop load) + W5 (full-model output-invariance) are DONE. **The benchmark blocker is CLEARED:** the caching spike's W1 prefix-cache counters landed earlier, so the W4 offload arm proved its hits | | 13a | `ROAD-V1-D4-APC` | **Prompt / prefix caching to full vLLM parity, then beyond (user-directed 2026-07-22: "same featureset of vLLM and better")** β€” the headline user-facing caching feature, previously mentioned only once in this roadmap despite being a shipped, default-ON behaviour for dense models | [`KV-PREFIX-CACHE`](engine-matrix.md), [`KV-BLOCK-POOL`](engine-matrix.md), [`KV-HYBRID-COORD`](engine-matrix.md), [`KV-MAMBA-ALIGN`](engine-matrix.md), [`KV-EVENTS`](engine-matrix.md), [`KV-PREFIX-MATCH-UNIT`](engine-matrix.md), [`ENG-CASCADE-ATTN`](engine-matrix.md), [coverage view Β§2](feature-matrix.md#2-kv-cache--memory) | umbrella spike ACCEPTED [prefix-prompt-caching-parity.md](specs/prefix-prompt-caching-parity.md) β€” enumerates the complete pinned-vLLM caching surface (38 features) with a per-feature DONE/PARTIAL/MISSING verdict grounded in our source. **The ported core is deeper than the record claimed** (chain hashing, block pool, all three coordinators, the full hybrid fixed-point intersection, four single-type managers); the real gaps are narrower and different: block-hash extra keys are a no-op stub, there are NO prefix-cache statistics at any level, KV events are inert, `cache_salt` and 3 of 4 hash algos are absent, and `reset_prefix_cache` is implemented but unreachable. Three matrix rows corrected, two of them in our favour. `ENG-CASCADE-ATTN` DISPOSITIONED as not owed (default-off, absent from the MRV2 runner we port, unreachable on Blackwell). llama.cpp comparison completed: its "prompt cache" is session/slot state serialization, strictly weaker than APC on every reuse axis, and vLLM already covers disk persistence via the `kv_offload` fs tier β€” the ONE genuine capability neither vLLM nor we have is an imperative named per-sequence save/restore **W1 IMPLEMENTED 2026-07-22: prefix-cache statistics exist for the first time.** `BaseCacheStats`/`PrefixCacheStats`/`CachingMetrics` ported 1:1 from `vllm/v1/metrics/stats.py:35-142`, recorded in `get_computed_blocks`, flagged by `reset_prefix_cache`, taken-and-swapped per step and folded into a 1000-request sliding window exposed on `Scheduler`/`EngineCore`/`LLMEngine`. Per the standing parity-enabler rule `log_stats` is DEFAULTED ON (mirroring upstream's `disable_log_stats=False`), so no benchmark arm is void for want of a counter. `Request::num_preemptions` un-deferred to feed the mutually-exclusive `preempted_*` triple. **FIRST MEASURED HIT RATE: 0.75** (1920 of 2560 queried tokens over 16 requests sharing a 128-token prefix), with a caching-OFF 0.0 negative control β€” the first demonstration in this project that APC actually serves cached tokens. The hard blocker on [`BACKEND-GATE-CUDA-SGLANG-PREFIX`](backend-matrix.md) is CLOSED **W2 DONE 2026-07-27 (`CLAIM-ROADMAP-D4APC`, CPU-gated on dgx GB10, NOT pushed):** `generate_block_hash_extra_keys` ported 1:1 (`kv_cache_utils.py:451-591`) β€” mm hash + LoRA name + `cache_salt`, fixed order lora->mm->salt (prompt_embeds deferred: no prompt-embeds path); `cache_salt`/`lora_name` carried on `Request`/`EngineCoreRequest`, set before the first hash in `FromEngineCoreRequest` (fixes a latent ordering bug). RED-first no-false-share PROVEN: with the stub a differently-salted request false-hits the prior tenant's 48 cached tokens (`n1==48`), with extra keys `n1==0`. Ported extra-key/ordering cases + hash- and manager-level no-false-share (`test_kv_cache_utils.cpp` 29/29, `test_kv_cache_manager.cpp` 10/10). **This unblocks the MM + LoRA cache consumers.** **W3 DONE 2026-07-27 (`CLAIM-ROADMAP-D4APC-W3`, dgx GB10, NOT pushed) β€” the FIRST-EVER cache-ON model gate:** on `Qwen/Qwen3-4B` (dense, full-attention, APC-default-ON β€” the vehicle the prior "vehicle-blocked" note missed) a shared-prefix workload runs APC-ON and APC-OFF through the full paged engine, gating token-identity + hits + prefill drop. **NO engine code changed** (`git diff --stat` = tests+scripts+goldens) β‡’ pure GATE over the already-shipped default-ON path; binary byte-identical β‡’ SACRED unaffected. RESULT (`test_qwen3_apc_e2e` 2/2, 84/84 asserts): APC-ON hits **2240/2777 (rate 0.807)**, APC-OFF 0; APC-ON == APC-OFF EXACT on 5/6 (the 1 diff a vLLM-confirmed 0.125-nat near-tie, RCA'd = attention-kernel-path near-tie flip, not a cache bug); **== vLLM-APC-ON** teacher-forced (APC-OFF 6/6 max gap 0.0 nats = exact argmax, APC-ON 6/6 max gap 0.125 nats, 0 outside top-20); **TTFT drop 70.1β†’39.9 ms = 1.76Γ—** on a cache hit. Existing 4B SACRED gate 16/16 GREEN (no regression). Oracle vLLM 0.25.0 (0.26 venv broken β€” editable source disk-reclaimed; 4B byte-stable across the pin). | `DONE` (headline) | **Row DONE for the default dense APC path (block hashing incl. extra_keys, pool, coordinators, stats, scheduling, cache-ON e2e all gated).** Named NON-BLOCKING tails tracked in their own rows / future items: W4 KV events (`KV-EVENTS` β€” event GENERATION + `msgpack` PAYLOAD DONE 2026-07-27 `CLAIM-ROADMAP-D4-KV-EVENTS`, `SPIKE`β†’`ACTIVE`, byte-exact vs `msgspec`; live ZMQ transport + engine batch wiring DEFERRED), W5 partial-block primitive (upstream dead-code), W6 Mamba-`align` hybrid cache-on (`KV-MAMBA-ALIGN`, SPIKE β€” feeds `BACKEND-GATE-CUDA-SGLANG-PREFIX`), W7 `reset_prefix_cache` dev-endpoint + `--prefix-caching-hash-algo` + `skip_reading_prefix_cache`, W8/W9 the beyond-vLLM named session save/restore. The every-axis cache-on grid vs vLLM/SGLang is a separate perf follow-on under `ROAD-V1-A`. No `/metrics` route yet (`SERVE-METRICS`), so the hit rate is read from the engine API. **`--prefix-match-unit` (0.26-new fine-grained matching unit) W0 spike + W1 resolver LANDED 2026-07-28 (`CLAIM-PREFIX-MATCH-UNIT`, `KV-PREFIX-MATCH-UNIT` PARTIAL): `resolve_kv_cache_block_sizes` computes `hash_block_size = prefix_match_unit if set else gcd(group_block_sizes)`, RED-first unit-gated; config/CLI/ABI field (W2) + scheduler threading of `hash_block_size != block_size` (W3, needs the `KV-BLOCK-POOL` align path) + benchmark (W4) deferred.** | | 14 | `ROAD-V1-D5` | LoRA, local KV/weight offload, expert streaming, wider model zoo | [engine matrix](engine-matrix.md), [model matrix](model-matrix.md) | corrected expert-streaming spike accepted (`ENG-EXPERT-STREAM` READY): bank-only safetensorsβ†’Marlin bank, fixed contiguous cache slots matching Marlin dense strides, logicalβ†’slot remap after explicit router D2H, chunked C