The llama.cpp project released version b10707, which includes a performance optimization to the key-value (KV) cache handling. The update modifies the `for_each_token_in` function to stop scanning once all sequences within a specific cell have been seen, rather than iterating through all possible maximum sequences.

  • This change targets the n-gram path via the `get_prev_tokens` caller.
  • On an RTX PRO 6000 with Qwen3.8-Flash-Next UD-Q4_K_XL, generation speed increased from 56.3 to 74.3 tokens per second at a 55k context.
  • At a 132k context, generation speed improved from 33.6 to 50.9 tokens per second.
  • The optimization scales with the number of used cells, making gains more visible at longer contexts while leaving prompt processing unchanged.

The release provides binaries for macOS (Apple Silicon and Intel), Linux (CPU, Vulkan, ROCm, OpenVINO, SYCL), Android, Windows (CPU, CUDA, Vulkan, OpenVINO, SYCL, ROCm), and openEuler.