SGLang
SGLang: Efficient Execution of Structured Language Model Programs
Lianmin Zheng et al. · NeurIPS 2024
Use RadixAttention to reuse prefix KV caches and optimize structured decoding.
What you will implement
A token-node expansion of radix-tree semantics modeling shared prefixes, LRU and active-request pins, without storing actual KV tensors.
- 159. SGLang Prefix KV Cache and Leaf-Only LRU
Find the longest cached prefix and evict only unpinned leaves under a capacity limit.
A token-node expansion of radix-tree semantics modeling shared prefixes, LRU and active-request pins, without storing actual KV tensors.