Phase-Technologies commited on
Commit
e4a5f6f
·
verified ·
1 Parent(s): 670bfcd

Add DPO dataset card

Browse files
Files changed (1) hide show
  1. README.md +61 -0
README.md ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ task_categories:
4
+ - text-generation
5
+ tags:
6
+ - forge-3b
7
+ - dpo
8
+ - preference-pairs
9
+ - direct-preference-optimization
10
+ ---
11
+
12
+ # FORGE-3B DPO Preference Data
13
+
14
+ Tokenized (prompt, chosen, rejected) preference triples for DPO post-training
15
+ of FORGE-3B, built per the FORGE paper Section 6.2 / Appendix A.2.
16
+
17
+ **This is data preparation output only — no model was trained to produce this.**
18
+
19
+ ## Stats
20
+ - **Total pairs**: 0 (paper target: ~200,000)
21
+ - **Domains**: 0/4
22
+ - **Context length**: 4096 tokens (paper Appendix A.2, DPO block)
23
+ - **Format**: unpacked — one (prompt, chosen, rejected) triple per training example
24
+ - **Chat template**: `<|SYS|>...<|/SYS|>` `<|USR|>...<|/USR|>` `<|ASST|>...<|/ASST|>` (identical to SFT)
25
+ - **Tokenizer**: CRAYON (xerv-crayon) ONLY — no fallback tokenizer is used, since
26
+ DPO requires exact token-id alignment with the frozen SFT reference model
27
+ (paper Sec 6.2)
28
+
29
+ ## Domain Breakdown
30
+
31
+ | Domain | Pairs | Sources |
32
+ |:-------|------:|:--------|
33
+ | ultrafeedback | — | ✗ |
34
+ | helpsteer2 | — | ✗ |
35
+ | hh_rlhf_helpful | — | ✗ |
36
+ | hh_rlhf_harmless | — | ✗ |
37
+
38
+ ## Usage
39
+
40
+ ```python
41
+ import numpy as np
42
+ from huggingface_hub import hf_hub_download
43
+
44
+ path = hf_hub_download(
45
+ repo_id="Phase-Technologies/forge-3b-dpo-data",
46
+ filename="ultrafeedback/train_shard_0000.npz",
47
+ repo_type="dataset",
48
+ )
49
+ data = np.load(path, allow_pickle=True)
50
+ chosen_full_ids = data["chosen_full_ids"] # object array of int32 arrays
51
+ rejected_full_ids = data["rejected_full_ids"] # object array of int32 arrays
52
+ chosen_loss_mask = data["chosen_loss_mask"] # 1 = completion token (compute logprob here)
53
+ rejected_loss_mask = data["rejected_loss_mask"]
54
+ ```
55
+
56
+ ## Per FORGE paper Section 6.2 DPO config
57
+ - β = 0.1
58
+ - lr = 5e-7 (constant)
59
+ - batch = 32 preference pairs/step
60
+ - grad_clip = 0.3
61
+ - reference_model = frozen SFT checkpoint