A research playground for LLM pretraining and model architecture exploration.
Requires python >=3.12 Notable pins:
torch>=2.10triton>=3.6tokenizers>=0.22datasets>=4.5wandb>=0.26
uv sync
uv run wandb login # required unless you pass --no-wandb to train.pyOption A — download prebuilt tokenizer and tokenized .bin files from gongyisheng/openwebtext-exp (recommended, skips ~hours of preprocessing):
uv run hf download gongyisheng/openwebtext-exp --repo-type dataset --local-dir .Option B — build from scratch:
uv run python scripts/train_tokenizer.py --config configs/gpt2_124m.yaml
uv run python scripts/preprocess_data.py --config configs/gpt2_124m.yamlPick a config from configs/ and launch training:
uv run python scripts/train.py --config configs/gpt2_124m.yaml # GPT-2 124M (MHA baseline)
uv run python scripts/train.py --config configs/qwen3_57m.yaml # Qwen3 57M (GQA + RoPE + RMSNorm + SwiGLU)
uv run python scripts/train.py --config configs/qwen3_moe_133m.yaml # Qwen3 MoE 133MOverride config values from the CLI, disable W&B, or resume from a checkpoint:
uv run python scripts/train.py --config configs/gpt2_124m.yaml --no-wandb
uv run python scripts/train.py --config configs/gpt2_124m.yaml --optimizer.lr=1e-4 --training.backend=triton
uv run python scripts/train.py --config configs/gpt2_124m.yaml --resume checkpoints/step_1000.ptArchitecture-specific experiments (attention variants, MoE, scaling laws, etc.) live in experiments/ with their own configs and write-ups.