How Quail works

What Quail is for, how it's built, and how we measure it against the other ways to run models on a Mac, and act on what we find.

What it's for

Quail runs AI models on your Mac and gives your tools an API they already speak: OpenAI's Chat Completions, Responses and Embeddings, and Anthropic's Messages. Its aims:

How it's built

The design and every decision behind it are in the repository: the architecture and the decision records.

How we measure and improve speed

  1. Measure against the others on the same Mac, with the same weights, prompts and settings, one server at a time: Quail against llama.cpp's server and Ollama for GGUF, and against oMLX and Rapid-MLX for MLX. How the comparison works.
  2. List every gap larger than 5% and larger than the spread between rounds. Each becomes an issue.
  3. Find the cause before changing anything. We trace where Quail spends its time, and check it against the engine's own reference (mlx-lm, llama-server) on the same Mac. Then we try one change at a time, alternating builds on a cooled Mac.
  4. Fix it in its own change, with before-and-after numbers and a test that the replies are unchanged.
  5. Run the whole comparison again and publish it, losses included.

What the first comparison changed

The first comparison found Quail level with llama.cpp on GGUF, except on long prompts, and behind oMLX and Rapid-MLX on MLX in four ways. What changed as a result, measured in the second on the same M1 Max:

Several requests at once on MLX

Gemma 4 now batches: with 8 requests at once, its first token takes 1.6 s instead of 41 s. MLX 0.32 made every batched step about a quarter faster.

Qwen3.5 and 3.6 on MLX

Quail's own model code and a fused GPU kernel: 13.1 ms a token instead of 15.8 ms, and a 4,096-token prompt's first token in 5.2 s instead of 8.0 s.

MLX memory

Freed GPU memory is no longer kept without limit: Qwen3 8B's peak fell from 32.5 GB to 10.4 GB.

Long prompts on GGUF

Earlier requests' caches move out of the way: a 4,096-token prompt now reaches its first token as fast as on llama.cpp's own server.

What's next