[UnifiedRadixTree]: Support HiCache Framework for UnifiedRadixTree (#23316)

Co-authored-by: JINZ <1023553676@qq.com>
Co-authored-by: diemchai <diemchai@tencent.com>
This commit is contained in:
Zhangheng
2026-05-03 22:13:22 +08:00
committed by GitHub
co-authored by JINZ diemchai
parent e37f46fcf7
commit c0f5950636
12 changed files with 2193 additions and 254 deletions
@@ -262,5 +262,55 @@ class TestUnifiedSWARadixCache(UnifiedRadixTreeTestMixin, CustomTestCase):
kill_process_tree(cls.process.pid)
# TODO(hzh): Currently, HiCache is not fully compatible with the CI CUDA13 environment; we need to wait for the fix before re-enabling the tests below.
# class TestUnifiedMambaRadixCacheWithHiCache(UnifiedRadixTreeTestMixin, CustomTestCase):
# """Mamba hybrid + UnifiedRadixCache."""
#
# kl_threshold = 0.003
# prefill_cache_assert = staticmethod(
# make_mamba_prefill_assert(chunk_size=MAMBA_CHUNK_SIZE)
# )
# decode_cache_assert = staticmethod(
# make_mamba_decode_assert(track_interval=MAMBA_TRACK_INTERVAL)
# )
#
# @classmethod
# def setUpClass(cls):
# cls.model = MAMBA_MODEL
# cls.base_url = DEFAULT_URL_FOR_TEST
# cls.process = popen_launch_server(
# cls.model,
# cls.base_url,
# timeout=DEFAULT_TIMEOUT_FOR_SERVER_LAUNCH,
# other_args=[
# "--tp-size",
# "4",
# "--chunked-prefill-size",
# "2048",
# "--mem-fraction-static",
# "0.85",
# "--mamba-scheduler-strategy",
# "extra_buffer",
# "--mamba-track-interval",
# str(MAMBA_TRACK_INTERVAL),
# "--enable-hierarchical-cache",
# "--hicache-ratio",
# "1.5",
# "--hicache-write-policy",
# "write_through",
# "--hicache-io-backend",
# "direct",
# "--hicache-mem-layout",
# "page_first_direct",
# ],
# env={"SGLANG_ENABLE_UNIFIED_RADIX_TREE": "1"},
# )
# cls.input_ids = get_input_ids(cls.model, num_samples=18)
#
# @classmethod
# def tearDownClass(cls):
# kill_process_tree(cls.process.pid)
if __name__ == "__main__":
unittest.main()