Menu

My Cache With a 90% Hit Rate Skipped Less Attention Work Than One With 10%
📰

My Cache With a 90% Hit Rate Skipped Less Attention Work Than One With 10%

#towardsdatascience#science#cache#long#tokens
Long article (1349 words) — no AI summary yet.
Reading 0:00
15s threshold

You get ten requests. Nine customers type short questions. The tenth customer uploads a long document and requests a summary. Your dashboard turns green to indicate that nine of ten requests found something in the prompt cache. A second cache, with the same requests and memory budget, finds only one match. Which cache would you choose?

In deciding which cache to keep, it helps to understand why the dashboard turned green. If the request log treats any prefix reuse as a hit, the nine short questions win on request count. Count the tokens reused and the two caches tie. You can work out which cache skips more attention work with a pen and paper. Finding out how long the customer waits takes a timing measurement.

What the cache keeps

A prompt cache saves some of the work required to process a request and stores part of a language model’s state.…

Continue reading — create a free account

Join HashtagPLUS to read full articles, follow hashtags, vote, and join the conversation.