Core OS Virtual Memory Concepts Adapted by Paged KV Cache

Paged KV Cache directly borrows concepts from operating system virtual memory, primarily 'pages' (fixed-size blocks), 'page tables' (mapping logical token offsets to physical memory), and 'dynamic allocation' to manage the KV cache. This allows LLMs to view a contiguous memory space for the KV cache while the physical storage is non-contiguous, eliminating fragmentation at the page level.

Sources

Open the full topic