Mila local LLMs · C++23 · CUDA
Mila

Local LLMs at the metal

Gemma 4, Llama 3.x and GPT-2 — built from explicit C++23 components and hand-written CUDA kernels you can read and understand, on the consumer hardware you already own.

Explicit

No execution engine. Your application owns main() and the loop; Mila makes the model an ordinary C++ object inside them.

Validated

Gemma 4, Llama 3.x and GPT-2 each reproduce a HuggingFace reference token-for-token, at their target precisions.

Fast

Within 1.03x of llama.cpp on decode and 1.14x on prefill at long context, measured on a consumer RTX 4070.

Typed components

Every component is templated on device and precision, with concept-constrained policies — weight quantization, KV-cache compression — on the layers that use them.

// The type is the configuration - no config object, no runtime dispatch.
using QuantizedProjection =
    Linear<DeviceType::Cuda, TensorDataType::BF16, PerGroupFp4<128>>;

Sponsoring