Commit ed87efa
authored
feat(data): add --train-only-last-turn option for thinking models (#419)
Add a new CLI argument to train_eagle3.py that enables training only on the last assistant turn in each conversation. This is useful for 'thinking' models (like DeepSeek-R1) or distilled datasets where the conversation history lacks the thought process present in the current generation.
Changes:
- Add train_only_last_turn parameter to GeneralParser, HarmonyParser, ThinkingParser
- Add train_only_last_turn parameter to preprocess_conversations and build_eagle3_dataset
- Add --train-only-last-turn CLI argument to train_eagle3.py
Co-authored-by: yiliu <123>1 parent c183a3a commit ed87efa
File tree
3 files changed
+41
-5
lines changed- scripts
- specforge/data
3 files changed
+41
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
109 | 109 | | |
110 | 110 | | |
111 | 111 | | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
112 | 118 | | |
113 | 119 | | |
114 | 120 | | |
| |||
422 | 428 | | |
423 | 429 | | |
424 | 430 | | |
| 431 | + | |
425 | 432 | | |
426 | 433 | | |
427 | 434 | | |
| |||
462 | 469 | | |
463 | 470 | | |
464 | 471 | | |
| 472 | + | |
465 | 473 | | |
466 | 474 | | |
467 | 475 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
| 57 | + | |
57 | 58 | | |
58 | 59 | | |
59 | 60 | | |
| |||
138 | 139 | | |
139 | 140 | | |
140 | 141 | | |
141 | | - | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
142 | 148 | | |
143 | 149 | | |
144 | 150 | | |
| |||
200 | 206 | | |
201 | 207 | | |
202 | 208 | | |
203 | | - | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
204 | 214 | | |
205 | 215 | | |
206 | 216 | | |
| |||
243 | 253 | | |
244 | 254 | | |
245 | 255 | | |
246 | | - | |
| 256 | + | |
| 257 | + | |
| 258 | + | |
| 259 | + | |
| 260 | + | |
247 | 261 | | |
248 | 262 | | |
249 | 263 | | |
| |||
288 | 302 | | |
289 | 303 | | |
290 | 304 | | |
| 305 | + | |
291 | 306 | | |
292 | 307 | | |
293 | 308 | | |
294 | 309 | | |
295 | 310 | | |
296 | 311 | | |
297 | | - | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
117 | 117 | | |
118 | 118 | | |
119 | 119 | | |
| 120 | + | |
120 | 121 | | |
121 | 122 | | |
122 | 123 | | |
| |||
129 | 130 | | |
130 | 131 | | |
131 | 132 | | |
| 133 | + | |
132 | 134 | | |
133 | 135 | | |
134 | 136 | | |
| |||
158 | 160 | | |
159 | 161 | | |
160 | 162 | | |
161 | | - | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
162 | 168 | | |
163 | 169 | | |
164 | 170 | | |
| |||
294 | 300 | | |
295 | 301 | | |
296 | 302 | | |
| 303 | + | |
297 | 304 | | |
298 | 305 | | |
299 | 306 | | |
| |||
319 | 326 | | |
320 | 327 | | |
321 | 328 | | |
| 329 | + | |
| 330 | + | |
322 | 331 | | |
323 | 332 | | |
324 | 333 | | |
| |||
360 | 369 | | |
361 | 370 | | |
362 | 371 | | |
| 372 | + | |
363 | 373 | | |
364 | 374 | | |
365 | 375 | | |
| |||
376 | 386 | | |
377 | 387 | | |
378 | 388 | | |
| 389 | + | |
379 | 390 | | |
380 | 391 | | |
381 | 392 | | |
| |||
0 commit comments