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

Document NeoLLM training with workflow diagrams

Browse files
.gitattributes CHANGED
@@ -33,3 +33,5 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ docs/dpo-workflow.png filter=lfs diff=lfs merge=lfs -text
37
+ docs/validation-workflow.png filter=lfs diff=lfs merge=lfs -text
README.md CHANGED
@@ -40,8 +40,22 @@ We ran sigmoid DPO with beta `0.1`, learning rate `5e-7`, and one pair per optim
40
 
41
  A separate supervised objective on the preferred completion has weight `0.1`. It retains Copy-Paste, MiLe, μ-loss, NITP, TWEO, and MEAP using the clean and masked training views described in the SFT card. The retained FP32 master weights were trained with BF16 autocast and fused AdamW. The model can be loaded in BF16 for inference. [SFT training details](https://huggingface.co/KitsuVp/NeoLLM-Instruct/tree/208a47045e03be2861777edaeebf91ea01c7ac3c)
42
 
 
 
 
 
 
 
 
 
 
 
43
  ## Evaluation and limitations
44
 
 
 
 
 
45
  | Validation metric | English | Spanish |
46
  |---|---:|---:|
47
  | Held-out pairs | 32 | 32 |
 
40
 
41
  A separate supervised objective on the preferred completion has weight `0.1`. It retains Copy-Paste, MiLe, μ-loss, NITP, TWEO, and MEAP using the clean and masked training views described in the SFT card. The retained FP32 master weights were trained with BF16 autocast and fused AdamW. The model can be loaded in BF16 for inference. [SFT training details](https://huggingface.co/KitsuVp/NeoLLM-Instruct/tree/208a47045e03be2861777edaeebf91ea01c7ac3c)
42
 
43
+ ## DPO workflow
44
+
45
+ [![DPO workflow showing chosen and rejected completions, four sequence log-probabilities, the frozen SFT reference, and the chosen-only SFT anchor](./docs/dpo-workflow.png)](./docs/dpo-workflow.png)
46
+
47
+ Use DPO when two answers to the same prompt demonstrate a clear preference, such as a correct format or less repetition. Use [SFT](https://huggingface.co/KitsuVp/NeoLLM-Instruct#sft-workflow) when you primarily have demonstrations of the desired behavior.
48
+
49
+ - **Prepare comparable pairs.** Match the tokenized prompt, template, context policy, and precision on both branches. Score completion tokens through EOS once. Reserve prompts for validation before preparing windows.
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)
56
+
57
+ The diagram's numerical example comes from the [extended DPO run](https://huggingface.co/KitsuVp/NeoLLM-Instruct-DPO/tree/dpo-1450), evaluated separately from this 400-step pilot.
58
+
59
  | Validation metric | English | Spanish |
60
  |---|---:|---:|
61
  | Held-out pairs | 32 | 32 |
docs/dpo-workflow.png ADDED

Git LFS Details

  • SHA256: add53639bedaacf3b9fdaad23db53f81765bbac56737660837a8585660a04687
  • Pointer size: 131 Bytes
  • Size of remote file: 245 kB
docs/validation-workflow.png ADDED

Git LFS Details

  • SHA256: 2d04781a64dab1c7f1d04bf74ed7e37d0e4227ee8b3cbea1f3e0e9b8c417e2c8
  • Pointer size: 131 Bytes
  • Size of remote file: 190 kB