atlas

Research map / Architectures and efficiency / Attention and transformers

DeFT: Decoding with Flash Tree-attention for Efficient Tree-structured LLM Inference

ICLR 2025 · Architectures and efficiency › Attention and transformers · approach: Sparse attention for long-context LLMs

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Proposes DeFT, a prefix-aware, load-balanced tree attention kernel (KV-guided grouping plus flattened tree KV splitting) that cuts KV-cache IO for tree-structured LLM decoding, implemented in Triton.

Problem

Attention for tree-structured LLM workloads (few-shot prompting, multi-step reasoning, speculative decoding) repeatedly loads shared-prefix KV cache and suffers poor GPU load balancing, causing redundant IO and low utilization.

Approach

Group queries by KV node (KV-guided grouping) so shared-prefix KV is loaded once, and flatten the tree KV into evenly sized blocks for balanced partitions, using bit causal masks and tree-topology-aware global reduction.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace Radix Attention with DeFT-FlattenLlama3-8B tree-based decoding · Few-shot promptingdecoding latency: 12.37 -> 9.98; 14.08 -> 10.99; 16.54 -> 12.48Helped
Replace Radix Attention with DeFT-FlattenLlama3-8B tree-based decoding · Multi-step reasoningdecoding latency: 104.79 -> 94.67; 69.61 -> 66.95; 11.25 -> 10.90; 17.03 -> 16.10Helped
Replace Radix Attention with DeFT-FlattenLlama3-8B tree-based decoding · Speculative decodingdecoding latency: 54.66 -> 42.23; 69.75 -> 46.60; 108.56 -> 56.96; 188.66 -> 84.27Helped
Add flattened tree KV splitting instead of node-wise KV splitting (ablation)DeFT tree attention · Few-shot prompting b=20attention latency: 10.59 -> 3.47Helped
Add flattened tree KV splitting instead of node-chunk splitting (ablation)DeFT tree attention · Multi-step reasoning Sortingattention latency: 49.63 -> 28.41Helped
Add flattened tree KV splitting instead of node-wise KV splitting (ablation)DeFT tree attention · Multi-step reasoning Keywordattention latency: 6.16 -> 2.57Helped
Add flattened tree KV splitting instead of node-chunk splitting (ablation)DeFT tree attention · Speculative decoding t=64attention latency: 20.28 -> 16.79Helped
Add flattened tree KV splitting instead of node-wise KV splitting (ablation)DeFT tree attention · Speculative decoding t=256attention latency: 41.78 -> 40.56Helped
Use node-chunk splitting instead of node-wise splitting (ablation)DeFT tree attention · Few-shot prompting b=20attention latency: 10.59 -> 8.52Helped
Use node-chunk splitting instead of node-wise splitting (ablation)DeFT tree attention · Speculative decoding t=256attention latency: 41.78 -> 57.26Hurt
Increase prompt length while using DeFT-Flatten (ablation)Llama3-8B multi-step reasoning Sorting · Sorting, prompt length L=1k to L=10kdecoding speedup over Radix Attention: 1.09× -> 1.67×Helped
Use Codellama-34B instead of Codellama-7B (ablation)DeFT-Flatten relative to Radix Attention · Few-shot prompting b=30decoding time speedup: 1.34× -> 1.23×Hurt

Surprising findings

Limitations

Experimental setup

Datasets: APPS Graph-of-Thoughts multi-step reasoning tasks (Sorting, Document, Keyword, Set) Medusa speculative decoding trees

Benchmarks: few-shot prompting (APPS, 4k prompt) multi-step reasoning (Sorting, Document, Keyword, Set) speculative decoding (APPS with Medusa trees)

Metrics: decoding latency (s) attention latency (s) IO (TB) speedup

Baselines: Flash-Decoding Tree Attention-Medusa Radix Attention DeFT-Node DeFT-Node-Chunk

Builds on: FlashAttention Flash-Decoding Medusa SpecInfer tree attention Triton

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy