arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2511.03728cs.AIcs.LG
收藏

通过自适应上下文管理实现高效的设备端代理

Efficient On-Device Agents via Adaptive Context Management

Language Technologies Institute, Carnegie Mellon University(语言技术研究所,卡内基梅隆大学);Samsung Research America(三星美国研究)

Sanidhya Vijayvargiya, Rahul Lokesh

AI总结:

本文提出了一种通过自适应上下文管理实现高效设备端代理的框架,通过动态内存系统、极简序列化格式和即时模式传递机制,显著压缩上下文并提升性能。

摘要:

设备端AI代理提供了个性化、低延迟协助的潜力,但其部署受到有限内存容量的根本限制,这限制了可用上下文。这种减少的实际上下文窗口造成了在支持丰富、具有状态的交互和复杂工具能力之间以及保持设备端可行性之间的权衡。我们通过一个上下文高效的设备端代理框架打破这种权衡,该框架由三个协同优化组成:(1)使用专用LoRA适配器的动态内存系统,将对话历史压缩成结构化的上下文状态对象;(2)用于工具模式的极简序列化格式,以最小化每个工具的token开销;以及(3)一种即时的模式传递机制,仅在选择工具时加载完整的工具定义。我们通过将一个3B参数SLM适应到上下文高效的轨迹中来实例化该框架,并在复杂用户任务上严格评估其与传统基线的对比。我们的代理在性能上与传统基线持平或优于其,同时大幅压缩上下文,实现了初始系统提示上下文超过6倍的减少,并基于交互的 verbosity 实现上下文增长速率的10到25倍的减少,证明了战略上下文管理是解锁强大且持久的设备端AI的关键。

英文摘要:

On-device AI agents offer the potential for personalized, low-latency assistance, but their deployment is fundamentally constrained by limited memory capacity. Context in agentic settings worsens this problem due to large static tool schemas and a growing interaction history that continually expands the persistent KV cache. To maintain on-device feasibility, agents must operate near the minimum task-sufficient context, while preserving task performance. We introduce two complementary mechanisms: (1) a learned intra-session memory architecture that distills trajectories into an append-only Context State Object (CSO), preserving current state and relevant details from previous steps that may have future utility, while still supporting KV-cache reuse, and (2) a just-in-time schema-passing mechanism that loads full tool definitions only upon tool selection. We instantiate this framework by adapting 3B-parameter SLMs and profiling them on smartphone hardware. In our evaluations, CSO-based memory outperforms KV-cache compression and trained summarization while retaining performance near or even above full-history execution. Deployed on-device, our framework reduces initial tool context by over $6\times$ and interaction-context growth by 10-25 times, substantially reducing initial

机构、总结、中文摘要均由AI分析而来,可能存在错误,请以论文正文为准。

↑