Skip to content

Instantly share code, notes, and snippets.

View matanabudy's full-sized avatar

Matan Abudy matanabudy

View GitHub Profile
@matanabudy
matanabudy / selector_basis_adder_33p.py
Created February 25, 2026 22:48
33-parameter hand-coded adder — 100% accuracy on 10-digit addition (AdderBoard submission)
"""
33-parameter hand-coded adder (1L decoder, d=3, 4h, ff=2).
Causal self-attention with RoPE-style digit routing, fixed analytic queries,
selector-basis routing for k/v/up/o projections, SiLU carry detection via MLP,
and tied embedding decode. Only learned params: embed (10x3) + final norm (3).
"""
from __future__ import annotations