# emilio

A research inference engine that proves a full transformer forward pass can run through a single algebraic operation, exponentiation combined with a logarithm and subtraction, in place of ordinary multiplication.

emilio is a complete large language model inference engine built to demonstrate that a single algebraic primitive, described as one exponentiation, one logarithm and one subtraction, is sufficient to express all of arithmetic, linear algebra and a full transformer forward pass. It proves this by running a small instruction-tuned Qwen2.5 model entirely through this operation, producing correct English text at a modest but functional speed on Apple Silicon CPU and GPU.

The repository includes a Rust inference engine with CPU and Metal GPU kernels, a Python proof-of-concept with instrumented operation counts, a model loader that converts GGUF weights into the project's own format, a correctness verifier comparing the Python and reference implementations, and the accompanying paper. Its authors are explicit that speed is not the goal, and that llama.cpp remains the choice for anyone who actually wants fast inference; building requires a Rust toolchain 1.75 or newer and, for GPU support, Apple Silicon.

Website: https://github.com/videlalvaro/emilio
