llama.cpp Cuts Redundant Scans, Lifting One Long-Context Test 51%

llama.cpp release b10707 stops an n-gram lookup from scanning all 256 possible sequence slots after it has found every sequence actually attached to a used KV-cache cell. On an RTX PRO 6000 with a quantized Qwen3.8-Flash-Next model, the contributor reports generation rising from 33.6 to 50.9 tokens per second at a 132,000-token context—a 51.5% gain in that test—while prompt processing was unchanged. An earlier CUDA patch lifted prefill 9.9% in a separate 55,000-token test by extending a fast expert-routing path to the model’s 10-expert layout. The gains are project benchmarks, not fleet-wide cost reductions. China’s August PMI supplies the financial and demand check: manufacturing improved to 49.8 and high-tech manufacturing reached 52.9, yet the composite output index stayed below expansion at 49.5. Input prices rose to 56.6 while factory-gate prices reached only 50.4, making software efficiency relevant to margins but not sufficient evidence of stronger end demand.
ZharfAI Analysis
llama.cpp release b10707, published at 03:03 UTC on August 31, removes a surprisingly large amount of bookkeeping from one long-context generation path. The n-gram lookup used for speculative decoding walked the project’s maximum 256 sequence slots for every occupied KV-cache cell, even though a cell normally belongs to only one sequence. Pull request 28011 keeps track of the sequences actually present and stops as soon as all of them have been seen. The traversal order and callback behavior stay the same; the patch changes how soon the scan can finish, not the model’s answers.
The reported result is material and deliberately narrow. Using an RTX PRO 6000, flash attention and a UD-Q4_K_XL quantization of Qwen3.8-Flash-Next, the contributor measured generation at 74.3 tokens per second versus 56.3 at a 55,000-token context, a 32.0% increase. At 132,000 tokens, generation rose from 33.6 to 50.9 tokens per second, or 51.5%. Prompt processing did not change. The gain grows as more KV cells are occupied, and the author says it is effectively invisible on short prompts. These are warm project benchmarks on one GPU, model and quantization—not an independent fleet study and not a claim that every llama.cpp workload becomes 51% faster.
An earlier release in the same 48-hour cycle attacks prefill rather than generation. Release b10704 includes a CUDA change that lets any expert count use llama.cpp’s faster mm_ids_helper path. The old gate accepted expert counts that divide a 32-lane warp, plus a hard-coded exception for six; Qwen3.8-Flash-Next uses ten and therefore fell to a slower kernel. The patch pads the grouping width to the next power of two while still dispatching ten experts. In the contributor’s revised test on the same RTX PRO 6000 at a 55,000-token context, prompt processing increased from 2,139 to 2,351 tokens per second, or 9.9%. Generation was unaffected, and the implementation has only been exercised on CUDA’s 32-wide warps.
The two results should not be added together. One removes redundant sequence scanning during generation; the other changes expert routing during prompt processing. Both were measured on a named model and accelerator, and neither establishes energy use, concurrency under production load, tail latency or total serving cost. What they do establish is an operational possibility: software can raise useful output per installed GPU-hour without changing the accelerator. A capacity planner should reproduce the result on the exact model, context distribution and batch policy before treating it as available capacity.
China’s August purchasing managers’ survey, released by the National Bureau of Statistics on August 31, supplies the demand and financial counterweight. Manufacturing PMI rose 0.6 point to 49.8, still below the 50 expansion line. Production reached 50.4 and new orders 50.6, while new export orders were 50.1. Large manufacturers returned to expansion at 50.6, but medium firms were at 49.4 and small firms at 47.9. The improvement is broad enough to matter, yet not broad enough to call the factory sector expanding as a whole.
The price split is especially relevant to margins. The input-price index jumped 3.4 points to 56.6, while the factory-gate price index rose 2.6 points to 50.4. The bureau’s interpretation attributes part of that movement to higher crude-oil and non-ferrous-metal prices; in non-ferrous smelting and processing, both price measures exceeded 60. When input prices rise faster and from a higher level than selling prices, companies may not retain every efficiency gain. Better inference kernels can lower the compute needed for a task, but they do not neutralize energy, hardware, materials or financing costs elsewhere in the chain.
Technology-linked manufacturing was stronger than the aggregate. The official interpretation says production and new orders in electrical machinery and in computers, communications and electronic equipment were both above 53. Equipment manufacturing PMI was 51.4 and high-tech manufacturing 52.9, both in expansion. Consumer-goods manufacturing was 49.0 and energy-intensive manufacturing 47.9. That divergence supports a targeted technology-demand signal, not a claim that AI spending is lifting the entire economy. The PMI measures whether more respondents report improvement than deterioration; it does not measure revenue growth, accelerator purchases or model usage.
Services show the same uneven map. Overall non-manufacturing business activity held at 49.0; construction was 46.9 and services 49.3. Postal services, telecommunications and broadcasting, and internet, software and information-technology services each registered above 55, according to the bureau, while wholesale, retail and capital-market services were below 50. Non-manufacturing new orders fell to 44.1 and employment remained at 45.4. The composite output index improved 0.2 point to 49.5, leaving total surveyed activity below expansion despite the strength of selected digital categories.
Two fresh news reports help frame rather than replace the primary record. Xinhua highlighted that 16 of the 21 manufacturing industries improved from July and that procurement volume rose to 50.5. The Associated Press noted the headline reading was better than economists had expected, while still describing overall manufacturing as contracting. Neither observation changes what the survey can prove. The seasonally adjusted sample covers 3,200 manufacturing companies across 31 industries and 4,300 non-manufacturing companies across 43 industries; it captures activity breadth, not the dollar value of demand.
The operational and financial tests now divide cleanly. Engineering teams should reproduce both patches separately, measure prompt processing and generation by context bucket, and add power, memory, concurrent-request and p95 latency data. Capacity and finance teams should convert only verified production gains into GPU-hour or cash-cost assumptions, then ask whether higher utilization consumes the saving. In China’s data, the next confirmation would be manufacturing, services and the composite index crossing 50 together, with new orders and employment improving without a widening input-price squeeze.
The strongest conclusion is smaller than the headline number. llama.cpp has shown that long contexts can hide avoidable work, with a 51.5% generation gain in one 132,000-token test and a separate 9.9% prefill gain. China’s survey shows high-tech and digital services expanding inside an economy that has not regained broad-based growth, while input prices are moving faster than output prices. More useful work per GPU-hour is a credible engineering and margin target; proving that it survives production workloads and meets durable paying demand is the harder test ahead.
Sources & documents
- 01Release b10707llama.cpp · August 31, 2026
- 02kv-cells: stop the sequence scan once all sequences are seenllama.cpp · August 30, 2026
- 03Release b10704llama.cpp · August 31, 2026
- 04CUDA: let any expert count use the fast mm_ids_helper pathllama.cpp · August 29, 2026
- 052026年8月中国采购经理指数运行情况National Bureau of Statistics of China and CFLP · August 31, 2026
- 06China's manufacturing PMI at 49.8 in AugustXinhua News Agency · August 31, 2026
- 07China's factory activity contracts in August despite an uptick in export demandAssociated Press · August 31, 2026
Tags
Related News

llama.cpp Speeds Selected Mac Tests by Fusing Computation
llama.cpp merged selective Apple-GPU optimizations on September 19, with a contributor-reported generation gain of about 16% in one M2 Ultra test. Another attempted fusion was discarded after slowing execution, making workload-specific evidence more useful than a blanket speed claim. A separate CUDA correction addresses a memory error; neither change establishes universal gains or lower operating costs. In the separate macroeconomic picture, August US industrial output was flat and euro-area consumers' one-year inflation expectations rose slightly. Virginia's new executive order also restricts access to state assistance for certain new data-center projects.

Accenture Agrees to Embed Safety Evaluators at Anthropic
Accenture and Anthropic have agreed to establish an embedded evaluation team, with each company expecting at least $1 billion in AI-safety investment over five years. That is a plan, not completed spending or demonstrated safety. California has set deadlines for independent-oversight recommendations, while Michelle Bowman's banking remarks expose the distinction between recognizing risk and acting on it. Separately, Japan's new policy-rate target takes effect on September 24. ZharfAI examines why evaluator access, decision authority and evidence of corrective action should be assessed separately, without treating these different developments as one causal story.

Google and NVIDIA Seek Faster Grid Connections Through Flexible Data Center Power Use
Google, NVIDIA and Emerald AI's new alliance proposes a practical exchange: more flexible electricity demand for faster data center connections. It has not announced newly delivered power or binding rules. ZharfAI examines what that promise would require in an AI service contract and why lower grid draw is not necessarily lower total energy use. The House's separate 417–3 vote on ratepayer protection puts infrastructure-cost allocation in focus, while the Federal Reserve's quarter-point rate increase adds a distinct financing consideration. The tests ahead are regulatory decisions, measured performance and clear responsibility for costs—not the number of companies supporting an announcement.