KV-streams for Efficient Compaction in Agentic Reinforcement Learning

Emiliano Penaloza, Dane Malenfant, Dheeraj Vattikonda, Roger Creus Castanyer, Siddarth Venkatraman +13 more
9/28/2026
cs.LGcs.AI

No confident code implementation found for this paper.

Abstract

Scaling the horizon of agentic LLMs is bottlenecked by the need to fit ever longer context traces in GPU memory. Context compaction has been the most popular mechanism to alleviate this issue, keeping GPU memory constant for a given trace. Unfortunately, most compaction strategies rely on prefilling the LLM context many times over, hindering training throughput. To alleviate this bottleneck and enable efficient trainable compaction, we propose KV-streams, a plug-and-play strategy compatible with any compaction strategy that substantially increases throughput while showing no evidence of hindering performance. KV-streams enable scalable compaction by streaming the KV cache forward rather than flushing it after each compaction. We show that KV-streams enable three different compaction strategies, achieving a 2.6 to 5x wall-clock speedup in training. Beyond efficiency, we find that the streamed KV cache can act as a recurrent state, carrying forward information that has long since disappeared from the context. Specifically, in a controlled setting we show that, contrary to prior work, RL alone is all that is needed for this behavior to emerge. Overall, we show KV-streams to be an efficient and lightweight plug-and-play addition to any post-training pipeline.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. Any repos shown below are weak matches — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{penaloza2026kvstreams,
  title  = {KV-streams for Efficient Compaction in Agentic Reinforcement Learning},
  author = {Emiliano Penaloza and Dane Malenfant and Dheeraj Vattikonda and Roger Creus Castanyer and Siddarth Venkatraman and Abhay Puri and Jonathan Light and Matthew James Sargent and Augustine N. Mavor-Parker and Massimo Caccia and Lucas Caccia and Glen Berseth and Esmeralda S. Whitammer and Alessandro Sordoni and Minseon Kim and Marc-Alexandre Côté and Laurent Charlin and Guillaume Lajoie},
  year   = {2026},
  eprint = {2609.35750},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2609.35750v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2609.35750.svg)](https://codeofpaper.com/paper/2609.35750)

Discussion