Text Generation
Transformers
Safetensors
PyTorch
English
Spanish
neollm
causal-lm
research
dpo
conversational
custom_code
KitsuVp commited on
Commit
9946bca
路
verified 路
1 Parent(s): 6111911

Explain auxiliary objective handling during SFT and DPO

Browse files
Files changed (1) hide show
  1. README.md +15 -0
README.md CHANGED
@@ -50,6 +50,21 @@ Use DPO when two answers to the same prompt demonstrate a clear preference, such
50
  - **Score with the real mixed distribution.** Freeze the exact SFT reference and keep Copy-Paste active in both models. Sum clean, unweighted completion log-probabilities with dropout disabled. Apply NeoLLM's auxiliary losses through the separate chosen-response SFT anchor. With identical policy and reference, the DPO term starts at `ln(2)`.
51
  - **Resume and select checkpoints deliberately.** Resume the trainable policy from its saved state and keep the original SFT reference. Check preferred and rejected CE alongside the margin. Choose checkpoints using generated answers as well as preference scores. [Likelihood displacement in preference optimization](https://proceedings.mlr.press/v306/im26a.html)
52
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
53
  ## Evaluation and limitations
54
 
55
  [![Validation protocol showing held-out scores and generation probes, with a worked example from DPO step 1450](./docs/validation-workflow.png)](./docs/validation-workflow.png)
 
50
  - **Score with the real mixed distribution.** Freeze the exact SFT reference and keep Copy-Paste active in both models. Sum clean, unweighted completion log-probabilities with dropout disabled. Apply NeoLLM's auxiliary losses through the separate chosen-response SFT anchor. With identical policy and reference, the DPO term starts at `ln(2)`.
51
  - **Resume and select checkpoints deliberately.** Resume the trainable policy from its saved state and keep the original SFT reference. Check preferred and rejected CE alongside the margin. Choose checkpoints using generated answers as well as preference scores. [Likelihood displacement in preference optimization](https://proceedings.mlr.press/v306/im26a.html)
52
 
53
+ ### Objective handling in DPO
54
+
55
+ The policy update combined **clean sigmoid DPO with `尾=0.1`** and **`0.1 脳` a chosen-only SFT loss**. The policy and frozen SFT reference scored both replies through EOS using the same clean inputs. The reference scores were precomputed without gradients. The same setup was used in the pilot and the extended run.
56
+
57
+ | Component | Clean pair scoring | Chosen-only SFT anchor on the trainable policy |
58
+ |---|---|---|
59
+ | Copy-Paste | Active for both replies in both models, with the same structural and chat-header copy masks. Scores use the full vocabulary-plus-pointer distribution. | Active in the clean and MEAP views. The policy's copy head receives gradients from the preference term and the anchor. |
60
+ | MiLe | Unweighted token log-probabilities. | Entropy reweighting of the mixed distribution with `纬=1.0`. |
61
+ | 渭-loss | Pure sequence likelihood. | Output-matrix mean penalty with `位=1e-4`. |
62
+ | TWEO | Pure sequence likelihood. | Block-activation outlier penalty on supervised positions with weight `0.01`. |
63
+ | NITP | Pure sequence likelihood. | One-step prediction of detached shallow states for valid next-token labels, target index `2` and weight `1.0`. |
64
+ | MEAP | Clean input history and dropout off. | Two views with weights `0.75` clean and `0.25` MEAP. The mask ratio within eligible assistant history is `0.10`. |
65
+
66
+ For a labeled window, the clean sequence score is `鈭扤 脳 CE`, where `N` is the number of valid shifted completion targets and CE is the unweighted mixed-distribution cross-entropy. The anchor is computed separately in training mode. Its auxiliary terms contribute to the policy update outside the preference log-ratios.
67
+
68
  ## Evaluation and limitations
69
 
70
  [![Validation protocol showing held-out scores and generation probes, with a worked example from DPO step 1450](./docs/validation-workflow.png)](./docs/validation-workflow.png)