Getting Started
Use this page to get a reproducible first run in about 5 minutes and confirm your environment is healthy.
Prerequisites: Python 3.11+, pip, and optional CUDA GPU.
Command(s)
Install dependencies:
Check CUDA visibility:
Quick Start (reference preset: tinyshakespeare + char + configs/base/base.toml):
python scripts/data/prepare_data.py --dataset tinyshakespeare --tokenizer char --output-format txt --output-dir data/processed
python train.py --config configs/base/base.toml --tokenizer char --max-iters 5000
python generate.py --checkpoint checkpoints/ckpt_last.pt --meta data/processed/meta.json --tokenizer char --prompt "To be"
Tip
For a strict 5-minute smoke test, start the training command, wait for the first eval/checkpoint output, then stop and run generation.
Output Files / Artifacts Produced
data/processed/meta.jsondata/processed/train.txt,data/processed/val.txtcheckpoints/ckpt_last.ptcheckpoints/train_log.json
Success Checklist
- Training logs show at least two
train_losslines and the value trends down. - A checkpoint exists at
checkpoints/ckpt_last.pt. generate.pyreturns non-empty text from your prompt.
Common Errors
ModuleNotFoundError: torch: see Torch not installed.- CUDA expected but disabled: see CUDA not detected.
- Metadata mismatch: see Meta path mismatch.
Warning
Keep --checkpoint and --meta aligned with the same run. Mixed files from different runs produce misleading results.