Hyperparameters class at startup. The default values reflect the simple baseline configuration: 9 transformer blocks at width 512, 8 attention heads with 4 KV heads (GQA), 2x MLP expansion, vocab size 1024, sequence length 1024, tied embeddings, and a ~10-minute wallclock cap.
Data Paths
These parameters tell the training script where to find the tokenized dataset shards and the SentencePiece tokenizer model.train_files and val_files are derived from data_path using the glob patterns fineweb_train_*.bin and fineweb_val_*.bin respectively. They are not independently configurable via environment variables.Validation
Validation always runs on the fullfineweb_val_* split (the fixed first-50k-document set). These parameters control how often validation is computed and how many tokens are processed per validation pass.
Training Length
These parameters jointly determine how long training runs. The wallclock cap (MAX_WALLCLOCK_SECONDS) takes effect as soon as the elapsed training time exceeds the threshold, triggering an early stop after the current step completes.
Model Shape
These parameters define the architecture of the GPT model. Changing them affects both model quality and the number of parameters, which directly impacts the compressed artifact size.Optimizer
The training script uses a mixed optimizer strategy:- Token embedding (and tied
lm_head): Adam withTIED_EMBED_LRorEMBED_LR - Untied
lm_head(whenTIE_EMBEDDINGS=0): Adam withHEAD_LR - 2D matrix parameters in transformer blocks: Muon with
MATRIX_LR - Scalars and vectors in transformer blocks: Adam with
SCALAR_LR
All learning rates are scaled by the same
lr_mul schedule factor, which ramps down to zero during warmdown. The base_lr for each parameter group stores the unscaled learning rate so the schedule can be applied multiplicatively each step.