This repeated processing occurs during the prefill phase, where the model converts input tokens into the internal attention state required for generation. As conversations grow longer, prefill can become a significant contributor to overall response latency.
KV cache reuse addresses this challenge by preserving the model’s internal attention state across turns. Instead of rebuilding the entire conversation context for every request, the application processes only newly added tokens while reusing previously computed information.
AMD Ryzen™ AI Software 1.7.1 supports this capability through ONNX Runtime GenAI’s continuous decoding APIs. In this blog, we’ll explore how KV cache reuse works, demonstrate multi-turn conversation handling and conversation rewind capabilities, and measure the latency benefits of avoiding redundant prefill computation.
