Support HiCache for MambaRadixCache (#19663)

Co-authored-by: hzh0425 <hzh0425@apache.org>
This commit is contained in:
Ke Bao
2026-03-08 00:36:25 +08:00
committed by GitHub
co-authored by hzh0425
parent 17721b00fd
commit 5867c3fa80
6 changed files with 1739 additions and 14 deletions
@@ -264,7 +264,12 @@ class HiCacheController:
):
self.tp_group = tp_group
self.mem_pool_device_allocator = token_to_kv_pool_allocator
self.mem_pool_device = token_to_kv_pool_allocator.get_kvcache()
mem_pool_device = token_to_kv_pool_allocator.get_kvcache()
from sglang.srt.mem_cache.memory_pool import HybridLinearKVPool
if isinstance(mem_pool_device, HybridLinearKVPool):
mem_pool_device = mem_pool_device.full_kv_pool
self.mem_pool_device = mem_pool_device
self.mem_pool_host = mem_pool_host
self.write_policy = write_policy
self.page_size = page_size