Repository navigation
Mila's first production release: validated, packaged and documented. Mila is pre-1.0, and
breaking changes are expected between releases.
Local LLMs at the metal — a C++23 and CUDA library you can read, on a GPU you already own.
Inference and training, built from explicit neural-network components. No execution engine:
when you call forward(), you know exactly what runs.
A 27B model runs on a 16 GB card — and you can open it and read every step it took.
What you can run
| Model | Precision | Fits |
|---|---|---|
| Gemma 4 12B Instruct | FP4 | 12 GB |
| Llama 3.1 8B Instruct | FP4, FP8 | 12 GB |
| Llama 3.2 3B Instruct | FP4, FP8, BF16 | 12 GB |
| Qwen 3.8 27B | FP4 | 16 GB |
| GPT-2 | FP32 | anything |
Gemma, Llama and GPT-2 are validated token-for-token against HuggingFace; Qwen 3.8 by
hidden-state parity, one decoder block at a time. GPT-2 is the training reference — the MNIST
and Bard samples train against the current API.
Getting it
- Try a model, build nothing —
docker run --rm --gpus all -v mila-store:/models toddthomson/mila-llm:0.20.0-runtime chat --model Llama-3.2-3B-Instruct-fp4 - Python —
pip install mila-llm(3.12 and 3.13, Windows and Linux; no CUDA toolkit needed, just a driver) - C++ — CMake
FetchContentwithGIT_TAG v0.20.0, pinned rather than tracking a branch; see Mila/Samples/QuickStart/Cpp - A built tree to edit —
toddthomson/mila-llm:0.20.0-devel - From source — clone at this tag and read getting-started.md
Every one of those is indexed at mila.toddt.me.
latest on Docker Hub starts existing with this release and tracks 0.20.0-runtime.
Breaking changes since beta.3
Pre-1.0, so "production" means validated and polished, not API-frozen.
Loading a model. fromPretrained / savePretrained are now load / save on every model,
and from_pretrained is load in Python. PretrainedModelReader, PretrainedMetadata and
getPretrainedMetadata are WeightsReader, WeightsMetadata and getWeightsMetadata; the
module Serialization.PretrainedReader is Serialization.WeightsReader.
GptTransformer's static fromPretrained factory is removed.
Memory reporting. Model::getScratchHighWaterBytes() and
IExecutionContext::getScratchHighWaterBytes() are removed;
MemoryStats::totalDeviceBytes() now includes scratch. IExecutionContext gains
releaseLoadStaging() and reserveScratch(). PrefillChunking::fits_activation_budget is
fits_available_memory and isBudgetConstrained() is isMemoryConstrained(). Device gains
getAllocationGranularity().
The model store. ModelStore::prune() is clean() and PruneOptions is CleanOptions;
clean() no longer deletes blobs, and RemovalReport gains unreadable_records.
Removed. GemmaModel::profilePrefill and LlamaModel::profilePrefill — drive a prompt
through generate() with max_new_tokens = 1 instead. QwenGqaWorkspace and
makeQwenGqaWorkspace — use GqaWorkspace and makeGqaWorkspace.
Hardware. The library's default CUDA architecture list is 80;86;89;90;120, matching the
published binaries. Turing is gone from it: the runtime already refused those cards, since the
FP4 GEMM and both GQA flash prefill paths require SM 8.0 or newer. A FetchContent consumer
targeting Turing now gets no cubin rather than a build that cannot run.
Chat. mila-chat runs instruct models only and no longer loads GPT-2, which remains a
first-class Mila model for training and reference.
Tooling. The mila CLI builds to <build>/bin/mila rather than the build root.
publish_model.py requires --repo and a package directory.
Also in this release
Memory planning got most of the work: the prefill chunk is now chosen against the memory
actually free on your device rather than a fixed per-family budget, RoPE tables are sized to the
context you built rather than the model's trained maximum, and a CUDA allocation that cannot be
satisfied fails cleanly instead of aborting the process. Removing a model from the store deletes
that model's files and nothing else. A mistyped model name says so, and says what to type.
CUTLASS is gone from the build, and third-party licence texts now travel inside the wheels and
the images.
Earlier in the v0.20 line
This release closes a line that ran through
beta.1,
beta.2 and
beta.3 — each has its own
notes, and together they cover model distribution, observability, and the Qwen 3.8 work.
ROADMAP.md has what comes next.
Full Changelog: v0.20.0-beta.3...v0.20.0