Sample Python Code for Model Checkpoints | Generated by AI
You have two checkpoints available. Here are sample commands:
From your FineWeb checkpoint (GPT-2 style, BPE tokenizer):
python sample.py \
--out_dir=out-fineweb \
--start="The future of artificial intelligence is" \
--num_samples=3 \
--max_new_tokens=200
From your Shakespeare char-level checkpoint:
python sample.py \
--out_dir=out-shakespeare-char \
--start="To be or not to be" \
--num_samples=3 \
--max_new_tokens=200
From a pretrained GPT-2 (no local checkpoint needed):
python sample.py \
--init_from=gpt2 \
--start="Once upon a time" \
--num_samples=2 \
--max_new_tokens=100
Key flags for sample.py:
