This is the bundled runtime of opencoti, a soft fork of opencode adding a multi-tier local inference engine. The main opencoti project is not yet publicly released on GitHub — its engine ships here first as a standalone, zero-dependency single file usable with any OpenAI-compatible client.
One executable (Cosmopolitan APE) runs on Linux, Windows, macOS & BSD. Three artifacts: x86_64 with embedded CUDA (sm_75→sm_120, Turing→Blackwell), a bare Windows .exe, and (untested!) aarch64 with embedded sbsa CUDA for DGX Spark (GB10). Side-load DSOs under dso/. Base: llamafile 0.10.3 / llama.cpp + 80 additive patches (full series published in this repo).
Runs every llama.cpp-supported GGUF; tuning targets Gemma-4 (26B-A4B MoE, dense 12B/31B, E-series) and Qwen 2.5/3/3.5/3.6 (dense, MoE, recurrent-hybrid).
Highlights:
- DCA (dual-chunk attention): context extension validated to 768k–1M
- MTP speculative decoding: Qwen NextN self-spec (fused N-step) + Gemma-4 assistant drafter (dual-context) — up to ~1.9× decode
- KV-quant ladder: TurboQuant 2/3-bit, TCQ trellis-coded 2/3-bit, asymmetric hi-K/cheap-V mixes, q6_0
- Rolling-KV window: streaming host-RAM spill of KV overflow — contexts beyond VRAM, auto T*-aware policy
- Mixed position-axis KV: f16 recent window ⊕ quantized tail, auto-tiered at boot
- Agentic multi-session serving: PolyKV shared-prefix KV pool, session-keyed KV reuse, lazy slot grow/shrink
- Sparse-V + sparse attention (vertical-slash) long-ctx decode wins
- Runtime introspection (/props, /slots), layer-repeat (RYS) self-stacking, and more
Every feature is gated by KLD / logit-equivalence and RULER retrieval evals — quality numbers live in the docs alongside the binaries.
Grab a binary + MANIFEST + USAGE.md and point your agent at it. Feedback very welcome!
ManniX-ITA/opencoti-llamafile
