Repository navigation
feat(dspark): add sampling-aware L1 loss - #10
Merged
Merged
Conversation
Apply independent target and draft temperature, top-p and top-k transforms to DSpark L1 while keeping CE unchanged.
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.
DSpark currently computes L1 distillation using raw softmax distributions. This PR adds optional sampling transforms so the loss can reflect the target and draft sampling policies intended for inference.
temperature,top_p, andtop_ksettings throughtraining.dspark_l1_target_*andtraining.dspark_l1_draft_*, separate fromdecode.*.temperature=1,top_p=1, andtop_k=-1, and record the settings in checkpoint metadata for exact-resume consistency.Related to #6. This PR covers DSpark L1; other drafter losses and LM-head computation are unchanged.