[II] Align hybrid recurrent checkpoints with cache-group boundaries - #457
Conversation
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.
|
Warning Review limit reached
Next review available in: 11 minutes Limit 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. How can I continue?Wait for the limit to reset, then comment An organization admin can change what happens after included review limits in Billing. How do review limits work?CodeRabbit enforces per-developer PR review limits within each organization. For paid Pro and Pro+ reviews, CodeRabbit uses a developer's included PR review attempts over the past 7 days to set the current hourly allowance. At typical activity levels, the full plan allowance applies. Higher sustained activity can lower the allowance until earlier attempts leave the 7-day window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (4)
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 |
b5f995e
into
local-inference-lab:dev/infernal-invocation
Behavior
Hybrid Mamba/attention serving can retain an explicitly configured recurrent-state checkpoint cadence while physical Mamba pages remain padded to the attention page size.
The scheduler derives recurrent alignment from the resolved
MambaSpecgroups. For EAGLE models, it converts the last reusable annotated draft-attention boundary onto the recurrent-state grid. A prefill budget smaller than the recurrent interval may therefore advance through private intermediate states and publish a checkpoint only on a boundary shared with target attention.Technical reason
Platform._align_hybrid_block_sizepreviously replaced every align-mode--mamba-block-sizewith the physical attention block size.Scheduler._mamba_block_aligned_splitalso read the physical cache block directly. Those two behaviors coupled logical recurrent checkpoints to physical page geometry.For Kimi-K3 TP16/DCP16, 768-token recurrent checkpoints combined with 4,096-token prefill budgets did not land on 12,288-token target-attention boundaries. Native offload could restore only the first common 61,440-token boundary. A 12,288-token recurrent cadence permits three 4,096-token prefill steps per target boundary without changing physical page bytes.
Compatibility
--mamba-block-sizeis not explicit, align mode still uses the physical attention block size.Validation
Full-model TP16/DCP16 validation is tracked in the source-composed Kimi-K3 image qualification.
Upstream relationship