arXiv:2606.09613cs.CLcs.AI2026-06

为多轮大模型代理服务设计了硬件感知模拟器,可高效评估调度策略。

AGENTSERVESIM: A Hardware-aware Simulator for Multi-Turn LLM Agent Serving

论文配图:AGENTSERVESIM: A Hardware-aware Simulator for Multi-Turn LLM Agent Serving
图 1 · 摘自论文原文
  • 通过程序级编排与缓存状态跟踪,模拟多轮代理执行过程
  • 在真实系统上误差低于6%,且仅用普通CPU即可运行
  • 适合研究代理服务调度、缓存管理的学者和工程师

多轮大模型代理将模型调用与外部工具调用交织进行,使服务从无状态请求处理转变为有状态程序执行。这要求调度、KV缓存管理和路由策略具备程序级上下文,包括轮次依赖、工具引发的延迟间隙以及可重用的KV状态。直接在真实系统上评估这些策略成本高昂,因每个设计点需在不同到达率、模型规模、实例数量和内存层次结构下占用专用加速器时间。仿真提供可扩展替代方案,但现有大模型服务仿真器针对无状态请求级工作负载,因而忽略了代理服务的核心动态:多轮程序执行、跨轮缓存局部性以及工具间隙期间的KV缓存驻留。我们提出AGENTSERVESIM,一个面向多轮大模型代理服务的硬件感知模拟器。它通过可组合模块以程序粒度评估服务策略:程序协调器保持程序身份和轮次顺序,工具模拟器生成工具引发的延迟间隙,会话感知路由器维护程序到实例的亲和性以实现缓存感知调度,KV驻留模型跟踪策略定义的KV在HBM、主机DRAM/CXL间的放置及淘汰。在真实部署和硬件配置下,AGENTSERVESIM在关键性能指标上与真实系统误差小于6%,且完全运行于通用CPU。结果表明,AGENTSERVESIM可在不依赖昂贵加速器的前提下,实现受控、可重复的代理服务策略探索。

原文摘要 · Abstract (English)

Multi-turn LLM agents interleave model calls with external tool invocations, shifting serving from stateless request processing to stateful program execution. Serving these workloads requires scheduling, KV-cache management, and routing policies that use program-level context, including turn dependencies, tool-induced gaps, and reusable KV state. Evaluating such policies directly on real systems is costly, since each design point may require dedicated accelerator time across arrival rates, model scales, serving-instance counts, and memory hierarchies. Simulation offers a scalable alternative, but existing LLM serving simulators target stateless request-level workloads and therefore omit the core dynamics of agent serving: multi-turn program execution, cross-turn cache locality, and KV-cache residency during tool gaps. We present AGENTSERVESIM, a hardware-aware simulator for multi-turn LLM agent serving. AGENTSERVESIM evaluates serving policies at program granularity through composable modules: a Program Orchestrator preserves program identity and turn order, a Tool Simulator materializes tool-induced gaps, a Session-Aware Router maintains program-to-instance affinity for cache-aware dispatch, and a KV Residency Model tracks policy-defined KV placement across HBM, host DRAM/CXL, and eviction. Across real serving deployments and hardware configurations, AGENTSERVESIM reproduces real-system behavior within 6% error across key performance metrics while running entirely on commodity CPUs. These results show that AGENTSERVESIM enables controlled, repeatable exploration of agent-serving policies without requiring exhaustive deployment on costly accelerators.

大模型服务模拟器缓存管理代理系统

Thank you to arXiv for use of its open access interoperability. PaperDance 不是 arXiv 官方产品;中文卡片由大模型生成,请以原文为准。