Efficiently Scaling Transformer Inference

Auteurs : Reiner Pope, Sholto Douglas, Aakanksha Chowdhery, Jacob Devlin, James Bradbury, Anselm Levskaya, Jonathan Heek, Kefan Xiao, Shivani Agrawal, Jeff Dean

Soumis à arXiv le 09 Nov. 2022
Licence : CC BY 4.0
Résumé scientifique

We study the problem of efficient generative inference for Transformer models, in one of its most challenging settings: large deep models, with tight latency targets and long sequence lengths. Better understanding of the engineering tradeoffs for inference for large Transformer-based models is important as use cases of these models are growing rapidly throughout application areas. We develop a simple analytical model for inference efficiency to select the best multi-dimensional partitioning techniques optimized for TPU v4 slices based on the application requirements. We 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. We further show that with appropriate partitioning, the lower memory requirements of multiquery attention (i.e. multiple query heads share single key/value head) enables scaling up to 32x larger context lengths. Finally, we 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.

Les articles autour de lui, par date et par proximité

Plus haut, c’est plus proche de cet article ; à gauche, c’est plus ancien. Les traits relient les articles proches entre eux : les groupes de traits sont des sous-thèmes. Sélectionnez un point pour voir pourquoi il est là. Retour au résumé de cet article

Comment lire cette carte ? Guide illustré

Les articles les plus proches Les travaux antérieurs sur lesquels il s’appuie Les articles qui le citent

Les articles autour de celui-ci

Classés selon la proximité de leur titre et de leur résumé avec ceux de cet article. Sélectionnez-en pour les lire ensemble.

Les articles les plus proches

  1. Très proche
    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 · Pas encore résumé
    Résumé scientifique

    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. Très proche
    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 · cité 21 fois · Pas encore résumé
    Résumé scientifique

    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. Très proche
    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 · cité 188 fois · Résumé IA disponible
    Résumé scientifique

    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. Très proche
    Exploiting Sparsity for Long Context Inference: Million Token Contexts on Commodity GPUs
    Ryan Synk, Monte Hoover, John Kirchenbauer et al. · 2025 · arXiv.org · preprint, non relu par les pairs · cité 5 fois · Pas encore résumé
    Résumé scientifique

    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. Proche Cite cet article
    Gated Subspace Inference for Transformer Acceleration
    Stephen Thomas · 2026 · arXiv.org · preprint, non relu par les pairs · cité 1 fois · Pas encore résumé
    Résumé scientifique

    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. Proche
    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 · cité 399 fois · Pas encore résumé
    Résumé scientifique

    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. Proche Cité par cet article
    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 · cité 749 fois · Pas encore résumé
    Résumé scientifique

    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. Proche
    Model Compression and Efficient Inference for Large Language Models: A Survey
    Wenxiao Wang, Wei Chen, Yicong Luo et al. · 2024 · Computation and Language · preprint, non relu par les pairs · cité 113 fois · Résumé IA disponible
    Résumé scientifique

    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…

Les travaux antérieurs sur lesquels il s’appuie

  1. Proche Utilisé en profondeur par cet article
    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, non relu par les pairs · cité 3 381 fois · Pas encore résumé
    Résumé scientifique

    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. Proche Utilisé en profondeur par cet article
    PaLM: Scaling Language Modeling with Pathways
    Aakanksha Chowdhery, Sharan Narang, Jacob Devlin et al. · 2022 · Computation and Language · cité 8 599 fois · Résumé IA disponible
    Résumé scientifique

    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. Proche Données, outil ou méthode en commun
    LLM.int8(): 8-bit Matrix Multiplication for Transformers at Scale
    Tim Dettmers, Mike Lewis, Younes Belkada et al. · 2022 · Machine Learning · cité 1 413 fois · Résumé IA disponible

    LLM.int8() réduit de moitié la mémoire d’inférence par multiplication matricielle int8, une quantification également utilisée pour accélérer la génération dans cet article.

    Résumé scientifique

    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. Proche Autre approche du problème
    Reformer: The Efficient Transformer
    Nikita Kitaev, Łukasz Kaiser, Anselm Levskaya · 2020 · Machine Learning · cité 3 187 fois · Résumé IA disponible

    Reformer réduit le coût de l’attention et du stockage des activations pour l’entraînement sur longues séquences, tandis que cet article vise l’inférence générative.

    Résumé scientifique

    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. Proche
    Training Compute-Optimal Large Language Models
    Jordan Hoffmann, Sebastian Borgeaud, Arthur Mensch et al. · 2022 · Computation and Language · cité 4 028 fois · Résumé IA disponible
    Résumé scientifique

    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-…

Les articles qui le citent

  1. Proche Utilise cet article en profondeur
    Scaling Inference Prefill with High-Radix Photonic Interconnects
    Arulselvan Madhavan, Peter Carson, Taylor L. Groves et al. · 2026 · Pas encore résumé
    Résumé scientifique

    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. Proche Utilise cet article en profondeur
    Evaluating Inference Compute for Generative AI: A Framework for Enterprise Workloads
    Abbas Ali, Muhammad Ajmal Siddiqui, Moona Zahid · 2026 · Pas encore résumé
    Résumé scientifique

    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. Proche
    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) · cité 133 fois · Pas encore résumé
    Résumé scientifique

    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. Proche
    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 · cité 86 fois · Pas encore résumé
    Résumé scientifique

    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. Proche
    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 · cité 73 fois · Pas encore résumé
    Résumé scientifique

    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…

Comment ces articles sont-ils trouvés ?

Nous comparons le titre et le résumé de cet article avec ceux de tous les articles résumés sur ce site, et avec les articles que Semantic Scholar recommande, ceux qu’il cite et ceux qui le citent (pour un article très cité, ses citations les plus récentes et, depuis OpenAlex, les plus citées). Parmi les travaux antérieurs et les suites, les articles qui s’utilisent en profondeur, une méthode qu’il utilise et les suites très citées remontent un peu. Les niveaux (très proche, proche, apparenté) viennent de la similarité des textes, pas d’un jugement de qualité ; * signale un article sans résumé, comparé par son titre. La phrase sous un article est écrite par une IA à partir des deux résumés : vérifiez-la dans les articles. Un article jugé hors sujet par trois lecteurs quitte la liste.

Mis à jour le 6 novembre 2026.

Le guide illustré des articles autour d’un article