Skip to content
AI-generated research idea🟠Medium🔬Significant ResearchRelated work found

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

a couple of months

Compute level

Single GPU or less

Resources

Single consumer desktop with a 32 GB GPU (e.g., RTX 5090), 32–128 GiB host RAM, NVMe SSD, open-weight MoE models (DeepSeek-V4-Flash, Qwen3.6-35B-A3B), and TraceLab agent traces.

What the paper used

A single consumer desktop with a 32-core AMD CPU, 251 GiB RAM (capped at 16–128 GiB per model), a 32 GB NVIDIA GeForce RTX 5090 over PCIe 5.0, and an 8 TB WD_BLACK SN850X NVMe SSD; evaluated on Gemma4-26B-A4B (BF16), Qwen3.6-35B-A3B (BF16), and DeepSeek-V4-Flash (FP4) across 270 static-shape configurations (4K–128K input, 128–2K output) and eight multi-turn TraceLab coding-agent traces.

Prerequisites

GPU memory management, paged attention / KV cache systems, and CUDA/Triton systems programming.

Scope

Modify existing TIDEWAY memory manager and attention runtime.

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.”
From the paper, Section 7, page 10. Matched against the PDF text.

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.

  1. Clone the released TIDEWAY repository (https://github.com/Afterglow231/Tideway) and reproduce the DeepSeek-V4-Flash 64 GiB TraceLab baseline metrics.
  2. Profile KV cache memory footprint versus expert slot miss rates across 32K to 128K context lengths to quantify capacity contention.
  3. Extend the Residency Table in TIDEWAY's memory manager to track fixed-size paged KV blocks alongside expert slots with configurable eviction weights.
  4. 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?

Related work found

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.

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 Devices

Yifei 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

Is this a good idea?

Share onXLinkedIn