AI summary · arXiv: 2211.05102v1 · cs.LG

Efficiently Scaling Transformer Inference

Reiner Pope, Sholto Douglas, Aakanksha Chowdhery, Jacob Devlin, James Bradbury, Anselm Levskaya, Jonathan Heek, Kefan Xiao,
and 2 more authorsShivani Agrawal, Jeff Dean
Original paper Submitted to arXiv on 09 Nov. 2022 License: CC BY 4.0

How to read this summary? Illustrated guide

The essentials

  • The paper investigates the problem of efficient generative inference for large deep Transformer models with tight latency targets and long sequence lengths.
  • Challenges associated with generative inference of language models (LLMs) include a large memory footprint, low parallelizability, and high inference cost due to attention mechanisms scaling quadratically with input sequence length.
  • The authors propose a powerful and abstract partitioning framework to optimize LLMs for inference efficiency, which enables reaching the limits of model parallel scaling given the limited parallelizability of Transformer inference.
  • They develop a simple analytical model for inference efficiency to select the best multi-dimensional partitioning techniques optimized for TPU v4 slices based on application requirements.
  • A suite of low-level optimizations is combined with the partitioning framework to achieve a new Pareto frontier on the latency and model FLOPS utilization (MFU) tradeoffs on 500B+ parameter models that outperforms the FasterTransformer suite of benchmarks.
  • Appropriate partitioning reduces memory requirements in multiquery attention, enabling scaling up to 32x larger context lengths.
  • The authors achieve a low-batch-size latency of 29ms per token during generation (using int8 weight quantization) and a 76% MFU during large-batch-size processing of input tokens while supporting a long 2048-token context length on the PaLM 540B parameter model.
  • The paper discusses several approaches to improve ML inference efficiency such as efficient attention layers, distillation, pruning or quantization techniques which could be coupled with other model compression methods.
  • In conclusion, this paper investigates the scaling properties of Transformer inference workloads and proposes practical partitioning approaches to meet challenging application requirements such as tight latency targets.

Key points written by AI: they may contain errors, check them against the paper.

AI-generated keywords: Generative inference Transformer models Model architecture Model compression FLOPs

Read further

  • Comprehensive Summary
  • Layman's Summary
  • Blog article
  • Original abstract
In this paper, the authors investigate the problem of efficient generative inference for large deep Transformer models with tight latency targets and long sequence lengths. They highlight the challenges associated with generative inference of language models (LLMs), including a large memory footprint, low parallelizability, and high inference cost due to attention mechanisms scaling quadratically with input sequence length. To optimize LLMs for inference efficiency, they propose a powerful and abstract partitioning framework that enables reaching the limits of model parallel scaling given the limited parallelizability of Transformer inference. Within this framework, they develop a simple analytical model for inference efficiency to select the best multi-dimensional partitioning techniques optimized for TPU v4 slices based on application requirements. They combine these with a suite of low-level optimizations to achieve a new Pareto frontier on the latency and model FLOPS utilization (MFU) tradeoffs on 500B+ parameter models that outperforms the FasterTransformer suite of benchmarks. The authors further show that appropriate partitioning reduces memory requirements in multiquery attention (i.e., multiple query heads share single key/value head), enabling scaling up to 32x larger context lengths. Finally, they achieve a low-batch-size latency of 29ms per token during generation (using int8 weight quantization) and a 76% MFU during large-batch-size processing of input tokens while supporting a long 2048-token context length on the PaLM 540B parameter model. The paper also discusses several approaches to improve ML inference efficiency such as efficient attention layers, distillation, pruning or quantization techniques which could be coupled with other model compression methods. In conclusion, this paper investigates the scaling properties of Transformer inference workloads and proposes practical partitioning approaches to meet challenging application requirements such as tight latency targets. The authors push beyond traditional paradigms of single-server inference by scaling up to 64+ chips and show that longer context lengths incur higher memory costs but multiquery attention with appropriate partitioning reduces this cost and makes long-context inference practical. They observe that FLOP count and communication volume can fundamentally limit inference performance of dense Transformer models and suggest sparsity techniques like task-based mixture of expert architectures or adaptive computation techniques that allocate different amounts of compute per input and generation timestep to reduce FLOPs per token in order to enable further gains in both cost and latency.

Was this synthesis useful?

Score: 0

Why do we need votes?

Votes are used to determine whether we need to re-run our summarizing tools. If the count reaches -10, our tools can be restarted.

Figures and plots

Ask about a figure by number or use its question button to request visual analysis. Up to two figures and four image panels per question. Values read from plots are approximate; check the original data.

AI assistant instructions?

Tools for this paper

Explain it differently 1 free rewrite left today
Save to a collection Group papers in collections to compare them, chat with them and export them. Continue with Google Create a free account Log in

Advanced tools Premium

For researchers who follow a field closely: citation alerts, journal-club slides, version comparison and Zotero export. Discover Premium

Zotero Zotero guide
Citation alerts More than 300 papers already cite it: be emailed each new one. Citation alerts guide
Who works on it?

Among the 31 papers around this one, the name that comes back most: Jaewan Choi (2 papers)

2 more people sign several of them. The full map adds their institutions and approaches, from the papers of the last years.

Continue with Google Create a free account: your first map is free
Weekly letter The latest letter of its field, "Artificial intelligence this week" of 23 November 2026: Artificial intelligence this week: The difference between looking right and getting it right · Receive one by email for free

Papers around this one

See them on a map

Ranked by how close their title and abstract are to this paper’s. Select some to read them together.

Closest papers

  1. Very close
    Unleashing the Potential of PIM: Accelerating Large Batched Inference of Transformer-Based Generative Models
    Jaewan Choi, Jaehyun Park, Kwanhee Kyung et al. · 2024 · International Symposium on High-Performance Computer Architecture · Not summarized yet
    Abstract

    Transformer-based generative models, such as GPT, summarize an input sequence by generating key/value (KV) matrices through attention and generate the corresponding output sequence by utilizing these matrices once per token of the sequence. Both input and output sequences tend to get longer, which improves the understanding of contexts and conversation quality. These models are also typically batched for inference to improve the serving throughput. All these trends enable the models' weights to be reused effectively, increasing the relative importance of sequence generation, especially in processing KV matrices through attention. We identify that the conventional computing platforms (e.g., G…

  2. Very close
    Unleashing the Potential of PIM: Accelerating Large Batched Inference of Transformer-Based Generative Models
    Jaewan Choi, Jaehyun Park, Kwanhee Kyung et al. · 2023 · IEEE computer architecture letters · cited 21 times · Not summarized yet
    Abstract

    Transformer-based generative models, such as GPT, summarize an input sequence by generating key/value (KV) matrices through attention and generate the corresponding output sequence by utilizing these matrices once per token of the sequence. Both input and output sequences tend to get longer, which improves the understanding of contexts and conversation quality. These models are also typically batched for inference to improve the serving throughput. All these trends enable the models’ weights to be reused effectively, increasing the relative importance of sequence generation, especially in processing KV matrices through attention. We identify that the conventional computing platforms (e.g., G…

  3. Very close
    Full Stack Optimization of Transformer Inference: a Survey
    Sehoon Kim, Coleman Hooper, Thanakul Wattanawong et al. · 2023 · Presented in Workshop on Architecture and System Support for Transformer Models (ASSYST) at ISCA 2023 · cited 188 times · AI summary available
    Abstract

    Recent advances in state-of-the-art DNN architecture design have been moving toward Transformer models. These models achieve superior accuracy across a wide range of applications. This trend has been consistent over the past several years since Transformer models were originally introduced. However, the amount of compute and bandwidth required for inference of recent Transformer models is growing at a significant rate, and this has made their deployment in latency-sensitive applications challenging. As such, there has been an increased focus on making Transformer models more efficient, with methods that range from changing the architecture design, all the way to developing dedicated domain-s…

  4. Very close
    Exploiting Sparsity for Long Context Inference: Million Token Contexts on Commodity GPUs
    Ryan Synk, Monte Hoover, John Kirchenbauer et al. · 2025 · arXiv.org · preprint, not peer reviewed · cited 5 times · Not summarized yet
    Abstract

    There is growing demand for performing inference with hundreds of thousands of input tokens on trained transformer models. Inference at this extreme scale demands significant computational resources, hindering the application of transformers at long contexts on commodity (i.e not data center scale) hardware. To address the inference time costs associated with running self-attention based transformer language models on long contexts and enable their adoption on widely available hardware, we propose a tunable mechanism that reduces the cost of the forward pass by attending to only the most relevant tokens at every generation step using a top-k selection mechanism. We showcase the efficiency ga…

  5. Close Cites this paper
    Gated Subspace Inference for Transformer Acceleration
    Stephen Thomas · 2026 · arXiv.org · preprint, not peer reviewed · cited 1 time · Not summarized yet
    Abstract

    A method is presented for accelerating inference in transformer language models by exploiting the low effective rank of the token activation manifold at each layer. The method decomposes each activation vector into a subspace component and a residual, computes the linear-layer output on the subspace component via a cached low-rank weight image at reduced memory bandwidth, and applies a per-token gate that determines whether the residual correction is computed or skipped. The gate ensures that the output distribution is preserved to within a controllable tolerance. Validation on three model families (GPT-2 124M, GPT-J 6B, OPT 6.7B) on AMD MI300X demonstrates effective speedups of 3.0x to 10.5…

  6. Close
    InfiniGen: Efficient Generative Inference of Large Language Models with Dynamic KV Cache Management
    Wonbeom Lee, Jungi Lee, Junghwa Seo et al. · 2024 · USENIX Symposium on Operating Systems Design and Implementation · cited 399 times · Not summarized yet
    Abstract

    Transformer-based large language models (LLMs) demonstrate impressive performance across various natural language processing tasks. Serving LLM inference for generating long contents, however, poses a challenge due to the enormous memory footprint of the transient state, known as the key-value (KV) cache, which scales with the sequence length and batch size. In this paper, we present InfiniGen, a novel KV cache management framework tailored for long-text generation, which synergistically works with modern offloading-based inference systems. InfiniGen leverages the key insight that a few important tokens that are essential for computing the subsequent attention layer in the Transformer can be…

  7. Close Cited by this paper
    DeepSpeed- Inference: Enabling Efficient Inference of Transformer Models at Unprecedented Scale
    Reza Yazdani Aminabadi, Samyam Rajbhandari, A. Awan et al. · 2022 · International Conference for High Performance Computing, Networking, Storage and Analysis · cited 749 times · Not summarized yet
    Abstract

    The landscape of transformer model inference is increasingly diverse in model size, model characteristics, latency and throughput requirements, hardware requirements, etc. With such diversity, designing a versatile inference system is challenging. DeepSpeed-Inference addresses these challenges by (1) a multi-GPU inference solution to minimize latency while maximizing throughput for both dense and sparse transformers when the model fits in aggregate GPU memory, and (2) a heterogeneous inference solution that leverages CPU/NVMe/GPU memory to enable high-throughput inference for models larger than aggregate GPU memory. DeepSpeed-Inference reduces latency by 6.4× and increases throughput by 1.5 …

  8. Close
    Model Compression and Efficient Inference for Large Language Models: A Survey
    Wenxiao Wang, Wei Chen, Yicong Luo et al. · 2024 · Computation and Language · preprint, not peer reviewed · cited 113 times · AI summary available
    Abstract

    Transformer based large language models have achieved tremendous success. However, the significant memory and computational costs incurred during the inference process make it challenging to deploy large models on resource-constrained devices. In this paper, we investigate compression and efficient inference methods for large language models from an algorithmic perspective. Regarding taxonomy, similar to smaller models, compression and acceleration algorithms for large language models can still be categorized into quantization, pruning, distillation, compact architecture design, dynamic networks. However, Large language models have two prominent characteristics compared to smaller models: (1…

Prior work it builds on

  1. Close Used in depth by this paper
    Megatron-LM: Training Multi-Billion Parameter Language Models Using GPU Model Parallelism
    Mohammad Shoeybi, Mostofa Patwary, Raul Puri et al. · 2019 · Computation and Language · preprint, not peer reviewed · cited 3,381 times · Not summarized yet
    Abstract

    Recent work in unsupervised language modeling demonstrates that training large neural language models advances the state of the art in Natural Language Processing applications. However, for very large models, memory constraints limit the size of models that can be practically trained. Model parallelism allows us to train larger models, because the parameters can be split across multiple processors. In this work, we implement a simple, efficient intra-layer model parallel approach that enables training state of the art transformer language models with billions of parameters. Our approach does not require a new compiler or library changes, is orthogonal and complimentary to pipeline model para…

  2. Close Used in depth by this paper
    PaLM: Scaling Language Modeling with Pathways
    Aakanksha Chowdhery, Sharan Narang, Jacob Devlin et al. · 2022 · Computation and Language · cited 8,599 times · AI summary available
    Abstract

    Large language models have been shown to achieve remarkable performance across a variety of natural language tasks using few-shot learning, which drastically reduces the number of task-specific training examples needed to adapt the model to a particular application. To further our understanding of the impact of scale on few-shot learning, we trained a 540-billion parameter, densely activated, Transformer language model, which we call Pathways Language Model PaLM. We trained PaLM on 6144 TPU v4 chips using Pathways, a new ML system which enables highly efficient training across multiple TPU Pods. We demonstrate continued benefits of scaling by achieving state-of-the-art few-shot learning resu…

  3. Close Shared data, tool or method
    LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale
    Tim Dettmers, Mike Lewis, Younes Belkada et al. · 2022 · Machine Learning · cited 1,413 times · AI summary available

    LLM.int8() develops Int8 matrix multiplication for Transformer inference, while this paper also uses int8 weight quantization to reduce latency on large models.

    Abstract

    Large language models have been widely adopted but require significant GPU memory for inference. We develop a procedure for Int8 matrix multiplication for feed-forward and attention projection layers in transformers, which cut the memory needed for inference by half while retaining full precision performance. With our method, a 175B parameter 16/32-bit checkpoint can be loaded, converted to Int8, and used immediately without performance degradation. This is made possible by understanding and working around properties of highly systematic emergent features in transformer language models that dominate attention and transformer predictive performance. To cope with these features, we develop a t…

  4. Close Broader context
    Reformer: The Efficient Transformer
    Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya · 2020 · Machine Learning · cited 3,187 times · AI summary available

    Reformer reduces attention complexity and training memory for long sequences, addressing Transformer efficiency but focusing on model architecture and training rather than inference systems.

    Abstract

    Large Transformer models routinely achieve state-of-the-art results on a number of tasks but training these models can be prohibitively costly, especially on long sequences. We introduce two techniques to improve the efficiency of Transformers. For one, we replace dot-product attention by one that uses locality-sensitive hashing, changing its complexity from O($L^2$) to O($L\log L$), where $L$ is the length of the sequence. Furthermore, we use reversible residual layers instead of the standard residuals, which allows storing activations only once in the training process instead of $N$ times, where $N$ is the number of layers. The resulting model, the Reformer, performs on par with Transforme…

  5. Close
    Training Compute-Optimal Large Language Models
    Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch et al. · 2022 · Computation and Language · cited 4,028 times · AI summary available
    Abstract

    We investigate the optimal model size and number of tokens for training a transformer language model under a given compute budget. We find that current large language models are significantly undertrained, a consequence of the recent focus on scaling language models whilst keeping the amount of training data constant. By training over 400 language models ranging from 70 million to over 16 billion parameters on 5 to 500 billion tokens, we find that for compute-optimal training, the model size and the number of training tokens should be scaled equally: for every doubling of model size the number of training tokens should also be doubled. We test this hypothesis by training a predicted compute-…

Papers that cite it

  1. Close Uses this paper in depth
    Scaling Inference Prefill with High-Radix Photonic Interconnects
    Arulselvan Madhavan, Peter Carson, Taylor L. Groves et al. · 2026 · Not summarized yet
    Abstract

    With the rise of inference as today's dominant AI workload, the industry is transitioning to high-bandwidth photonic interconnects to meet the large scale-up requirements of increasingly complex Mixture-of-Experts (MoE) models. This paper quantifies the benefits of 3D-integrated photonic interconnects for inference prefill by analyzing tradeoffs between high-concurrency throughput for Large Language Model (LLM) chat and the large context windows typically required for reasoning and agentic AI. We simulate three MoE models: short context (1K--8K tokens), medium context (128K tokens), and long context (1M tokens). We evaluate this workload across existing copper-based GPU systems and one with …

  2. Close Uses this paper in depth
    Evaluating Inference Compute for Generative AI: A Framework for Enterprise Workloads
    Abbas Ali, Muhammad Ajmal Siddiqui, Moona Zahid · 2026 · Not summarized yet
    Abstract

    LLM deployment is shifting from single-turn completion to agentic trajectories in which a model plans, calls tools, reads results and reasons at test time before acting. This inverts the economics of inference hardware: chat serving amortises weight reads across large batches, whereas agent trajectories are sequentially dependent, run at effective batch one, and make per-token decode latency (TPOT) the dominant term in task completion time. Using a roofline analysis and a closed-form episode-latency model, we show why this regime favours accelerators that keep weights in on-die SRAM (Cerebras WSE-3/3T, Groq/NVIDIA LPU) or compiler-managed tiered memory (SambaNova SN40L/SN50), and why three v…

  3. Close
    NeuPIMs: NPU-PIM Heterogeneous Acceleration for Batched LLM Inferencing
    Guseul Heo, Sangyeop Lee, Jaehong Cho et al. · 2024 · International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS) · cited 133 times · Not summarized yet
    Abstract

    Modern transformer-based Large Language Models (LLMs) are constructed with a series of decoder blocks. Each block comprises three key components: (1) QKV generation, (2) multi-head attention, and (3) feed-forward networks. In batched processing, QKV generation and feed-forward networks involve compute-intensive matrix-matrix multiplications (GEMM), while multi-head attention requires bandwidth-heavy matrix-vector multiplications (GEMV). Machine learning accelerators like TPUs or NPUs are proficient in handling GEMM but are less efficient for GEMV computations. Conversely, Processing-in-Memory (PIM) technology is tailored for efficient GEMV computation, while it lacks the computational power …

  4. Close
    Understanding the Potential of FPGA-based Spatial Acceleration for Large Language Model Inference
    Hongzheng Chen, Jiahao Zhang, Yixiao Du et al. · 2024 · ACM Transactions on Reconfigurable Technology and Systems · cited 86 times · Not summarized yet
    Abstract

    Recent advancements in large language models (LLMs) boasting billions of parameters have generated a significant demand for efficient deployment in inference workloads. While hardware accelerators for Transformer-based models have been extensively studied, the majority of existing approaches rely on temporal architectures that reuse hardware units for different network layers and operators. However, these methods often encounter challenges in achieving low latency due to considerable memory access overhead. This article investigates the feasibility and potential of model-specific spatial acceleration for LLM inference on field-programmable gate arrays (FPGAs). Our approach involves the speci…

  5. Close
    ShuffleInfer: Disaggregate LLM Inference for Mixed Downstream Workloads
    C.-C. Hu, Heyang Huang, Liangliang Xu et al. · 2025 · ACM Transactions on Architecture and Code Optimization · cited 73 times · Not summarized yet
    Abstract

    Transformer-based large language model (LLM) inference serving is now the backbone of many cloud services. LLM inference consists of a prefill phase and a decode phase. However, existing LLM deployment practices often overlook the distinct characteristics of these phases, leading to significant interference. To mitigate interference, our insight is to carefully schedule and group inference requests based on their characteristics. We realize this idea in ShuffleInfer through three pillars. First, it partitions prompts into fixed-size chunks so that the accelerator always runs close to its computation-saturated limit. Second, it disaggregates prefill and decode instances so each can run indepe…

How are these papers found?

We compare the title and abstract of this paper with those of every paper summarized on this site, and with the papers Semantic Scholar recommends, those it cites and those citing it (for a much-cited paper, its most recent citations and, from OpenAlex, the most cited ones). Among the prior work and the follow-ups, the papers that use each other in depth, a method it uses and the much-cited follow-ups come a little higher. The levels (very close, close, related) come from the similarity of the texts, not from a judgment of quality; * marks a paper without an abstract, compared by its title. The sentence under a paper is written by an AI from the two abstracts: check it in the papers. A paper marked not relevant by three readers leaves the list.

Updated on 6 November 2026.

The illustrated guide to the papers around a paper

The previous summary was created more than a year ago and can be re-run (if necessary) by clicking on the Run button below.

Disclaimer: The AI-based summarization tool and virtual assistant provided on this website may not always provide accurate and complete summaries or responses. We encourage you to carefully review and evaluate the generated content to ensure its quality and relevance to your needs.