One container, one command — Mila runs Gemma 4 12B as the brain behind any OpenAI/Anthropic harness #18
ToddThomson
started this conversation in
Show and tell
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
This week Mila added a feature I think is really cool! Mila now builds and runs the same way on three surfaces — Windows/MSVC (where I develop), Clang on WSL/Linux, and a single Docker container — and from that container you can drive Mila as the "brain" behind any OpenAI- or Anthropic-compatible harness.
One container, one command, a Gemma 4 12B model as a brain
The dev container is a completely known build environment — clone, one step, a running Mila. Beyond the interactive Chat CLI, it now stands up the Mila Inference Server (MIS): a small FastAPI wire adaptor that serves the runtime over an OpenAI / Anthropic / Mila-native HTTP API.
(There are
scripts/mis-buildandscripts/mis-runwrappers if you'd rather not type the compose line.)Then point whatever agent you already use at it:
http://localhost:6452/v1MILA_PROTOCOL=anthropic)Open
http://localhost:6452/docsin a browser and you get the full interactive API. Under the hood that request is: your prompt → themilabinding → Gemma 4 12B quantized to FP4 → running on a 12 GB consumer card (I develop on an RTX 4070). Tool calling is wired on both the OpenAI and Anthropic paths, so a CLI agent can actually use tools through it — Codex CLI and Claude Code CLI both drive it end-to-end.The whole point: Mila is the brain; the harness is whatever you already have.
Why this mattered to me
Mila has always been Windows-first — I build in Visual Studio. Making it build and run, provably, under Clang on Linux and inside a reproducible container is the difference between "works on my machine" and something anyone can clone and run.
C++23 named modules + CUDA + a Python binding is not a well-trodden cross-compiler path, and Clang surfaced a pile of genuine conformance issues that MSVC had been quietly papering over — position-independent code for the binding, module-import strictness, two-phase lookup for dependent templates. Fixing them made the tree more honest, not just more portable. I landed on a three-surface model I'm happy with:
What Mila is (and isn't)
It isn't trying to be the fastest or the most complete inference server. It's a place to understand — by building it, by hand — how a modern LLM actually runs: quantization, attention, the KV cache, the compile-time dispatch, the kernels. If that's your kind of thing, the code is meant to be read.
Still alpha, still just me — but it's getting to be genuinely good, and this step felt worth sharing.
Beta Was this translation helpful? Give feedback.
All reactions