A CPU Inside an LLM: Zero-Gradient Compilation of Exact Circuits into Pretrained Weights
TL;DR - This paper introduces a zero-gradient compiler that grafts exact arithmetic and Boolean circuits directly into pretrained LLM weights without examples or runtime tools, while largely preserving language capabilities. The approach achieves near-perfect arithmetic accuracy with sparse weight modifications.
- Compiles deterministic circuits using analytical primitives for normalization control, cross-token scale cancellation, and width extension.
- Reaches 99.17% on six-digit arithmetic with Granite 4.2 3B and 100% with Qwen 3.5 4B; an FP32 sidecar raises both to 100%.
- Outperforms LoRA trained on 12,800 examples, particularly for inline continuation.
- Uses block-sparse sidecars affecting at most 0.057% of weights and reports no out-of-distribution triggers across the evaluated Tango splits.