Changelog · first model

Watch it learn

Training never shows the same problem twice. Each step draws 8 new episodes: a random relation, 999 new examples and 16 new questions, so it is trained to find a procedure for any relation rather than memorise answers for one.

This page covers the first, bit-by-bit model, kept in thechangelog. The current model is on theModel page.

Updates to reach 90% on trained relations400of 3,000 · batch of 8 episodes × 16 questions
Final, trained relations98.1%mean exact; the gap from 100% is the random rules
Final, never-seen relations77.0%mean of a+b+1, a−2b, min, nand, 3a

Exact answers during training

Measured every 100 updates on fixed validation episodes (128 questions per relation). Only the trained relations were used to pick the saved checkpoint; the never-seen ones are just watched.

Exact-match accuracy over training
trained relationsnever-seen relations
0%25%50%75%100%05001,0001,5002,0002,5003,000training updates98.1%77%

Relation by relation

Bitwise relations (and, or, a<<1) click within the first 200 updates; carries and max follow by about 400. Among the never-seen relations, a+b+1 andnand transfer almost at once, 3a and a−2b creep up slowly, andmin never takes off. Random rules plateau below 100%. Hover a cell for the value.

addsubb-axorandora+2b2a+bmaxa<<1a+constb^consttransducera+b+1a-2bminnand3a50010001500200025003000
0%100% exact

Replay the checkpoints

The same question and the same 999 examples, answered by the model saved at each stage. At first attention is spread evenly and the answer is a blur of probabilities. As training goes on, attention snaps onto the examples in the question's situation and the bits become certain.

Relation

Exact on 64 fresh questions (this relation)—

Where the first question looks at bit 3 (low-bit-first pass)

Training loss

Per-bit cross-entropy, averaged over each 100-update window.

Training loss
0.0000.5001.0001.50005001,0001,5002,0002,5003,000training updates0.134

Training recipe

Relations drawn during training

addsubb-axorandora+2b2a+bmaxa<<1a+constb^consttransducer

a+const and b^const draw a new constant each episode. transducer is a random 1–4 state rule reading one bit position at a time, in either direction — a nearly endless supply of new relations.

Never trained (held out)

a+b+1a-2bminnand3a

Settings

Updates3,000
Episodes per update8
Questions per episode16
OptimizerAdamW, one-cycle, peak 1e-3
Lossper-bit cross-entropy
Wall time~8 min, RTX 3050 laptop
uv run teenie-bits --device cuda --updates 3000 \
  --log-every 100 --save checkpoints/bits.pt \
  --snapshots checkpoints/bits-snapshots \
  --log experiments/bits-seed0-train.jsonl