Kyro-29M is a 29.1M-parameter English language model trained from scratch on 30 billion tokens. Its architecture and training recipe were not hand-designed. An autonomous research agent found them over hundreds of timed experiments on a laptop GPU. A single 15-hour run on one rented RTX 5090 then trained the result at full scale.
This repo holds the base (pretrained) model. An instruction-tuned version, Kyro-29M-Instruct, is published separately.
| Parameters | 29.13M (14.7M of them in the input embedding and output head) |
| Layers / width / heads | 6 / 448 / 7 (head dim 64) |
| Context | 512 tokens |
| Vocabulary | 16,384 (byte-level BPE) |
| Training tokens | 30B (about 1,030 tokens per parameter) |
| Training compute | ≈5.2 × 10¹⁸ FLOPs, 14.9 h on 1× RTX 5090 |
| FineWeb-Edu validation | 1.084 bits per byte |
| Weights | model.safetensors, float32 (117 MB) |
pip install torch safetensors tiktoken huggingface_hub
from huggingface_hub import snapshot_download
import sys
path = snapshot_download("Astrosully/Kyro-29M")
sys.path.insert(0, path)
from modeling_kyro import load
model, tok = load(path) # GPU if available, else CPU
print(tok.complete(model, "The water cycle is", max_new_tokens=80, temperature=0.7))
Or from the command line, inside the downloaded folder:
python modeling_kyro.py --prompt "The water cycle is"
modeling_kyro.py is about 200 lines and needs only PyTorch, safetensors and tiktoken. It is not a
transformers architecture, so AutoModel will not load it. The tokenizer ships as a plain tiktoken
ranks file (kyro.tiktoken) plus tokenizer_config.json, with no pickles.
Sample output (temperature 0.7):
The water cycle is a complex system involving an array of interconnected components and processes. It all starts with the water cycle, which is usually divided into two parts...
A pre-norm decoder-only transformer descended from Karpathy's nanochat, plus four additions the research agent kept because they measurably lowered loss at a fixed time budget:
λ_res·x + λ_0·x₀, where x₀ is the
normalised embedding.Every addition starts at exactly zero, so the model begins training as a plain transformer and learns how much of each to use.
The design came from an autoresearch loop in the spirit of Karpathy's autoresearch experiments:
train.py.The harness enforces honesty checks:
Across sessions, the agent settled or rejected most of the design space:
The winning configuration (7b25048) was frozen and became Kyro.
Data: a 14.5B-token mix built for this run, tokenized with Kyro's own 16K tokenizer. The tokenizer was trained on FineWeb-Edu.
| Source | Tokens | Share | Documents |
|---|---|---|---|
| FineWeb-Edu (sample-100BT) | 10.0B | 69% | 9.08M |
| Cosmopedia v2 (synthetic textbooks) | 2.5B | 17% | 3.12M |
| FineMath (finemath-4plus) | 1.0B | 7% | 0.57M |
| Wikipedia (English, 2023-11-01) | 1.0B | 7% | 1.06M |
Every document starts with <|bos|>. The FineWeb-Edu validation documents were removed from the
training mix by content hash; 4,792 were caught in the 100BT sample. Validation numbers are
therefore held out.
Training run:
torch.compile, at 560K tokens/s.The same model trained on 2B FineWeb-Edu tokens (58 minutes) reached 1.114 bpb. 15× more data, plus the broader mix, brought it to 1.084 bpb:
A 29M model is capacity-bound well before 30B tokens; the compute-optimal size for this budget would be around 200M parameters.
Results:
<|bos|>
prepended, 512-token context.acc_norm where a task has it, otherwise acc.| Model | Params | Tokens | ARC-C | ARC-E | BoolQ | HellaSwag | LAMBADA | OBQA | PIQA | SciQ | WinoG | Avg | Avg w/o BoolQ |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Kyro-29M | 29M | 30B | 23.2 | 41.0 | 51.4 | 29.4 | 25.0 | 28.6 | 58.7 | 63.3 | 51.1 | 41.3 | 40.0 |
| Kyro-29M @ 2B tokens | 29M | 2B | 23.1 | 41.4 | 62.2 | 27.7 | 18.9 | 26.6 | 58.7 | 63.8 | 50.4 | 41.4 | 38.8 |
| BarunLM-35M | 35M | 5.7B | 22.4 | 39.0 | 56.7 | 28.9 | 24.6 | 28.4 | 59.4 | 59.3 | 51.5 | 41.1 | 39.2 |
| nanochat-style d146M (own run) | 146M | 2B | 22.8 | 34.7 | 62.1 | 27.5 | 19.7 | 26.6 | 59.6 | 53.9 | 51.5 | 39.8 | 37.0 |
| SmolLM-135M | 135M | 600B | 28.7 | 56.5 | 60.2 | 42.6 | 37.7 | 34.4 | 68.1 | 74.8 | 53.3 | 50.7 | 49.5 |
Two notes on reading the table:
ArithMark 3.0 has 1,000 grade-school arithmetic word problems with four answer choices each; random guessing scores 25%. It was scored the same way as the dataset's own script: no special tokens, length-normalized log-likelihood. The setup reproduces SmolLM-135M's published 36.80% exactly.
| Model | Params | Score |
|---|---|---|
| Kyro-29M | 29M | 37.2% |
| Kyro-29M, BOS token prepended (as in training) | 29M | 39.2% |
| SmolLM-135M | 135M | 36.8% |
| Kyro-29M-Instruct | 29M | 34.7% |
That ties sixth of the 78 models on the benchmark's published leaderboard. The margin of error is about ±1.5 points.
Most of the score comes from recognizing plausible answers, not computing them:
Kyro-29M is a research and education artifact: an example of what a ~30M model can learn, and of an agent-designed training recipe. It is not suitable for anything that relies on its outputs being true.