Prefix Caching and Prompt Reuse
Overview This post is divided into five parts; they are: • Reusing Prefill Work • Finding the Longest Cached Prefix • Block Hashes, Radix Trees, and Compatibility • Designing Prompts for Reuse • Capacity and Measurement Reusing Prefill Work During prefill, every layer computes keys and values for every prompt token.
We haven't written up this one. Machine Learning Mastery has the full story — the link below goes straight to it.
Source: machinelearningmastery.com