[HiCache] Simple style change for buffer mode (#35574)
This commit is contained in:
@@ -240,8 +240,10 @@ def create_tree_cache(ctx: TreeCacheBuildContext) -> BasePrefixCache:
|
|||||||
if (
|
if (
|
||||||
ctx.server_args.enable_hierarchical_cache
|
ctx.server_args.enable_hierarchical_cache
|
||||||
and ctx.server_args.hicache_host_memory_mode == "buffer_only"
|
and ctx.server_args.hicache_host_memory_mode == "buffer_only"
|
||||||
and type(cache).__name__ != "UnifiedRadixCache"
|
|
||||||
):
|
):
|
||||||
|
from sglang.srt.mem_cache.unified_radix_cache import UnifiedRadixCache
|
||||||
|
|
||||||
|
if not isinstance(cache, UnifiedRadixCache):
|
||||||
raise ValueError(
|
raise ValueError(
|
||||||
"--hicache-host-memory-mode buffer_only is only implemented for "
|
"--hicache-host-memory-mode buffer_only is only implemented for "
|
||||||
f"the unified radix tree; this model selected {type(cache).__name__}."
|
f"the unified radix tree; this model selected {type(cache).__name__}."
|
||||||
|
|||||||
Reference in New Issue
Block a user