muradil211 commited on
Commit
8528bf0
·
verified ·
1 Parent(s): 1c45a5b

docs: connect DPO model, data, and training code

Browse files
Files changed (1) hide show
  1. README.md +101 -32
README.md CHANGED
@@ -2,6 +2,8 @@
2
  library_name: transformers
3
  pipeline_tag: text-generation
4
  base_model: muradil211/AetherSearch_SFT
 
 
5
  tags:
6
  - aethersearch
7
  - agentic-search
@@ -22,21 +24,20 @@ language:
22
 
23
  ### A preference-aligned search agent for retrieval-augmented reasoning
24
 
25
- Continued from **AetherSearch SFT** with direct preference optimization on
26
- the **AetherSearch_DPO** dataset.
27
 
28
  <p>
29
  <a href="https://huggingface.co/muradil211/AetherSearch_SFT"><img src="https://img.shields.io/badge/Base-AetherSearch__SFT-7C3AED?style=flat-square" alt="Base model: AetherSearch SFT"></a>
 
30
  <img src="https://img.shields.io/badge/Method-DPO-0F766E?style=flat-square" alt="Training method: DPO">
31
- <img src="https://img.shields.io/badge/Dataset-AetherSearch__DPO-F59E0B?style=flat-square" alt="Dataset: AetherSearch DPO">
32
  <img src="https://img.shields.io/badge/Context-32K-2563EB?style=flat-square" alt="Context window: 32K">
33
  </p>
34
 
35
- [🏠 Project](https://github.com/Muradil-mamat-211/AetherSearch) · [🧠 SFT checkpoint](https://huggingface.co/muradil211/AetherSearch_SFT)
36
-
37
- 📚 Dataset: **AetherSearch_DPO**
38
-
39
- <!-- Dataset URL: -->
40
 
41
  </div>
42
 
@@ -47,30 +48,37 @@ the **AetherSearch_DPO** dataset.
47
 
48
  ## ✨ Highlights
49
 
50
- - 🎯 **Preference aligned**: trained with DPO to favor stronger search and answer trajectories.
51
- - 🔎 **Search native**: produces explicit reasoning, retrieval requests, and grounded answers.
52
- - 🔁 **Multi-step retrieval**: can request additional evidence when one search is insufficient.
53
- - ⚡ **Compact backbone**: retains the accessible 3B-scale Qwen2 architecture.
 
 
 
 
 
 
 
54
 
55
  ## 🧠 How it works
56
 
57
  ```text
58
  Question
59
- |
60
- v
61
  <think>reason about what is missing</think>
62
- |
63
- v
64
- <search>focused retrieval query</search> -----> Search / RAG backend
65
- ^ |
66
- +---- <information>retrieved evidence</information>+
67
- |
68
- +-- repeat the search loop when more evidence is needed
69
- v
70
  <answer>evidence-grounded final answer</answer>
71
  ```
72
 
73
- The model produces the reasoning, search, and answer spans. The surrounding
74
  runtime parses each completed `<search>` span, runs retrieval, appends the
75
  result as `<information>`, and resumes generation until the model emits an
76
  `<answer>` span.
@@ -80,16 +88,69 @@ result as `<information>`, and resumes generation until the model emits an
80
  | Field | Value |
81
  |---|---|
82
  | 🧬 Base checkpoint | [`muradil211/AetherSearch_SFT`](https://huggingface.co/muradil211/AetherSearch_SFT) |
 
 
 
83
  | 🏗️ Architecture | Qwen2 causal language model |
84
  | 🔢 Parameters | 3,085,938,688 |
85
  | 🎛️ Weight dtype | BF16 |
86
- | 📏 Context window | 32,768 positions |
87
- | 🎯 Alignment method | Direct Preference Optimization (DPO) |
88
- | 📚 Training data | AetherSearch_DPO |
89
 
90
- ## 🚀 Quick start
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
 
92
- Load the checkpoint with:
93
 
94
  ```python
95
  import torch
@@ -109,18 +170,26 @@ model.config.use_cache = True
109
  For end-to-end use, wrap generation in the retrieval loop shown above and
110
  preserve the XML protocol exactly.
111
 
 
 
 
 
 
 
 
112
  ## ⚠️ Limitations
113
 
114
  Generated searches and answers can be incorrect, unsupported, or unsafe.
115
- Retrieval quality, evidence validation, and answer verification remain the
116
- caller's responsibility.
117
 
118
  ## 📜 Terms
119
 
120
  No additional blanket license is asserted here. Review the
121
  [Qwen2.5-3B-Instruct license](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct/blob/main/LICENSE),
122
- the AetherSearch SFT terms, and the AetherSearch_DPO dataset terms before
123
- redistribution or downstream use.
 
124
 
125
  ---
126
 
 
2
  library_name: transformers
3
  pipeline_tag: text-generation
4
  base_model: muradil211/AetherSearch_SFT
5
+ datasets:
6
+ - muradil211/AetherSearch_DPO
7
  tags:
8
  - aethersearch
9
  - agentic-search
 
24
 
25
  ### A preference-aligned search agent for retrieval-augmented reasoning
26
 
27
+ Trained from **AetherSearch SFT** with direct preference optimization on all
28
+ **2,126 preference pairs** in the canonical **AetherSearch DPO** dataset.
29
 
30
  <p>
31
  <a href="https://huggingface.co/muradil211/AetherSearch_SFT"><img src="https://img.shields.io/badge/Base-AetherSearch__SFT-7C3AED?style=flat-square" alt="Base model: AetherSearch SFT"></a>
32
+ <a href="https://huggingface.co/datasets/muradil211/AetherSearch_DPO"><img src="https://img.shields.io/badge/Pairs-2%2C126-F59E0B?style=flat-square" alt="Training pairs: 2,126"></a>
33
  <img src="https://img.shields.io/badge/Method-DPO-0F766E?style=flat-square" alt="Training method: DPO">
 
34
  <img src="https://img.shields.io/badge/Context-32K-2563EB?style=flat-square" alt="Context window: 32K">
35
  </p>
36
 
37
+ [🏠 Project](https://github.com/Muradil-mamat-211/AetherSearch) ·
38
+ [🧪 Training code](https://github.com/Muradil-mamat-211/AetherSearch/tree/main/dpo) ·
39
+ [📚 Preference data](https://huggingface.co/datasets/muradil211/AetherSearch_DPO) ·
40
+ [🧠 SFT checkpoint](https://huggingface.co/muradil211/AetherSearch_SFT)
 
41
 
42
  </div>
43
 
 
48
 
49
  ## ✨ Highlights
50
 
51
+ - 🎯 **Preference aligned** — trained to favor stronger search decisions,
52
+ evidence use, and final answers over paired alternatives.
53
+ - 🔎 **Search native** — produces explicit reasoning, retrieval requests, and
54
+ grounded answers using the AetherSearch XML protocol.
55
+ - 🔁 **Multi-step retrieval** — can request additional evidence when an
56
+ existing trajectory is insufficient.
57
+ - 🧾 **Environment-aware loss** — retrieved information remains available as
58
+ context while being excluded from preference log-probability sums.
59
+ - 🧪 **Reproducible stage** — canonical data identity, strict trainer,
60
+ hardware-independent launcher, DeepSpeed configuration, and source checks
61
+ are public.
62
 
63
  ## 🧠 How it works
64
 
65
  ```text
66
  Question
67
+ │
68
+ ▼
69
  <think>reason about what is missing</think>
70
+ │
71
+ ▼
72
+ <search>focused retrieval query</search> ─────► Search / RAG backend
73
+ ▲ │
74
+ └──── <information>retrieved evidence</information> ◄────┘
75
+ │
76
+ ├── repeat the search loop when more evidence is needed
77
+ ▼
78
  <answer>evidence-grounded final answer</answer>
79
  ```
80
 
81
+ The model produces reasoning, search, and answer spans. The surrounding
82
  runtime parses each completed `<search>` span, runs retrieval, appends the
83
  result as `<information>`, and resumes generation until the model emits an
84
  `<answer>` span.
 
88
  | Field | Value |
89
  |---|---|
90
  | 🧬 Base checkpoint | [`muradil211/AetherSearch_SFT`](https://huggingface.co/muradil211/AetherSearch_SFT) |
91
+ | 🧬 Base revision | `437aca474d3966e57e82af565db95d0ad64aa24d` |
92
+ | 📚 Training data | [`muradil211/AetherSearch_DPO`](https://huggingface.co/datasets/muradil211/AetherSearch_DPO) |
93
+ | 🔗 Training code | [`AetherSearch/dpo`](https://github.com/Muradil-mamat-211/AetherSearch/tree/main/dpo) |
94
  | 🏗️ Architecture | Qwen2 causal language model |
95
  | 🔢 Parameters | 3,085,938,688 |
96
  | 🎛️ Weight dtype | BF16 |
97
+ | 📏 Context window | 32,768 positions; training sequences capped at 4,096 |
98
+ | 🎯 Alignment method | Direct Preference Optimization |
 
99
 
100
+ ## 🧬 Checkpoint identity
101
+
102
+ This checkpoint was trained in one DPO stage from the pinned AetherSearch SFT
103
+ checkpoint over all 2,126 records in the canonical `train.jsonl`, using the
104
+ public code under the GitHub repository's `dpo/` directory. Training was
105
+ performed on a separate server; this repository contains the final model
106
+ artifacts rather than server-local run logs or optimizer state.
107
+
108
+ **Dataset SHA-256**
109
+
110
+ ```text
111
+ c42adcb0f194cff3126134b37afd85e4b89aa9917e5c98dda4b09904509f61e9
112
+ ```
113
+
114
+ ## 🎯 Preference contract
115
+
116
+ Every training row supplies one shared `prompt_text`, one `chosen`
117
+ continuation, and one `rejected` continuation.
118
+
119
+ - Shared prompt tokens are masked on both sides.
120
+ - Environment-provided `<information>...</information>` spans inside either
121
+ continuation are masked while remaining visible as context.
122
+ - All remaining continuation tokens contribute to summed sequence log
123
+ probabilities.
124
+ - Answer-terminal continuations supervise a final `<|im_end|>` token.
125
+ - Search-terminal continuations do not append that token because the runtime
126
+ must provide retrieved information before generation resumes.
127
+ - The frozen reference and initial policy use the same pinned SFT checkpoint.
128
+
129
+ The strict public trainer rejects checksum drift, row-count drift, duplicate
130
+ questions, malformed trajectories, identical pairs, all-masked continuations,
131
+ and sequence truncation before allocating model weights.
132
+
133
+ ## 🛠️ Training recipe
134
+
135
+ | Setting | Value | Setting | Value |
136
+ |---|---:|---|---:|
137
+ | Epochs | 1 | Learning rate | `5e-7` |
138
+ | DPO beta | `0.1` | Scheduler | Cosine |
139
+ | Global batch size | 12 pairs | Per-device batch | 1 pair |
140
+ | Precision | BF16 | Max sequence length | 4,096 |
141
+ | Warmup ratio | `0.03` | Weight decay | `0.0` |
142
+ | Distributed optimizer | DeepSpeed ZeRO-3 | Seed | 42 |
143
+
144
+ The launcher discovers devices already made visible by the surrounding
145
+ runtime and derives gradient accumulation to preserve global batch 12. It does
146
+ not embed physical GPU IDs, node addresses, communication-fabric settings,
147
+ allocator tuning, or server-local paths. The policy and frozen reference are
148
+ both sharded under ZeRO-3.
149
+
150
+ The complete implementation and reproduction commands are in the
151
+ [AetherSearch DPO directory](https://github.com/Muradil-mamat-211/AetherSearch/tree/main/dpo).
152
 
153
+ ## 🚀 Quick start
154
 
155
  ```python
156
  import torch
 
170
  For end-to-end use, wrap generation in the retrieval loop shown above and
171
  preserve the XML protocol exactly.
172
 
173
+ ## 📦 Repository contents
174
+
175
+ The repository contains two BF16 SafeTensors shards, the shard index, model
176
+ and generation configuration, tokenizer assets, this model card, and the
177
+ AetherSearch logo. Intermediate checkpoints, optimizer state, report bundles,
178
+ and server-local logs are not included.
179
+
180
  ## ⚠️ Limitations
181
 
182
  Generated searches and answers can be incorrect, unsupported, or unsafe.
183
+ Retrieval quality, evidence validation, answer verification, and deployment
184
+ safeguards remain the caller's responsibility.
185
 
186
  ## 📜 Terms
187
 
188
  No additional blanket license is asserted here. Review the
189
  [Qwen2.5-3B-Instruct license](https://huggingface.co/Qwen/Qwen2.5-3B-Instruct/blob/main/LICENSE),
190
+ the [AetherSearch SFT terms](https://huggingface.co/muradil211/AetherSearch_SFT),
191
+ and the [AetherSearch DPO data attribution](https://huggingface.co/datasets/muradil211/AetherSearch_DPO/blob/main/ATTRIBUTION.md)
192
+ before redistribution or downstream use.
193
 
194
  ---
195