fix: decouple shift_targets from Domino loss mask - #1
Merged
Eros483 merged 1 commit intoJul 4, 2026
Merged
Conversation
shift_targets=True creates an off-by-one mismatch between training (position p predicts token p+1) and vLLM inference (position p drafts token p). This degrades acceptance length by -46% vs DFlash baseline. Fix: - Set shift_targets=False to align training with inference - Always include anchor positions in Domino loss mask (decoupled from shift_targets) - Use unshifted suffix_start unconditionally - Derive num_anchors from tensor shape (config.max_anchors removed in vllm-project#707) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com> Signed-off-by: Orestis Zambounis <orestis.zambounis@gmail.com>
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.
Summary
shift_targets=Falseto align training with vLLM inference (fixes off-by-one mismatch)shift_targets)suffix_startunconditionallynum_anchorsfrom tensor shape (config.max_anchorsremoved in refactor: move training hyperparameters from model configs to trainer kwargs vllm-project/speculators#707)See detailed analysis: vllm-project#685 (comment)
🤖 Generated with Claude Code