arXivDaily arXiv每日学术速递 周一至周五更新
arXiv 2610.41177cs.CL
收藏

TraceSpec:理解与改进大语言模型智能体的投机解码

TraceSpec: Understanding and Improving Speculative Decoding for LLM Agents

Huawei Technologies Co., Ltd.(华为技术有限公司)

Jihao Zhao, Shuaishuai Zu, Pengfei Li, Biao Qin, Guanghuan Fang, Ben Feng, Baochuan Yang

AI总结:

本研究提出TraceSpec框架,结合轨迹评估与自适应草稿训练,利用TraceSpec-Traj语料库,提升大语言模型智能体重放吞吐量与接受长度,关联智能体执行分析与草稿改进。

摘要:

大语言模型智能体通过对不断演化的推理、动作及工具反馈历史进行重复的模型调用来执行任务。聚合的投机解码指标会合并这些不同的决策,仅能为草稿监督提供有限的指导。我们提出TraceSpec,这一将轨迹评估与自适应草稿训练相结合的框架,它将动态执行与固定前缀重放相结合,并推出TraceSpec-Traj,一个包含10000个训练状态和2500个测试状态的语料库,涵盖浏览和软件工程领域。对5种投机基线的分析显示,聚合接受率会随上下文长度上升,但在匹配的后期浏览动作中会下降;工作负载和阶段进一步区分了这些趋势,为基于轨迹条件的监督提供了动机。TraceSpec在中间助手轮次上进行训练,并利用基于前缀感知接受差距的状态条件估计来分配固定的预测预算。在3种目标规模和2种温度下,它相比其DSpark基线将重放吞吐量提升了12.5%至22.6%。Qwen3-4B的消融实验表明,自适应分配相比固定全轮次监督将接受长度提升了3.3%至10.0%,额外的比较证实了状态条件和连续token一致性的作用。由此产生的评估资源、轨迹发现和训练策略将智能体执行的分析与实用的草稿改进联系起来。

英文摘要:

LLM agents execute tasks through repeated model calls over evolving histories of reasoning, actions, and tool feedback. Aggregate speculative-decoding metrics merge these distinct decisions, providing limited guidance on where draft supervision is needed. We present TraceSpec, a framework connecting trajectory evaluation with adaptive draft training. It combines dynamic execution with fixed-prefix replay and introduces TraceSpec-Traj, a corpus of 10,000 training states and 2,500 test states spanning browsing and software engineering. Analysis of five speculative baselines reveals that aggregate acceptance can rise with context length while declining within matched late browsing actions. Workload and phase further distinguish these trends, motivating supervision guided by trajectory conditions. TraceSpec trains on intermediate assistant turns and allocates a fixed prediction budget using state-conditioned estimates of prefix-aware acceptance gaps. Across three target sizes and two temperatures, it improves replay throughput by 12.5% to 22.6% over its DSpark base. Qwen3-4B ablations show that adaptive allocation increases accepted length by 3.3% to 10.0% over fixed full-turn supervision, with additional comparisons substantiating the roles of state conditioning and consecutive-token agreement. The resulting evaluation resources, trajectory findings, and training strategy connect the analysis of agent execution to practical draft improvement.

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

↑