Skip to content
leemadovPublic

About

AXIOM: an experimental attention-free architecture with Law Cells and validated fission. Axiom-1: a 65M LM trained on one RTX 5070, with honest results.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AXIOM

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.

Chat with Axiom-1

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.txt
python -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 cuda

Or in Python:

from axiom.hub import load
model, tok, meta = load("Atlas-AI-research/Axiom-1-Chat", device="cuda")

Results

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.

Reproduce Axiom-1

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.py
powershell -ExecutionPolicy Bypass -File run_axiom1.ps1

run_axiom1.ps1 runs four steps:

  1. Tokenizes the data.
  2. Runs a pilot of two memory designs.
  3. Pretrains for about 22 hours, with fission rounds.
  4. 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

Axiom-0 experiments

python hwcheck.py
python train.py --config configs/axiom0.yaml --out checkpoints/axiom0
python benchmark.py --config configs/axiom0.yaml --seeds 3
python benchmark.py --config configs/axiom0.yaml --seeds 3 --variants axiom,axiom_no_gate,moe_fixed,moe_k2,moe_k8,moe_k12 --tag wrongk
python -m pytest tests -q

Override any config value with --set key=value.

Layout

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

License and attribution

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.

About

AXIOM: an experimental attention-free architecture with Law Cells and validated fission. Axiom-1: a 65M LM trained on one RTX 5070, with honest results.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages