Commit 9f4e8d2
refactor(algo): remove group_relative; stop SFT assigning a throwaway advantage
group_relative was a ClassVar on every advantage config whose only consumer was AlgorithmConfig.requires_group_advantage -> warn_group_size, a config-time warning for group-relative algorithms run with group_size=1. SFT also overrode score_group to assign group-normalized advantages it never trains on (the loss is CE), purely so the zero-advantage filter would drop uniform-reward groups -- overloading 'advantage' as a filter key.
Remove the group_relative ClassVars, the requires_group_advantage property, warn_group_size and its orchestrator call site, and the now-unused warnings import. SFT drops its score_group override (inherits the base no-op) and ships no advantage: the zero-advantage filter skips None, and SFT is ce-only so the trainer never requires one. SFT now trains on every sampled token; reward-based filtering is opt-in via an explicit filter.
The group_size=1 footgun is already caught by the runtime empty-batch guard (orchestrator warns on zero-trainable batches and aborts after repeated ones), which covers all causes, not just this prediction.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent fe8a527 commit 9f4e8d2
4 files changed
Lines changed: 9 additions & 45 deletions
File tree
- docs
- packages/prime-rl-configs/src/prime_rl/configs
- src/prime_rl/orchestrator/algo
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
111 | 111 | | |
112 | 112 | | |
113 | 113 | | |
114 | | - | |
| 114 | + | |
115 | 115 | | |
116 | 116 | | |
117 | 117 | | |
| |||
283 | 283 | | |
284 | 284 | | |
285 | 285 | | |
286 | | - | |
| 286 | + | |
287 | 287 | | |
288 | 288 | | |
289 | 289 | | |
| |||
Lines changed: 4 additions & 30 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
28 | | - | |
29 | 28 | | |
30 | 29 | | |
31 | 30 | | |
| |||
109 | 108 | | |
110 | 109 | | |
111 | 110 | | |
112 | | - | |
113 | 111 | | |
114 | 112 | | |
115 | 113 | | |
| |||
187 | 185 | | |
188 | 186 | | |
189 | 187 | | |
190 | | - | |
191 | 188 | | |
192 | 189 | | |
193 | 190 | | |
| |||
196 | 193 | | |
197 | 194 | | |
198 | 195 | | |
199 | | - | |
200 | 196 | | |
201 | 197 | | |
202 | 198 | | |
| |||
210 | 206 | | |
211 | 207 | | |
212 | 208 | | |
213 | | - | |
214 | 209 | | |
215 | 210 | | |
216 | 211 | | |
| |||
235 | 230 | | |
236 | 231 | | |
237 | 232 | | |
238 | | - | |
239 | 233 | | |
240 | 234 | | |
241 | 235 | | |
| |||
263 | 257 | | |
264 | 258 | | |
265 | 259 | | |
266 | | - | |
267 | | - | |
268 | | - | |
269 | | - | |
| 260 | + | |
| 261 | + | |
| 262 | + | |
| 263 | + | |
270 | 264 | | |
271 | 265 | | |
272 | | - | |
273 | 266 | | |
274 | 267 | | |
275 | 268 | | |
| |||
283 | 276 | | |
284 | 277 | | |
285 | 278 | | |
286 | | - | |
287 | 279 | | |
288 | 280 | | |
289 | 281 | | |
| |||
345 | 337 | | |
346 | 338 | | |
347 | 339 | | |
348 | | - | |
349 | | - | |
350 | | - | |
351 | | - | |
352 | | - | |
353 | | - | |
354 | 340 | | |
355 | 341 | | |
356 | 342 | | |
| |||
414 | 400 | | |
415 | 401 | | |
416 | 402 | | |
417 | | - | |
418 | | - | |
419 | | - | |
420 | | - | |
421 | | - | |
422 | | - | |
423 | | - | |
424 | | - | |
425 | | - | |
426 | | - | |
427 | | - | |
428 | | - | |
Lines changed: 0 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
869 | 869 | | |
870 | 870 | | |
871 | 871 | | |
872 | | - | |
873 | | - | |
874 | 872 | | |
875 | 873 | | |
876 | 874 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
4 | | - | |
5 | | - | |
6 | 3 | | |
7 | 4 | | |
8 | | - | |
9 | | - | |
10 | | - | |
11 | 5 | | |
12 | 6 | | |
13 | 7 | | |
14 | 8 | | |
15 | 9 | | |
16 | | - | |
17 | | - | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
18 | 13 | | |
19 | 14 | | |
20 | | - | |
21 | | - | |
22 | | - | |
0 commit comments