fix(glm): classify long DCP profile rows as prefill - #822
Conversation
Signed-off-by: Martin Vit <martin@voipmonitor.org> (cherry picked from commit 65f73469a324f54f43b305590081dc3fd83daf0e)
|
Understand this PR’s impact Explore downstream dependencies and potential security impact with Blast Radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (4)
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe change tightens speculative KDA classification to require query spans equal draft tokens plus one target token. Tests cover zero-draft prefills and decodes, and release metadata records the correction. ChangesGDN metadata classification
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~20 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The revised classification preserves long prefills and retains the capacity guard for explicitly supplied oversized speculative metadata. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 5 functions across 3 files. (1 skipped: 1 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
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 |
Signed-off-by: Martin Vit <martin@voipmonitor.org>
Result
A GLM-5.3-Flash TP4/DCP4/MTP3 server with a 4096-token scheduler budget starts successfully instead of sending a 4096-token memory-profile prefill into the 128-token B12X KDA decode kernel. The GDN builder and its B12X mixed worklist classify a row as speculative decode only when its query length equals one target token plus the declared draft count. Valid one-token and MTP decode rows keep their existing route.
Cause and compatibility
During
profile_glm_dcp_attention, a dummy 4096-token prefill can carry a zero-draft marker. A nonnegative marker alone is not evidence that the row is decode. The former condition classified this prefill as speculative decode and raisedb12x KDA capacity exceeded: tokens=4096/128. The fix does not alter checkpoint content, model weights, sampling, or real decode geometry. An explicit out-of-capacity speculative row remains an error.Validation
The published beta image reproduced the failure on four RTX PRO 6000 Blackwell Max-Q GPUs, TP4/DCP4, MTP3, max-num-batched-tokens 4096, max-num-seqs 32, with LMCache disabled. A diagnostic trace at the builder showed
query_start=[0,4096],drafts=[0]. With the patched source bound into the same image, the server passed memory profiling, allocated 37.1 GiB KV cache per rank, captured CUDA graphs, completed JIT warmup, passed/health, and answered a temperature-1 chat request withREADY. This is a startup and short-response evaluation, not a throughput or long-context claim.The full metadata test file passed:
/opt/venv/bin/python -m pytest -q -p no:cacheprovider tests/v1/attention/test_gdn_metadata_builder.py(57 passed) in the published CUDA image with the changed files bound over installed sources.ruff check,ruff format --check, andgit diff --checkpassed locally.Duplicate check and review
A search of open LIL vLLM PRs found no PR for this long-prefill/zero-draft KDA classification. #821 addresses recurrent-state reservation and external checkpoint recovery; it does not fix this startup crash. AI assistance was used. A human maintainer must review the changed lines and validation before merge.
Summary by CodeRabbit