mμ|LLM
Cost-Optimal LLM Routing — 96.4% cheaper than cloud-only
GitHub · Quick Start · Benchmarks · Providers
💡 The Case in One Line
$27.87 actual spend vs $772 cloud-only baseline — across 15,363 production queries over 22 days.
87.5% of queries resolved at $0.00. 100% HumanEval pass@1 at $0.00. RouterBench AIQ 0.6673 — highest published.
🏛️ Four-Tier Architecture
mμ|LLM routes every query through four escalating tiers, short-circuiting the moment an answer is found. Cost accumulates only if cheaper tiers can't satisfy the query.
The classifier — DeBERTa-v3-small (44 MB) — reads the query once and predicts tier + intent category before any LLM is invoked. Tier 0 overhead: <1 ms.
Software Factory: from specification to evidence
Build small, dependent tasks with local inference, protected executable tests, bounded repair loops, and a human handoff when the worker needs help. Inspect the work on a flat operations board, or switch on the animated 3D factory.
How it works · Watch the tour · Spec → working game: evidence · Try Peg Bloom
Build several projects together and see which need a human: three marketing workspaces, their contracts, repairs, and review evidence. Executable checks establish technical behavior; a separate product gate asks whether the result is useful and usable.
The Peg Bloom case study includes model-generated source, independent checks for three puzzle boards and 63 legal jumps, browser validation, failed attempts, diagnostic guidance, and an artifact hash. An accepted artifact means its configured checks passed; the evidence makes that claim inspectable.
🚀 Quick Start
Start muLLM on port 6856, configure your providers, and open the web UI. Use a virtual environment with Python 3.11 or newer.
Path 1 — Install the package
python -m venv .venv
# Linux / macOS:
source .venv/bin/activate
# Windows PowerShell instead: .venv\Scripts\Activate.ps1
python -m pip install --upgrade mullm
mullm-server
Open the setup URL printed by the server. It uses HTTPS when a local certificate
is available. The first interactive start opens setup automatically; installation
itself starts no process. Set MULLM_OPEN_BROWSER=0 for headless operation.
Windows with local inference: connect your existing Ollama, TabbyAPI, vLLM,
or llama.cpp runner in /setup. Mac with API keys only: add your provider
keys and leave local inference disabled; MLX and model downloads are optional.
Use /chat for queries and /factory to follow projects, tasks, and human
requests. The optional /classifier page previews local Kev.js inference.
Factory guide · Upgrade and configuration guide.
The core install needs no separate constraints download. SQLite is the default cache. ChromaDB is an opt-in extra with unresolved advisories; see Security.
Optional installs, modes, and key storage
The base package includes the router, web UI, CLI, SQLite semantic cache, and cloud-provider clients. Add only the capabilities you need:
| Install | Adds |
|---|---|
pip install "mullm[studio]" |
Studio media helpers, local TTS, audio, and video support |
pip install "mullm[classifier]" |
Transformers + PyTorch for the trained DeBERTa classifier |
pip install "mullm[gpu]" |
NVIDIA GPU/VRAM monitoring |
pip install "mullm[auth]" |
OAuth/OIDC support for a remotely exposed UI |
pip install "mullm[sentence-transformers]" |
Local embedding models |
pip install "mullm[vector-cache]" |
Optional ChromaDB cache; SQLite remains the safer dependency-free default |
pip install "mullm[dev]" |
Developer tests, coverage, linting, and browser-test tools |
pip install "mullm[google]" |
Current google-genai SDK |
pip install "mullm[notifications]" |
Apprise adapters for factory notifications |
The setup page separates installs from feature toggles. Single User keeps private workstation defaults; Team / Proxy configures a stricter shared-gateway posture. Studio, 3D, Game Studio, ComfyUI, benchmarks, experimental backends, and research/developer features can be enabled independently. Some changes require a restart.
Provider keys can be saved to the OS keychain (recommended), Unix pass, or a local .env file with owner-only permissions. Best available selects the OS keychain when usable and otherwise falls back to .env. For containers and Kubernetes, inject keys through environment variables or mounted secrets rather than baking them into the image.
Path 2 — Rootless Podman
git clone https://github.com/mybrainrunslinux/mullm.git && cd mullm
podman build -t localhost/mullm:local .
podman volume create mullm-data
podman run --name mullm --replace -d \
-p 127.0.0.1:6856:6856 \
-v mullm-data:/data:Z \
-e MULLM_REMOTE_ACCESS=true \
localhost/mullm:local
This is a single muLLM container; run Ollama or another compatible inference backend separately. See Deployment for secrets, persistent state, and remote access.
Path 3 — Source / development
git clone https://github.com/mybrainrunslinux/mullm && cd mullm
python -m pip install -e ".[dev]"
cp config/mullm.toml.example mullm.toml # configure providers as needed
mullm-server
For local generation, configure a supported inference runner in /setup.
Ollama is one option (ollama pull qwen3-coder:30b); TabbyAPI, vLLM,
llama.cpp, and MLX are also supported. Deterministic lookups need no model.
🚢 Production Deployment
# 1. Configure authentication and headless startup
export MULLM_DEV_MODE=false
export MULLM_API_KEY="your-long-random-server-token"
export MULLM_OPEN_BROWSER=0
# Add cloud provider keys through your normal secret store
# 2. Start muLLM
mullm-server
# 3. Verify
mullm --status
For concrete systemd, Podman, Kubernetes, and multi-replica guidance, see Deployment.
🖥️ CLI Reference
mullm "your question" # auto-route
mullm-server # start server on :6856
mullm --status # health check
mullm --cost # session cost summary
mullm --stream "tell me a story" # SSE streaming
mullm --model claude-haiku-5-5 "summarize X" # force a specific model
mullm --tier cloud_full "complex question" # force a specific tier
🌐 Supported Providers
The tier router directly supports Anthropic, OpenAI, Google, DeepSeek, GLM, and Cerebras. Additional providers have backend/gateway integrations; these are not all interchangeable with the tier router. Keys are optional. Model documentation reviewed 2026-11-05; account availability varies.
| Provider | Models Available | Pricing Tier |
|---|---|---|
| Anthropic | Haiku / Sonnet / Opus 5.5 · Fable 5.1 | Low → High |
| OpenAI | GPT-6 Luna / Astra · GPT-6.1 Sol / Terra | Low → High |
| Gemini 3.5 Flash-Lite · 3.8 Flash · 4 Argon | Low → High | |
| DeepSeek | V4.1 Flash (deepseek-flash) · V4 Pro |
Low |
| Cerebras | GPT OSS 120B · Qwen 3.8 27B | Low |
| Mistral | Mistral Small · Large | Low → Medium |
| Cohere | Command A+ | Account dependent |
| Perplexity | Agent API / Sonar | Token and tool charges |
| OpenRouter | All models via unified API | Varies |
| Venice | Privacy-preserving inference | Low |
| GLM (Z.AI) | GLM 5.3 · Flash · FlashX | Low |
| xAI | Grok 4.7 | Medium |
| IBM / Venice | Operator-configured model IDs | Account dependent |
| Ollama | Any local model | $0 |
| ExLlamaV2 | Quantized GPTQ/EXL2 | $0 |
| llama.cpp | GGUF models | $0 |
| MLX | Apple Silicon optimized | $0 |
The router escalates through providers in cost order. Budget hard-stop at a configurable threshold prevents runaway spend.
💻 Hardware Compatibility
mμ|LLM scales from a laptop to a workstation. The local tier performance scales with your hardware; Tiers 0, 1, and 3 are hardware-independent.
| GPU / RAM | Recommended Model | Backend | Expected tok/s |
|---|---|---|---|
| RTX 5090 / 32 GB VRAM | qwen3-coder:30b (Q4) | Ollama / ExLlamaV2 | ~60–80 |
| RTX 4090 / 24 GB VRAM | qwen3-coder:30b (Q4) | Ollama / ExLlamaV2 | ~40–55 |
| RTX 4080 / 16 GB VRAM | qwen2.5-coder:14b (Q8) | Ollama | ~45–60 |
| RTX 3080 / 10 GB VRAM | qwen2.5-coder:7b (Q8) | Ollama | ~35–50 |
| Apple M3 Max / 128 GB | qwen3-coder:30b (Q4) | MLX | ~30–45 |
| Apple M2 Pro / 32 GB | qwen2.5-coder:14b (Q6) | MLX | ~25–35 |
| CPU only / 32 GB RAM | qwen2.5-coder:7b (Q4) | llama.cpp | ~5–12 |
| CPU only / 16 GB RAM | qwen2.5-coder:3b (Q8) | llama.cpp | ~8–18 |
Models are pulled automatically on first use when Ollama is the backend. For ExLlamaV2, MLX, and llama.cpp, point
MULLM_OLLAMA_BASE_URLat their compatible API endpoint.
🧩 Module System
Each module is independently toggleable. Disable what you don't need to reduce dependencies and startup time.
| Module | Toggle | Description |
|---|---|---|
| Groundtruth LUT | always on | AST arithmetic, date/time, HTTP codes, Big-O, Git one-liners |
| Semantic Cache | MULLM_SEMANTIC_CACHE_BACKEND=sqlite |
Dependency-free SQLite cosine cache by default; set chroma and install mullm[vector-cache] only if you explicitly want ChromaDB |
| DeBERTa Classifier | MULLM_CLASSIFIER_MODEL_PATH=<dir> |
44 MB fine-tuned intent classifier; falls back to rule-based if unset |
| Local Ollama | MULLM_OLLAMA_BASE_URL=<url> |
Any Ollama-compatible endpoint |
| Cloud Fallback | set any MULLM_*_API_KEY |
Only providers with keys are used |
| Budget Guard | MULLM_BUDGET_HARD=<$> |
Hard-stops cloud calls above threshold |
| Privacy Mode | MULLM_LOG_QUERY_CONTENT=false |
Strips query content from scoring log |
| Split Routing | POST /query/split |
Decomposes multi-part prompts, parallel execution |
| SSE Streaming | GET /query/stream |
Server-Sent Events from local Ollama |
| OpenAI Compat | POST /v1/chat/completions |
Drop-in replacement for OpenAI clients |
| Dashboard | GET /api/dashboard |
Real-time cost, tier distribution, query stats |
| System Stats | GET /api/system |
CPU, RAM, GPU, VRAM, loaded model info |
⚙️ Configuration
All environment variables are prefixed MULLM_. Copy .env.example to .env and set only what you need.
Full environment variable reference
| Variable | Default | Description |
|---|---|---|
MULLM_PORT |
6856 |
Server port (MULM on keypad) |
MULLM_DEV_MODE |
true |
Disable auth, enable /docs |
MULLM_API_KEY |
(unset) | Bearer token for production |
MULLM_OLLAMA_BASE_URL |
http://localhost:11434 |
Ollama endpoint |
MULLM_OLLAMA_MODEL |
qwen3-coder:30b |
Local generation model |
MULLM_OLLAMA_EMBED_MODEL |
nomic-embed-text |
Embedding model for semantic cache |
MULLM_ANTHROPIC_API_KEY |
(unset) | Anthropic API key |
MULLM_OPENAI_API_KEY |
(unset) | OpenAI API key |
MULLM_GOOGLE_API_KEY |
(unset) | Google Gemini API key |
MULLM_PREFERRED_CLOUD_PROVIDER |
anthropic |
anthropic / openai / google |
MULLM_BUDGET_WARN |
7.00 |
Log warning above this cost ($) |
MULLM_BUDGET_MODERATE |
10.00 |
Prefer local tier above this ($) |
MULLM_BUDGET_HARD |
50.00 |
Block all cloud calls above this ($) |
MULLM_SEMANTIC_CACHE_BACKEND |
sqlite |
Semantic cache backend: sqlite, chroma, or off |
MULLM_CACHE_COSINE_THRESHOLD |
0.98 |
Semantic cache similarity floor |
MULLM_LOG_QUERY_CONTENT |
true |
Set false for privacy mode |
MULLM_DATA_RETENTION_DAYS |
90 |
Auto-purge scoring log entries |
MULLM_CLASSIFIER_MODEL_PATH |
(unset) | DeBERTa model dir; empty = rule-based |
🔌 API Reference
Base URL: http://localhost:6856
Core endpoints
# Route a query through all tiers
POST /query
{"content": "what is 2+2"}
# Split multi-part query, parallel execution
POST /query/split
{"content": "summarize X and then write tests for Y"}
# SSE streaming from local Ollama
GET /query/stream?content=tell+me+a+story
# Health check (Ollama + semantic cache availability)
GET /health
# Dashboard stats (cost, tier distribution, query counts)
GET /api/dashboard
# Live system stats (CPU, RAM, GPU, VRAM, loaded model)
GET /api/system
OpenAI-compatible endpoints
POST /v1/chat/completions # drop-in replacement
GET /v1/models # model list
Example query response
curl -X POST http://localhost:6856/query \
-H "Content-Type: application/json" \
-d '{"content": "what is 2+2"}'
{
"response": "4",
"tier": "groundtruth",
"cost": 0.0,
"latency_ms": 0.3,
"model_used": "groundtruth-lut",
"cached": false
}
🎯 Intent Categories
The classifier assigns every query to one of eight categories, each with a default routing strategy.
| Category | Description | Default Tier |
|---|---|---|
code |
Programming, debugging, refactoring | Local (complexity-gated) |
deploy |
Docker, CI/CD, infrastructure | Local |
research |
Explanations, papers, analysis | Local / Cloud |
lookup |
Facts, definitions, unit conversions | Cache / Groundtruth |
note |
Summarise, remember, to-do | Local |
creative |
Writing, stories, brainstorming | Local |
conversation |
General chat | Local |
vision |
Image and photo analysis | Local (vision model) |
🔬 Research
mμ|LLM is informed by ongoing research. The manuscript and evaluation methodology are still under critical review; no preprint is currently published.
Key claims (verified on production data)
- 96.4% cost reduction — $27.87 vs $772 baseline, N = 15,363 queries, 22 days
- 87.5% free-tier resolution — Tiers 0–2 combined, zero cloud spend
- 100% HumanEval pass@1 at $0.00 — local tier only, no cloud escalation
- RouterBench AIQ 0.6673 — highest published score on this benchmark at time of submission
- DeBERTa-v3-small (44 MB) classifier achieves production-grade intent classification
- Four-tier waterfall architecture generalizes to any local + cloud backend combination
Citation details will be added when the manuscript is ready for publication.
📊 Benchmark Results
All results from a 22-day production run on real developer queries (N = 15,363). No cherry-picking, no synthetic benchmarks for the cost numbers.
| Benchmark | Result | Notes |
|---|---|---|
| Actual spend | $27.87 | 22-day production run |
| Cloud-only baseline | $772.00 | Same queries, cloud-only |
| Cost reduction | 96.4% | $744.13 saved |
| Free-tier resolution | 87.5% | Tier 0 + Tier 1 + Tier 2 |
| HumanEval pass@1 | 100% | At $0.00 (local tier only) |
| MMLU accuracy | ≥ cloud parity | Via quality-gated escalation |
| RouterBench AIQ | 0.6673 | Highest published score |
| Production queries | 15,363 | 22 days, real developer workload |
| Tier 0 latency | < 1 ms | Groundtruth LUT, no model |
| Local tier latency | ~ 5 s | 30B model, consumer GPU |
| Classifier size | 44 MB | DeBERTa-v3-small, fine-tuned |
| Cloud providers | 16 | See provider grid below |
📈 Tier distribution breakdown
| Tier | Name | Queries Handled | Cost Per Query |
|---|---|---|---|
| Tier 0 | Groundtruth LUT | ~15% | $0.0000 |
| Tier 1 | Semantic Cache | ~35% | $0.0000 |
| Tier 2 | Local 30B Model | ~37.5% | $0.0000 |
| Tier 3 | Cloud API | ~12.5% | varies |
87.5% of all queries cost nothing. Cloud is invoked only when the local tier fails a quality gate.
🤝 Contributing
Contributions are welcome. Please open an issue before starting large changes.
git clone https://github.com/mybrainrunslinux/mullm.git
cd mullm
pip install -e .[all]
npx playwright test # 59 free tests (no API calls)
npx playwright test --grep @spend # paid cloud tests (explicit opt-in)
Guidelines:
- Tests must never spend money by default — cloud tests go behind
--grep @spend - Use Podman over Docker for container-based tests
- Cost accuracy matters — real API keys, real money
- Local-first — default to the cheapest capable tier
📄 License & Credits
License: Apache 2.0
Built by 0101 Technology
mμ|LLM is a research project and production system developed at 0101 Technology. The tardigrade mascot was chosen for its resilience — surviving extremes, running anywhere, needing nothing external.
GitHub · 0101technology.com · Apache 2.0
Cost-optimal LLM routing. Local-first. Microscopic spend.
muLLM is developed and stewarded by 0101 Technology LLC (Oregon, USA). See NOTICE.
Runtime privacy, deadlines, and model verification · Software Factory mode. Current models and custom classifiers · Upgrade guide.
Software Factory: mullm --factory factory.toml — configuration and acceptance gates.
Metadata
Release files for mullm 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| mullm-1.0.0.tar.gz | 3.1 MB | With provenance | Details for mullm-1.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| mullm-1.0.0-py3-none-any.whl | Python 3 | none | any | Details for mullm-1.0.0-py3-none-any.whl |
Total release size: 6.1 MB
Release files / mullm-1.0.0.tar.gz
| Download URL | mullm-1.0.0.tar.gz |
|---|---|
| Size | 3.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
e1c3dc1c0567707463c376b5cee94d96091760bc0248dec60b6a917dd0c259fb
|
|
BLAKE2b-256 checksum How to use checksums |
8ede738b7fcd4ad51ed6aad00f13b8e32af4da96661dd5d95ecd71325dc47315
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Transparency logRelease files / mullm-1.0.0-py3-none-any.whl
| Download URL | mullm-1.0.0-py3-none-any.whl |
|---|---|
| Size | 3.0 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d9c90283dabd19ddd1db455ae12b224d0031b0bb58ad8a6c5caaaffc6c82f5a4
|
|
BLAKE2b-256 checksum How to use checksums |
37c273515786af8480a6ff2b48e7c54933e225f2eed1e2c99ce7523a90d2763f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.16
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Transparency logSecurity for mullm 1.0.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for mullm-1.0.0.tar.gz
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Nov 7, 2026.
Transparency logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.