feat : add radix prefix cache

- replace hash-only lookup with page-granular radix matching
- keep partial pages private and cache only materialized KV prefixes
- integrate completed-request caching and add radix behavior tests
This commit is contained in:
2026-08-06 11:45:52 +08:00
parent 654e6eb0d1
commit b2230fefd8
5 changed files with 142 additions and 34 deletions
+2 -2
View File
@@ -35,7 +35,7 @@ from astrai.inference.core import (
KVCache,
KVStorage,
PagePool,
PrefixCache,
RadixCache,
ReqToTokenPool,
Task,
TaskManager,
@@ -66,7 +66,7 @@ __all__ = [
"KVCache",
"KVStorage",
"PagePool",
"PrefixCache",
"RadixCache",
"ReqToTokenPool",
"page_hash",
"sample",