Commit 1d32128
committed
Replace step-0 overwrite with _state cache invalidation
The real issue is that UnslothService._state (a cached_property)
may be initialized before the fork copies the checkpoint, caching
the base model instead of the forked weights. Invalidating the
cache after fork ensures the trainer picks up the forked checkpoint
on next access.
The step-0 overwrite was unnecessary — vLLM's start_openai_server
already calls get_last_checkpoint_dir() which finds the forked
checkpoint at its original step number.1 parent 7ee591e commit 1d32128
1 file changed
Lines changed: 9 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1434 | 1434 | | |
1435 | 1435 | | |
1436 | 1436 | | |
1437 | | - | |
1438 | | - | |
1439 | | - | |
1440 | | - | |
| 1437 | + | |
| 1438 | + | |
| 1439 | + | |
| 1440 | + | |
| 1441 | + | |
| 1442 | + | |
| 1443 | + | |
| 1444 | + | |
1441 | 1445 | | |
1442 | 1446 | | |
1443 | | - | |
| 1447 | + | |
1444 | 1448 | | |
1445 | | - | |
1446 | | - | |
1447 | 1449 | | |
1448 | 1450 | | |
1449 | 1451 | | |
| |||
0 commit comments