[KongchangAI]
· 2 min read· 1,488 words

TideCache: Transparent Caching and Tiered Streaming Optimization for Hybrid LLM Inference

TideCache: Transparent Caching and Tiered Streaming Optimization for Hybrid LLM Inference

TideCache dynamically manages heterogeneous caches in hybrid-architecture models through a transparent cache pool, streaming prefetch, and request scheduling, significantly improving inference throughput and reducing latency.

Hybrid-architecture models combine global attention layers, whose caches grow linearly with context, and bounded-state layers, whose caches are fixed in size, making GPU memory difficult to plan statically. TideCache proposes three components for CPU-GPU superchips: a transparent cache pool that reallocates physical pages under fixed virtual addresses so heterogeneous cache components share the same GPU memory; a cache streamer that exploits computation gaps in bounded-state layers to prefetch global attention layer prefix caches, overlapping transfer with computation; and a scheduler that selects resident or streaming execution based on request size and queue state. Evaluations on GB300 and GH200 across seven configurations show up to 2.04x more agent turns, 20%–59% lower P50 per-token latency, and 1.40–3.05x higher TTFT. The system is implemented in SGLang without modifying model structures.

Hybrid architectures (which combine global attention and bounded-state layers) have become the mainstream design for open-weight models, but their heterogeneous caches place GPU memory demands that fluctuate dramatically with context length and concurrency. TideCache presents an inference serving system for CPU-GPU superchips that dynamically allocates and migrates caches between GPU and host memory through three components—a transparent cache pool, a cache streamer, and a request scheduler—significantly improving throughput and reducing latency.

TideCache paper source screenshot

The Caching Dilemma of Hybrid Architectures

In hybrid models, global attention layers must store KV caches that grow linearly with context, while bounded-state layers (such as SSM or linear attention) have relatively fixed cache sizes. This heterogeneity makes static memory planning difficult: long-context requests squeeze the space available for global attention caches, while in high-concurrency scenarios a large number of short requests may leave bounded-state caches idle. Existing solutions like SGLang's HiCache support tiered caching, but lack fine-grained, transparent management of heterogeneous cache components.

The core idea of TideCache is to treat GPU memory as a dynamically reorganizable resource pool, enabling transparent migration and streaming of caches without breaking existing cache layouts or backend interfaces.

KV cache (Key-Value Cache) is a key source of memory overhead in autoregressive generation inference: when decoding each token, the model must reuse the key and value vectors produced by all previous tokens in the attention layers to avoid redundant computation. For global attention layers, this cache size is proportional to context length, so long-context requests quickly consume HBM capacity.

SSM and linear attention are another class of sequence modeling structures: they replace per-token KV storage with a fixed-size recurrent state, so the per-request cache footprint does not grow with context. But the two have fundamentally different memory demand patterns—the former is "scalable but continuously growing," while the latter is "fixed but must be allocated by concurrency." This heterogeneity is precisely the root cause of why hybrid models are difficult to manage with unified static memory partitioning.

HBM (High Bandwidth Memory) is the high-bandwidth memory on GPUs; it is limited in capacity and expensive. Host memory (DRAM) is large in capacity but roughly an order of magnitude lower in bandwidth. Therefore, any scheme that swaps caches out to host memory must overlap transfer overhead with computation, or it will slow down decoding.

Transparent Cache Pool: Physical Page Reallocation Under Fixed Virtual Addresses

The Transparent Cache Pool is the foundation of TideCache's memory management. Through fixed virtual address mapping, it reallocates physical pages among different cache components (global attention cache, bounded-state cache, etc.) without modifying upper-layer cache layouts or inference backend interfaces. This means the system can dynamically adjust the proportion of GPU memory occupied by each component at runtime based on request characteristics, avoiding memory fragmentation and low utilization caused by static partitioning.

This transparency is deployment-friendly: existing SGLang-based serving stacks can be integrated almost seamlessly, without rewriting cache management logic.

Fixed virtual address mapping relies on GPU virtual memory management capabilities (such as CUDA's VMM API): the system first reserves a contiguous virtual address space, then maps different physical pages to this address range as needed. To the upper-layer inference backend, the virtual addresses of caches remain unchanged, so access logic requires no modification; meanwhile, the underlying layer can repoint the same virtual page to another physical memory region or transfer ownership of physical pages between different cache components.

This is exactly what "transparent" means: cache layouts and backend interfaces remain unchanged, while physical resources are reorganized at runtime. Compared with pre-partitioning HBM statically, this approach reduces fragmentation, improves utilization, and makes capacity adjustments as imperceptible as possible to running requests.

Cache Streamer: Prefetching Prefixes During Computation Gaps

The Cache Streamer addresses the cache residency problem of global attention layers. Bounded-state layers provide natural computation gaps during execution, and TideCache exploits these gaps to prefetch the prefix cache of the next global attention layer from host memory into shared slots on the GPU. Multiple global attention layers can reuse the same set of GPU slots, thereby reducing the GPU-resident footprint of global attention caches while overlapping tiered transfers with computation.

Generated KV caches still remain resident on the GPU, ensuring low latency during decoding. This design, without sacrificing generation quality, swaps out prefix caches that are "not needed" and swaps in caches that are "needed soon," achieving a balance between memory footprint and transfer overhead.

Prefix cache refers to the KV cache corresponding to the first several tokens of a request. In agent or multi-turn dialogue scenarios, multiple requests often share the same system prompt or historical context, and prefix caches can be reused to eliminate redundant prefill computation. But reuse requires these caches to reside in a quickly accessible location.

TideCache's strategy is to swap temporarily unused prefix caches out to host memory and prefetch them back to the GPU in advance when needed. The prefetch timing comes from the gaps created during bounded-state layer computation—when GPU compute units are busy with state updates, memory transfers can proceed in parallel, hiding bandwidth overhead behind computation. Multiple global attention layers sharing the same set of prefetch slots further reduces the GPU-resident cache volume.

Request Scheduler: Choosing Between Resident or Streaming Execution on Demand

The Request Scheduler decides, based on request size and queue state, whether each request should use resident execution or streaming execution, and triggers capacity adjustments. For long-context requests, the scheduler may choose streaming execution to free up HBM; for short requests, it prioritizes residency to reduce overhead. The scheduler works in concert with the cache pool and streamer, so that HBM freed by streaming can accommodate other cache components or more concurrent requests, creating a positive feedback loop.

Measured Results: Performance on GB300 and GH200

TideCache is implemented in SGLang and evaluated on GB300 and GH200 platforms across seven model/platform configurations. Compared with SGLang with HiCache, TideCache completes up to 2.04x more agent turns in agent scenarios, reduces overall P50 per-token latency by 20%–59%, and improves agent P50 time to first token (TTFT) by 1.40–3.05x. These data show that transparent cache management and tiered streaming strategies can deliver substantial throughput and latency gains under real workloads.

You may not have noticed that TideCache's optimizations focus on the memory management layer and do not modify model structures or attention algorithms, so they offer strong generality. For service providers deploying hybrid-architecture models, this approach offers a path to improve serving efficiency without adding hardware.

GB300 and GH200 are NVIDIA's Grace Hopper/Grace Blackwell superchip platforms, which package a Grace CPU and GPU together through a high-bandwidth CPU-GPU interconnect (NVLink-C2C), making the transfer bandwidth between host memory and GPU memory far higher than traditional PCIe connections. This characteristic is crucial for TideCache: the benefit of tiered caching depends on the cost of swap-in and swap-out. The higher the interconnect bandwidth, the lower the cost of placing caches in host memory and retrieving them, making streaming prefetch truly worthwhile.

TTFT (Time To First Token) and per-token latency (TPOT) are two core metrics for inference serving: the former measures the wait from when a user issues a request to when they see the first token, while the latter measures the smoothness of subsequent generation. Agent scenarios are sensitive to both, because multi-turn tool calls repeatedly trigger prefill and decoding.

Implications for Inference Serving Architectures

The popularity of hybrid architectures has made memory management in inference serving systems more complex. TideCache's contribution lies in abstracting the management of heterogeneous caches into a dynamically reorganizable physical page pool, and in transforming memory pressure into controllable transfer overhead through streaming prefetch and scheduling strategies. As superchip platforms (such as GB300 and GH200) become more widespread, CPU-GPU bandwidth and memory hierarchies will become richer, and the value of this kind of fine-grained cache scheduling technology will become even more prominent.

In the future, extending similar ideas to multi-tenant, multi-model mixed deployment scenarios, and coordinating with techniques such as speculative decoding and continuous batching, are directions worth watching.

One-line Summary

TideCache dynamically manages the heterogeneous caches of hybrid-architecture models through a transparent cache pool, streaming prefetch, and request scheduling, significantly improving inference throughput and reducing latency.

Paragraph Summary

Hybrid-architecture models contain both global attention layers, whose caches grow linearly with context, and bounded-state layers, whose caches are fixed in size, making GPU memory difficult to plan statically. TideCache proposes three components for CPU-GPU superchips: a transparent cache pool that reallocates physical pages under fixed virtual addresses so heterogeneous cache components can share the same GPU memory; a cache streamer that exploits computation gaps in bounded-state layers to prefetch global attention layer prefix caches, overlapping transfer with computation; and a scheduler that selects resident or streaming execution based on request size and queue state. Evaluations on GB300 and GH200 across seven configurations show up to 2.04x more agent turns, 20%–59% lower P50 per-token latency, and 1.40–3.05x higher TTFT. The system is implemented in SGLang without modifying model structures.

#TideCache#hybrid LLM inference#transparent cache pool#cache streamer#request scheduler#CPU-GPU superchip#GB300#GH200#KV cache#tiered streaming
Share:

Related articles