Skip to main content
This experiment will continue a training from a Checkpoint emitted by the Training Job in the Running a simple Training Job on FlexAI experiment, so make sure to complete it and download its output artifacts before proceeding. Extract the contents of the output_0.zip file into a directory named fetched_checkpoints:
This fetched_checkpoints directory contains the different checkpoints that have been saved in the /output-checkpoint of the Training Job’s runtime environment during execution. Let’s use the checkpoint (saved at step 500) located in fetched_checkpoints/output/checkpoint-500/. Create the FlexAI checkpoint to be passed to the next run that will resume the training:
Resume training from your checkpoint with the following command:
Compared to the experiment that starts training from the base model, note that:
  • --checkpoint gpt2-ckpt500 has been added - referring to the checkpoint created above, the content of the checkpoint-500 folder will be mounted on /input-checkpoint
  • --model_name_or_path has been updated - pointing to the new checkpoint location
together with additional HuggingFace args to resume the training from the checkpoint:
  • --resume_from_checkpoint /input-checkpoint
  • --num_train_epochs 6

Code

code/causal-language-modeling/train.py

code/causal-language-modeling/requirements.txt

🚀 Run this on FlexAI

Managed checkpoints mean you never lose a run to preemption. Jobs launch in under 60 seconds — no infra setup, built-in observability.

Get started →Talk to us