An experimental neural architecture by Lee Madover, built and measured end to end on one consumer GPU (RTX 5070, 12 GB).
AXIOM replaces two standard parts of a language model:
- Attention becomes a recurrent working memory: a gated linear recurrence, so each new token costs O(1).
- The feed-forward layer becomes a bank of routed experts called Law Cells. These can grow during training by fission, but only when a paired, held-out trial shows that a split pays for its complexity.
This repository holds the architecture, the training pipeline, every experiment, and honest results, including the negative ones.
| Axiom-1-Chat (65M) | pretrained from scratch on 3.1B tokens, then chat-tuned. Weights: Atlas-AI-research/Axiom-1-Chat |
| Axiom-0 | the synthetic-data prototype used to test fission, contradiction tracking and continual learning |
| Status | research artifact. Axiom-1 chats, knows its name and answers some simple facts, but hallucinates on most factual questions (91% on a hand-audited 100-question test). See Results. |
Tested with Python 3.13 and PyTorch 2.11 + CUDA 12.8 on an RTX 5070. The RTX 50 series needs a cu128 or newer PyTorch build.
pip install -r requirements.txtpython -c "from huggingface_hub import snapshot_download; snapshot_download('Atlas-AI-research/Axiom-1-Chat', local_dir='hf/axiom1-chat')"Then chat in a terminal, with tokens streamed as they're generated:
python chat.py --model hf/axiom1-chat --device cudaOr in Python:
from axiom.hub import load
model, tok, meta = load("Atlas-AI-research/Axiom-1-Chat", device="cuda")All numbers are measured; the scripts and raw outputs are in results/. The reference is SmolLM2-135M-Instruct,
a mature open model about 2× larger that was pretrained on about 650× more text.
| Measure | Better is | Axiom-1-Chat (65M) | SmolLM2-135M |
|---|---|---|---|
| Good chat answers (coherent and on topic, judged) | ↑ | 37% | 70% |
| Coherent | ↑ | 88% | 95% |
| Hallucination rate, 100 synthetic questions (hand-audited) | ↓ | 91% | 61% |
| Easy facts correct | ↑ | 18% | 72% |
| Invents answers about things that don't exist | ↓ | 100% | 98% |
| SimpleQA correct (500 questions) | ↑ | 0% | 0% |
| Bits per byte, held-out web text | ↓ | 1.16 | 0.93 |
| Generation speed, batch 1 on an RTX 5070 | ↑ | 46.8 tok/s | 35 tok/s |
What the experiments found:
- The recurrent working memory works. It trains stably and generates faster than a same-size Transformer at batch 1.
- Fission did not earn its keep.
- On synthetic data, a fixed mixture of experts matched or beat it, and its evidence-derived split direction was no better than a random one.
- In Axiom-1, all 9 trial splits were rejected.
- The weaknesses are mostly data scale and shape: 3.1B pretraining tokens, long chat answers in the tuning data, and no examples of declining to answer.
Full design, maths, failure analysis and prior art: DESIGN.md. Chat-quality research: rd_coherence.md.
The data is about 9.6 GB: four FineWeb-Edu shards plus the two chat datasets. Download them into data/ as
prepare_data.py describes, then:
python -I prepare_data.pypowershell -ExecutionPolicy Bypass -File run_axiom1.ps1run_axiom1.ps1 runs four steps:
- Tokenizes the data.
- Runs a pilot of two memory designs.
- Pretrains for about 22 hours, with fission rounds.
- Chat-tunes for about 2 hours.
It's resumable and keeps the PC awake. Supporting tools:
| Tool | Purpose |
|---|---|
tracker.py / tracker.html |
progress dashboard: percent done, time left, cloud-cost estimate, pause-and-chat |
watch_training.sh |
crash and stall watchdog |
pause_training.ps1 |
freeze or resume training in place |
eval_chat.py |
chat-quality eval with an offline judge |
compare_models.py |
side-by-side comparison with a Hugging Face model |
hallucination_eval.py, simpleqa_eval.py |
hallucination benchmarks |
export_hf.py |
export a checkpoint as safetensors |
python hwcheck.pypython train.py --config configs/axiom0.yaml --out checkpoints/axiom0python benchmark.py --config configs/axiom0.yaml --seeds 3python benchmark.py --config configs/axiom0.yaml --seeds 3 --variants axiom,axiom_no_gate,moe_fixed,moe_k2,moe_k8,moe_k12 --tag wrongkpython -m pytest tests -qOverride any config value with --set key=value.
| Path | Contents |
|---|---|
axiom/lm.py |
Axiom-1: working memory, Law-Cell bank (LawFFN), Transformer baseline, streaming generate |
axiom/lm_train.py |
pretraining and chat tuning, fission rounds, atomic checkpoints, resume |
axiom/structure.py |
fission, fusion, pruning, dormancy, and HME split gates with exact mass conservation |
axiom/model.py, trainer.py, data.py, engine.py |
Axiom-0 model, trainer, synthetic data, checkpoint engine |
axiom/decoding.py, axiom/hub.py |
decoding safeguards; loading exported models |
configs/ |
Axiom-0 and Axiom-1 configs |
tests/ |
invariants: exact rollback and resume, mass-preserving splits, causal decoding, grading rules, and more |
Code and weights are released under the Apache-2.0 license (see LICENSE). Training data:
FineWeb-Edu (ODC-By 1.0),
smol-smoltalk (Apache-2.0) and
everyday-conversations-llama3.1-2k (Apache-2.0),
all by Hugging Face.