Agentic large language model (LLM) training often involves multi-turn interaction trajectories that branch into multiple execution paths due to concurrent tool use, think-mode, sub-agent, context management and other runtime designs. As a result, the token produced by a single task naturally forms a tree-structured token trajectory with shared prefixes, rather than a linear sequence. Existing training pipelines linearize such trajectories and treat each branch independently, leading to substantial redundant computation in both forward and backward passes. To eliminate such redundancy, we introduce Tree Training, an efficient training framework for tree-structured trajectories. Its core component, Gradient Restoration, enables correct gradient aggregation across shared prefixes, allowing each prefix to be computed exactly once while remaining mathematically equivalent to independent training on all branches. To support large trajectory trees in practice, we redesign the training engine to natively ingest tree-structured data and propose Tree Packing, a memory-efficient partitioning strategy that preserves high prefix reuse. Experiments conducted on dense and MOE models of real-world agentic trajectories show 6.2x training speedup for both supervised fine-tuning and the model update phase in reinforcement learning.


翻译:智能体大语言模型(LLM)的训练通常涉及多轮交互轨迹,这些轨迹由于并发工具调用、思考模式、子智能体、上下文管理及其他运行时设计而分叉为多条执行路径。因此,单个任务生成的令牌自然形成一个具有共享前缀的树状令牌轨迹,而非线性序列。现有训练流程将此类轨迹线性化并独立处理每个分支,导致前向传播与反向传播中存在大量冗余计算。为消除此类冗余,我们提出了树状训练——一种针对树状轨迹的高效训练框架。其核心组件梯度复原实现了跨共享前缀的正确梯度聚合,使得每个前缀仅需计算一次,同时在数学上等价于所有分支的独立训练。为在实践中支持大规模轨迹树,我们重新设计了训练引擎以原生处理树状数据,并提出了树状打包——一种保持高前缀复用率的内存高效分区策略。在真实世界智能体轨迹的稠密模型与混合专家模型上进行的实验表明,该方法在监督微调与强化学习的模型更新阶段均实现了6.2倍的训练加速。

0
下载
关闭预览

相关内容

大语言模型智能体强化学习:全景综述
专知会员服务
43+阅读 · 2025年12月18日
面向大语言模型的智能体化强化学习图景:综述
专知会员服务
55+阅读 · 2025年9月3日
《大语言模型智能体:方法、应用与挑战综述》
专知会员服务
58+阅读 · 2025年3月28日
基于大语言模型的智能体优化研究综述
专知会员服务
59+阅读 · 2025年3月25日
大语言模型智能体
专知会员服务
97+阅读 · 2024年12月25日
【ACL2024】大型语言模型的稀疏加速训练
专知会员服务
27+阅读 · 2024年6月4日
【普林斯顿】基于大型语言模型的语言智能体认知架构
专知会员服务
77+阅读 · 2023年9月6日
绝对干货!NLP预训练模型:从transformer到albert
新智元
13+阅读 · 2019年11月10日
自然语言处理中的语言模型预训练方法
PaperWeekly
14+阅读 · 2018年10月21日
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
19+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
VIP会员
相关VIP内容
大语言模型智能体强化学习:全景综述
专知会员服务
43+阅读 · 2025年12月18日
面向大语言模型的智能体化强化学习图景:综述
专知会员服务
55+阅读 · 2025年9月3日
《大语言模型智能体:方法、应用与挑战综述》
专知会员服务
58+阅读 · 2025年3月28日
基于大语言模型的智能体优化研究综述
专知会员服务
59+阅读 · 2025年3月25日
大语言模型智能体
专知会员服务
97+阅读 · 2024年12月25日
【ACL2024】大型语言模型的稀疏加速训练
专知会员服务
27+阅读 · 2024年6月4日
【普林斯顿】基于大型语言模型的语言智能体认知架构
专知会员服务
77+阅读 · 2023年9月6日
相关基金
国家自然科学基金
42+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
0+阅读 · 2015年12月31日
国家自然科学基金
2+阅读 · 2015年12月31日
国家自然科学基金
5+阅读 · 2015年12月31日
国家自然科学基金
3+阅读 · 2015年12月31日
国家自然科学基金
4+阅读 · 2014年12月31日
国家自然科学基金
19+阅读 · 2012年12月31日
国家自然科学基金
18+阅读 · 2009年12月31日
国家自然科学基金
17+阅读 · 2008年12月31日
Top
微信扫码咨询专知VIP会员