Fixed-Size Key-Value Prefix Compression for Multi-Expert Soft Prompts
Compress multi-expert soft-prompt sequences into fixed-size key-value cache prefixes to decouple inference memory footprint from the number of active domain experts.
Time
Compute level
Resources
What the paper used
Prerequisites
Scope
The Gap
In Section 2.2 and Section 5, CSPD concatenates continuous soft-prompt embedding vectors directly into the input system message prefix. Each soft prompt adds 256 vector positions to the context, causing linear growth in KV-cache size and attention computation as more experts are composed.
“Each prompt adds 256 positions to the context, so attention and KV-cache costs grow with the number of composed experts.”
Limitation
Scaling CSPD to dozens of domain experts severely increases context memory footprint and attention overhead during prefill and generation.
Proposed Solution
Train a lightweight cross-attention encoder or KV-cache compression module that maps concatenated multi-prompt sequences into a fixed-length set of key-value vectors (e.g., 64 positions). Use a distillation loss between the uncompressed multi-prompt KV-cache attention outputs and the compressed KV-cache attention outputs across sample outputs to preserve performance while fixing context length.
The paper’s authors list this direction as future work, so they may already be pursuing it.
Why This Matters
Successfully compressing multi-expert soft prompts would allow scaling CSPD to hundreds of modular domain experts without context length degradation or memory explosion.
How to Get Started
How to test it: Test whether a compressed 64-token KV prefix matches uncompressed 4-prompt CSPD (1024 tokens) on AIME24, LCB v5, GPQA, and IFBench average score within 0.5 percentage points. Baseline is standard concatenated CSPD. Stop if compressed KV score drops more than 2 percentage points.
- Download released CSPD checkpoints and Qwen3-4B-Base backbone from GitHub repository.
- Implement a prefix compression module that projects concatenated KV-caches of 4 prompts down to 64 key-value slots.
- Train the compressor module on multi-domain distillation datasets using KL divergence loss against uncompressed CSPD output distributions.
- Evaluate aggregate benchmarks (AIME24, LiveCodeBench, GPQA, IFBench) and benchmark KV-cache memory saving during SGLang inference.
Suggested by AI. Adapt it to your setup.
Has This Been Done?
Papers like KV-Kaizen and TraceKV explore KV cache compression and policy preservation, while PERSOMA and InfoPrompt examine soft prompt tuning and adapters. However, none of the listed results combine distillation-based KV cache compression specifically for multi-expert soft prompts into a fixed-length prefix.
- KV-Kaizen: Learning Context-Adaptive Cache Compression Choices · 2026 · 1 citations
- RIFT: KV Cache Compression for Draft Models with Complementary Compressibility Training · 2026 · 0 citations
- TraceKV: Policy-Preserving Low-Rank KV Cache Compression for Reasoning Vision-Language Models · 2026 · 0 citations
- PERSOMA: PERsonalized SOft ProMpt Adapter Architecture for Personalized Language Prompting · 2024 · 26 citations
- InfoPrompt: Information-Theoretic Soft Prompt Tuning for Natural Language Understanding · 2023 · 78 citations
We searched OpenAlex and arXiv for “soft prompt compression KV cache prefix distillation multi expert” and “Fixed-Size Key-Value Prefix Compression for Multi-Expert Soft Prompts” and an AI compared the idea with the top 10 results. A small search can miss relevant work.
Source Paper
Composable Soft-Prompt Distillation of RL Experts: Toward Continual Post-TrainingZhen Zhang, Changyi Yang, Xuehai He +25 more · 2026
This paper presents Composable Soft-Prompt Distillation (CSPD), a method for continual post-training of large language models that keeps the base pre-RL model frozen and distills each post-RL domain expert into an independent soft prompt. At inference, these soft prompts are concatenated directly in the system prompt without joint training or modifying model weights. CSPD recovers over 90% of teacher gains across math, code, and agent benchmarks, matches multi-teacher on-policy distillation in-domain, and provides superior out-of-domain generalization with minimal serving overhead.
Related Ideas
- Learned Dynamic Prefill Chunk Fetching for Unbounded Multi-Page Document ParsingUnlimited OCR Works🔴Hard
- Dual-Axis KV Sharing: Integrating Joint-KV with Cross-Layer and Prefix-Shared AttentionMulti-Branch Transformer🟠Medium
- Prompt-Relevant Historical Memory Retrieval and Entropy-Calibrated Layer-Head KV CompressionMovieRoll: A Systematic Framework for Rolling Out Long-Form Videos🟡Fairly easy
- Foveated Spatial KV Compression and Sparse Attention for Interactive 720p Video GenerationFastFrames: Video Generation at Interactive Latency🔴Hard
- Graph-Compatible Dynamic Sparse Attention for End-to-End Prefix CaptureTideway: Phase-Aware Tiered Memory Management for MoE Inference on Consumer Devices🟡Fairly easy