Smol Training Playbook (GPU MODE talk on SmolLM3)
A GPU MODE talk by the HuggingFace pre-training team walking through the “Smol Training Playbook” — the ~200-page postmortem of training SmolLM3, a 3B-parameter multilingual reasoning model trained on 11T tokens across 384 H100s for ~30 days. The talk reframes LLM pretraining as an operations discipline rather than a recipe: most of the cost goes into ablations and infrastructure-debugging, intuition is repeatedly wrong, and the run was restarted from scratch after burning 1T tokens because of a tensor-parallel seed bug. Useful as a reference for anyone planning a from-scratch pretraining run, especially the framing of how to budget ablation compute and which architectural choices are settled vs. still contested. No transcript is available on YouTube; the body below summarizes the companion playbook (the talk closely mirrors it).
Key claims
Section titled “Key claims”- The full SmolLM3 effort cost ~437,760 GPU-hours, split roughly 276K pretraining run + 115K ablations + 46K reset/debugging — i.e. ablations + debugging cost more than half the main run [§Compute budget].
- Most modern frontier-tier models (Qwen3, Gemma3, DeepSeek-V3, OLMo, Kimi, SmolLM) are still transformer descendants — refinements happen in attention variant, normalization, RoPE/positional, and data, not in the macro-architecture [§Architecture choices].
- GQA with 4–8 groups matches MHA on loss and downstream while dramatically reducing KV-cache cost; MQA underperforms; MHA is effectively obsolete for long-context inference [§Attention ablations].
- Intra-document attention masking (tokens only attend within the same source document) is recommended from day one — 80–90% of pretraining documents are under 2K tokens, so standard causal masking lets unrelated documents cross-contaminate within the same sequence [§Attention masking].
- Small-scale ablation findings are asymmetric: if a change hurts at small scale you can rule it out, but a small-scale win does not guarantee large-scale transfer — extrapolation only becomes reliable with sufficient tokens and sufficient closeness in scale [§Ablation methodology].
- For pretraining ablations, cloze-formulation (CF) evaluation tracks model capability earlier in training than multiple-choice (MCF) or free-form generation (FG); FG is too noisy pre-post-training [§Evaluation].
- A subtle bug where all GPUs in a tensor-parallel group shared the same random seed crippled learning and forced a full restart after 1T tokens of training, despite a normal-looking loss curve [§Training reset case study].
- Data curation provides larger headline gains than architecture tweaks — the team’s experience is that fixing data quality (broken PDFs, code indentation, mix weights) dominates returns from minor architectural changes [§Data §Discussion].
- Infrastructure choices that matter in practice: local NVMe storage per node (FSx for Lustre failed at scale), pre-warmed spare nodes for fast failover, and battle-tested dataloaders over experimental ones (the “nanosets” dataloader’s index grew linearly with steps and caused throughput drops) [§Infrastructure].
- Post-training uses dual-mode alignment — concise mode and reasoning
mode (
<think>tags) toggled by system prompt — with hybrid reasoning/non-reasoning datasets to avoid “split-brain” behavior, and model merging to recover capabilities lost during alignment [§Post-training].
Method
Section titled “Method”The artifact is a talk-form summary of HuggingFace’s Smol Training Playbook, structured around four phases: (1) deciding whether to train at all (the “Training Compass”: don’t train if prompting or fine-tuning an existing model would do); (2) pretraining (architecture choices via ablation at 1B/3B scale, data mixing, intra-document masking, RoPE/GQA/normalization choices, hyperparameter selection); (3) post-training (instruction tuning, reasoning-mode dual training, model merging); (4) infrastructure operations (storage, networking, checkpointing, throughput debugging).
The methodology that runs through all four phases is aggressive ablation: a baseline 1B Llama-3.2-style transformer trained on ~45B tokens (~1.5 days on 8×H100, ~42K tokens/s/GPU), with architecture or data varied one axis at a time. For data ablations, architecture is fixed and dataset mixtures vary. Some ablations were re-run at 3B/100B tokens before committing to a choice for the main run. The team explicitly budgets ablation compute as a substantial fraction of total project cost rather than as overhead.
The main SmolLM3 run: 3B dense transformer, 11T tokens, ~30 days on 384 H100s (48 AWS p5 nodes), ~30% MFU, 2.36M token global batch size, GQA with 4 groups, intra-document masking from step 0, FineWeb-Edu / Stack-Edu / FineMath as the core data sources, AdamW + cosine LR schedule, RoPE.
Results
Section titled “Results”SmolLM3-3B targets on-device deployment (phones, edge) with strong multilingual + math + code + long-context capabilities, positioned against Qwen, Gemma, and the team’s own SmolLM2-1.7B predecessor. The playbook’s claim is reproducibility-of-process rather than SOTA-headline-numbers: a researcher applying the same methodology should be able to land in the same capability band for a similar compute budget. The training-reset incident (1T tokens lost to a tensor-parallel seed bug) is the most concrete operational lesson — loss curves alone were not sufficient to detect the bug; downstream benchmark regression vs SmolLM2-1.7B was the signal that triggered investigation.
Cost breakdown (from the playbook tables): main run 276,480 GPU-h, pretraining ablations 69,120 GPU-h, mid-training ablations 46,080 GPU-h, reset & debugging 46,080 GPU-h, total ~437,760 GPU-h.
Why it’s interesting
Section titled “Why it’s interesting”For a team building generative-models infrastructure, the talk is most useful as a cost-model for from-scratch pretraining: ablations + debugging routinely cost as much as the headline run, and that fraction grows when targeting SOTA or introducing new architectural choices. The intra-document masking finding and the tensor-parallel seed bug are also concrete, transferable lessons that apply equally to video / diffusion pretraining pipelines, where short-segment packing and tensor parallelism have the same failure modes. The dual-mode alignment recipe (concise vs reasoning toggled by system prompt) is a clean reference design for any controllable model that needs to support multiple inference behaviors without fragmenting the model zoo.
See also
Section titled “See also”- Open foundation-model releases — SmolLM3 is itself an open-weights release; the playbook is the documentation companion that few open releases ship with
- Synthetic Training Data — the playbook’s data section discusses synthetic-data sources (Cosmopedia, FineMath, Stack-Edu) as integral to the recipe; relevant prior art for any team relying on synthetic corpora
- The Smol Training Playbook (HuggingFace Space): https://huggingface.co/spaces/HuggingFaceTB/smol-training-playbook
- SmolLM3-3B model card: https://huggingface.co/HuggingFaceTB/SmolLM3-3B