Back to AI Research

AI Research

A CPU Inside an LLM compiles arithmetic circuits into pretrained weights

Key Takeaways

  • A CPU Inside an LLM reports zero-gradient circuit grafting for arithmetic.
  • Results depend on specific models, numeric precision and trigger protocols.
  • A CPU Inside an LLM compiles deterministic circuits into pretrained model weights.
  • The paper reports high arithmetic accuracy under specific model and numerical settings.
  • A CPU Inside an LLM proposes compiling deterministic arithmetic and logic directly into pretrained language-model weights without gradient training.

A CPU Inside an LLM proposes compiling deterministic arithmetic and logic directly into pretrained language-model weights without gradient training. The paper describes circuit grafting rather than adding a physical processor or asking the model to call an external calculator during generation.

How does zero-gradient circuit grafting work?

The author develops analytical primitives for moving numeric information through existing model components while controlling normalization and scale effects. A compiler combines them into arithmetic circuits and a representation for emitting results through the model's tokenizer.
The system also uses a block-sparse sidecar implementation for efficiency. Zero-gradient means the construction does not learn its arithmetic circuit from training examples; it does not mean the modification has no memory cost, numerical requirements or integration constraints. The paper explicitly audits those issues.

What arithmetic results are reported?

On 1,200 six-digit arithmetic examples in BF16, the paper reports 99.17% ALU-prefix accuracy for IBM Granite 4.2 3B and 100.00% for Alibaba Qwen 3.5 4B. An FP32 sidecar reaches 100% in that reported comparison. Mid-sentence resumption ranges from 98% to 100%.
The author compares those results with a same-backbone LoRA baseline trained on 12,800 examples, reporting 42.2% and 61.7% arithmetic accuracy for the two models and no successful inline continuation in that setup. These are protocol-specific comparisons, not a finding that every fine-tuned model is worse than compiled circuits.

What remains important to verify?

The paper reports language-retention and out-of-distribution trigger audits alongside arithmetic. Preserving competence on those evaluated splits does not establish unchanged behavior on every natural-language task. Numerical precision, supported architecture and how the circuit is activated remain part of the result.
Franklin analysis: the approach is most interesting as a way to integrate exact sub-computations with generated prose. Independent replication should check the same arithmetic distribution, inline continuation and ordinary text behavior, then test new triggers and inputs. Reliable arithmetic inside a model would still need careful boundaries around when that circuit is used.

Comments