llama.cpp speeds up long prompts on an Intel NPU, with a caveat

Original chart of contributor-reported Gemma 4 E2B prompt processing on OpenVINO NPU, 512 tokens 1320–1375 before and 2349–2454 after, 2048 tokens 1146–1202 before and 2268–2513 after, in tokens per second. Not independently measured and not an Apple silicon test.

The November 27 llama.cpp b12807 prerelease changes how supported local models process prompts on an Intel neural processing unit (NPU). In contributor tests, Gemma 4 E2B processed a 2,048-token prompt at roughly twice its previous rate. This is an OpenVINO result, not an Apple silicon benchmark.

Why processing a long prompt can be faster

When a language model reads a prompt, it builds a key-value (KV) cache: stored attention data that helps it reuse earlier computation while generating an answer. The new static OpenVINO path avoids work that only produces the prediction scores during prompt processing for compatible models with shared KV layers. When scores are needed, one decoding step completes the computation against the cache. This changes the work done before the answer starts, not the capabilities of the model itself.

What the contributor measured

Prompt length Before (tokens/s) After (tokens/s)
512 tokens 1,320–1,375 2,349–2,454
2,048 tokens 1,146–1,202 2,268–2,513

The implementation notes report these llama-bench ranges for Gemma 4 E2B Q4_0 on an NPU with KV_SLICE=0 and NPU_TURBO=YES. INGOAMPT has not reproduced the measurements. The release does not establish the same gain on a Mac or for every model. Prompt throughput is not the rate at which the answer is generated, and neither metric alone measures the total time a customer waits.

What developers should test before shipping

For a private document assistant on supported Intel hardware, compare a short query and a long retrieved document using the same model and context settings. Record prompt-processing time, answer-generation time, memory and whether the answer is correct. The contributor reported identical greedy outputs for three of four needle prompts; one near-tie token differed, and also varied between baseline runs. This is a limited correctness check, not a general accuracy guarantee. The optimization is enabled by default on applicable graphs and can be disabled with GGML_OPENVINO_KV_ONLY_PREFILL=0. Check the prerelease’s supported paths and keep a stable configuration for production until the results are validated on the intended device.

For an Apple silicon deployment, test the Metal or MLX path separately; this change is not evidence of faster Mac inference. A faster prompt stage may improve a local service, but it does not prove demand, sales or a particular revenue outcome.

Original release: November 27, 2026, 05:42:54 UTC; implementation PR 33088. Explore more AI news for independent developers.