Unified Co-Management of KV Cache Blocks and MoE Experts Under Memory Pressure
Manage attention key-value cache blocks alongside mixture-of-experts weights in a unified GPU-host memory pool to prevent long prompts from evicting reusable experts.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
In TIDEWAY's Unified Memory Pool (Section 4.1 and Section 7), space for persistent model states and the full KV cache is statically reserved before partitioning the remaining VRAM and host RAM into uniform expert slots. On long-context agentic workloads up to 128K tokens, this rigid reservation shrinks the available expert pool, forcing more experts onto the NVMe SSD.
“TIDEWAY reserves KV capacity before allocating expert slots, so growing contexts leave less memory for expert residency.”
Limitation
Reserving KV cache capacity up front reduces the effective memory budget for expert residency as context length grows, and prevents the system from trading off KV offloading, sparse KV access, or prefix reuse against costly SSD expert reloads.
Proposed Solution
Extend the Residency Table and Phase Layout Controller to treat paged KV cache blocks and MoE expert slots as unified, evictable objects sharing the VRAM, host RAM, and SSD hierarchy. Implement a joint cost-aware replacement and admission policy that weighs the SSD reload latency of an expert against the PCIe transfer or recomputation cost of a cold KV block, integrating prefix-tree reuse for multi-turn agent prompts and sparse KV block fetching during decode.
The paper’s authors list this direction as future work, so they may already be pursuing it.
Why This Matters
Jointly managing KV blocks and experts is expected to increase effective expert residency on long-context multi-turn traces and reduce SSD thrashing when total context plus weights exceed host RAM.
How to Get Started
How to test it: Test the hypothesis that unified KV-expert eviction outperforms static KV reservation on long-context multi-turn workloads by comparing against unmodified TIDEWAY on 64K–128K TraceLab traces under 32–64 GiB RAM using end-to-end completion time and SSD bytes read; stop if joint management reduces decode throughput by more than 5% due to metadata overhead without lowering total latency.
- Clone the released TIDEWAY repository (https://github.com/Afterglow231/Tideway) and reproduce the DeepSeek-V4-Flash 64 GiB TraceLab baseline metrics.
- Profile KV cache memory footprint versus expert slot miss rates across 32K to 128K context lengths to quantify capacity contention.
- Extend the Residency Table in TIDEWAY's memory manager to track fixed-size paged KV blocks alongside expert slots with configurable eviction weights.
- Benchmark joint KV-expert offloading and prefix reuse against static KV reservation on the 8 TraceLab coding-agent sessions.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Works like PiKV and CECAR study co-aware management or caching between KV caches and Mixture-of-Experts components. However, they do not fully implement a unified residency table and multi-tier replacement hierarchy covering VRAM, RAM, and SSD with cost-aware joint replacement policies as proposed.
- SliceMoE: Bit-Sliced Expert Caching under Miss-Rate Constraints for Efficient MoE Inference · 2026 · 6 citations
- CECAR: Cache & Expert Co-Aware Routing Accelerates On-Device Inference of MoE LLMs · 2026 · 0 citations
- PiKV: KV Cache Management System for Mixture of Experts · 2025 · 7 citations
We searched OpenAlex and arXiv for “joint KV cache expert offloading MoE tiered memory” and “Unified Co-Management of KV Cache Blocks and MoE Experts Under Memory Pressure” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Tideway: Phase-Aware Tiered Memory Management for MoE Inference on Consumer DevicesYifei Wang, Tsun-yu Yang, Yechen Xu +7 more · 2026
This paper introduces TIDEWAY, a phase-aware tiered memory management and execution system for running frontier-scale Mixture-of-Experts (MoE) language models locally on memory-constrained consumer PCs. When model weights exceed GPU VRAM and host RAM and spill onto an NVMe SSD, TIDEWAY unites VRAM and host RAM into a unified pool with phase-specific layouts and paging-resilient CUDA Graph execution, achieving average speedups of 1.97x in end-to-end latency, 2.40x in TTFT, and 1.61x in TPOT over state-of-the-art baselines.
Related Ideas
- Three-Tier NVMe-DRAM-VRAM Expert Hierarchy for Memory-Constrained Consumer HostsFreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution🔴Hard
- Marginal-Latency Controller and Contention Benchmark for Elastic KV-Expert RebalancingFreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution🟠Medium
- Frequency- and Batch-Aware Expert Cache Replacement Beyond Global LRUFreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution🟡Fairly easy
- Bounded Pinned DMA Staging Buffers for Memory-Pinning-Restricted OS EnvironmentsFreeToken: Efficient Edge-Native MoE Serving with Bandwidth-Adaptive Execution🟡Fairly easy
- Dual-Axis KV Sharing: Integrating Joint-KV with Cross-Layer and Prefix-Shared AttentionMulti-Branch Transformer🟠Medium