LocaiHome
Benchmark · June 2026

Locai Link vs Ollama

How does Locai Link (llama.cpp build b9789) compare to Ollama (ollama-cuda) when both run the same Gemma 4 (Q4_K_M) model on the same CUDA hardware? Identical sampling, token-identical outputs, single-stream load. Measured on Linux; Mac and Windows results coming soon.

Time to first token
10.5×
faster on conversational prompts
Prefill throughput
10.2×
faster on conversational prompts
Long-context prefill
6.9×
faster on 9.5K-token documents
Decode throughput
Up to 1.18×
faster across scenarios

Test environment

Identical hardware, identical model file, identical sampling parameters across both backends.

Hardware & OS
  • ·NVIDIA RTX 4070 · 12 GiB VRAM
  • ·Arch Linux
  • ·CUDA 13.3 · driver 610.43.02
  • ·Compiler: nvcc / g++-15
Model
  • ·Gemma 4 E2B-it
  • ·4.6B params · Q4_K_M
  • ·GGUF · 2.9 GB
  • ·Sliding-window attention, shared KV layers
Sampling
  • ·temperature = 0
  • ·top_p = 1
  • ·seed = 42
  • ·streaming = true
Output equivalence verified

Token-identical replies at temperature=0 confirmed for all prompts across both backends.

Results by scenario

Two workloads were measured: a short conversational prompt and a long-context document analysis.

Conversation. Short conversational prompt (~30 tokens), mid-length reply (~300 tokens). 20 runs plus 3 warmup, 0 errors.

Scenario: conversation
MetricLocai LinkOllamaResult
Time to first token (median)31 ms326 msLocai Link 10.5x faster
Time to first token (p95)132 ms338 msLocai Link 2.6x faster
Prefill throughput936 tok/s92 tok/sLocai Link 10.2x faster
Decode throughput (median)196 tok/s166 tok/sLocai Link 1.18x faster
Decode throughput (p95)198 tok/s169 tok/sLocai Link 1.17x faster
End-to-end latency (median)1.6 s2.1 sLocai Link 1.3x faster
Peak VRAM4,244 MiB1,990 MiBOllama uses 2.2 GiB less
Peak host memory (RSS)5,799 MB3,022 MBOllama uses 2.8 GB less

Document analysis. Long-context document prompt (~9,500 tokens) from “From the Earth to the Moon”, reply capped at 500 tokens. 10 runs plus 3 warmup, 0 errors.

Scenario: document analysis
MetricLocai LinkOllamaResult
Time to first token (median)56 ms385 msLocai Link 6.9x faster
Prefill throughput169,466 tok/s24,728 tok/sLocai Link 6.9x faster
Decode throughput (median)174 tok/s158 tok/sLocai Link 1.10x faster
Decode throughput (p95)178 tok/s160 tok/sLocai Link 1.11x faster
End-to-end latency (median)1.2 s1.6 sLocai Link 1.3x faster
Peak VRAM4,266 MiB2,006 MiBOllama uses 2.2 GiB less
Peak host memory (RSS)6,003 MB3,091 MBOllama uses 2.9 GB less

What each metric means

Time to first token · lower is better
  • ·How long before the model starts replying.
Prefill throughput · higher is better
  • ·Speed of ingesting prompt tokens.
Decode throughput · higher is better
  • ·Speed of generating reply tokens.
Peak memory · lower is better
  • ·Resident GPU and host memory at peak.
End-to-end latency (median) · lower is better
  • ·Full request lifecycle: send to final token.

How to read this

Locai Link wins decisively on time to first token and prefill throughput, the phases that dominate perceived latency for interactive UIs and long-context document workflows. Decode throughput (token generation speed once the reply has started) is also faster, though the gap is narrower because both backends share the same underlying CUDA kernels for the generation loop.

Ollama uses meaningfully less peak VRAM and host RSS. That trade-off is by design: Ollama defers KV-cache and weight allocations more aggressively, while Locai Link pre-allocates to remove allocation cost from the hot path.

Caveats

  • Single-stream measurements only. One request in flight at a time per backend. Concurrent load was not measured. Results are specific to Arch Linux and the ollama-cuda Arch package; build steps and library paths differ on Ubuntu and RHEL.
  • These numbers describe a single in-flight request. Throughput under concurrent load is a separate test we will publish next.