llama.cpp PR speeds long-context prompt processing up to 41%
A pull request from an Nvidia engineer rotates the K/V read order to improve L2 cache hit rates. On an RTX 5090 with a Qwen 27B Q4 model, prompt processing is 1.41x faster at 131K depth and 1.25x at 65K, with no change at short contexts.
Why it matters
Local users running long-context workloads such as coding agents get a noticeable speedup once it merges.
What happened
1 min readA pull request from an Nvidia engineer rotates the K/V read order to improve L2 cache hit rates. On an RTX 5090 with a Qwen 27B Q4 model, prompt processing is 1.41x faster at 131K depth and 1.25x at 65K, with no change at short contexts.
Our analysis
A cheap, targeted optimization that helps exactly where llama.cpp has lagged: long contexts. The data covers one GPU and one model, and the PR isn't merged yet. Worth benchmarking on your own hardware once it lands.