# Engine prefill on CUDA vs llama.cpp — Hanzo AI

> hanzo-engine against llama.cpp on CUDA, same weights, same box: prefill throughput where the whole 95% interval of the ratio lies above parity.

[Benchmarks](https://hanzo.ai/benchmarks) / Engine prefill on CUDA vs llama.cpp

measured

hanzo-engine against llama.cpp on CUDA, built against the same weights and run on the same box: prefill throughput at the prompt lengths where the whole 95% interval of the ratio lies above parity.

[Start on Hanzo Cloud](https://platform.hanzo.ai/)

Prefill on CUDA, cell by cell

hanzo t/sllama.cpp t/s

- CUDA · Zen-1.7B · Q4\_K\_M · 500**7961.3****7250.2**
- CUDA · Zen-1.7B · Q4\_K\_M · 500**7474.8****6871.3**
- CUDA · Zen-4B · Q4\_K\_M · 2048**3774.4****3592.5**

```
$ scripts/dossier.sh --backend cuda --model <same.gguf> -p 512,500,2048,4096 -n 128 -r 7
```

prints the table on this page — transcribed from the committed run files on branch bench/dossier, the pass of 2026-07-21

harness

[hanzoai/engine · bench/dossier](https://github.com/hanzoai/engine/tree/bench/dossier/bench-runs)

our paper

[Refutation-Driven Performance Engineering](https://papers.hanzo.ai/refutation-driven-perf)

## What is measured

hanzo-engine and llama.cpp, built against the same weights, run on the same box, alternating. Prefill is tokens per second at a given prompt length, and the ratio is ours over theirs, so above 1.000 is a win. The models are Zen-1.7B at Q4\_K\_M and Zen-4B at Q4\_K\_M; 7 repetitions per cell, as its run records, with the first discarded as warmup, a Student-t 95% interval on each engine, and the ratio's interval formed by adding the two relative intervals in quadrature.

## Prefill on CUDA, cell by cell

3 cells from 2 runs on branch `bench/dossier` · engine 1.7.87 · each run pins its engine release, its llama.cpp build and its model digest, and is linked below

## The work that produced it

[Refutation-Driven Performance Engineering](https://papers.hanzo.ai/refutation-driven-perf) is the campaign that produced these kernels, written as a log of numbered hypotheses, each settled by a cheap decisive experiment. A long prefill is compute-bound, which is where that work landed.

```
$ scripts/dossier.sh --backend cuda --model <same.gguf> -p 512,500,2048,4096 -n 128 -r 7
```

PreviousSandbox cold start · All Benchmarks Board · NextGPQA-Diamond

- Other benchmarks

[LoCoMo](https://hanzo.ai/benchmarks/locomo) · [MemoryAgentBench](https://hanzo.ai/benchmarks/memoryagentbench) · [LongMemEval](https://hanzo.ai/benchmarks/longmemeval) · [CronQuestions](https://hanzo.ai/benchmarks/cronquestions) · [RepoBench-R](https://hanzo.ai/benchmarks/repobench-r) · [LoCoMo · subject scope](https://hanzo.ai/benchmarks/locomo-subject-scope) · [LoCoMo-Conv](https://hanzo.ai/benchmarks/locomo-conv) · [Fleet residency](https://hanzo.ai/benchmarks/fleet) · [Live agent footprint](https://hanzo.ai/benchmarks/goroutine) · [Sandbox cold start](https://hanzo.ai/benchmarks/sandbox) · [GPQA-Diamond](https://hanzo.ai/benchmarks/gpqa)

the committed runs, in [bench-runs](https://github.com/hanzoai/engine/tree/bench/dossier/bench-runs): CUDA Zen-1.7B Q4\_K\_M · CUDA Zen-4B Q4\_K\_M

## Build on Hanzo Cloud

[Start on Hanzo Cloud](https://platform.hanzo.ai/)[View Models & Pricing](https://hanzo.ai/pricing)

Hanzo AI Cloud
