[GG] spec-decode: cap same-model draft position limit#155
Conversation
Keep an in-checkpoint draft from allocating RoPE tables beyond the target's effective context limit. Read nested text config and leave external or already-smaller drafts unchanged. Assisted-by: OpenAI Codex
|
@coderabbitai review |
1 similar comment
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
Warning Review limit reached
Next review available in: 55 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling 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 (2)
✨ Finishing Touches🧪 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 |
Summary
When a target model uses a dict
hf_overridesto reducemax_position_embeddings, that dict intentionally remains target-only. Asame-checkpoint speculative draft could therefore allocate RoPE tables for the
checkpoint default even though the scheduler cannot reach those positions.
After constructing the draft
ModelConfig, this change lowers the draft textconfig limit when, and only when:
hf_text_configobjects exposemax_position_embeddings; andExternal draft checkpoints are untouched, and an already-smaller draft limit is
never increased.
Scope and prior work
This supersedes only the draft-context half of #146. It is an independent commit
directly on the current
dev/gilded-gnosishead. Compared with #146, it useshf_text_config(including nested text configs), verifies same-model identity,and includes regression tests. Searches of open upstream and local PRs found no
other implementation; #146 is the intentional predecessor being split.
PR #148 contains #146 in its stacked history, but its unique tip changes MLA
allocation order and is orthogonal to this configuration fix; it will need a
clean rebase after the predecessor replacement.
The original GLM-5.2 TP4 validation in #146 reported about 128 MiB/GPU reclaimed
when capping a 1M checkpoint default to a 600k target, with unchanged throughput,
KLD, and MTP acceptance. This patch does not alter any position the target can
schedule.
Validation
AI assistance was used. This PR must not be merged until the human submitter has
reviewed every changed line and can defend the behavior end to end.