llama.cpp Fixes Redundant Regex Compilation

Bulky-Priority6824 · reddit · 2026-07-12

llama.cpp released version b9966, fixing a performance issue in the -sm tensor scenario. Previously, the decode thread would recompile 29 regular expressions for every token and tensor, leading to massive unnecessary CPU overhead.

This fix caches and reuses these regular expressions. The behavior remains unchanged, but the decode thread is much more CPU-efficient. If you are using -sm tensor in a production environment, upgrading as soon as possible is recommended.

Original post →

More from Infra

Infra channel →