Commit fe06728
committed
KTO: decorate MLXKTOConfig @DataClass(init=False)
Bare @DataClass regenerated __init__, bypassing MLXTrainingConfig.__init__ and
its setup (e.g. _unsloth_mlx_warmup_steps_explicit). init=False inherits the
parent init while fields() still registers the KTO-specific fields, which the
parent __init__ reads via fields(type(self)). Mirrors unslothai#830's
MLXORPOConfig/MLXDPOConfig. Regression test asserts the inherited init and intact
KTO fields.1 parent f3fc0dc commit fe06728
2 files changed
Lines changed: 21 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
324 | 324 | | |
325 | 325 | | |
326 | 326 | | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8155 | 8155 | | |
8156 | 8156 | | |
8157 | 8157 | | |
8158 | | - | |
| 8158 | + | |
8159 | 8159 | | |
8160 | 8160 | | |
8161 | | - | |
| 8161 | + | |
| 8162 | + | |
| 8163 | + | |
| 8164 | + | |
| 8165 | + | |
| 8166 | + | |
| 8167 | + | |
8162 | 8168 | | |
8163 | 8169 | | |
8164 | 8170 | | |
| |||
0 commit comments