mullm 1.0.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (258) hide show
  1. mullm-1.0.0.dist-info/METADATA +538 -0
  2. mullm-1.0.0.dist-info/RECORD +258 -0
  3. mullm-1.0.0.dist-info/WHEEL +5 -0
  4. mullm-1.0.0.dist-info/entry_points.txt +5 -0
  5. mullm-1.0.0.dist-info/licenses/LICENSE +201 -0
  6. mullm-1.0.0.dist-info/licenses/NOTICE +15 -0
  7. mullm-1.0.0.dist-info/top_level.txt +1 -0
  8. router/0101.html +1199 -0
  9. router/3d.html +2986 -0
  10. router/__init__.py +1 -0
  11. router/a2a.html +285 -0
  12. router/accuracy.html +688 -0
  13. router/agents.py +160 -0
  14. router/apks.html +1033 -0
  15. router/archaeology.html +1013 -0
  16. router/architecture.html +1211 -0
  17. router/asset-manager.html +325 -0
  18. router/asset_store.py +393 -0
  19. router/assets.html +1018 -0
  20. router/audit.py +69 -0
  21. router/backend_profiles.py +246 -0
  22. router/backends/__init__.py +28 -0
  23. router/backends/anthropic.py +105 -0
  24. router/backends/exllamav2.py +110 -0
  25. router/backends/llamacpp.py +136 -0
  26. router/backends/mlx.py +77 -0
  27. router/backends/ollama.py +72 -0
  28. router/backends/openai_compat.py +163 -0
  29. router/backends/protocol.py +68 -0
  30. router/backends/registry.py +323 -0
  31. router/bench.html +9852 -0
  32. router/bench_api.py +767 -0
  33. router/benchmarks/__init__.py +0 -0
  34. router/benchmarks/humaneval.py +1326 -0
  35. router/benchmarks/mbpp.py +244 -0
  36. router/benchmarks/multipl_e.py +9252 -0
  37. router/benchmarks/runner.py +1418 -0
  38. router/benchmarks/suite.py +250 -0
  39. router/benchmarks/swebench.py +786 -0
  40. router/bows.html +2624 -0
  41. router/cache.py +721 -0
  42. router/camera_view.html +57 -0
  43. router/capyballista.html +537 -0
  44. router/characters.html +8 -0
  45. router/chat.html +13402 -0
  46. router/civitai_api.py +77 -0
  47. router/classifier.html +2 -0
  48. router/claude-site.html +1415 -0
  49. router/cli.py +809 -0
  50. router/cloud.py +1002 -0
  51. router/code/ready/axe-throw-lab.html +657 -0
  52. router/code/ready/bamboo-village.html +647 -0
  53. router/code/ready/boardwalk-midway.html +1941 -0
  54. router/code/ready/boiling-frogs.html +1245 -0
  55. router/code/ready/cardtoss.html +1533 -0
  56. router/code/ready/crokinole2.html +746 -0
  57. router/code/ready/foot-golf.html +603 -0
  58. router/code/ready/tardigrade.html +1288 -0
  59. router/code.html +272 -0
  60. router/comfyui.html +1752 -0
  61. router/comfyui_api.py +780 -0
  62. router/compare.html +1366 -0
  63. router/compare3d.html +997 -0
  64. router/competitive.html +1349 -0
  65. router/composition_api.py +195 -0
  66. router/config.py +897 -0
  67. router/cost.html +410 -0
  68. router/coverage.html +1108 -0
  69. router/coverage_api.py +257 -0
  70. router/crop.html +1039 -0
  71. router/dashboard.html +7801 -0
  72. router/dataviz.html +920 -0
  73. router/dataviz3d.html +150 -0
  74. router/dataviz3d_api.py +240 -0
  75. router/debug.html +1952 -0
  76. router/decision_classifier.py +60 -0
  77. router/decomposer.py +206 -0
  78. router/demo.html +377 -0
  79. router/dialogue.html +2164 -0
  80. router/dialogue_api.py +512 -0
  81. router/dice.html +1789 -0
  82. router/drums.html +865 -0
  83. router/factory.html +37 -0
  84. router/factory.py +500 -0
  85. router/factory_api.py +253 -0
  86. router/factory_notify.py +130 -0
  87. router/factory_templates.py +22 -0
  88. router/forest3d.html +61 -0
  89. router/frontier_models.py +55 -0
  90. router/gallery.html +1419 -0
  91. router/gamedevbench.html +1026 -0
  92. router/games.html +2004 -0
  93. router/games3d1.html +543 -0
  94. router/games3d2.html +542 -0
  95. router/games3d3.html +487 -0
  96. router/gamesystems.html +1410 -0
  97. router/gears.html +1003 -0
  98. router/globe.html +10 -0
  99. router/grandtour.html +1556 -0
  100. router/groundtruth/__init__.py +12 -0
  101. router/groundtruth/core.py +629 -0
  102. router/groundtruth/live.py +337 -0
  103. router/groundtruth/loader.py +89 -0
  104. router/groundtruth/optional/__init__.py +2 -0
  105. router/groundtruth/optional/gaming.py +150 -0
  106. router/groundtruth/optional/ue5.py +141 -0
  107. router/groundtruth/registry.py +115 -0
  108. router/groundtruth/wcag.py +155 -0
  109. router/hyper.html +1678 -0
  110. router/image.html +1384 -0
  111. router/image_api.py +390 -0
  112. router/intake.html +497 -0
  113. router/intent.py +1060 -0
  114. router/investors.html +1292 -0
  115. router/jobs.py +55 -0
  116. router/kaggle_neurogolf.html +1450 -0
  117. router/languages.py +87 -0
  118. router/levels.html +6 -0
  119. router/lighthouse.html +531 -0
  120. router/lighting.html +92 -0
  121. router/local_models_api.py +87 -0
  122. router/login.html +175 -0
  123. router/main.py +6324 -0
  124. router/market.html +1416 -0
  125. router/market_api.py +593 -0
  126. router/mcp.html +369 -0
  127. router/megabench.html +2858 -0
  128. router/meshy.py +286 -0
  129. router/minitest.html +854 -0
  130. router/models.py +468 -0
  131. router/module_catalog.py +152 -0
  132. router/mullm_crop.html +825 -0
  133. router/mupatch-fresh.html +478 -0
  134. router/musaic.html +1864 -0
  135. router/onnx.html +2032 -0
  136. router/orchestrator.py +2210 -0
  137. router/page_registry.py +162 -0
  138. router/pareto.html +264 -0
  139. router/performance.html +862 -0
  140. router/physics.html +1283 -0
  141. router/physics_api.py +1032 -0
  142. router/plugin_manifest.py +119 -0
  143. router/policy.py +86 -0
  144. router/power-game.html +887 -0
  145. router/powerup.py +188 -0
  146. router/privacy.html +340 -0
  147. router/provider_catalog.py +201 -0
  148. router/provider_policy.py +103 -0
  149. router/provider_selector.py +250 -0
  150. router/realtime.py +4332 -0
  151. router/realtime_plugins.py +128 -0
  152. router/refiner_api.py +60 -0
  153. router/research.html +2071 -0
  154. router/research_exports.py +134 -0
  155. router/resource_policy.py +46 -0
  156. router/retrain_scheduler.py +188 -0
  157. router/review.html +2540 -0
  158. router/review_api.py +538 -0
  159. router/rigs.html +722 -0
  160. router/rpc.html +322 -0
  161. router/sandbox_policy.py +50 -0
  162. router/scene_api.py +850 -0
  163. router/scorer.py +652 -0
  164. router/secrets.py +335 -0
  165. router/security.html +893 -0
  166. router/server_tls.py +22 -0
  167. router/sessions.html +444 -0
  168. router/setup.html +2875 -0
  169. router/showcase.html +1204 -0
  170. router/siege.html +2284 -0
  171. router/siegecheck.html +162 -0
  172. router/site.html +1446 -0
  173. router/skyrail-archer.html +55 -0
  174. router/spend_guard.py +147 -0
  175. router/static/classifier.css +3 -0
  176. router/static/gamesystems/camera-shake.js +25 -0
  177. router/static/gamesystems/combo-system.js +26 -0
  178. router/static/gamesystems/day-night-cycle.js +29 -0
  179. router/static/gamesystems/dialogue-system.js +33 -0
  180. router/static/gamesystems/inventory-grid.js +35 -0
  181. router/static/gamesystems/minimap.js +34 -0
  182. router/static/gamesystems/particle-system.js +55 -0
  183. router/static/gamesystems/weather-system.js +29 -0
  184. router/static/kev-browser.js +36 -0
  185. router/static/kev-worker.js +18 -0
  186. router/static/lib/dexie.min.js +152 -0
  187. router/static/lib/highlight.min.js +16 -0
  188. router/static/lib/hljs-github-dark.min.css +13 -0
  189. router/static/lib/marked.min.js +38 -0
  190. router/static/lib/purify.min.js +23 -0
  191. router/static/mullm.css +253 -0
  192. router/static/musaic-sequencer.js +765 -0
  193. router/static/nav.js +201 -0
  194. router/static/tardigrade.svg +44 -0
  195. router/static/three/addons/controls/OrbitControls.js +1963 -0
  196. router/static/three/addons/controls/PointerLockControls.js +264 -0
  197. router/static/three/addons/controls/TransformControls.js +2003 -0
  198. router/static/three/addons/environments/RoomEnvironment.js +185 -0
  199. router/static/three/addons/exporters/GLTFExporter.js +3840 -0
  200. router/static/three/addons/generators/CityGenerator.js +346 -0
  201. router/static/three/addons/generators/ForestGenerator.js +347 -0
  202. router/static/three/addons/generators/TerrainGenerator.js +504 -0
  203. router/static/three/addons/generators/TreeGenerator.js +377 -0
  204. router/static/three/addons/generators/city/SidewalkGenerator.js +253 -0
  205. router/static/three/addons/generators/city/SkyscraperGenerator.js +1357 -0
  206. router/static/three/addons/libs/ktx-parse.module.js +1 -0
  207. router/static/three/addons/libs/zstddec.module.js +1 -0
  208. router/static/three/addons/loaders/DRACOLoader.js +772 -0
  209. router/static/three/addons/loaders/GLTFLoader.js +4860 -0
  210. router/static/three/addons/loaders/KTX2Loader.js +1276 -0
  211. router/static/three/addons/math/ColorSpaces.js +147 -0
  212. router/static/three/addons/math/ImprovedNoise.js +88 -0
  213. router/static/three/addons/utils/BufferGeometryUtils.js +1501 -0
  214. router/static/three/addons/utils/SkeletonUtils.js +496 -0
  215. router/static/three/addons/utils/WorkerPool.js +167 -0
  216. router/static/three/libs/basis/basis_transcoder.js +19 -0
  217. router/static/three/libs/basis/basis_transcoder.wasm +0 -0
  218. router/static/three/libs/draco/draco_decoder.js +33 -0
  219. router/static/three/libs/draco/draco_decoder.wasm +0 -0
  220. router/static/three/libs/draco/draco_wasm_wrapper.js +116 -0
  221. router/static/three/three.core.js +60006 -0
  222. router/static/three/three.module.js +19610 -0
  223. router/steam.html +1059 -0
  224. router/steam_api.py +615 -0
  225. router/storage.py +325 -0
  226. router/store.html +1306 -0
  227. router/studio.html +1575 -0
  228. router/studio_installer.py +162 -0
  229. router/swords.html +2493 -0
  230. router/sysctl.html +1167 -0
  231. router/tardigrades.html +884 -0
  232. router/teaser.html +1516 -0
  233. router/templates/csv-json/README.md +15 -0
  234. router/templates/csv-json/acceptance.py +46 -0
  235. router/templates/csv-json/build.py +11 -0
  236. router/templates/csv-json/contract.md +17 -0
  237. router/templates/csv-json/factory.toml +29 -0
  238. router/terminalbench.html +1407 -0
  239. router/terrain.html +1786 -0
  240. router/terrain_api.py +1093 -0
  241. router/terrain_standalone.html +1729 -0
  242. router/tests.html +369 -0
  243. router/textures.html +1616 -0
  244. router/tiers.py +1228 -0
  245. router/train_classifier.py +113 -0
  246. router/translate.html +654 -0
  247. router/troubleshoot.html +1850 -0
  248. router/tts.html +1686 -0
  249. router/unblock.html +1247 -0
  250. router/urls.html +429 -0
  251. router/vector_cache.py +760 -0
  252. router/vehicles.html +8 -0
  253. router/video.html +943 -0
  254. router/videoeditor.html +1842 -0
  255. router/vram_guard.py +242 -0
  256. router/wacky.html +403 -0
  257. router/walks.html +775 -0
  258. router/world_providers.py +289 -0
@@ -0,0 +1,538 @@
1
+ Metadata-Version: 2.4
2
+ Name: mullm
3
+ Version: 1.0.0
4
+ Summary: Local-first LLM router. 96.4% cost reduction. Free tier first.
5
+ Author: muLLM Contributors
6
+ License-Expression: Apache-2.0
7
+ Project-URL: Homepage, https://github.com/mybrainrunslinux/mullm
8
+ Project-URL: Repository, https://github.com/mybrainrunslinux/mullm
9
+ Project-URL: Bug Tracker, https://github.com/mybrainrunslinux/mullm/issues
10
+ Keywords: llm,router,ai,cost-optimization,ollama,local-first
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: Programming Language :: Python :: 3
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Classifier: Programming Language :: Python :: 3.13
17
+ Classifier: Programming Language :: Python :: 3.14
18
+ Classifier: Programming Language :: Python :: 3.15
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Requires-Python: >=3.11
21
+ Description-Content-Type: text/markdown
22
+ License-File: LICENSE
23
+ License-File: NOTICE
24
+ Requires-Dist: fastapi<1.0,>=0.116
25
+ Requires-Dist: uvicorn[standard]<1.0,>=0.50
26
+ Requires-Dist: pydantic<3.0,>=2.10
27
+ Requires-Dist: pydantic-settings<3.0,>=2.6
28
+ Requires-Dist: httpx<1.0,>=0.27
29
+ Requires-Dist: python-multipart<1.0,>=0.0.20
30
+ Requires-Dist: anthropic<1.0,>=0.50
31
+ Requires-Dist: openai<3.0,>=1.60
32
+ Requires-Dist: psutil<7.0,>=6.0
33
+ Requires-Dist: numpy<3.0,>=2.1
34
+ Requires-Dist: Pillow<14.0,>=13.0
35
+ Requires-Dist: rich<15.0,>=13.0
36
+ Requires-Dist: structlog<26.0,>=24.0
37
+ Requires-Dist: python-dotenv<2.0,>=1.0
38
+ Requires-Dist: keyring<26.0,>=25.0
39
+ Requires-Dist: tomli>=2.0; python_version < "3.11"
40
+ Provides-Extra: gpu
41
+ Requires-Dist: pynvml<12.0,>=11.0; extra == "gpu"
42
+ Provides-Extra: classifier
43
+ Requires-Dist: transformers<5.0,>=4.44; extra == "classifier"
44
+ Requires-Dist: torch<3.0,>=2.3; extra == "classifier"
45
+ Provides-Extra: google
46
+ Requires-Dist: google-genai<3.0,>=1.0; extra == "google"
47
+ Provides-Extra: notifications
48
+ Requires-Dist: apprise<2.0,>=1.9; extra == "notifications"
49
+ Provides-Extra: auth
50
+ Requires-Dist: authlib<2.0,>=1.3; extra == "auth"
51
+ Requires-Dist: itsdangerous<3.0,>=2.1; extra == "auth"
52
+ Provides-Extra: redis
53
+ Requires-Dist: redis<6.0,>=5.0; extra == "redis"
54
+ Provides-Extra: studio
55
+ Requires-Dist: pillow<14.0,>=13.0; extra == "studio"
56
+ Requires-Dist: imageio-ffmpeg<1.0,>=0.5; extra == "studio"
57
+ Requires-Dist: kokoro<1.0,>=0.9; extra == "studio"
58
+ Requires-Dist: soundfile<1.0,>=0.12; extra == "studio"
59
+ Provides-Extra: sentence-transformers
60
+ Requires-Dist: sentence-transformers<4.0,>=3.0; extra == "sentence-transformers"
61
+ Provides-Extra: vector-cache
62
+ Requires-Dist: chromadb<2.0,>=1.0; extra == "vector-cache"
63
+ Requires-Dist: requests>=2.33.0; extra == "vector-cache"
64
+ Requires-Dist: urllib3>=2.6.3; extra == "vector-cache"
65
+ Provides-Extra: cuda128
66
+ Requires-Dist: torch==2.7.0; extra == "cuda128"
67
+ Requires-Dist: torchvision; extra == "cuda128"
68
+ Requires-Dist: torchaudio; extra == "cuda128"
69
+ Provides-Extra: cuda-nightly
70
+ Provides-Extra: tts
71
+ Requires-Dist: kokoro<1.0,>=0.9; extra == "tts"
72
+ Requires-Dist: soundfile<1.0,>=0.12; extra == "tts"
73
+ Provides-Extra: dev
74
+ Requires-Dist: pytest<10.0,>=9.0.3; extra == "dev"
75
+ Requires-Dist: pytest-asyncio<2.0,>=1.3; extra == "dev"
76
+ Requires-Dist: pytest-cov<8.0,>=5.0; extra == "dev"
77
+ Requires-Dist: httpx>=0.27; extra == "dev"
78
+ Requires-Dist: playwright<2.0,>=1.48; extra == "dev"
79
+ Requires-Dist: ruff<1.0,>=0.8; extra == "dev"
80
+ Provides-Extra: security
81
+ Requires-Dist: bandit[toml]<2.0,>=1.8; extra == "security"
82
+ Requires-Dist: pip-audit<3.0,>=2.7; extra == "security"
83
+ Provides-Extra: all
84
+ Requires-Dist: mullm[classifier,dev,google,gpu,security,sentence-transformers,studio,vector-cache]; extra == "all"
85
+ Dynamic: license-file
86
+
87
+ <div align="center">
88
+
89
+ # mฮผ|LLM
90
+
91
+ ### Cost-Optimal LLM Routing โ€” 96.4% cheaper than cloud-only
92
+
93
+ [![License: Apache 2.0](https://img.shields.io/badge/License-Apache%202.0-green?style=for-the-badge)](https://www.apache.org/licenses/LICENSE-2.0)
94
+ [![Python 3.11+](https://img.shields.io/badge/Python-3.11%2B-blue?style=for-the-badge&logo=python&logoColor=white)](https://www.python.org)
95
+ [![Release](https://img.shields.io/github/v/release/mybrainrunslinux/mullm?style=for-the-badge&logo=github)](https://github.com/mybrainrunslinux/mullm/releases/latest)
96
+ [![Cost Reduction](https://img.shields.io/badge/Cost%20Reduction-96.4%25-F59E0B?style=for-the-badge)](#-benchmark-results)
97
+ [![HumanEval](https://img.shields.io/badge/HumanEval-100%25%20pass%401-brightgreen?style=for-the-badge)](#-benchmark-results)
98
+ [![RouterBench AIQ](https://img.shields.io/badge/RouterBench%20AIQ-0.6673%20SOTA-purple?style=for-the-badge)](#-benchmark-results)
99
+
100
+ [![Platform](https://img.shields.io/badge/Platform-Linux%20%7C%20macOS%20%7C%20Windows-lightgrey?style=for-the-badge)](#-quick-start)
101
+ [![Backends](https://img.shields.io/badge/Local-TabbyAPI%20%7C%20vLLM%20%7C%20llama.cpp%20%7C%20Ollama-94A3B8?style=for-the-badge)](#-supported-providers)
102
+ [![Security checks](https://img.shields.io/github/actions/workflow/status/mybrainrunslinux/mullm/security.yml?branch=main&style=for-the-badge&label=Security)](https://github.com/mybrainrunslinux/mullm/actions/workflows/security.yml)
103
+ [![Release checks](https://img.shields.io/github/actions/workflow/status/mybrainrunslinux/mullm/release-dry-run.yml?branch=main&style=for-the-badge&label=Release%20checks)](https://github.com/mybrainrunslinux/mullm/actions/workflows/release-dry-run.yml)
104
+ [![CI](https://img.shields.io/github/actions/workflow/status/mybrainrunslinux/mullm/ci.yml?branch=main&style=for-the-badge&label=CI)](https://github.com/mybrainrunslinux/mullm/actions/workflows/ci.yml)
105
+
106
+ **[GitHub](https://github.com/mybrainrunslinux/mullm)** ยท **[Quick Start](#-quick-start)** ยท **[Benchmarks](#-benchmark-results)** ยท **[Providers](#-supported-providers)**
107
+
108
+ </div>
109
+
110
+ ---
111
+
112
+ ## ๐Ÿ’ก The Case in One Line
113
+
114
+ <div align="center">
115
+
116
+ > **$27.87 actual spend vs $772 cloud-only baseline โ€” across 15,363 production queries over 22 days.**
117
+ >
118
+ > 87.5% of queries resolved at $0.00. 100% HumanEval pass@1 at $0.00. RouterBench AIQ 0.6673 โ€” highest published.
119
+
120
+ </div>
121
+
122
+ ---
123
+
124
+ ## ๐Ÿ›๏ธ Four-Tier Architecture
125
+
126
+ **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.
127
+
128
+ ![muLLM four-tier routing architecture](docs/tier-routing.svg)
129
+
130
+ **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**.
131
+
132
+ ---
133
+
134
+ ## Software Factory: from specification to evidence
135
+
136
+ 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.
137
+
138
+ [![The muLLM Software Factory](docs/media/factory-tour.gif)](docs/SOFTWARE_FACTORY.md)
139
+
140
+ **[How it works](docs/SOFTWARE_FACTORY.md)** ยท **[Watch the tour](docs/media/factory-tour.webm)** ยท **[Spec โ†’ working game: evidence](docs/evidence/peg-bloom/README.md)** ยท **[Try Peg Bloom](examples/factory-peg-bloom/README.md)**
141
+
142
+ Build several projects together and see which need a human: [three marketing workspaces, their contracts, repairs, and review evidence](docs/evidence/marketing/README.md). Executable checks establish technical behavior; a separate product gate asks whether the result is useful and usable.
143
+
144
+ 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.
145
+
146
+ ---
147
+
148
+ ## ๐Ÿš€ Quick Start
149
+
150
+ Start muLLM on port **6856**, configure your providers, and open the web UI.
151
+ Use a virtual environment with Python 3.11 or newer.
152
+
153
+ ### Path 1 โ€” Install the package
154
+
155
+ ```bash
156
+ python -m venv .venv
157
+ # Linux / macOS:
158
+ source .venv/bin/activate
159
+ # Windows PowerShell instead: .venv\Scripts\Activate.ps1
160
+ python -m pip install --upgrade mullm
161
+ mullm-server
162
+ ```
163
+
164
+ Open the setup URL printed by the server. It uses HTTPS when a local certificate
165
+ is available. The first interactive start opens setup automatically; installation
166
+ itself starts no process. Set `MULLM_OPEN_BROWSER=0` for headless operation.
167
+
168
+ **Windows with local inference:** connect your existing Ollama, TabbyAPI, vLLM,
169
+ or llama.cpp runner in `/setup`. **Mac with API keys only:** add your provider
170
+ keys and leave local inference disabled; MLX and model downloads are optional.
171
+
172
+ Use `/chat` for queries and `/factory` to follow projects, tasks, and human
173
+ requests. The optional `/classifier` page previews local Kev.js inference.
174
+ [Factory guide](docs/SOFTWARE_FACTORY.md) ยท [Upgrade and configuration guide](docs/UPGRADING.md).
175
+
176
+ The core install needs no separate constraints download. SQLite is the default
177
+ cache. ChromaDB is an opt-in extra with unresolved advisories; see [Security](SECURITY.md).
178
+
179
+ ### Optional installs, modes, and key storage
180
+
181
+ The base package includes the router, web UI, CLI, SQLite semantic cache, and cloud-provider clients. Add only the capabilities you need:
182
+
183
+ | Install | Adds |
184
+ |---|---|
185
+ | `pip install "mullm[studio]"` | Studio media helpers, local TTS, audio, and video support |
186
+ | `pip install "mullm[classifier]"` | Transformers + PyTorch for the trained DeBERTa classifier |
187
+ | `pip install "mullm[gpu]"` | NVIDIA GPU/VRAM monitoring |
188
+ | `pip install "mullm[auth]"` | OAuth/OIDC support for a remotely exposed UI |
189
+ | `pip install "mullm[sentence-transformers]"` | Local embedding models |
190
+ | `pip install "mullm[vector-cache]"` | Optional ChromaDB cache; SQLite remains the safer dependency-free default |
191
+ | `pip install "mullm[dev]"` | Developer tests, coverage, linting, and browser-test tools |
192
+ | `pip install "mullm[google]"` | Current `google-genai` SDK |
193
+ | `pip install "mullm[notifications]"` | Apprise adapters for factory notifications |
194
+
195
+
196
+ 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.
197
+
198
+ 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.
199
+
200
+ ### Path 2 โ€” Rootless Podman
201
+
202
+ ```bash
203
+ git clone https://github.com/mybrainrunslinux/mullm.git && cd mullm
204
+ podman build -t localhost/mullm:local .
205
+ podman volume create mullm-data
206
+ podman run --name mullm --replace -d \
207
+ -p 127.0.0.1:6856:6856 \
208
+ -v mullm-data:/data:Z \
209
+ -e MULLM_REMOTE_ACCESS=true \
210
+ localhost/mullm:local
211
+ ```
212
+
213
+ This is a single muLLM container; run Ollama or another compatible inference backend separately. See [Deployment](docs/DEPLOYMENT.md) for secrets, persistent state, and remote access.
214
+
215
+ ### Path 3 โ€” Source / development
216
+
217
+ ```bash
218
+ git clone https://github.com/mybrainrunslinux/mullm && cd mullm
219
+ python -m pip install -e ".[dev]"
220
+ cp config/mullm.toml.example mullm.toml # configure providers as needed
221
+ mullm-server
222
+ ```
223
+
224
+ For local generation, configure a supported inference runner in `/setup`.
225
+ Ollama is one option (`ollama pull qwen3-coder:30b`); TabbyAPI, vLLM,
226
+ llama.cpp, and MLX are also supported. Deterministic lookups need no model.
227
+
228
+ ---
229
+
230
+ ## ๐Ÿšข Production Deployment
231
+
232
+ ```bash
233
+ # 1. Configure authentication and headless startup
234
+ export MULLM_DEV_MODE=false
235
+ export MULLM_API_KEY="your-long-random-server-token"
236
+ export MULLM_OPEN_BROWSER=0
237
+ # Add cloud provider keys through your normal secret store
238
+
239
+ # 2. Start muLLM
240
+ mullm-server
241
+
242
+ # 3. Verify
243
+ mullm --status
244
+ ```
245
+
246
+ For concrete systemd, Podman, Kubernetes, and multi-replica guidance, see [Deployment](docs/DEPLOYMENT.md).
247
+
248
+ ---
249
+
250
+ ## ๐Ÿ–ฅ๏ธ CLI Reference
251
+
252
+ ```bash
253
+ mullm "your question" # auto-route
254
+ mullm-server # start server on :6856
255
+ mullm --status # health check
256
+ mullm --cost # session cost summary
257
+ mullm --stream "tell me a story" # SSE streaming
258
+ mullm --model claude-haiku-5-5 "summarize X" # force a specific model
259
+ mullm --tier cloud_full "complex question" # force a specific tier
260
+ ```
261
+
262
+ ---
263
+
264
+ ## ๐ŸŒ Supported Providers
265
+
266
+ The tier router directly supports Anthropic, OpenAI, Google, DeepSeek, GLM,
267
+ and Cerebras. Additional providers have backend/gateway integrations; these
268
+ are not all interchangeable with the tier router. Keys are optional.
269
+ Model documentation reviewed 2026-11-05; account availability varies.
270
+
271
+ | Provider | Models Available | Pricing Tier |
272
+ |---|---|---|
273
+ | **Anthropic** | Haiku / Sonnet / Opus 5.5 ยท Fable 5.1 | Low โ†’ High |
274
+ | **OpenAI** | GPT-6 Luna / Astra ยท GPT-6.1 Sol / Terra | Low โ†’ High |
275
+ | **Google** | Gemini 3.5 Flash-Lite ยท 3.8 Flash ยท 4 Argon | Low โ†’ High |
276
+ | **DeepSeek** | V4.1 Flash (`deepseek-flash`) ยท V4 Pro | Low |
277
+ | **Cerebras** | GPT OSS 120B ยท Qwen 3.8 27B | Low |
278
+ | **Mistral** | Mistral Small ยท Large | Low โ†’ Medium |
279
+ | **Cohere** | Command A+ | Account dependent |
280
+ | **Perplexity** | Agent API / Sonar | Token and tool charges |
281
+ | **OpenRouter** | All models via unified API | Varies |
282
+ | **Venice** | Privacy-preserving inference | Low |
283
+ | **GLM (Z.AI)** | GLM 5.3 ยท Flash ยท FlashX | Low |
284
+ | **xAI** | Grok 4.7 | Medium |
285
+ | **IBM / Venice** | Operator-configured model IDs | Account dependent |
286
+ | **Ollama** | Any local model | **$0** |
287
+ | **ExLlamaV2** | Quantized GPTQ/EXL2 | **$0** |
288
+ | **llama.cpp** | GGUF models | **$0** |
289
+ | **MLX** | Apple Silicon optimized | **$0** |
290
+
291
+ The router escalates through providers in cost order. Budget hard-stop at a configurable threshold prevents runaway spend.
292
+
293
+ ---
294
+
295
+ ## ๐Ÿ’ป Hardware Compatibility
296
+
297
+ 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.
298
+
299
+ | GPU / RAM | Recommended Model | Backend | Expected tok/s |
300
+ |---|---|---|---|
301
+ | RTX 5090 / 32 GB VRAM | qwen3-coder:30b (Q4) | Ollama / ExLlamaV2 | ~60โ€“80 |
302
+ | RTX 4090 / 24 GB VRAM | qwen3-coder:30b (Q4) | Ollama / ExLlamaV2 | ~40โ€“55 |
303
+ | RTX 4080 / 16 GB VRAM | qwen2.5-coder:14b (Q8) | Ollama | ~45โ€“60 |
304
+ | RTX 3080 / 10 GB VRAM | qwen2.5-coder:7b (Q8) | Ollama | ~35โ€“50 |
305
+ | Apple M3 Max / 128 GB | qwen3-coder:30b (Q4) | MLX | ~30โ€“45 |
306
+ | Apple M2 Pro / 32 GB | qwen2.5-coder:14b (Q6) | MLX | ~25โ€“35 |
307
+ | CPU only / 32 GB RAM | qwen2.5-coder:7b (Q4) | llama.cpp | ~5โ€“12 |
308
+ | CPU only / 16 GB RAM | qwen2.5-coder:3b (Q8) | llama.cpp | ~8โ€“18 |
309
+
310
+ > Models are pulled automatically on first use when Ollama is the backend. For ExLlamaV2, MLX, and llama.cpp, point `MULLM_OLLAMA_BASE_URL` at their compatible API endpoint.
311
+
312
+ ---
313
+
314
+ ## ๐Ÿงฉ Module System
315
+
316
+ Each module is independently toggleable. Disable what you don't need to reduce dependencies and startup time.
317
+
318
+ | Module | Toggle | Description |
319
+ |---|---|---|
320
+ | **Groundtruth LUT** | always on | AST arithmetic, date/time, HTTP codes, Big-O, Git one-liners |
321
+ | **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 |
322
+ | **DeBERTa Classifier** | `MULLM_CLASSIFIER_MODEL_PATH=<dir>` | 44 MB fine-tuned intent classifier; falls back to rule-based if unset |
323
+ | **Local Ollama** | `MULLM_OLLAMA_BASE_URL=<url>` | Any Ollama-compatible endpoint |
324
+ | **Cloud Fallback** | set any `MULLM_*_API_KEY` | Only providers with keys are used |
325
+ | **Budget Guard** | `MULLM_BUDGET_HARD=<$>` | Hard-stops cloud calls above threshold |
326
+ | **Privacy Mode** | `MULLM_LOG_QUERY_CONTENT=false` | Strips query content from scoring log |
327
+ | **Split Routing** | POST `/query/split` | Decomposes multi-part prompts, parallel execution |
328
+ | **SSE Streaming** | GET `/query/stream` | Server-Sent Events from local Ollama |
329
+ | **OpenAI Compat** | POST `/v1/chat/completions` | Drop-in replacement for OpenAI clients |
330
+ | **Dashboard** | GET `/api/dashboard` | Real-time cost, tier distribution, query stats |
331
+ | **System Stats** | GET `/api/system` | CPU, RAM, GPU, VRAM, loaded model info |
332
+
333
+ ---
334
+
335
+ ## โš™๏ธ Configuration
336
+
337
+ All environment variables are prefixed `MULLM_`. Copy `.env.example` to `.env` and set only what you need.
338
+
339
+ <details>
340
+ <summary>Full environment variable reference</summary>
341
+
342
+ | Variable | Default | Description |
343
+ |---|---|---|
344
+ | `MULLM_PORT` | `6856` | Server port (MULM on keypad) |
345
+ | `MULLM_DEV_MODE` | `true` | Disable auth, enable /docs |
346
+ | `MULLM_API_KEY` | _(unset)_ | Bearer token for production |
347
+ | `MULLM_OLLAMA_BASE_URL` | `http://localhost:11434` | Ollama endpoint |
348
+ | `MULLM_OLLAMA_MODEL` | `qwen3-coder:30b` | Local generation model |
349
+ | `MULLM_OLLAMA_EMBED_MODEL` | `nomic-embed-text` | Embedding model for semantic cache |
350
+ | `MULLM_ANTHROPIC_API_KEY` | _(unset)_ | Anthropic API key |
351
+ | `MULLM_OPENAI_API_KEY` | _(unset)_ | OpenAI API key |
352
+ | `MULLM_GOOGLE_API_KEY` | _(unset)_ | Google Gemini API key |
353
+ | `MULLM_PREFERRED_CLOUD_PROVIDER` | `anthropic` | `anthropic` / `openai` / `google` |
354
+ | `MULLM_BUDGET_WARN` | `7.00` | Log warning above this cost ($) |
355
+ | `MULLM_BUDGET_MODERATE` | `10.00` | Prefer local tier above this ($) |
356
+ | `MULLM_BUDGET_HARD` | `50.00` | Block all cloud calls above this ($) |
357
+ | `MULLM_SEMANTIC_CACHE_BACKEND` | `sqlite` | Semantic cache backend: `sqlite`, `chroma`, or `off` |
358
+ | `MULLM_CACHE_COSINE_THRESHOLD` | `0.98` | Semantic cache similarity floor |
359
+ | `MULLM_LOG_QUERY_CONTENT` | `true` | Set `false` for privacy mode |
360
+ | `MULLM_DATA_RETENTION_DAYS` | `90` | Auto-purge scoring log entries |
361
+ | `MULLM_CLASSIFIER_MODEL_PATH` | _(unset)_ | DeBERTa model dir; empty = rule-based |
362
+
363
+ </details>
364
+
365
+ ---
366
+
367
+ ## ๐Ÿ”Œ API Reference
368
+
369
+ **Base URL:** `http://localhost:6856`
370
+
371
+ ### Core endpoints
372
+
373
+ ```bash
374
+ # Route a query through all tiers
375
+ POST /query
376
+ {"content": "what is 2+2"}
377
+
378
+ # Split multi-part query, parallel execution
379
+ POST /query/split
380
+ {"content": "summarize X and then write tests for Y"}
381
+
382
+ # SSE streaming from local Ollama
383
+ GET /query/stream?content=tell+me+a+story
384
+
385
+ # Health check (Ollama + semantic cache availability)
386
+ GET /health
387
+
388
+ # Dashboard stats (cost, tier distribution, query counts)
389
+ GET /api/dashboard
390
+
391
+ # Live system stats (CPU, RAM, GPU, VRAM, loaded model)
392
+ GET /api/system
393
+ ```
394
+
395
+ ### OpenAI-compatible endpoints
396
+
397
+ ```bash
398
+ POST /v1/chat/completions # drop-in replacement
399
+ GET /v1/models # model list
400
+ ```
401
+
402
+ <details>
403
+ <summary>Example query response</summary>
404
+
405
+ ```bash
406
+ curl -X POST http://localhost:6856/query \
407
+ -H "Content-Type: application/json" \
408
+ -d '{"content": "what is 2+2"}'
409
+ ```
410
+
411
+ ```json
412
+ {
413
+ "response": "4",
414
+ "tier": "groundtruth",
415
+ "cost": 0.0,
416
+ "latency_ms": 0.3,
417
+ "model_used": "groundtruth-lut",
418
+ "cached": false
419
+ }
420
+ ```
421
+
422
+ </details>
423
+
424
+ ---
425
+
426
+ ## ๐ŸŽฏ Intent Categories
427
+
428
+ The classifier assigns every query to one of eight categories, each with a default routing strategy.
429
+
430
+ | Category | Description | Default Tier |
431
+ |---|---|---|
432
+ | `code` | Programming, debugging, refactoring | Local (complexity-gated) |
433
+ | `deploy` | Docker, CI/CD, infrastructure | Local |
434
+ | `research` | Explanations, papers, analysis | Local / Cloud |
435
+ | `lookup` | Facts, definitions, unit conversions | Cache / Groundtruth |
436
+ | `note` | Summarise, remember, to-do | Local |
437
+ | `creative` | Writing, stories, brainstorming | Local |
438
+ | `conversation` | General chat | Local |
439
+ | `vision` | Image and photo analysis | Local (vision model) |
440
+
441
+ ---
442
+
443
+ ## ๐Ÿ”ฌ Research
444
+
445
+ **mฮผ|LLM** is informed by ongoing research. The manuscript and evaluation methodology are still under critical review; no preprint is currently published.
446
+
447
+ ### Key claims (verified on production data)
448
+
449
+ - **96.4% cost reduction** โ€” $27.87 vs $772 baseline, N = 15,363 queries, 22 days
450
+ - **87.5% free-tier resolution** โ€” Tiers 0โ€“2 combined, zero cloud spend
451
+ - **100% HumanEval pass@1 at $0.00** โ€” local tier only, no cloud escalation
452
+ - **RouterBench AIQ 0.6673** โ€” highest published score on this benchmark at time of submission
453
+ - **DeBERTa-v3-small (44 MB)** classifier achieves production-grade intent classification
454
+ - Four-tier waterfall architecture generalizes to any local + cloud backend combination
455
+
456
+ Citation details will be added when the manuscript is ready for publication.
457
+
458
+ ---
459
+
460
+ ## ๐Ÿ“Š Benchmark Results
461
+
462
+ 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.
463
+
464
+ | Benchmark | Result | Notes |
465
+ |---|---|---|
466
+ | **Actual spend** | $27.87 | 22-day production run |
467
+ | **Cloud-only baseline** | $772.00 | Same queries, cloud-only |
468
+ | **Cost reduction** | **96.4%** | $744.13 saved |
469
+ | **Free-tier resolution** | **87.5%** | Tier 0 + Tier 1 + Tier 2 |
470
+ | **HumanEval pass@1** | **100%** | At $0.00 (local tier only) |
471
+ | **MMLU accuracy** | โ‰ฅ cloud parity | Via quality-gated escalation |
472
+ | **RouterBench AIQ** | **0.6673** | Highest published score |
473
+ | **Production queries** | 15,363 | 22 days, real developer workload |
474
+ | **Tier 0 latency** | < 1 ms | Groundtruth LUT, no model |
475
+ | **Local tier latency** | ~ 5 s | 30B model, consumer GPU |
476
+ | **Classifier size** | 44 MB | DeBERTa-v3-small, fine-tuned |
477
+ | **Cloud providers** | 16 | See provider grid below |
478
+
479
+ <details>
480
+ <summary>๐Ÿ“ˆ Tier distribution breakdown</summary>
481
+
482
+ | Tier | Name | Queries Handled | Cost Per Query |
483
+ |---|---|---|---|
484
+ | Tier 0 | Groundtruth LUT | ~15% | $0.0000 |
485
+ | Tier 1 | Semantic Cache | ~35% | $0.0000 |
486
+ | Tier 2 | Local 30B Model | ~37.5% | $0.0000 |
487
+ | Tier 3 | Cloud API | ~12.5% | varies |
488
+
489
+ 87.5% of all queries cost nothing. Cloud is invoked only when the local tier fails a quality gate.
490
+
491
+ </details>
492
+
493
+ ---
494
+
495
+ ## ๐Ÿค Contributing
496
+
497
+ Contributions are welcome. Please open an issue before starting large changes.
498
+
499
+ ```bash
500
+ git clone https://github.com/mybrainrunslinux/mullm.git
501
+ cd mullm
502
+ pip install -e .[all]
503
+ npx playwright test # 59 free tests (no API calls)
504
+ npx playwright test --grep @spend # paid cloud tests (explicit opt-in)
505
+ ```
506
+
507
+ **Guidelines:**
508
+ - Tests must never spend money by default โ€” cloud tests go behind `--grep @spend`
509
+ - Use Podman over Docker for container-based tests
510
+ - Cost accuracy matters โ€” real API keys, real money
511
+ - Local-first โ€” default to the cheapest capable tier
512
+
513
+ ---
514
+
515
+ ## ๐Ÿ“„ License & Credits
516
+
517
+ **License:** [Apache 2.0](LICENSE)
518
+
519
+ **Built by [0101 Technology](https://0101technology.com)**
520
+
521
+ 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.
522
+
523
+ ---
524
+
525
+ <div align="center">
526
+
527
+ **[GitHub](https://github.com/mybrainrunslinux/mullm)** ยท **[0101technology.com](https://0101technology.com)** ยท **[Apache 2.0](LICENSE)**
528
+
529
+ *Cost-optimal LLM routing. Local-first. Microscopic spend.*
530
+
531
+ muLLM is developed and stewarded by **0101 Technology LLC** (Oregon, USA). See [NOTICE](NOTICE).
532
+
533
+ </div>
534
+
535
+ [Runtime privacy, deadlines, and model verification](docs/RUNTIME_GUARDS.md) ยท [Software Factory mode](docs/SOFTWARE_FACTORY.md).
536
+ [Current models and custom classifiers](docs/MODELS.md) ยท [Upgrade guide](docs/UPGRADING.md).
537
+
538
+ Software Factory: `mullm --factory factory.toml` โ€” [configuration and acceptance gates](docs/SOFTWARE_FACTORY.md).