Repository navigation
fix(dspine): correct training objective and add online example - #1038
A-Gentle-Cat wants to merge 2 commits into
Conversation
Average code loss over draft layers and normalize the objective by sequence count. Compute refinement CE and L1 as separate decay-weighted means over covered and eligible rows, scaled by supervised rows per microbatch. Match the alignment ramp to the LR warmup through the canonical model builder. Add the Qwen3-8B online recipe and draft config, and list DSpine in the README Supported Methods and News. Update objective and provider tests.
|
Thanks for this. We're fine-tuning the released A pitfall unrelated to this PR: A question about the alignment reduction: this PR averages the alignment loss over draft layers. As we read the paper's loss (eqs. 6–8), alignment is summed over layers, which makes it 5× stronger for the 5-layer b16 draft. An independent trainer we looked at also sums. Could you confirm that the mean is what the released checkpoints were trained with? On a small synthetic batch, this PR moves alignment from about 82% to 56% of the total loss and refinement from about 4% to 14%, so the choice matters. We're running both objectives side by side from the same released checkpoint (all layers trainable, same data and schedule) and will post the dev acceptance-length comparison here when it's done. |
|
Update on the side-by-side run mentioned above. Both runs fine-tune the released This PR vs main (change in tokens per round from the released checkpoint, with this PR's lead in the right-hand columns):
So for fine-tuning this checkpoint, this PR's objective beat main at both checkpoints, mostly on agent prompts. We stopped the main run at about step 1,850. This doesn't settle which reduction the released weights were trained with. Later checkpoints with this PR's objective. The agent gain is largest at the first snapshot and falls after that: +0.38, +0.34, +0.30, +0.24 and +0.21 at steps 662 to 3,310. Structured rises over the same steps, from +0.033 to +0.055. We suspect overfitting: agent prompts take 4 of the 9 batch slots, and we have only 203 agent training conversations. A fork that cuts each block's loss after the first wrong position led this run on chat and code at step 1,986, but the lead was within noise by step 2,648, and its agent gain falls the same way. We'll post the final checkpoints when they're scored. |
Motivation
Correct DSpine loss normalization and default alignment warmup after #965.
Modifications
Related Issues
Follow-up to #1004.
Accuracy Test