paper-with-me

Papers

Tree Attention: Topology-aware Decoding for Long-Context Attention on GPU clusters

2024-08-07 · Vasudev Shyam, Jonathan Pilault, Emily Shepperd, Quentin Anthony, Beren Millidge

Self-attention is the core mathematical operation of modern transformer architectures and is also a significant computational bottleneck due to its quadratic complexity in the sequence length. In this work, we derive the scalar energy function whose gradient computes the self-attention block, thus elucidating the theoretical underpinnings of self-attention, providing a Bayesian interpretation of the operation and linking it closely with energy-based models such as Hopfield Networks. Our formulation reveals that the reduction across the sequence axis can be efficiently computed in parallel through a tree reduction. Our algorithm, for parallelizing attention computation across multiple GPUs enables cross-device decoding to be performed asymptotically faster (up to 8x faster in our experiments) than alternative approaches such as Ring Attention, while also requiring significantly less communication volume and incurring 2x less peak memory. Our code is publicly available here: \url{https://github.com/Zyphra/tree_attention}.

📄 PDF Abstract BibTeX arXiv:2408.04093

Code (1)

zyphra/tree_attention 공식 구현 jax

Tasks

GPU

Methods 이 논문이 사용한 방법론

Softmax The Softmax output function transforms a previous layer's output into a vector of probabilities. It is commonly used for multiclass classification. Given an input vector $x$…
Attention 설명 없음

Similar Papers 제목 키워드 기반

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

2024-03-30 · Jinwei Yao, Kaiqi Chen, Kexun Zhang, Jiaxuan You 외

Large language models (LLMs) are increasingly employed for complex tasks that process multiple generation calls in a tree structure with shared prefixes of tokens, including few-shot prompting, multi-step reasoning, spec…

GPU

SpecExtend: A Drop-in Enhancement for Speculative Decoding of Long Sequences

2025-05-27 · Jungyoub Cha, Hyunjong Kim, Sungzoon Cho

Speculative decoding is a widely adopted technique for accelerating inference in large language models (LLMs), but its performance degrades on long inputs due to increased attention cost and reduced draft accuracy. We in…

16kLong-Context Understanding

Top-down Tree Structured Decoding with Syntactic Connections for Neural Machine Translation and Parsing

2018-09-06 · EMNLP 2018 10 · Jetic Gū, Hassan S. Shavarani, Anoop Sarkar

The addition of syntax-aware decoding in Neural Machine Translation (NMT) systems requires an effective tree-structured neural network, a syntax-aware attention model and a language generation model that is sensitive to …

Constituency ParsingDecoderDependency ParsingMachine Translation+4

Vector Representations of Vessel Trees

2025-06-11 · James Batten, Michiel Schaap, Matthew Sinclair, Ying Bai 외

We introduce a novel framework for learning vector representations of tree-structured geometric data focusing on 3D vascular networks. Our approach employs two sequentially trained Transformer-based autoencoders. In the …

GPUvalid

LongSpec: Long-Context Speculative Decoding with Efficient Drafting and Verification

2025-02-24 · Penghui Yang, Cunxiao Du, Fengzhuo Zhang, Haonan Wang 외

Speculative decoding has become a promising technique to mitigate the high inference latency of autoregressive decoding in Large Language Models (LLMs). Despite its promise, the effective application of speculative decod…

Code Completion