diff --git a/docs/design-docs/checkpointing.md b/docs/design-docs/checkpointing.md index f8f11b916f..de7fb64fbe 100644 --- a/docs/design-docs/checkpointing.md +++ b/docs/design-docs/checkpointing.md @@ -8,3 +8,12 @@ A checkpoint converter is provided to convert a Torch distributed checkpoint che uv run examples/convert_dcp_to_hf.py --config= --dcp-ckpt-path= --hf-ckpt-path= ``` +Usually Hugging Face checkpoints keep the weights and tokenizer together (which we also recommend for provenance). You can copy it afterwards. Here's an end-to-end example: + +```sh +# Change to your appropriate checkpoint directory +CKPT_DIR=results/sft/step_10 + +uv run examples/convert_dcp_to_hf.py --config=$CKPT_DIR/config.yaml --dcp-ckpt-path=$CKPT_DIR/policy/weights --hf-ckpt-path=${CKPT_DIR}-hf +rsync -ahP $CKPT_DIR/policy/tokenizer ${CKPT_DIR}-hf/ +```