Pretraining and adapting a language model on a dependency-free stack: GPT-2 124M from random weights, reproduced against llm.c, and a clinical adapter for Qwen3-0.6B
Abstract
Almost every language model in service was trained by one family of software. That concentration makes a question hard to settle: how much of what is known about training a language model describes language models, and how much describes that software? Settling it needs a second implementation able to carry a model through a whole lifecycle rather than reproduce one operator. We report such a lifecycle. Using numbat, a machine-learning stack written in Zig with no third-party runtime dependencies, we pretrain a 124.4 M-parameter GPT-2 from random initialisation over 9.91 B tokens of web text, then adapt a separate small model to clinical question answering. A reference implementation runs on identical hardware at both stages, and a sidecar with authority to halt a run supervises each. Agreement is close. Held-out cross-entropy finishes at 3.2588 against a published 3.29, and HellaSwag at 0.3053 against 0.299; across 8 paired evaluations it sits below a same-machine reference at every point, by 0.0608 on average. Re-running that reference on different hardware moves it 0.0035, which bounds how much of any gap is method rather than framework. Throughput does not pay for agreement: measured in one session at a production configuration, numbat reaches 43,374 tokens per second against PyTorch's 41,202, scaling 2.769x over three cards. Clinical adaptation ends at 2.1899 held-out loss against 2.1941. Neither model is a medical device, and neither is validated for clinical use.
Create a lesson
Metadata
- Comments
- 20 pages, 2 figures, 7 tables. Weights: https://huggingface.co/cloudkites/gpt2-124m-fineweb-edu Licence: Apache-2.0. Weights, a config and an evaluation curve only; no framework source is released and none is needed to use them
Related papers
Labelling Bug-Fixing Commits with Local Open-Weight Language Models
Shared title terminologycs.SEPhilip König, Georg Goldenits, Caroline König et al.
Does Training-Free Delegation Improve Cost Efficiency in Multi-Agent Software Engineering Systems? An Empirical Study
Shared title terminologycs.SEMootez Saad, Mohammad Masudur Rahman, Tushar Sharma
Analyzing and Clarifying Software Change Intentions via Project Asset Dependency Mining
Shared title terminologycs.SEYingtao Fang, Zhi Jin, Tiankuo Zhao et al.
SpecBridge: Learning Natural-Language Formalization Plans for the Formal Specification Synthesis Task
Shared title terminologycs.SEWenjie Zhang, Yun Lin, Zining He et al.
Codit-Bench - Can Large Language Models Find Bugs in Code Auditing?
Shared title terminologycs.SEYuesong Feng, Zheng Zhang, Haoran Ding et al.
A Large Language Model-Based Framework for Automated Game Quest Testing
Shared title terminologycs.SEEnhong Mu, Nianyu Li, Jinyu Cai et al.