智能体睡一觉,推理更强
该论文提出一种睡眠压缩机制,让模型每N步进行离线递归处理将上下文写入持久快速权重,然后清除KV缓存。在细胞自动机、多跳图检索和数学推理任务上,该方法比纯Transformer和SSM-Attention混合模型效果更好,睡眠时间越长性能提升越大。这为长时智能体提供了替代方案,通过压缩和遗忘原始token来避免注意力二次计算开销。
Language models need "sleep"
Language models need "sleep" DAIR.AI @dair_ai // Language Models Need Sleep // Let your agents "sleep", folks. On a serious note, this is a fascinating paper on getting the most from long-horizon agents. Here is the problem with agents today: Attention scales badly with context length, so long-horizon agents keep paying a quadratic tax at inference time. This work proposes a sleep-like consolidation step instead. The model periodically does N offline recurrent passes over recent context, writes the result into persistent fast weights in its state-space blocks, then clears the KV cache. The effect is that extra compute moves to sleep while wake-time prediction stays low latency. On cellular automata, multi-hop graph retrieval, and a math reasoning task where a plain transformer and SSM-attention hybrids fail, longer sleep durations improve performance, with the biggest gains on examples that need deeper reasoning. Why does it matter? It points at an alternative to ever-larger KV caches for agents that run for a long time. Consolidate, then forget the raw tokens. Paper: arxiv.org/abs/2605.26099 Learn to build effective AI agents in our academy: academy.dair.ai 🔗 View Quoted Tweet 💬 3 🔄 2 ❤️ 7 👀 657 📊 4 ⚡