paper-with-me

Papers

Diagonal Batching Unlocks Parallelism in Recurrent Memory Transformers for Long Contexts

2025-06-05 · Danil Sivtsov, Ivan Rodkin, Gleb Kuzmin, Yuri Kuratov, Ivan Oseledets

Transformer models struggle with long-context inference due to their quadratic time and linear memory complexity. Recurrent Memory Transformers (RMTs) offer a solution by reducing the asymptotic cost to linear time and constant memory usage. However, their memory update mechanism leads to sequential execution, causing a performance bottleneck. We introduce Diagonal Batching, a scheduling scheme that unlocks parallelism across segments in RMTs while preserving exact recurrence. This approach eliminates the sequential constraint, enabling efficient GPU inference even for single long-context inputs without complex batching and pipelining techniques. Because the technique is purely a run-time computation reordering, existing RMT models adopt it with no retraining. Applied to a LLaMA-1B ARMT model, Diagonal Batching yields a 3.3x speedup over standard full-attention LLaMA-1B and a 1.8x speedup over the sequential RMT implementation on 131,072-token sequences. By removing sequential bottleneck, Diagonal Batching reduces inference cost and latency, thereby strengthening RMTs as a practical solution for real-world, long-context applications.

📄 PDF Abstract BibTeX arXiv:2506.05229

Code (1)

svtdanny/diagonal-batching 공식 구현 pytorch

Tasks

GPUScheduling

Methods 이 논문이 사용한 방법론

ADOPT Please enter a description about the method here

Similar Papers 제목 키워드 기반

Recurrent Reinforcement Learning with Memoroids

2024-02-15 · Steven Morad, Chris Lu, Ryan Kortvelesy, Stephan Liwicki 외

Memory models such as Recurrent Neural Networks (RNNs) and Transformers address Partially Observable Markov Decision Processes (POMDPs) by mapping trajectories to latent Markov states. Neither model scales particularly w…

reinforcement-learningReinforcement Learning

Improving the performance of bagging ensembles for data streams through mini-batching

2021-12-18 · Guilherme Cassales, Heitor Gomes, Albert Bifet, Bernhard Pfahringer 외

Often, machine learning applications have to cope with dynamic environments where data are collected in the form of continuous data streams with potentially infinite length and transient behavior. Compared to traditional…

Ensemble LearningIncremental Learning

Taming Throughput-Latency Tradeoff in LLM Inference with Sarathi-Serve

2024-03-04 · Amey Agrawal, Nitin Kedia, Ashish Panwar, Jayashree Mohan 외

Each LLM serving request goes through two phases. The first is prefill which processes the entire input prompt and produces the first output token and the second is decode which generates the rest of output tokens, one-a…

GPUScheduling

Recurrent Neural Networks Hardware Implementation on FPGA

2015-11-17 · Andre Xian Ming Chang, Berin Martini, Eugenio Culurciello

Recurrent Neural Networks (RNNs) have the ability to retain memory and learn data sequences. Due to the recurrent nature of RNNs, it is sometimes hard to parallelize all its computations on conventional hardware. CPUs do…

CPULanguage ModelingLanguage Modelling

Parallelization Strategies for Dense LLM Deployment: Navigating Through Application-Specific Tradeoffs and Bottlenecks

2026-03-05 · Burak Topcu, Musa Oguzhan Cim, Poovaiah Palangappa, Meena Arunachalam 외 arxiv

Breakthroughs in the generative AI domain have fueled an explosion of large language model (LLM)-powered applications, whose workloads fundamentally consist of sequences of inferences through transformer architectures. W…