Skip to content
Open
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions src/art/local/backend.py
Original file line number Diff line number Diff line change
Expand Up @@ -1434,6 +1434,17 @@ async def _experimental_fork_checkpoint(

shutil.copytree(source_checkpoint_dir, dest_checkpoint_dir)

# Also overwrite the initial empty checkpoint at step 0 so vLLM
# loads the forked weights on startup (it uses @0 by default)
step0_dir = get_step_checkpoint_dir(dest_model_dir, 0)
if os.path.exists(step0_dir) and step0_dir != dest_checkpoint_dir:
if verbose:
print(
f"Overwriting initial checkpoint at {step0_dir} with forked weights"
)
shutil.rmtree(step0_dir)
shutil.copytree(dest_checkpoint_dir, step0_dir)

if verbose:
print(
f"Successfully forked checkpoint from {from_model} (step {selected_step}) to {model.name}"
Expand Down
Loading