# Llama.cpp achieves up to 42x faster prompt lookup drafting

Digest AI · Research · published 2026-09-27T00:23:41Z

Canonical: https://digestai.news/story/llama-cpp-achieves-up-to-42x-faster-prompt-lookup-drafting

## Summary

Benchmarks were run on an Apple M4 Pro (14 cores, 48 GB RAM) using the WikiText‑103 corpus (541 MB) and smaller subsets (25 MB‑200 MB). Median latency per drafted token and memory figures were measured over three runs.

The work builds on earlier contributions by Daniel Lemire, Martin Ankerl, and a PR from Johannes Gaessler that added a static cache to llama.cpp. All code and results are publicly available in the repository, and the author emphasizes that acceptance rates remain unchanged compared with the original implementation.

## Key points

- Up to 42× faster prompt‑lookup drafting reported on Apple M4 Pro hardware
- Switching outer map to ankerl::unordereddense segmentedmap drives most speed gains

## Why it matters

Faster, leaner prompt‑lookup decoding lets developers run larger language models on consumer‑grade machines, lowering latency and cost for interactive AI applications.

## Sources

1. [42x Faster Prompt Lookup Drafting in llama.cpp](https://jadidbourbaki.github.io/blog/prompt-lookup-llama-cpp) (jadidbourbaki.github.io, 2026-09-27)

## Cite

Digest AI, "Llama.cpp achieves up to 42x faster prompt lookup drafting", 27 September 2026, https://digestai.news/story/llama-cpp-achieves-up-to-42x-faster-prompt-lookup-drafting

---

Written by Digest AI's editorial model from the linked sources; the sources are the record. Headlines, digests and key points are written by Digest AI and may be quoted with a link to the story page. Linked articles belong to their publishers. Terms: https://digestai.news/terms#reuse
JSON: https://digestai.news/story/llama-cpp-achieves-up-to-42x-faster-prompt-lookup-drafting.json
