A Hand-Compiled Phi-3 Transformer Does 12x12-Digit Multiplication at 100% While Five of Six Frontier Models Score 0/500 at Seven Digits
A developer implemented the grade-school multiplication algorithm as a computation graph and compiled it directly into an ordinary Phi-3 Hugging Face checkpoint using Torchwright, a compiler they wrote — no training anywhere in the pipeline, and the output loads with plain AutoModelForCausalLM, no trust_remote_code. The three-digit calculator gets all 3,000,000 supported expressions right and published checkpoints handle up to 12-digit x 12-digit multiplication; compilation takes under ten seconds on a laptop CPU into a 16-layer decoder at d_model 512. For contrast the author tested six frontier models with reasoning disabled: accuracy collapses as digits grow, and at seven digits five of the six scored 0/500.
↳ Follow the thread