Skip to content

ICML papers

Search ICML papers by title, author, or track. Open a paper’s abstract to read more.

Explore the ICML analysis

Search results

521–540 of 607

  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Prelude: Execution-Class Aware Serving for Decision-Style LLM Inference

    Minzhou Pan, Yuzhou Nie, Ruilin Zhou, Yuheng Tang, Jingyang Zhang, Dawn Song, Bo Li, Wenbo Guo

    Abstract

    Foundation-model inference is usually served through a single chat-oriented runtime even when requests have very different resource lifetimes. We present **Prelude**, a resource-adaptive serving framework for decision-style LLM inference: judges, reward models, safety classifiers, routers, rerankers, embedding models, and prompt-logprob extractors that read a prompt and return a fixed-size artifact or at most one token. Prelude classifies work into *OneShot*, *Mixed*, and *Decode* execution classes, avoiding per-request paged-decode state for fixed-output work while preserving the standard paged-KV path for open-ended generation. It also performs prefix-aware OneShot planning and uses an inference-only tokenizer, *fasttoken*, to remove CPU-side overhead from the same hot path. On H200, Prelude reaches $16{,}311$ input tok/s on a Qwen3-0.6B prefill-only benchmark, achieving $2.08\times$ vLLM and $3.85\times$ SGLang. It also reaches $186.7$ req/s on Qwen3-4B at concurrency 96. A multi-token decode control closes the gap to $1.03\times$ vLLM, showing that the gains come from execution-class adaptation rather than a uniformly faster forward kernel.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Ghosted Layers: Unconstrained Activation Alignment for Recovering Layer-Pruned LLMs

    Vincent-Daniel (Juyoung) Yun, Junhyuk Jo, Sai Praneeth Reddy Karimireddy, Sunwoo Lee

    Abstract

    Layer pruning removes entire Transformer decoder blocks from large language models, but introduces a mismatch between the hidden state received by the next surviving layer and the distribution it was trained to process, leading to significant performance degradation. We propose Ghosted Layers, a training-free recovery module that addresses this issue by solving a boundary activation alignment problem. Our method derives a closed-form optimal linear operator from a small calibration set to reconstruct the activation discrepancy introduced by the pruned layers. We show that this solution corresponds to the unconstrained optimum of the alignment objective, whereas existing methods are restricted to constrained solutions over limited operator subspaces. Experiments across multiple LLM backbones and pruning strategies demonstrate that our method consistently improves accuracy and perplexity over prior training-free baselines, while preserving the efficiency gains of layer pruning.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    MatMLA: Matryoshka Multi-Head Latent Attention

    Kevin Li, Berlin Chen, Caitlin Wang, Aakash Lahoti, Albert Gu, Tri Dao

    Abstract

    Language models are increasingly deployed under diverse inference constraints, from low-latency interactive serving to higher-quality generation with larger compute budgets. Matryoshka-style Transformers address this setting by exposing multiple compute-quality operating points within a single set of weights, avoiding the need to train, store, and serve separate models for each budget. In parallel, multi-head latent attention (MLA) improves autoregressive decoding by replacing full per-head Key-Value (KV) caches with a compact latent cache. These ideas target complementary aspects of inference efficiency: Matryoshka controls the compute budget, while MLA controls the cache footprint. We introduce Matryoshka Multi-Head Latent Attention (MatMLA), a Matryoshka-style extension of MLA that exposes multiple attention-head budgets within a single latent-attention module. MatMLA inherits the compact KV cache of MLA while adding the nested sub-model structure of Matryoshka-style attention. This also resolves a key limitation of nested Multi-Head Attention (MHA): varying the active head count during inference requires irregular KV-cache layouts or full caches with inactive heads, whereas MatMLA's fixed-size latent cache gives all sub-models a shared memory format. We show that a 210M-parameter MatMLA model trained on 4.2B FineWeb-Edu tokens with nested head budgets of 12, 8, and 4 heads achieves perplexities close to the corresponding fixed-head MLA baselines, while preserving MLA's compact KV cache and enabling a shared nested parameterization across compute budgets.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    GreenMoE: Exploiting Dynamic Load Imbalance for Energy-Efficient Long-Context MoE Training

    Lilaiyi, Zhenheng Tang, Peijie Dong, Qiang Wang

    Abstract

    Large language model training increasingly combines long-context data with mixture-of-experts (MoE) architectures, but this setting also exposes a practical energy-efficiency problem: dynamic sequence packing and expert routing create substantial load imbalance across GPUs. Many energy-saving methods rely on static execution assumptions or reduce frequency on phases that may become critical, which can harm training throughput. We present GreenMoE, a dynamic-load-aware frequency scaling framework that treats non-critical-path waiting time as an energy-saving opportunity. GreenMoE estimates the load of Attention and MoE blocks at runtime, selects GPU core frequencies that satisfy a critical-path time constraint, and applies the selected frequencies through an asynchronous CUDA-event-based controller. In representative single-node configurations, GreenMoE reduces per-GPU step energy by 8.63% with 3.75% step-time overhead in a 64K setting and by up to 10.20% with larger overhead; in a constructed Attention-heavy setting, it reduces non-critical GPU energy by 16.15% with 0.23% overhead.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Multi-Token Prediction via Self-Distillation

    John Kirchenbauer, Abhimanyu Hans, Brian Bartoldson, Micah Goldblum, Ashwinee Panda, Tom Goldstein

    Abstract

    Existing techniques for accelerating language model inference, such as speculative decoding, require training auxiliary speculator models and building and deploying complex inference pipelines. We consider a new approach for converting a pretrained autoregressive language model from a slow single next token prediction model into a fast standalone multi-token prediction model using a simple online distillation objective. The final model retains the exact same implementation as the pretrained initial checkpoint and is deployable without the addition of any auxiliary verifier or other specialized inference code. Our method produces models that decode more than $3\times$ faster at $<5\%$ drop in accuracy on GSM8K relative to the single token decoding performance of the same checkpoint.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    StreamAttention: Energy-Efficient and High-Utilization Attention on Systolic Hardware

    Olav Førland, H. T. Kung

    Abstract

    Attention computation represents the dominant cost in modern transformers as it grows quadratically with the sequence length. FlashAttention [Dao et al., 2022] cuts the memory cost through tiling and online softmax computation. But the underlying hardware itself remains the bottleneck. Modern accelerators are optimized for matrix multiplication, while the non-linear softmax operation is typically offloaded to much lower-throughput vector units, leading to pipeline stalls. We present StreamAttention, an accelerator co-designed with FlashAttention-2 [Dao, 2023] that sustains continuous streaming of operands on a single systolic array of multiply-accumulate (MAC) units. We map online attention to MAC recurrences that fit the systolic dataflow exactly, and evaluate the softmax exponential as a Chebyshev polynomial with the same MAC units. A four-stage pipeline overlaps every attention phase with no idle cycles between tiles, keeping operands continuously streaming through the array. StreamAttention achieves 95–98% utilization against $\sim$40% for the closest peer SystolicAttention [Lin et al., 2025]. We demonstrate that the Chebyshev approximation has negligible impact on Llama-3.2-1B (WikiText-103 Perplexity), ViT-Base (ImageNet Top-1), and BERT-Large (SQuAD F1). Furthermore, fusing softmax onto the array eliminates per-tile SRAM round-trips of the score and softmax matrices, cutting per-layer attention energy by up to $\sim$2.8$\times$ and average attention power by up to $\sim$2.9$\times$ compared to our baseline. This comes at the cost of a $\sim$34% area overhead and +6% power on pure matrix multiplication over a standard systolic-based matrix unit. We synthesize against the open source SkyWater 130 nm process design kit for area and power, and SRAM energies are from CACTI 7 at 90 nm.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    SparseSAM: Structured Sparsification of Activations in Segment Anything Models

    Hoai-Chau Tran, Chi H Nguyen, Duy Nguyen, Mathias Niepert, Fan Lai, Khoa Doan

    Abstract

    The Segment Anything Model (SAM) achieves strong open-vocabulary segmentation, but its ViT-based image encoders dominate inference latency and memory. Existing activation compression methods, such as token merging, reduce the token length to process, yet introduce non-trivial runtime overhead and encounter catastrophic quality drop under high compression. Other methods applying Sparse Attention focus on attention alone, leaving the MLP fully dense and capping achievable speedup. We propose \emph{SparseSAM}, a \textit{(i) training-free structured sparsification} framework that jointly accelerates attention and MLP layers while preserving token identity. SparseSAM introduces \textit{(ii) Stripe-Sort Attention}, which uses a deterministic Z-order permutation to transform dense attention into static hardware-friendly sparse patterns, eliminating dynamic masking overhead. SparseSAM further introduces a \textit{(iii) Residual-Consistency MLP} that routes only informative tokens through the MLP while propagating remaining tokens through the residual pathway. Across four segmentation benchmarks, SparseSAM loses only 0.004 mIoU at a 0.4 density and 0.021 mIoU at 0.3, a 2.10× reduction in accuracy loss versus token merging advances, while achieving 2x faster inference and 2.8× memory reduction.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    When Good Enough Is Optimal: Multiplication-Only Matrix Inversion Approximation for Quantized Gated DeltaNet

    Luoming Zhang, Yuwei Ren, Kui zhang, Tian Liu, Lingjuan Ge, Denghao Li, M. Harper Langston, Yin Huang, Weiliang W Zeng, liang zhang

    Abstract

    Matrix inversion in chunk-wise parallel linear attention is a major bottleneck for long-context modeling, particularly on NPUs, where forward-substitution-based methods exhibit limited parallelism and poor hardware utilization. We propose a fast, Matrix Multiplication (MatMul)-based algorithm tailored for strictly lower-triangular matrices arising in chunk-wise linear attention. Motivated by the rapid growth of Neumann-series terms and the diagonal concentration of the inverse matrix, we employ a truncated Neumann expansion with structural masking and parallel residual correction to eliminate sequential dependencies. We further extend our method to low-bits INT by mitigating the dynamic range expansion arising from repeated matrix power operations, and adapt the approximation order and residual step to the chunk size to minimize computational cost while preserving the model’s accuracy. Experiments on Qwen3.5-family models demonstrate up to 5$\times$ kernel-level speedup and a 20\% reduction in decode-layer overhead, while preserving accuracy under both floating-point and low-precision inference. Our method offers an efficient and hardware-friendly solution for scalable linear attention.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Vitality-Aware Compression for Efficient Image-to-Shape Diffusion Transformers

    Jaeah Lee, Hyunjin Kim, Jaewoong Cho, Gihyun Kwon

    Abstract

    Image-to-shape Diffusion Transformers (DiTs) achieve high geometric fidelity but their backbones often exceed 2.5 GB, while existing diffusion compression methods designed for image or video transfer poorly to 3D synthesis. We propose the first vitality-aware adaptive compression framework for image-to-shape DiTs, scoring each layer via per-layer ablation with Earth Mover’s Distance on generated point clouds. The resulting non-uniform importance, with distinct double vs. single-block patterns, guides structured pruning, mixed-precision quantization, and selective fine-tuning under block-type-specific thresholds. Across three state-of-the-art models, our method achieves up to 66% model-size reduction while preserving synthesis quality, demonstrating a favorable quality–resource trade-off and a plug-and-play path to efficient 3D foundation models.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Rethinking Layer Redundancy in Large Language Models: Calibration Objectives and Search for Depth Pruning

    Minkyu Kim, Vincent-Daniel (Juyoung) Yun, Youngrae Kim, YoungJin Heo, Suin Cho, Seong-hun Kim, Woosang Lim, Gaeul Kwon

    Abstract

    Depth pruning improves the inference efficiency of large language models by removing Transformer blocks. Prior work has largely treated layer redundancy as an inherent structural property of pretrained networks, emphasizing importance criteria and search algorithms for identifying removable layers. In contrast, we adopt a \emph{functional perspective}, where redundancy depends jointly on the model and the calibration objective, suggesting that a universal layer ranking may not exist. Through an empirical study across three LLM families, two calibration objectives, and seven search algorithms, we find that different objectives produce qualitatively different pruning patterns, while perplexity and downstream reasoning accuracy rankings often fail to align. In contrast, under a fixed objective, different search algorithms tend to converge to similar pruning solutions. Overall, our results suggest that the calibration objective may play a larger role than the particular search algorithm in determining which layers appear redundant.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    One Simple Trick for Improving the Performance of Energy-Limited Local Inference and Training

    Erik Schultheis, Maximilian Kleinegger, Dan Alistarh

    Abstract

    Energy supply and heat dissipation are two of the main challenges with modern GPU deployments. While typically discussed in the context of new datacenter constructions, the same constraints also apply to small form-factor consumer devices, such as the DGX spark. In workloads characterized by alternating compute-intensive tasks such as matmuls with memory-bound operations such as norms or cross-entropy, the compute-intensive parts might hit power and/or thermal limits and start throttling. In this short paper, we show that chunking the workload into smaller parts that alternate compute and memory in higher frequencies, these power and temperature spikes can be smoothed out, preventing throttling and resulting in considerably faster wallclock time and reduced total energy consumption. We present several scenarios in which this effect can be exploited on a DGX Spark with up to 20% performance and energy improvements, and demonstrate that the same phenomenon also happens on less constrained systems, such as a multi-GPU server, albeit at significantly reduced effect size of 1-2%.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Structure-Preserving Adaptive Post-Training Quantization for Monocular Depth Estimation

    Jaemin Choi, Jincheol Yang, NaHyun Lim, Yunseong Jeong, Matti A Zinke, Hyunwoo Yu, Suk-Ju Kang

    Abstract

    Monocular Depth Estimation (MDE) foundation models such as Depth Anything achieve strong generalization across diverse scenes, but their high computational and memory costs hinder efficient deployment. Post-Training Quantization (PTQ) offers a practical compression strategy, yet low-bit PTQ for MDE remains challenging because quantizing query and key projections independently fails to preserve their induced attention maps, while accumulated quantization errors cause distribution shifts in intermediate features. To address these challenges, we propose SPA-Q, a Structure-Preserving Adaptive PTQ framework for MDE. SPA-Q introduces Attention-Preserving Calibration (APC), which calibrates quantization parameters by directly preserving the full-precision attention distributions, and Channel-Wise Distribution Alignment (CWDA), which mitigates quantization-induced feature distribution shifts through channel-wise affine transformations that are absorbed into the weights after training. Experiments on NYUv2 and KITTI show that SPA-Q consistently improves 4-bit quantization performance over existing PTQ methods, reducing AbsRel by 29.5\% and improving $\delta_1$ by 20.2\% on average.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Latent Cache Flow: Model-to-Model Communication Without Text

    Maximillian Rossi, Prajwal Raghunath, Eugene Wu

    Abstract

    LLM agents today communicate via text, which incurs considerable latency and information loss due to the need to autoregressively decode the sharer model's state and encode at the receiver model. Recent work such as Cache-to-Cache seeks to exchange KV caches by learning adapters that translate sharer KV matrices to the receiver model. However, the adapters are large and expensive to train, and translate individual tokens, which requires the target context to be identical. This is unsuitable for agent communication, where the LLMs have differing context. We introduce Latent Cache Flow (LCF). To address efficiency, we observe that keys and values can be jointly translated and compressed, reducing the adapter to about 4% of C2C's size. To address differing context, we design the adapter to transmit a summary of new information that the target model does not have. Our early experiments show that a 13 MB LCF adapter can be more accurate than a 956 MB C2C adapter in shared-context settings; for different contexts, LCF is 23% more accurate and 8.5 times faster than text-based communication.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    EntropyCache: Decoded Token Entropy Guided KV Caching for Diffusion Language Models

    Minsoo Cheong, Donghyun Son, Woosang Lim, Sungjoo Yoo

    Abstract

    Diffusion-based large language models (dLLMs) rely on bidirectional attention, which prevents lossless KV caching and requires a full forward pass at every denoising step. Existing approximate KV caching methods reduce this cost by selectively updating cached states, but their decision overhead scales with context length or model depth. We propose EntropyCache, a training-free KV caching method that uses the maximum entropy of newly decoded token distributions as a constant-cost signal for deciding *when* to recompute. Our design is grounded in two empirical observations: (1) decoded token entropy correlates with KV cache drift, providing a cheap proxy for cache staleness, and (2) feature volatility of decoded tokens persists for multiple steps after unmasking, motivating recomputation of the $k$ most recently decoded tokens. The skip-or-recompute decision requires only $O(V)$ computation per step, independent of context length and model scale. Experiments on LLaDA-8B-Instruct and Dream-7B-Instruct show that EntropyCache achieves 15.2×–26.4× speedup on standard benchmarks and 22.4×–24.1× on chain-of-thought benchmarks against vanilla baselines, with competitive accuracy and decision overhead accounting for only 0.5% of inference time.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Sigmoid Attention as a Better Substrate for Learned KV Cache Eviction

    Isaac Li

    Abstract

    Learned KV-cache eviction often faces a soft-to-hard mismatch: during training, differentiable gates typically attenuate token contributions, whereas inference saves memory only when KV entries are physically removed. We ask whether the attention substrate affects this soft-to-hard transition. Using GPT-2-scale Transformers trained on OpenWebText, we run a controlled $2\times2\times2$ comparison over attention type, learned gating, and positional encoding. Although sigmoid attention is worse as a dense language model, learned hard eviction changes the useful operating points: sigmoid-gated models delete KV entries with negligible PPL change relative to their own no-eviction references. Under a matched live-cache protocol on the same dense backbones, learned sigmoid gates obtain lower PPL than our H$_2$O and KeyDiff implementations, whereas softmax gates do not uniformly beat these post-hoc methods. The results suggest that attention normalization can substantially affect whether a training-time soft gate transfers cleanly to hard KV deletion.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Relaxed On-Policy Distillation: Selective Credit Allocation for Scaling Reasoning Efficiently

    Jongwoo Ko, Sara Abdali, Young Jin Kim, Tianyi Chen, Pashmina Cameron

    Abstract

    On-policy distillation (OPD) is a promising approach for transferring reasoning capabilities to capacity-constrained models, yet sampled-token OPD often suffers from entropy collapse and negative transfer. We identify uniform credit allocation as a key bottleneck: existing objectives obtain dense teacher feedback on student-generated trajectories, but apply it uniformly across sampled tokens despite highly heterogeneous token-level signals. Most tokens carry redundant near-zero credit, while rare heavy-tailed negative credits can dominate updates and prematurely suppress plausible reasoning trajectories. We introduce REOPOLD (Relaxed On-Policy Distillation), a framework that relaxes this uniform assignment by controlling where teacher feedback is applied, how strongly it affects the update, and when the allocation rule changes during training. Across diverse reasoning tasks, REOPOLD improves sampled-token OPD over recent post-training baselines with up to 12$\times$ higher sample efficiency, and extends to cross-vocabulary distillation, self-distillation, and test-time scaling.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Multi-Mixer Models: Flexible Sequence Modeling with Shared Representations

    Kevin Li, Asher Trockman, Ananda Suresh, Ziteng Sun

    Abstract

    Softmax attention is the cornerstone of modern large language models but is hindered by its linear memory and quadratic compute requirements. Linear recurrent models, such as linear attention and state space models, have become widely studied as alternatives due to their linear compute and constant memory requirements. While these sub-quadratic methods achieve promising efficiency gains and competitive results on a wide range of benchmarks, current linear recurrent models still lag behind on tasks that require long-context retrieval or in-context learning, resulting in a growing body of work on hybrid architectures. In this work, we propose Oryx, which explores a new axis of developing hybrid models: across the sequence, the model has the ability to operate with different mixers, e.g., quadratic attention and linear recurrences, rather than fixing a single mixer throughout. Oryx ties more than 90% of its parameters across mixer types, enabling attention and recurrent modes to operate over shared internal representations. We validate our design with Mamba-2 and Gated DeltaNet variants up to the 1.4B model scale. Under fixed token budgets and a mixed-training strategy, all modes of the 1.4B Oryx outperform their respective baselines by at least 0.7 percentage points on average on downstream language modeling evaluations. On retrieval tasks, Oryx achieves performance comparable to the Transformer baseline even when processing only a tiny fraction (<10%) of the tokens in the attention mode. These results suggest that attention and linear recurrent models can share internal representations, and motivate sequence-axis hybridization as a promising direction for efficient long-context language models.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    DropKV: Decoupling Residual-Output Perturbation for Near-Optimal KV-Cache Eviction

    Aozhong Zhang, Selcuk Gurses, Yanxia Deng, Naigang Wang, Chi-Chun Liu, Davis Wertheimer, Derrick Liu, Xin Li, Zi Yang, Felix X.-F. Ye, Penghang Yin

    Abstract

    Key-value (KV) cache management has become a critical bottleneck for scaling Large Language Models (LLMs) to long-context scenarios due to linear memory growth. While recent eviction methods have moved beyond simple attention-score heuristics to incorporate value representations, they typically face a fundamental trade-off: the underlying optimization for minimizing output perturbation is an NP-hard combinatorial problem, leading to mathematically suboptimal heuristics or implementations that are difficult to kernelize. In this work, we propose DropKV, a simple principled eviction framework based on Decoupled Residual-Output Perturbation. By decoupling the joint eviction decision into independent per-token scoring, DropKV circumvents combinatorial intractability and admits a provable constant-factor approximation guarantee under a cone condition that we empirically verify on three long-context LLMs. To ensure practical viability, we provide a high-performance implementation using fused Triton kernels that avoid materializing the full attention matrix, delivering a 19.8$\times$ scoring-kernel speedup that translates to up to a 9.9\% matched-batch end-to-end prefill speedup. Extensive evaluations on the RULER and LongBench benchmarks demonstrate that DropKV consistently outperforms state-of-the-art baselines at equivalent cache budgets, achieving the lowest inference latency among eviction methods while also remaining faster than the dynamic cache baseline.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Is Escalation Worth It? A Decision-Theoretic Characterization of LLM Cascades

    Dylan Bouchard

    Abstract

    Model cascades, in which a cheap LLM defers to an expensive one on low-confidence queries, are widely used to navigate the cost-quality tradeoff at deployment. Existing approaches largely treat the deferral threshold as an empirical hyperparameter, giving limited guidance on the geometry of the resulting cost-quality frontier over a model pool. We develop a decision-theoretic characterization of deterministic threshold cascades over a model pool: two-model frontiers are piecewise concave on decreasing-benefit regions, the two-model pool frontier is the pointwise envelope over pairwise cascades, and fixed $k$-model cascades satisfy stagewise first-order conditions that equalize marginal quality-per-cost. Across five benchmarks and eight models, full fixed chains underperform the pairwise envelope and optimized subsequence cascades add little on held-out data. A lightweight pre-generation router beats the best cascade policy on four of five datasets, suggesting that cascade performance is limited more by paying the cheap model before escalation than by a shortage of intermediate stages.

    Abstract source
  • ICML · Workshop · AdaptFM: Resource-Adaptive Foundation Model Inference

    Cache You Later: Post-Compression KV Repair for Long-Context Agentic LLM Inference

    Andrew Rusli, Shreyan Paliwal, Henry Zhang, Michael Jiao

    Abstract

    As large language models (LLMs) support longer contexts and more capable agentic sessions, what matters in the accumulated context can change with each new query, tool output, test result, or browser observation. At the same time, inference still depends on a limited active key-value (KV) cache, and many existing KV-cache compression methods decide which past tokens stay active from the current prefix. As a result, tokens that matter in later turns may already have been evicted or compressed away in earlier compression decisions. We study post-compression KV cache repair, a runtime mechanism that restores previously evicted tokens to the active cache. RepairKV uses the interval between turns to reevaluate which tokens are important from evicted KV rows stored in a slower memory tier, then promotes a small subset before decoding resumes. Controlled experiments show that RepairKV's restoration of evicted tokens improves retrieval accuracy, with the effect persisting across relevance changes and different initial eviction policies, and a preliminary diagnostic on open-source repositories shows the same pattern; on Qwen2.5-7B-Instruct at 32K context, RepairKV achieves 91.0% retrieval on a four-query needle-in-a-haystack task versus 24.5% for the matched no-repair baseline at the same active-cache budget, with only 96 promoted tokens.

    Abstract source