Distributed training methods: small GPT experiments
Code and experiment artifacts for comparing a plain training baseline with several low-communication distributed-training prototypes on a 4.34M-parameter GPT.
Model and data
- Decoder-only GPT: 4 layers,
d_model=256, FFN 1024, tied embeddings, vocabulary 4096, context 512. - Tokenizer: custom 4,096-token BPE; files are in
tokenizer/fineweb_bpe_4096. - Data source: locally cached FineWeb text. Training used 117,227,520 input tokens per one-epoch run after sequence packing.
val.u16is used for validation;ext_valis reserved for method-specific probes. - The FineWeb text and token-ID caches are not included in this repository. See the cache README and manifest for the local data layout and counts.
- Main experiment hardware: NVIDIA RTX 3060; PyTorch 2.14.1+cu130.
Selected results
| Run | Full val.u16 loss |
Scope |
|---|---|---|
| Plain B32 baseline | 3.9842 | 1 epoch, 117.23M tokens |
| Best screening method: LADDER | 4.7920 | K=16, up to 7 epochs |
| Best one-epoch LR sweep: LADDER, lr=9e-4 | 5.7302 | K=16 |
| Best Muon follow-up: LADDER + Muon/AdamW | 5.0823 | K=16, 1 epoch |
| DiLoCo-style run | 6.3252 | K=16, H=4, 1 epoch |
The DiLoCo comparison uses the same initialization, shuffled batch order, and inner AdamW learning rate as the plain baseline. It keeps separate AdamW state per worker and applies averaged worker deltas with outer Nesterov SGD (lr 0.7, momentum 0.9). The original DiLoCo paper uses inner AdamW and outer Nesterov momentum, with H=500 as its default; H=4 here is a small-run adaptation, not a reproduction of the paper's full setup (Douillard et al., 2023).
Results and plots
results/distributed_idea_grid/results.json: baseline and five-method K=16 screening run.results/distributed_idea_grid/val_loss_grid.png: screening validation curves.results/distributed_idea_grid/lr_sweep/: top-two LR sweep results and graph.results/distributed_idea_grid/muon_stage/: Muon follow-up results.results/distributed_idea_grid/diloco_comparison/diloco_vs_baseline.png: DiLoCo vs baseline validation curve.models/best_distributed_model.pt: best retained distributed-method checkpoint (Muon LADDER).models/diloco_model.pt: DiLoCo-style checkpoint.
Frequent points in the plots use the fixed 8-batch val.u16 sample; final markers use the full val.u16 corpus. The local training scripts are in code/. They expect token caches at /workspace/data/fineweb_text/token_ids/ by default; edit the CLI paths for another layout.