llmsforall/millie-runtime
HF Paper ↗A llama.cpp runtime that streams experts and attention to fit Millie models in less memory
Automated SPDX check for reference only — not legal advice. Disclaimer
GitHub Star History
Full-history star trajectory from GitHub official history. Switch ranges or hover any point for exact counts.
Evidence-Backed Technical Brief
AI Deep ReviewArchitecture & Core Mechanics
Millie Runtime is a C++ inference engine built on llama.cpp. Its source layout includes src/, ggml/, and include/, alongside a CMake build and a separate gguf-py/ package. It retains the llama_* APIs and executable names such as llama-cli and llama-server. Millie 2 adds a dedicated launcher, bin/millie-chat, which starts a loopback chat server from a complete model directory containing the weights and matching multi-token prediction (MTP) head.
The key change is what must stay resident during inference: expert streaming addresses model weights, while attention streaming addresses the attention cache. The Linux launcher uses Vulkan, the MTP head, disk-backed experts, and host-side K/V; macOS uses Metal and streamed attention at the model's native context length. The Python ≥3.9 manifest, with Transformers 5.5.1 and a local gguf dependency, is for the script toolchain, including model conversion. It is not a blanket requirement for running every prebuilt C++ binary.
Key Capabilities & Differentiators
Millie 2 supports Q3 and Ternary weights using Millie's custom quantization formats. The local server listens on 127.0.0.1:28297 and accepts requests at /v1/chat/completions. It requires stream: true, emits text fragments in choices[0].delta.content, and terminates with data: [DONE]. This gives streaming chat clients a concrete integration path but does not establish non-streaming support or full OpenAI API parity.
For Millie 1.1, llama-cli loads the Ternary GGUF and accepts a separate vision GGUF via --mmproj, with --image supplying the image input. Its low-memory mode caps the number of resident experts per layer and requires Apple Metal; that restriction is specific to the Millie 1.1 mode, not to all Millie 2 paths. The original Millie 35B-A3B distributions come in 7 GB, 9 GB, and 11 GB sizes. Those are model distribution sizes, not RAM or VRAM requirements.
Trade-offs & Limitations
Millie Runtime is a focused choice over upstream llama.cpp when the workload calls for Millie's custom quantizations and lower memory residency. Retaining familiar llama_* entrypoints helps with migration, but the Millie 2 server still has a distinct model layout and a streaming-only chat contract. Do not assume that another llama.cpp build can load the custom formats, or that an existing OpenAI client can use this server without testing its request and response handling.
Compared with the hosted OpenAI API, local serving keeps inference on your hardware and shifts model staging, sizing, and service operation to your team. Disk-backed experts and host-side K/V make storage behavior and host memory part of the sizing exercise, not just VRAM. Test your target context and concurrency on the actual backend: fitting a model does not establish acceptable generation speed. The runtime is MIT-licensed; review the separately distributed model terms before bundling weights.
Hardware & Deployment Guide
For Millie 2 desktop serving, extract the platform release, download the full Q3 or Ternary model directory, and run bin/millie-chat with that directory. For Q3, hf download llmsforall/Millie-2-Q3 --local-dir ./models/Millie-2-Q3 fetches the artifacts. Keep the matching MTP head in place. Generation runs against the local model and loopback server after staging. If a client must connect remotely, plan network exposure and access controls separately rather than treating the local listener as a ready-made remote deployment.
The v0.1.0 release shipped Apple Silicon macOS and Linux x86_64 builds with custom quantization support and low-memory Metal inference. v0.2.0 adds Millie 2 Q3 and Ternary and provides a signed, notarized Apple Silicon package. The Windows x64 v0.2.0 preview uses Vulkan and requires Python 3 plus a GPU driver that supports 32-lane subgroups. The iPhone instructions use a source build; the REDMAGIC Android instructions provide a separate first-run path.
stream: true, returns choices[0].delta.content fragments, and ends with data: [DONE].llama-cli flow pairs Ternary weights with a separate vision GGUF via --mmproj and takes an image via --image.Running Millie 2 Q3 or Ternary locally on memory-constrained devices when you can test the target backend, storage, and context length and integrate a streaming chat client.
You need verified full OpenAI API compatibility, non-streaming chat, broad model interchangeability, or managed capacity without operating inference hardware.
Quick Start & Installation
curl -N http://127.0.0.1:28297/v1/chat/completions \ -H 'Content-Type: application/json' \ -d '{"model":"millie-2-q3","messages":[{"role":"user","content":"Write a two-line poem about rain."}],"max_tokens":64,"stream":true}'
Comparison vs. Top LLMs & Inference Alternatives
Full comparison →| Repository | Stars | 7d Trend | Stack | License | Core Positioning |
|---|---|---|---|---|---|
| millie-runtime ★ | 61 | +49 | C++ | MIT | A llama.cpp runtime that streams experts and attention to fit Millie models in l |
| OmniRoute | 92.2k | +1.4k | TypeScript | MIT | Self-hosted OpenAI-compatible gateway for multi-provider routing and fallback |
| freellmapi | 62.1k | +2.7k | TypeScript | MIT | Self-hosted LLM gateway for routing across free tiers and custom endpoints |
| bifrost | 10.2k | +125 | Go | Apache-2.0 | Self-hosted Go gateway for routing and governing multi-provider LLM traffic |
AI Context Briefing (for Claude / Cursor / Windsurf)
Standardized architecture summary & quickstart commands ready to paste into coding agents.
curl -sL https://repoforai.com/repo/llmsforall/millie-runtime.md
Active README embeds unlock Hot-Tier 6h Telemetry Refresh automatically (zero pay-to-rank).
Frequently Asked Questions about millie-runtime
How do I connect an existing chat client to Millie 2?
bin/millie-chat with the complete Millie 2 model directory, including its matching MTP head. Send a POST to 127.0.0.1:28297/v1/chat/completions with the corresponding model ID (millie-2-q3 or millie-2-ternary) and stream: true. Read text from choices[0].delta.content until data: [DONE]. Test your client's streaming parser; the shared endpoint path alone does not establish broader API compatibility.Can I assume it will fit on a 16 GB machine?
Can we self-host it commercially or ship it with our product?
When should I choose this over upstream llama.cpp or the OpenAI API?
Upstream README & Documentation
This profile focuses on independent engineering analysis and live telemetry. Read the full upstream README, changelog, and examples directly on GitHub.
Top 10 Breakout Open-Source AI Repos, Every Thursday
Signal-only digest of fast-growing AI repos, SPDX license alerts, and architecture picks. Zero spam.
Zero spam · 1-click unsubscribe · Privacy Policy