nace-ai/kapitsa

Blazing fast Apple Silicon optimized inference engine built for Qwen & Nemotron. OpenAI + Anthropic API compatible. Built by folks from nace.ai

Just enough context:

Kapitsa is a program that runs large language models (the kind of AI that writes text) directly on Apple silicon Macs — no cloud, no GPU card needed. It's built as the backend for "coding agents," tools that help you write software.

What it does

  • Runs three model families locally: Qwen, Nemotron, and Recursive's Flint.
  • Starts coding-agent tools (opencode, Claude Code, Codex, pi) on that local model.
  • Exposes two standard server APIs (OpenAI and Anthropic) so other apps can talk to it.

Hardware requirement: that's it — an Apple silicon Mac (M1 or newer) running macOS 14 Sonoma or later.

Install & first use

One command installs it:

brew install nace-ai/tap/kapitsa

(there's also a curl script). Then, to use it with opencode on a 35B model:

kapitsa opencode --model 35b

On smaller-memory Macs (16–24 GB), the README suggests --model 9b or 4b for quicker replies.

Main commands

Command What it does
kapitsa serve Starts a local server with chat, OpenAI, and Anthropic APIs at http://127.0.0.1:8000
kapitsa claude Runs Claude Code on top of Kapitsa
kapitsa doctor Shows your Mac's GPU and memory and which models will fit
kapitsa bench Benchmarks your Mac and (optionally) shares results with the community
kapitsa bench compare Runs the same benchmark against other engines installed on your machine
kapitsa pull 27b Downloads a model without starting it
kapitsa list / kapitsa rm Lists / deletes downloaded models
kapitsa import model.gguf Imports an existing Qwen or Flint GGUF file (from LM Studio, Ollama, or llama.cpp)
kapitsa update Upgrades Kapitsa itself

What makes it fast — KFlash

Normal engines generate text token-by-token (a token is roughly a word fragment). To speed that up, some engines use a "drafter" — a small, fast model that guesses the next ~7 tokens. The big model then checks those guesses in one pass and keeps the run of correct ones.

KFlash takes this one step further with tree speculative decoding: instead of checking a single chain of guesses, the big model checks a small tree of the drafter's top candidates in the same single pass. Wherever the drafter hesitates, its runner-up guesses ride along and get checked too — so more tokens survive each pass. The tree size is tuned to the cost of a verify row on your specific Mac. Crucially, the output is identical to plain decoding: the big model still validates every token.

It works with published drafters as-is: z-lab's DFlash and DFlash2, and NVIDIA's DSpark and LiLiCorr.

Speed claims (from the README's benchmarks)

  • Out of 27 model-and-Mac combinations measured against nine other engines, Kapitsa had the fastest text-generation (decode) speed in 25.
  • Up to 3.5× faster than llama.cpp and 2.2× faster than oMLX (thanks to KFlash).
  • Example: Recursive Flint 40B-A2.5B with 2-bit experts on an M1 Pro (16 GB): 61 tokens/second vs llama.cpp's 43.
  • On the M4 Pro, Flint's prompt-processing is 1.1–1.2× Recursive's own engine, and decode pulls ahead to 1.3× at 128K-token contexts.

Everything is measurable on your own Mac: kapitsa bench and kapitsa bench compare are built in.

Other notable features

  • SSD prefix cache — restart the server and keep the conversation; a 16K-token follow-up on the 35B goes from 17 s to 0.16 s (100×).
  • Prefix reuse — new questions sharing the system prompt start in 0.06 s instead of 1.9 s.
  • KFlash budget — several requests at once share one verify pass, up to +23% total throughput on the 27B model.
  • Output check — any speed claim in the project is only trusted if the output stays within twice the model's noise floor of the original.
  • License: Apache 2.0, © 2026 Nace AI.

Related

  • Project
  • Project
  • Project
  • Project