Prefix caching
Reusing a prompt's already-computed opening across requests
A language model turns every word of a prompt into internal numbers before it answers. Many requests start with the same opening, such as one long conversation. Prefix caching stores that work after the first request. Later requests that start the same way reuse it instead of computing it again. Each request still runs on its own, though. On hybrid models the store only keeps checkpoints at fixed block edges.
Think of it as
A teacher who keeps marked-up notes on a textbook chapter, but still reopens the book for every student's question.
Ideas that use this term