anadim/AdderBoard

Smallest transformer that can add two 10-digit numbers

Python

379

34 commits

updated Mar 26, 2026

See the code

README

AdderBoard

AdderBoard

Challenge: Build the smallest transformer that can add two 10-digit numbers with >= 99% accuracy on a held-out 10K test set.

This started with Addition Under Pressure, where I gave Claude Code and Codex the same prompt: train the smallest possible transformer that can do 10-digit addition with at least 99% accuracy. Claude Code came back with 6,080 parameters and Codex came back with 1,644. The community has since pushed this dramatically lower.

Maintained by Dimitris Papailiopoulos (@dimitrispapail).

We track two categories:

  • Trained — weights learned from data by any training algorithm (SGD, Adam, evolutionary search, etc.). The algorithm must be generic — it should work with any model and dataset, not just this specific problem. This encourages creative ideas around data format, tokenization, curriculum learning, and architecture search.
  • Hand-coded — weights set analytically. This is a constructive proof that the architecture can represent addition, regardless of whether SGD would find it.

Both are valid. Both are interesting.

Leaderboard

Hand-Coded Weights (Constructive Proofs)

RankParamsAccuracyAuthorBuilt withArchitectureKey TricksLink
16*100%zcbtrak1L Qwen-derived decoder, d=2, 1h, hd=2, ff=2 (fixed Q, folded norm)RoPE period-19, hardcoded Q_proj (PE exemption), norm weights folded into tied output head, tied carry hinge gate, shared carry-scale scalargist
28100%kswain981L Qwen-style decoder, d=2, 1h, hd=2, ff=2RoPE period-19, phase-tied Q projection (1 param), coupled quadratic embedding (1 param), tied carry hinge gate, shared carry-scale scalarrepo
310100%lokimorty1L Qwen-derived decoder, d=2, 1h, hd=2, ff=2RoPE period-19, parametric tied embedding, gate tying via algebraic identity, merged carry scalargist
412100%lokimorty1L Qwen-derived decoder, d=2, 1h, hd=2, ff=2RoPE period-19, parametric tied embedding, sparse attention/MLP, constructive carry hingegist
520100%yieldthought1L decoder, d=2, 1h, hd=2Quadratic tied embedding + tied output head, RoPE-19 digit routing, sparse tied V/O, two-hinge ReLU MLP, parameterless pre-normgist
627100%Wonderfall (@w0nderfall)1L decoder, d=2, 1h, hd=2Tied Q/K + V/O, cross-tied W_vo as MLP w2, factorized quadratic embedding, compressed MLP w1, RoPE period-19gist
728100%jacobli991L decoder, d=2, 5h (MQA), hd=2, ff=4Tied parabolic decode, RoPE digit routing, sparse O-proj, tied MLP, matrix broadcastgist
831100%Arch2221L decoder, d=3, 4h/1kv, hd=2, ff=4RoPE offset-targeted queries, sparse O-proj, SwiGLU carry detection, tied embed decoderepo
933100%fblissjrClaude Code + Gemini1L decoder, d=3, 3h (d_head=1), ff=4ALiBi prefix sum for carry, e^80 softmax anchoring, residual cancellation head, 2-hinge ReLU step, parabolic LM head, float64repo
1036100%alexlitz2L decoder, d=5, 5h+1hALiBi slope=log(10) for base-10 weighting, sparse embed, gated ReLU FFN, float64gist
1150100%lichengliu031L custom GPT, d=4, 2h, hd=2Factorized embed, rotation Q (2 angles), tied embed+V dir, rank-1 MLP, parabolic head, sinusoidal PE (period 11)repo
1266100%cosminscn1L nanoGPT, d=4, 2hRotation Q (2 angles), sparse c_proj (2 nonzero), parabolic lm_head, factorized embed, sinusoidal PE (period 11)gist
1387100%bingbangboom-lab2L Qwen3, d=5, 2h/1kv, hd=2, ff=3Cross-layer sharing, rank-1 projections, sparse gate, low-rank head, frozen scaling paramsgist
1493100%jacobli991L decoder, d=2, 5h (MQA), hd=2, ff=4Tied parabolic decode, RoPE digit routing, ReLU carry detectiongist
15111100%corbensorensonCodex1L decoder, d=3, 4h/1kv, hd=2, ff=2Tied embed, RoPE, SwiGLU, GQArepo
16116100%nino1L Qwen3, d=3, 4h/1kv, hd=2Tied embed, shared RMSNorm vectors, RoPE (hd=2)gist
17121100%Wonderfall (@w0nderfall)Codex1L Qwen3, d=3, 4h/1kv, hd=2, ff=2Tied embed, RoPE digit routing, carry via final norm, SiLU wrap detectiongist
18130100%cosminscn1L nanoGPT, d=4, 2hRank-1 linear, factorized embed, sinusoidal PE (period 11), ReLU carry detection, parabolic logit decodinggist
19130100%Wonderfall (@w0nderfall)Codex1L Qwen3, d=3, 4h/1kv, hd=2, ff=3Tied embed, RoPE digit routing, SiLU carry logicgist
20139100%Wonderfall (@w0nderfall)GPT-5.2 Pro + Codex1L Qwen3, d=3, 4h/1kv, hd=2Tied embed, RoPE digit routing, SiLU carry logicgist
21148100%bingbangboom-lab2L Qwen3, d=5, 2h/1kv, hd=2, ff=3Rank-1 linear, factorized embed, sparse gate, param-free norm, low-rank head, cross-layer sharinggist
22177100%xangma (@xangma)GPT + Codex2L Qwen3, d=5, 2h/1kv, hd=2Rank-1 linear, factorized embed, sparse gate, param-free norm, low-rank headgist
23197~100%**xangma (@xangma)GPT + Codex2L Qwen3, d=5, 2h/1kv, hd=2Rank-1 linear, factorized embed, sparse gate, param-free normgist

* Parameter count debated: the 6 counted parameters sit within an architecture that has 4 additional hardcoded weight values (Q projection and RMSNorm weights) that were counted as parameters in the parent 10p submission. Under strict counting this model has 10 unique weight values; under the submitter's accounting, 6. See #75 for discussion. We may be approaching the practical minimum for this architecture family.

** Passed 8,192 random tests; not independently verified on our 10K test suite yet.

Trained Weights (Learned from Data)

RankParamsAccuracyAuthorBuilt withArchitectureKey TricksLink
136100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=rotation(Q), V=Q, tied O=Q^T, all RMSNorms shared, tied QK norms, down=rotation(up^T)repo
23999.91%lokimorty1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding, tied K=V, tied Q/O readout, shared RMSNorms, shared anti-quarter QK norm, repeat-mix shared blockgist
341100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=rotation(Q), V=Q, tied O=Q^T, all RMSNorms shared, tied QK normsrepo
444100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=Q, V=Q, tied O=Q^T, all RMSNorms shared, pure grokking (no targeted FT)repo
545100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=rotation(Q), V=Q, tied O=Q^T, all RMSNorms sharedrepo
652100%Enara Vijil1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding, tied K=V, tied O=Q^T, all RMSNorms shared, shared QK norms, Grokfast-EMArepo
755100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=αQ, gate=α·up, tied O=Q^T, shared block RMSNormsrepo
857100%evindorClaude Code + Codex1L decoder, d=5(2+3), 1h, qk=4, hd=5, ff=2Parametric circular embed, tied V/O, tied Q/K+phase, tied fc2=head_proj, rank-1 out, shared normrepo
958100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=αQ, gate=α·up, tied O=Q^Trepo
1062100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), tied K=V, tied O=Q^T, tied lm_head, Adam no weight decayrepo
1167100%evindorClaude Code + Codex1L decoder, d=5(2+3), 1h, qk=4, hd=5, ff=2Parametric circular embed (3p), tied V/O, tied Q/K+phase, rank-1 out, shared norm, carry-mix curriculumrepo
1283100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied K=V, tied O=Q^T, shared all RMSNorms, iterated targeted fine-tuningrepo
1386100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied K=V, tied O=Q^T, shared block RMSNorms, L-BFGS + targeted fine-tuningrepo
1489100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied K=V, tied O=Q^T, RoPE (zero params), QK norms, 4-stage grokking-aware trainingrepo
159599.03%tbukicSuperchargeAI + Claude Code1L Qwen3 + circular arc embed, d=3, 1h/1kv, hd=4, ff=3, RoPE θ=3, SwiGLUCircular arc embedding (3 params), tied lm_head to dynamic embed, RoPE, QK normsrepo
16101100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied O=Q^T, RoPE (zero params), QK norms, cosine LR + targeted fine-tuningrepo
1712299.95%staghado1L Qwen3, d=3, 1h/1kv, hd=4, ff=3Tied embed, RoPE θ=3repo
18140100%dimopepClaude Code1L decoder, d=4, 1h/1kv, hd=4, ff=4, RoPE θ=3, SwiGLUTied K=V, tied O=Q^T, tied lm_head, QK-normgist
1923499.91%JackCai1206Claude Code1L decoder, d=6 (3 tok + 3 pos), 2h, hd=3, ff=2Parametric spiral PE (4 params), split-head attn (QK-pos/V-tok), shared XYZ pos, tied output head, LSB-firstrepo
2026299.95%lichengliu031L decoder, d=4, 1h, ff=8Rank-3 factorization, shared-A tied-KV, RMSNorm, tied embed, curriculum learningrepo
2127599.98%ryanyordGemini1L decoder, d=4, 1h, ff=8, ranks=(3,3,2,2)SVD truncation of 311p, tied embed, low-rank factorization, shareA_tieKV, RMSNormrepo
2230599.98%h3nock1L decoder, d=4, 1h, ff=9Low-rank factorization, shared-A tied-KV, RMSNorm, tied embed, learned PE, curriculum learningrepo
2331199.999%rezabyt (@reza_byt)1L decoder, d=4, 1h, ff=8Rank-3 factorization, shared-A tied-KV, RMSNorm, grokkingrepo
24456100%yinglunz1L decoder, d=7, 1h, ff=14Rank-3 factorization, shared-A tied-KV, rank-2 attn out, tied embedrepo
2549199.97%rezabyt (@reza_byt)1L decoder, d=7Rank-3 factorization, RMSNorm, curriculum learningrepo
2651299.988%yinglunz (@yinglun122)1L decoder, d=7, 1h, ff=14Rank-3 factorizationrepo
2777799.69%Yeb Havinga (@YebHavinga)Claude Code1L decoder, d=7, 1h, ff=14Tied embeddings, no FFN bias, curriculum learningrepo
281,64499.04%anadim (@dimitrispapail)Codex1L decoder, pair tokensPair token encoding (digit pairs as single tokens)repo
296,080100%anadim (@dimitrispapail)Claude Code2L decoder, d=16, ff=48Systematic scaling, found phase transition at d=16repo

Rules

The Core Constraint: Autoregressive Transformer

The model must operate as a genuine autoregressive transformer. This means:

  1. Self-attention is required. The model must contain at least one self-attention layer. This is the defining feature of a transformer — without it, you have an MLP or RNN, not a transformer.

  2. The model must be autoregressive. It receives a token sequence as input and predicts the next token. Output digits are generated one at a time, with each new token fed back as input for predicting the next. The carry propagation must emerge from this autoregressive process — not from explicit state variables passed between steps in Python.

  3. Standard forward pass. The model's forward() method must be a standard tensor-in, logits-out computation. No problem-specific control flow (for-loops over digits, explicit carry variables, string manipulation) inside forward(). The autoregressive generation loop lives outside the model, exactly as it would for any language model.

  4. The model does the work, not the code. The inference code should be generic autoregressive decoding that would work with any transformer checkpoint. If your generation loop contains addition-specific logic — manually pairing digits, threading carry state, indexing into specific positions — then the Python code is solving the problem, not the model.

In short: if you can swap in a different set of weights and use the exact same inference code for a different task, your setup is legitimate. If the inference code is inseparable from the algorithm, it's not.

What's Allowed

  • Architectural variations: rank-1/low-rank projections, factorized embeddings, custom positional encodings, alternative norms
  • Hand-coded weights (constructive proofs are valid — they show the architecture can represent addition)
  • Trained weights via any generic learning algorithm (shows the solution is learnable — encourages creative ideas on data format, tokenization, and curriculum)
  • Input formatting choices (reversed digits, delimiters, etc.) as long as the format is fixed and doesn't encode the answer

Qualification

  • Must achieve >= 99% accuracy on 10,000 random test pairs (held-out, fixed seed)
  • Inputs: two integers in [0, 9,999,999,999]
  • Output: their sum as an integer
  • Verified using verify.py with --seed 2025

Parameter Counting

  • Count unique parameters (after weight tying/deduplication)
  • Fixed/sinusoidal positional encodings are not counted (following the original Transformer paper convention)
  • Learned positional encodings are counted

How to Submit

Option A: Open an Issue (easiest)

  1. Click New Issue and fill in the template
  2. Include a link to your code (GitHub repo, gist, etc.)
  3. Include test results (accuracy on random pairs)
  4. We'll verify and add you to the leaderboard

Option B: Open a Pull Request

  1. Fork this repo
  2. Update the leaderboard in README.md with your entry
  3. Include verification results
  4. We'll review and merge

Updates to the leaderboard are welcome via pull request.

Verification

python verify.py submissions/your_submission.py

This runs:

  • 10 edge cases (boundary values, max carry chains)
  • 10,000 random pairs (seed=2025)
  • Reports accuracy, pass/fail, and timing

Context

This challenge explores a fundamental question: what is the minimal transformer that can represent integer addition?

Addition requires three capabilities:

  1. Digit alignment — pairing corresponding digits from two numbers
  2. Per-digit arithmetic — computing sum and carry for each pair
  3. Carry propagation — threading carry information across positions

Transformers solve these using attention (for alignment), MLPs (for arithmetic), and autoregressive generation (for carry propagation). The question is how small the architecture can be while still implementing all three.

Key Findings from the Community

  • Parameter cliff at ~800: Sharp accuracy transition observed by multiple researchers
  • Single layers beat two layers at equivalent parameter budgets (for trained models)
  • d=7 was the sweet spot for early trained models — multiple independent teams converged on this
  • d=4 now works with rank-3 factorization + grokking (311 params trained)
  • d=3 is the new frontier for trained models — circular arc embeddings + aggressive weight tying push to 36 params
  • Hand-coded models can go much smaller (6* vs 36 trained) since they don't need to be discoverable by SGD
  • Rank-3 factorization is the key trick for trained models at d>=4
  • Circular arc embedding + weight tying is the key trick for trained models at d=3
  • ALiBi enables extreme compression: the 36-param hand-coded leader uses ALiBi with slope log(10) for base-10 positional weighting, achieving 100% accuracy with a 2-layer decoder (d=5) in float64

Citation

If you use AdderBoard in your research, please cite:

@misc{papailiopoulos2026adderboard,
  author       = {Papailiopoulos, Dimitris},
  title        = {{AdderBoard}: A Community Challenge for Tiny Arithmetic Transformers},
  year         = {2026},
  publisher    = {GitHub},
  howpublished = {\url{https://github.com/anadim/AdderBoard}},
  note         = {Open challenge and leaderboard for building the smallest transformers that can perform integer addition}
}

License

MIT

Contributors

anadim

34 commits

anadim/AdderBoard

Smallest transformer that can add two 10-digit numbers

Python

379

34 commits

updated Mar 26, 2026

See the code

README

AdderBoard

AdderBoard

Challenge: Build the smallest transformer that can add two 10-digit numbers with >= 99% accuracy on a held-out 10K test set.

This started with Addition Under Pressure, where I gave Claude Code and Codex the same prompt: train the smallest possible transformer that can do 10-digit addition with at least 99% accuracy. Claude Code came back with 6,080 parameters and Codex came back with 1,644. The community has since pushed this dramatically lower.

Maintained by Dimitris Papailiopoulos (@dimitrispapail).

We track two categories:

  • Trained — weights learned from data by any training algorithm (SGD, Adam, evolutionary search, etc.). The algorithm must be generic — it should work with any model and dataset, not just this specific problem. This encourages creative ideas around data format, tokenization, curriculum learning, and architecture search.
  • Hand-coded — weights set analytically. This is a constructive proof that the architecture can represent addition, regardless of whether SGD would find it.

Both are valid. Both are interesting.

Leaderboard

Hand-Coded Weights (Constructive Proofs)

RankParamsAccuracyAuthorBuilt withArchitectureKey TricksLink
16*100%zcbtrak1L Qwen-derived decoder, d=2, 1h, hd=2, ff=2 (fixed Q, folded norm)RoPE period-19, hardcoded Q_proj (PE exemption), norm weights folded into tied output head, tied carry hinge gate, shared carry-scale scalargist
28100%kswain981L Qwen-style decoder, d=2, 1h, hd=2, ff=2RoPE period-19, phase-tied Q projection (1 param), coupled quadratic embedding (1 param), tied carry hinge gate, shared carry-scale scalarrepo
310100%lokimorty1L Qwen-derived decoder, d=2, 1h, hd=2, ff=2RoPE period-19, parametric tied embedding, gate tying via algebraic identity, merged carry scalargist
412100%lokimorty1L Qwen-derived decoder, d=2, 1h, hd=2, ff=2RoPE period-19, parametric tied embedding, sparse attention/MLP, constructive carry hingegist
520100%yieldthought1L decoder, d=2, 1h, hd=2Quadratic tied embedding + tied output head, RoPE-19 digit routing, sparse tied V/O, two-hinge ReLU MLP, parameterless pre-normgist
627100%Wonderfall (@w0nderfall)1L decoder, d=2, 1h, hd=2Tied Q/K + V/O, cross-tied W_vo as MLP w2, factorized quadratic embedding, compressed MLP w1, RoPE period-19gist
728100%jacobli991L decoder, d=2, 5h (MQA), hd=2, ff=4Tied parabolic decode, RoPE digit routing, sparse O-proj, tied MLP, matrix broadcastgist
831100%Arch2221L decoder, d=3, 4h/1kv, hd=2, ff=4RoPE offset-targeted queries, sparse O-proj, SwiGLU carry detection, tied embed decoderepo
933100%fblissjrClaude Code + Gemini1L decoder, d=3, 3h (d_head=1), ff=4ALiBi prefix sum for carry, e^80 softmax anchoring, residual cancellation head, 2-hinge ReLU step, parabolic LM head, float64repo
1036100%alexlitz2L decoder, d=5, 5h+1hALiBi slope=log(10) for base-10 weighting, sparse embed, gated ReLU FFN, float64gist
1150100%lichengliu031L custom GPT, d=4, 2h, hd=2Factorized embed, rotation Q (2 angles), tied embed+V dir, rank-1 MLP, parabolic head, sinusoidal PE (period 11)repo
1266100%cosminscn1L nanoGPT, d=4, 2hRotation Q (2 angles), sparse c_proj (2 nonzero), parabolic lm_head, factorized embed, sinusoidal PE (period 11)gist
1387100%bingbangboom-lab2L Qwen3, d=5, 2h/1kv, hd=2, ff=3Cross-layer sharing, rank-1 projections, sparse gate, low-rank head, frozen scaling paramsgist
1493100%jacobli991L decoder, d=2, 5h (MQA), hd=2, ff=4Tied parabolic decode, RoPE digit routing, ReLU carry detectiongist
15111100%corbensorensonCodex1L decoder, d=3, 4h/1kv, hd=2, ff=2Tied embed, RoPE, SwiGLU, GQArepo
16116100%nino1L Qwen3, d=3, 4h/1kv, hd=2Tied embed, shared RMSNorm vectors, RoPE (hd=2)gist
17121100%Wonderfall (@w0nderfall)Codex1L Qwen3, d=3, 4h/1kv, hd=2, ff=2Tied embed, RoPE digit routing, carry via final norm, SiLU wrap detectiongist
18130100%cosminscn1L nanoGPT, d=4, 2hRank-1 linear, factorized embed, sinusoidal PE (period 11), ReLU carry detection, parabolic logit decodinggist
19130100%Wonderfall (@w0nderfall)Codex1L Qwen3, d=3, 4h/1kv, hd=2, ff=3Tied embed, RoPE digit routing, SiLU carry logicgist
20139100%Wonderfall (@w0nderfall)GPT-5.2 Pro + Codex1L Qwen3, d=3, 4h/1kv, hd=2Tied embed, RoPE digit routing, SiLU carry logicgist
21148100%bingbangboom-lab2L Qwen3, d=5, 2h/1kv, hd=2, ff=3Rank-1 linear, factorized embed, sparse gate, param-free norm, low-rank head, cross-layer sharinggist
22177100%xangma (@xangma)GPT + Codex2L Qwen3, d=5, 2h/1kv, hd=2Rank-1 linear, factorized embed, sparse gate, param-free norm, low-rank headgist
23197~100%**xangma (@xangma)GPT + Codex2L Qwen3, d=5, 2h/1kv, hd=2Rank-1 linear, factorized embed, sparse gate, param-free normgist

* Parameter count debated: the 6 counted parameters sit within an architecture that has 4 additional hardcoded weight values (Q projection and RMSNorm weights) that were counted as parameters in the parent 10p submission. Under strict counting this model has 10 unique weight values; under the submitter's accounting, 6. See #75 for discussion. We may be approaching the practical minimum for this architecture family.

** Passed 8,192 random tests; not independently verified on our 10K test suite yet.

Trained Weights (Learned from Data)

RankParamsAccuracyAuthorBuilt withArchitectureKey TricksLink
136100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=rotation(Q), V=Q, tied O=Q^T, all RMSNorms shared, tied QK norms, down=rotation(up^T)repo
23999.91%lokimorty1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding, tied K=V, tied Q/O readout, shared RMSNorms, shared anti-quarter QK norm, repeat-mix shared blockgist
341100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=rotation(Q), V=Q, tied O=Q^T, all RMSNorms shared, tied QK normsrepo
444100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=Q, V=Q, tied O=Q^T, all RMSNorms shared, pure grokking (no targeted FT)repo
545100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=rotation(Q), V=Q, tied O=Q^T, all RMSNorms sharedrepo
652100%Enara Vijil1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding, tied K=V, tied O=Q^T, all RMSNorms shared, shared QK norms, Grokfast-EMArepo
755100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=αQ, gate=α·up, tied O=Q^T, shared block RMSNormsrepo
857100%evindorClaude Code + Codex1L decoder, d=5(2+3), 1h, qk=4, hd=5, ff=2Parametric circular embed, tied V/O, tied Q/K+phase, tied fc2=head_proj, rank-1 out, shared normrepo
958100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), K=αQ, gate=α·up, tied O=Q^Trepo
1062100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUCircular arc embedding (3 params), tied K=V, tied O=Q^T, tied lm_head, Adam no weight decayrepo
1167100%evindorClaude Code + Codex1L decoder, d=5(2+3), 1h, qk=4, hd=5, ff=2Parametric circular embed (3p), tied V/O, tied Q/K+phase, rank-1 out, shared norm, carry-mix curriculumrepo
1283100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied K=V, tied O=Q^T, shared all RMSNorms, iterated targeted fine-tuningrepo
1386100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied K=V, tied O=Q^T, shared block RMSNorms, L-BFGS + targeted fine-tuningrepo
1489100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied K=V, tied O=Q^T, RoPE (zero params), QK norms, 4-stage grokking-aware trainingrepo
159599.03%tbukicSuperchargeAI + Claude Code1L Qwen3 + circular arc embed, d=3, 1h/1kv, hd=4, ff=3, RoPE θ=3, SwiGLUCircular arc embedding (3 params), tied lm_head to dynamic embed, RoPE, QK normsrepo
16101100%tbukicSuperchargeAI + Claude Code1L Qwen3, d=3, 1h/1kv, hd=4, ff=2, RoPE θ=3, SwiGLUTied embed, tied O=Q^T, RoPE (zero params), QK norms, cosine LR + targeted fine-tuningrepo
1712299.95%staghado1L Qwen3, d=3, 1h/1kv, hd=4, ff=3Tied embed, RoPE θ=3repo
18140100%dimopepClaude Code1L decoder, d=4, 1h/1kv, hd=4, ff=4, RoPE θ=3, SwiGLUTied K=V, tied O=Q^T, tied lm_head, QK-normgist
1923499.91%JackCai1206Claude Code1L decoder, d=6 (3 tok + 3 pos), 2h, hd=3, ff=2Parametric spiral PE (4 params), split-head attn (QK-pos/V-tok), shared XYZ pos, tied output head, LSB-firstrepo
2026299.95%lichengliu031L decoder, d=4, 1h, ff=8Rank-3 factorization, shared-A tied-KV, RMSNorm, tied embed, curriculum learningrepo
2127599.98%ryanyordGemini1L decoder, d=4, 1h, ff=8, ranks=(3,3,2,2)SVD truncation of 311p, tied embed, low-rank factorization, shareA_tieKV, RMSNormrepo
2230599.98%h3nock1L decoder, d=4, 1h, ff=9Low-rank factorization, shared-A tied-KV, RMSNorm, tied embed, learned PE, curriculum learningrepo
2331199.999%rezabyt (@reza_byt)1L decoder, d=4, 1h, ff=8Rank-3 factorization, shared-A tied-KV, RMSNorm, grokkingrepo
24456100%yinglunz1L decoder, d=7, 1h, ff=14Rank-3 factorization, shared-A tied-KV, rank-2 attn out, tied embedrepo
2549199.97%rezabyt (@reza_byt)1L decoder, d=7Rank-3 factorization, RMSNorm, curriculum learningrepo
2651299.988%yinglunz (@yinglun122)1L decoder, d=7, 1h, ff=14Rank-3 factorizationrepo
2777799.69%Yeb Havinga (@YebHavinga)Claude Code1L decoder, d=7, 1h, ff=14Tied embeddings, no FFN bias, curriculum learningrepo
281,64499.04%anadim (@dimitrispapail)Codex1L decoder, pair tokensPair token encoding (digit pairs as single tokens)repo
296,080100%anadim (@dimitrispapail)Claude Code2L decoder, d=16, ff=48Systematic scaling, found phase transition at d=16repo

Rules

The Core Constraint: Autoregressive Transformer

The model must operate as a genuine autoregressive transformer. This means:

  1. Self-attention is required. The model must contain at least one self-attention layer. This is the defining feature of a transformer — without it, you have an MLP or RNN, not a transformer.

  2. The model must be autoregressive. It receives a token sequence as input and predicts the next token. Output digits are generated one at a time, with each new token fed back as input for predicting the next. The carry propagation must emerge from this autoregressive process — not from explicit state variables passed between steps in Python.

  3. Standard forward pass. The model's forward() method must be a standard tensor-in, logits-out computation. No problem-specific control flow (for-loops over digits, explicit carry variables, string manipulation) inside forward(). The autoregressive generation loop lives outside the model, exactly as it would for any language model.

  4. The model does the work, not the code. The inference code should be generic autoregressive decoding that would work with any transformer checkpoint. If your generation loop contains addition-specific logic — manually pairing digits, threading carry state, indexing into specific positions — then the Python code is solving the problem, not the model.

In short: if you can swap in a different set of weights and use the exact same inference code for a different task, your setup is legitimate. If the inference code is inseparable from the algorithm, it's not.

What's Allowed

  • Architectural variations: rank-1/low-rank projections, factorized embeddings, custom positional encodings, alternative norms
  • Hand-coded weights (constructive proofs are valid — they show the architecture can represent addition)
  • Trained weights via any generic learning algorithm (shows the solution is learnable — encourages creative ideas on data format, tokenization, and curriculum)
  • Input formatting choices (reversed digits, delimiters, etc.) as long as the format is fixed and doesn't encode the answer

Qualification

  • Must achieve >= 99% accuracy on 10,000 random test pairs (held-out, fixed seed)
  • Inputs: two integers in [0, 9,999,999,999]
  • Output: their sum as an integer
  • Verified using verify.py with --seed 2025

Parameter Counting

  • Count unique parameters (after weight tying/deduplication)
  • Fixed/sinusoidal positional encodings are not counted (following the original Transformer paper convention)
  • Learned positional encodings are counted

How to Submit

Option A: Open an Issue (easiest)

  1. Click New Issue and fill in the template
  2. Include a link to your code (GitHub repo, gist, etc.)
  3. Include test results (accuracy on random pairs)
  4. We'll verify and add you to the leaderboard

Option B: Open a Pull Request

  1. Fork this repo
  2. Update the leaderboard in README.md with your entry
  3. Include verification results
  4. We'll review and merge

Updates to the leaderboard are welcome via pull request.

Verification

python verify.py submissions/your_submission.py

This runs:

  • 10 edge cases (boundary values, max carry chains)
  • 10,000 random pairs (seed=2025)
  • Reports accuracy, pass/fail, and timing

Context

This challenge explores a fundamental question: what is the minimal transformer that can represent integer addition?

Addition requires three capabilities:

  1. Digit alignment — pairing corresponding digits from two numbers
  2. Per-digit arithmetic — computing sum and carry for each pair
  3. Carry propagation — threading carry information across positions

Transformers solve these using attention (for alignment), MLPs (for arithmetic), and autoregressive generation (for carry propagation). The question is how small the architecture can be while still implementing all three.

Key Findings from the Community

  • Parameter cliff at ~800: Sharp accuracy transition observed by multiple researchers
  • Single layers beat two layers at equivalent parameter budgets (for trained models)
  • d=7 was the sweet spot for early trained models — multiple independent teams converged on this
  • d=4 now works with rank-3 factorization + grokking (311 params trained)
  • d=3 is the new frontier for trained models — circular arc embeddings + aggressive weight tying push to 36 params
  • Hand-coded models can go much smaller (6* vs 36 trained) since they don't need to be discoverable by SGD
  • Rank-3 factorization is the key trick for trained models at d>=4
  • Circular arc embedding + weight tying is the key trick for trained models at d=3
  • ALiBi enables extreme compression: the 36-param hand-coded leader uses ALiBi with slope log(10) for base-10 positional weighting, achieving 100% accuracy with a 2-layer decoder (d=5) in float64

Citation

If you use AdderBoard in your research, please cite:

@misc{papailiopoulos2026adderboard,
  author       = {Papailiopoulos, Dimitris},
  title        = {{AdderBoard}: A Community Challenge for Tiny Arithmetic Transformers},
  year         = {2026},
  publisher    = {GitHub},
  howpublished = {\url{https://github.com/anadim/AdderBoard}},
  note         = {Open challenge and leaderboard for building the smallest transformers that can perform integer addition}
}

License

MIT

Contributors

anadim

34 commits

Languages

Python

100.0%