Skip to content

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:

python -m pip install -e ".[torch,dev]"

Check CUDA visibility:

python -c "import torch; print(torch.cuda.is_available()); print(torch.version.cuda)"

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.json
  • data/processed/train.txt, data/processed/val.txt
  • checkpoints/ckpt_last.pt
  • checkpoints/train_log.json

Success Checklist

  • Training logs show at least two train_loss lines and the value trends down.
  • A checkpoint exists at checkpoints/ckpt_last.pt.
  • generate.py returns non-empty text from your prompt.

Common Errors

Warning

Keep --checkpoint and --meta aligned with the same run. Mixed files from different runs produce misleading results.