repro(glm53): publish qualified W4A4 DCP4 MTP5 source snapshot - #503
Closed
jackzampolin wants to merge 32 commits into
Closed
Conversation
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-Authored-By: Claude opus <noreply@anthropic.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.1 <noreply@anthropic.com>
Co-Authored-By: Claude GPT-5.6 Sol <noreply@anthropic.com>
Co-Authored-By: Claude GPT-5.6 Sol <noreply@anthropic.com>
Co-authored-by: Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
Co-authored-by: OpenAI Codex <codex@openai.com> (cherry picked from commit f538b46)
Add an opt-in piecewise-only graph mode for autoregressive draft prefill while retaining full CUDA graphs for target and draft decode. Co-authored-by: OpenAI Codex <codex@openai.com> (cherry picked from commit 0f335be)
GLM KDA decode retains the shape plan and creates a fresh B12X binding for each call from vLLM workspace scratch. This prevents a binding from outliving recyclable scratch or KV-cache state while leaving non-B12X and prefill paths unchanged. Validation: tests/models/test_glm5next_model.py (26 passed); ruff check and format check. Assisted-by: OpenAI Codex <codex@openai.com> Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit 3328207)
Assign each completed C4 pool to an independent Triton program and update each request tail separately. Decode and speculative-decode requests retain ordered row processing, while prefill requires packed main-cache slots and consecutive positions. Validated with GLM-5.3-Flash-NVFP4 on four RTX PRO 6000 Blackwell GPUs using a 32k-token standalone-prefill benchmark and parity tests for boundary tails, state-slot isolation, and invalid dummy slots. Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit 18dd85c)
Use B12X mHC for decode-sized rank-local batches, including CUDA graph padding, and TileLang mHC for larger prefill batches. The dispatch threshold derives from scheduler capacity, speculative depth, CUDA graph capacity, tensor parallelism, and sequence parallelism. Every mHC operation in a decoder layer uses the same selected backend. Validated with GLM-5.3-Flash-NVFP4 in W4A4 mode on four RTX PRO 6000 Blackwell GPUs. A 32k-token standalone-prefill benchmark sustained 13,280 prompt tokens/s for 30 seconds; concurrency-one decode without speculative tokens sustained 117.2 tokens/s. Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit 159ca47)
Use the packed Triton KDA path for plain GLM-5.3 decode and the B12X KDA path for speculative decode by default. Plain decode avoids B12X metadata staging and validation overhead, while speculative decode retains B12X checkpoint selection and rollback handling. Expose glm53_kda_decode_backend=auto|b12x|triton through additional_config. The default auto mode preserves B12X initialization for speculative requests; explicit values remain available for qualification and diagnosis. Unknown values fail during model construction. Validation: six targeted GLM model tests; Ruff check and format; direct BF16 kernel comparison against the B12X reference for batch 1 over 64 sequential steps and batch 16; TP4 W4A4 decode benchmarks on physical GPUs 4-7. Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit 28ee5e2)
Select one KDA implementation for the lifetime of every recurrent cache. Auto mode uses Triton when speculative decoding is disabled and B12X when an MTP or DFlash configuration is present. Explicit b12x and triton selections remain unchanged. Both implementations satisfy the BF16 operation reference, but switching their rounding behavior between plain and speculative steps changes subsequent draft acceptance. A server-level choice preserves stable recurrent-state behavior and retains the qualified speculative rollback path. Compatibility: the additional_config interface remains glm53_kda_decode_backend=auto|b12x|triton. Validation: nine targeted GLM model tests, Ruff check and format, and git diff validation. Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit a4b04ee)
Keep Python owners registered during FULL CUDA graph capture alive for the lifetime of each captured graph. B12X mHC bindings own scratch and output tensors whose device pointers are embedded in a graph; releasing those bindings lets the allocator reuse their storage before replay. Profiling teardown releases retained owners together with the graphs. Execution outside CUDA graph capture is unchanged. Validated with the workspace resource tests, the B12X mHC binding test, and GLM-5.3-Flash NVFP4 TP4 target-plus-DFlash2 FULL graph replay on GPUs 4-7. Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit 479f2ee)
Co-authored-by: OpenAI Codex <codex@openai.com> Signed-off-by: Jack Zampolin <jack.zampolin@gmail.com>
Co-authored-by: OpenAI Codex <noreply@openai.com>
…inference-lab#457) Preserve an explicitly configured Mamba state checkpoint cadence independently of the physical attention page size. Derive scheduler alignment from the resolved Mamba cache specifications and convert the annotated EAGLE draft boundary onto the recurrent-state grid. This keeps reusable recurrent and target-attention prefixes aligned when prefill chunks are smaller than the recurrent checkpoint interval.
Co-Authored-By: OpenAI Codex <noreply@openai.com>
Allow synchronous CKV gathering to borrow the persistent workspace when a draft attention layer has no resolved layer index. This keeps MTP graph warmup from falling back to a cache-capacity-sized transient allocation. Co-Authored-By: OpenAI Codex <noreply@openai.com>
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: trueThanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Purpose
Publish the exact vLLM source snapshot used by the qualified
ghcr.io/jackzampolin/glm53-flash-nvfp4-joviancommunity experimental image sothe runtime is reproducible and its branch/PR composition is explicit.
This is a source/reproduction snapshot, not a request to merge this combined
diff as-is. The individual changes should continue upstream feature-by-feature.
Exact source and artifact
jackzampolin:repro/glm53-flash-nvfp4-w4a4-dcp4-mtp5-202608285c1702c572abad8672f66b6d5eab398583532ac55177283cf2b757bb75bc65b824cc0766b2324ec33e63556c2b79de0b3a2f04648e575cb06e8ad276sha256:6a89cd18c1dc38753d7eb9f18dbcb3e937c28a30675cee61f1a1d0dc662a4eccsha256:6ebeaa39d468250e661a43e02201e7a01bc6aa420e3416aca5b47e545081d202sha256:60f6e0c3e8f7f299b6f73374cc51c43e61180f53ec6c924dbd1f1a1d0024decb520de24eabf507659eaef7c70f14fd584527faccThe prior image index
sha256:eb9f5b9b...is superseded: its labels named thiscommit, but its embedded source omitted the final CUDA-graph profiling
implementation and test. The replacement above was rebuilt directly from this
PR fetch ref and requalified.
PR composition
Included:
commits are patch-equivalent to the snapshot.
746600d3bounded draft-prefill implementation; notpatch-identical to the current perf(spec-decode): bound autoregressive draft prefill graph memory #502 head.
142062f13d16bed254b5d97cc3d371fbd4f7790a.Not included:
The remaining commits after the PR-derived work are the tested production
harvest: caller-owned KDA scratch, parallel C4 prefill, mHC dispatch, stable KDA
backend selection, CUDA-graph resource retention/accounting, disabled-capture
profiling policy, bounded CKV workspace, and pre-KV-profiling B12X scratch.
Qualified runtime profile
4x RTX PRO 6000 Blackwell at stock clocks; NVFP4 W4A4 target experts through
Humming; TP4/DCP4; FP8 KV; MTP5 with Humming MXFP8; prefix caching/CKV; B12X
attention and linear; full decode plus piecewise prefill CUDA graphs; 524288
model length; 32 sequences; 4096 batched tokens; 0.88 GPU memory utilization.
Clean-rebuild validation:
runtime errors and zero max-token truncations
Full build/run instructions, component locks, commands, and result tables:
https://github.com/jackzampolin/glm53-flash-nvfp4-jovian
AI assistance disclosure: Codex assembled, tested, and documented this
integration snapshot. Human review remains required for individual upstream
changes.