Home/Algo Bridge/LRU / LFU Cache (Hash + Doubly Linked List)/LC_460
⚡ Practice in Flashcards
🌉 Problem-Level AI BridgeLC_460 · 困难

LC_460 (LFU Cache) ➔ PagedAttention: Virtual Memory Block Table Mapping

Algorithmic foundation connecting classic data structures to LLM high-performance computing.

1️⃣ 1️⃣ Classical DSA Origin

LC_460 · LFU Cache

Pattern: LRU / LFU Cache (Hash + Doubly Linked List) — Hybrid architecture combining hash table with a doubly linked list. The hash table provides O(1) direct address lookup, while the doubly linked list maintains recency access order (LRU) or frequency (LFU) for O(1) insertion, elevation, and eviction.

⚡ Open LC-460 Solution ➔
2️⃣ 2️⃣ Production AI System Transfer

vLLM PagedAttention & Block-Paged KV Cache · PagedAttention: Virtual Memory Block Table Mapping

Industrial Application: Industrial optimization for modern large model training and inference pipelines.

🧬 Target AI Kernel Interface
def paged_attention(Q: torch.Tensor, K_cache: torch.Tensor, V_cache: torch.Tensor, block_tables: torch.Tensor, context_lens: torch.Tensor, block_size: int = 16) -> torch.Tensor

🔗 Related Algorithmic Bridges

LC_239 ➔ PagedAttention: Virtual Memory Block Table Mapping
Algorithmic foundation connecting classic data structures to LLM high-pe...
LC_146 ➔ RadixAttention: Longest Prefix Match KV Cache
Doubly linked list paired with hash table guarantees O(1) eviction and l...
LC_146 ➔ Prefix Cache Attention Block
Doubly linked list paired with hash table guarantees O(1) eviction and l...
LC_146 ➔ PagedAttention: Virtual Memory Block Table Mapping
Doubly linked list paired with hash table guarantees O(1) eviction and l...
LC_380 ➔ PagedAttention: Virtual Memory Block Table Mapping
Algorithmic foundation connecting classic data structures to LLM high-pe...
← LC_146 (LRU Cache) → vLLM PagedAttention & Block-Paged KV CacheLC_380 (Insert Delete Getrandom O1) → vLLM PagedAttention & Block-Paged KV Cache →