Experiments
Expériences
What the numbers say.
Ce que disent les chiffres.
Three measurements, each on its own axis. Architecture: at the parameter count that fits a $4 chip, the 3-pathway design beats a plain transformer by 22 % on quality. Compression: ternary weights pack the model into 16× less disk than FP32. Hardware: the firmware boots and produces tokens on an emulated Cortex-M3 with the same answer as Python, to the bit.
Three orthogonal measurements: architecture (60K head-to-head ternary vs vanilla FP32, 3-seed median), compression (1.58 bits/wt under ATOME01 → 1.6 bits/trit under ATOME02 — within 1 % of the log₂(3) floor), hardware (bit-exact Python ↔ C ↔ Cortex-M3 to FP32 epsilon, 48/48 tokens on 60K demo and 16/16 on trained 944K).
Trois mesures, chacune sur son propre axe. Architecture : au nombre de paramètres qui tient dans une puce à 4 $, le design 3-chemins bat un transformeur classique de 22 % en qualité. Compression : les poids ternaires divisent par 16 la taille disque vs FP32. Matériel : le firmware boote et produit des tokens sur un Cortex-M3 émulé avec la même réponse que Python, au bit près.
Trois mesures orthogonales : architecture, compression (1,58 bits/poids ATOME01 → 1,6 bits/trit ATOME02), matériel (parité bit-exact à epsilon FP32).
Experiment 1 — Architecture, 60K params, TinyStories
Expérience 1 — Architecture, 60K paramètres, TinyStories
| Model |
Params |
Bits/wt |
Disk |
PPL ↓ |
vs vanilla |
| atome 60K · ternary · 3-pathway |
60,800 |
1.58 |
15.1 KB |
6.31 |
−22.3 % |
| vanilla GPT · FP32 · param-fair |
60,808 |
32 |
237.5 KB |
8.12 |
baseline |
| vanilla GPT · FP32 · flash-fair |
5,968 |
32 |
23.3 KB |
13.10 |
− |
Bold but true: at fixed parameter count and in 16× less disk, the 3-pathway routed ternary architecture beats a plain transformer by 22 % on perplexity. At fixed flash budget, the gap is 52 %. Three-seed median, 3,000 steps, TinyStories. ab_results.json in the repo.
Affirmation forte mais vraie : à nombre de paramètres égal et en 16× moins de disque, l'architecture ternaire 3-chemins bat un transformeur classique de 22 % en perplexité. À budget flash égal, l'écart est de 52 %. Médiane 3 seeds, 3 000 pas.
Experiment 2 — Trained 944K model writes coherent prose
Expérience 2 — Le modèle 944K entraîné écrit une prose cohérente
A larger version of the same architecture, scaled to 944,000 parameters and trained for three hours on a single rented GPU. The model writes recognisable TinyStories prose: "Once upon a time, there was a little girl named Lily…" 270 KB on disk. Same engine; same bit-exact verification path; the only thing that changed was scale and training time.
944,640 params (d=256, 8 layers), 30 K steps × eff batch 256 × seq 256, BF16, cosine LR 3e-4 → 3e-5, RunPod A6000 community cloud, ~3 h 20 min wall, ~$2 spend. Best val loss 1.0545 / ppl 2.87 at step 29K. 16/16 bit-exact QEMU ↔ Python on the trained checkpoint.
Une version plus grande de la même architecture, dimensionnée à 944 000 paramètres et entraînée pendant trois heures sur un seul GPU loué. Le modèle écrit de la vraie prose TinyStories : « Once upon a time, there was a little girl named Lily… » 270 Ko sur disque.
944 640 params (d=256, 8 couches), 30 K pas × batch effectif 256 × seq 256, BF16, LR cosine 3e-4 → 3e-5, RunPod A6000 community, ~3 h 20 wall, ~2 $.
Experiment 3 — Bit-exact, on emulated silicon
Expérience 3 — Bit-exact sur silicium émulé
The same trained model, exported to a 270 KB binary, baked into a Cortex-M3 firmware image, and run on the QEMU MPS2-AN385 emulator. Every token comes out identical to what Python produced — for 48 out of 48 generated bytes on the 60K demo, and 16 out of 16 on the 944K production model. Numerical difference: 0.00000037, which is the limit of single-precision floating-point representation. That's not "close" — that's the same answer.
Cross-compile sweep: arm-none-eabi-gcc -Os targeting Cortex-M0/M3/M4/M4F/M7, engine code 2.6–2.8 KB .text across all five. Full QEMU MPS2-AN385 firmware (35 KB total) boots, calls atome_predict_next in a loop, emits each generated byte over semihosting + DWT cycle count. Multi-token QEMU parity passing after the SSM-state fix at atome.c:294-300.
Le même modèle entraîné, exporté en binaire de 270 Ko, intégré dans un firmware Cortex-M3, et exécuté sur l'émulateur QEMU MPS2-AN385. Chaque token sort identique à ce que Python a produit — 48 sur 48 sur la démo 60K, 16 sur 16 sur le modèle 944K. Différence numérique : 0,00000037, soit la limite de la représentation simple précision.
Sweep cross-compile arm-none-eabi-gcc -Os Cortex-M0/M3/M4/M4F/M7, code moteur 2,6–2,8 Ko de .text. Firmware QEMU MPS2-AN385 complet (35 Ko) boote et émet chaque token via semihosting + compteur DWT.
Caveats we publish — not bury.Réserves qu'on publie — pas qu'on cache.
The 60K head-to-head is 3-seed median; the 944K is single-seed (we have the option for multi-seed but it doesn't change the architecture story). Above ~1M params, plain transformers catch up as their dense FFN starts to pay off — the 3-pathway block's edge is the sub-1M regime, and that's the regime we ship to. No real silicon yet — QEMU MPS2-AN385 only. Nucleo-F411RE flash is the next milestone.
Le head-to-head 60K est médiane 3 seeds ; le 944K est seed unique. Au-delà de ~1M paramètres, les transformeurs classiques rattrapent quand leur FFN dense commence à payer — l'avantage du bloc 3-chemins est le régime sub-1M, c'est le régime qu'on cible. Pas encore de silicium réel — QEMU MPS2-AN385 uniquement.