perf(glm5next): checkpoint target GDN state for MTP prefill - #536
Conversation
|
@coderabbitai review |
|
Warning Review limit reachedNext included review available in 59 minutes. View limit detailsLimit details: You’ve used the included review currently available. You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository. Review configuration: ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
Thanks 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 |
|
Permit GLM-5.3 MTP to publish an internal target GDN checkpoint at a crossed align-mode cache boundary. Draft MLA KV remains independently owned, while the existing EAGLE cache-group policy continues to replay its lookahead-dependent tail. This removes the target-only tail forward for unaligned prompts without changing other MTP architectures or speculative cache ownership. Assisted-by: OpenAI Codex Signed-off-by: Martin Vit <martin@voipmonitor.org>
283f798 to
9f27029
Compare
|
@coderabbitai review |
|
f7851a3
into
perf/glm53-split-target-recurrent-cache-pages
Purpose and status
Status: implemented and qualified for GLM-5.3 MTP align-mode prefill.
GLM-5.3 MTP stores draft MLA KV independently from the target model's gated
delta network (GDN) recurrent state. The generic EAGLE scheduler disables
intermediate recurrent-state checkpoints because most speculative models must
replay a lookahead-dependent draft tail. Applying that blanket policy to
Glm5NextMTPModelalso discards a valid target GDN checkpoint and can schedulean additional target-only forward at an unaligned prompt tail.
This pull request permits target GDN checkpoint publication only when the MTP
draft architecture is
Glm5NextMTPModel. Prefix-cache lookup continues todrop and replay the lookahead-dependent draft tail through the existing EAGLE
cache-group policy. Other MTP architectures retain the generic scheduler
behavior.
Correctness contract
path.
Performance evidence
Hardware was four stock-clock NVIDIA RTX PRO 6000 Blackwell Workstation
Edition GPUs (physical devices 4-7), TP4/DCP1, B12X target attention, B12X
NVFP4 W4A4 MoE, B12X linear kernels and PCIe all-reduce, FlashKDA prefill,
MTP3 with B12X attention and Humming MoE, full CUDA graphs, FP8 target KV,
512-token target/recurrent cache blocks and
max_num_batched_tokens=4096.Each row is the median of three cold completion requests with one output token.
The 32,320-token request crosses a checkpoint boundary with an unaligned
3,648-token prompt tail. Reusing the target checkpoint removes one redundant
target-only forward and improves throughput by 3.75%. The 32,770-token request
does not expose that redundant schedule and remains neutral within 0.2%.
Validation
All pre-commit hooks for the changed files pass, including Ruff and mypy. The
scheduler unit test constructs the 32,320-token boundary case and verifies that
the remaining 3,648 prompt tokens join the checkpointed target tail instead of
forming a separate target-only step.
Six deterministic serving cases in the complete GLM-5.3 MTP stack selected
identical tokens between DCP1 and TP4/DCP4 full-CKV execution. The largest
selected-token log-probability delta was 0.00896.
Relationship to open work
This pull request is stacked on #535, which defines independent target MLA and
recurrent-state page geometry. PR #530 provides FlashKDA target prefill and
#517 provides DCP full-CKV target selection. Those pull requests do not alter
the MTP scheduler's recurrent-checkpoint eligibility.
AI assistance was used to implement, test, benchmark, and prepare this pull
request. The submitted behavior and evidence were reviewed against the source
and runtime logs by the human submitter.