Class RadixTreeNode
java.lang.Object
smile.llm.cache.RadixTreeNode
A node in the radix tree used for KV cache management.
Each node represents an edge labeled with a span of token IDs (key)
and the corresponding KV cache indices (value). The tree is a
compressed prefix tree: common token prefixes are shared, so a single node
can store many tokens at once.
Nodes are reference-counted via lockRef: a node with
lockRef > 0 is protected and cannot be evicted. When all
references are released the node becomes evictable and may be
reclaimed by the LRU eviction policy.
-
Field Summary
Fields -
Method Summary
-
Field Details
-
id
public final long idUnique, monotonically increasing node identifier.
-
-
Method Details
-
isEvicted
public boolean isEvicted()Returnstrueif this node's KV cache entries have been freed. A node is evicted whenvalueis set tonull.- Returns:
trueif evicted.
-
toString
-