Tree Training: Accelerating Agentic LLMs Training via Shared Prefix Reuse
On the map: LLM agents and tool use → General LLM agent frameworks and benchmarks
Abstract (arXiv)
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 tokens produced by a single task naturally form 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. We derive that averaging the loss over all branches independently is algebraically identical to a per-token weighted loss, where each token's weight equals the fraction of branches passing through it. The problem therefore reduces to computing the log-probability of every token in the prefix tree exactly once, with no repeated computation across shared prefixes: we propose DFS serialization of the tree, which visits every token exactly once, and adapt full-attention and SSM layers to ensure the resulting log-probabilities match independent per-branch calculation exactly. In practice, a single trajectory tree can be too large to fit in GPU memory; we therefore propose Redundancy-Free Tree Partitioning, which handles memory-constrained settings with zero redundant computation and peak memory bounded by a single root-to-leaf path. Together, these contributions form Tree Training, an efficient framework for training LLMs on tree-structured trajectories, achieving up to 6.2x end-to-end training speedup on dense and MoE models for both supervised fine-tuning and reinforcement learning.
Key facts. Cited by 4 papers in the map (data through 7 Oct 2026). Placed in General LLM agent frameworks and benchmarks, one of 16 directions in LLM agents and tool use. Builds on 25 of its 36 references that are in the map. First posted on arXiv 1 Nov 2025.
Builds on
25 of 36 references.
References · 25
- 2023Efficient Memory Management for Large Language Model Serving with PagedAttentioncited by 5,767
- 2023Mamba: Linear-Time Sequence Modeling with Selective State Spacescited by 4,616
- 2021RoFormer: Enhanced Transformer with Rotary Position Embeddingcited by 4,581
- 2023Tree of Thoughts: Deliberate Problem Solving with Large Language Modelscited by 3,155
- 2019Megatron-LM: Training Multi-Billion Parameter Language Models Using Model Parallelismcited by 1,829
- 2024Transformers are SSMs: Generalized Models and Efficient Algorithms Through Structured State Space Dualitycited by 1,283
- 2025A-MEM: Agentic Memory for LLM Agentscited by 1,000
- 2024FlashAttention-3: Fast and Accurate Attention with Asynchrony and Low-precisioncited by 507
- 2024Gated Delta Networks: Improving Mamba2 with Delta Rulecited by 483
- 2024ReST-MCTS*: LLM Self-Training via Process Reward Guided Tree Searchcited by 338
- 2025SWE-smith: Scaling Data for Software Engineering Agentscited by 255
- 2024CacheBlend: Fast Large Language Model Serving for RAG with Cached Knowledge Fusioncited by 211
13 more
- 2023CacheGen: KV Cache Compression and Streaming for Fast Large Language Model Servingcited by 199
- 2024Mooncake: A KVCache-centric Disaggregated Architecture for LLM Servingcited by 193
- 2023An LLM Compiler for Parallel Function Callingcited by 170
- 2025LMCache: An Efficient KV Cache Layer for Enterprise-Scale LLM Inferencecited by 119
- 2025SWEET-RL: Training Multi-Turn LLM Agents on Collaborative Reasoning Taskscited by 108
- 2025Agent Lightning: Train ANY AI Agents with Reinforcement Learningcited by 94
- 2025Tree Search for LLM Agent Reinforcement Learningcited by 73
- 2024Granite-Function Calling Model: Introducing Function Calling Abilities via Multi-task Learning of Granular Taskscited by 52
- 2024FlashMask: Efficient and Rich Mask Extension of FlashAttentioncited by 18
- 2024Do Large Language Models Need a Content Delivery Network?cited by 15
- 2025Prefix Grouper: Efficient GRPO Training through Shared-Prefix Forwardcited by 9
- 2024Accelerating Direct Preference Optimization with Prefix Sharingcited by 3
- 2025One-Pass to Reason: Token Duplication and Block-Sparse Mask for Efficient Fine-Tuning on Multi-Turn Reasoningcited by 1
Built on by
Citing papers per year: 2026: 4.
4 papers.
- 2026KAT-Coder-V2 Technical Reportcited by 7
- 2026AREAL-DTA: Dynamic Tree Attention for Efficient Reinforcement Learning of Large Language Modelscited by 1
- 2026Rollplex: Cross-Phase GPU Spatial Sharing for Vision Language Model Post-Trainingcited by 1
- 2026QwenGyre: An Elastic Reinforcement Learning Framework for Training xLong-Horizon Agentscited by 0
- 2026QwenGyre: An Elastic Reinforcement Learning Framework for Training xLong-Horizon Agents27 Sep 2026
- 2026Rollplex: Cross-Phase GPU Spatial Sharing for Vision Language Model Post-Training14 Aug 2026
- 2026KAT-Coder-V2 Technical Report29 Mar 2026
- 2026AREAL-DTA: Dynamic Tree Attention for Efficient Reinforcement Learning of Large Language Models31 Jan 2026
Similar, not cited
Close in wording, no citation either way
- 2024Designing Algorithms Empowered by Language Models: An Analytical Framework, Case Studies, and Insights
- 2025The Automated LLM Speedrunning Benchmark: Reproducing NanoGPT Improvements
- 2024Offline Training of Language Model Agents with Functions as Learnable Weights
- 2025Can Compressed LLMs Truly Act? An Empirical Evaluation of Agentic Capabilities in LLM Compression
- 2025Speed Always Wins: A Survey on Efficient Architectures for Large Language Models
- 2025Youtu-LLM: Unlocking the Native Agentic Potential for Lightweight Large Language Models
- 2025Training LLM-Based Agents with Synthetic Self-Reflected Trajectories and Partial Masking
- 2024Training Agents with Weakly Supervised Feedback from Large Language Models