POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference

Each request in LLM inference goes through two phases: compute-bound prefill and memory-bandwidth-bound decode. To improve GPU utilization, recent systems use hybrid batching that combines the prefill and decode phases of different requests into the same batch. Hybrid batching works well for linear...

Ausführliche Beschreibung

Gespeichert in:
Bibliographische Detailangaben
Veröffentlicht in:arXiv.org 2024-10
Hauptverfasser: Kamath, Aditya K, Prabhu, Ramya, Mohan, Jayashree, Simon, Peter, Ramachandran Ramjee, Panwar, Ashish
Format: Artikel
Sprache:eng
Schlagworte:
Online-Zugang:Volltext
Tags: Tag hinzufügen
Keine Tags, Fügen Sie den ersten Tag hinzu!
container_end_page
container_issue
container_start_page
container_title arXiv.org
container_volume
creator Kamath, Aditya K
Prabhu, Ramya
Mohan, Jayashree
Simon, Peter
Ramachandran Ramjee
Panwar, Ashish
description Each request in LLM inference goes through two phases: compute-bound prefill and memory-bandwidth-bound decode. To improve GPU utilization, recent systems use hybrid batching that combines the prefill and decode phases of different requests into the same batch. Hybrid batching works well for linear operations as it amortizes the cost of loading model weights from HBM. However, attention computation in hybrid batches remains inefficient because existing attention kernels are optimized for either prefill or decode. In this paper, we present POD-Attention -- the first GPU kernel that efficiently computes attention for hybrid batches. POD-Attention aims to maximize the utilization of both compute and memory bandwidth by carefully allocating the GPU's resources such that prefill and decode operations happen concurrently on the same multiprocessor. We integrate POD-Attention in a state-of-the-art LLM inference scheduler Sarathi-Serve. POD-Attention speeds up attention computation by up to 75% (mean 28%) and increases LLM serving throughput by up to 22% in offline inference. In online inference, POD-Attention enables lower time-to-first-token (TTFT), time-between-tokens (TBT), and request execution latency versus Sarathi-Serve.
format Article
fullrecord <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_3120202410</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3120202410</sourcerecordid><originalsourceid>FETCH-proquest_journals_31202024103</originalsourceid><addsrcrecordid>eNqNikELgjAYQEcQJOV_-KDzYG5a0S0yKVD0YGcR-xba2Gyb_f489APiHd7hvQUJuBARPcScr0jo3MAY47s9TxIRkKIqU3ryHrXvjT7CXSvTvXr9hGxSCiqLsleKptiZB0L5QavaEaSxkLXOo4U8L-CmJVrUHW7IUrbKYfjzmmyzS32-0tGa94TON4OZrJ5TIyLOZuKIif-uL-oGPGU</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>3120202410</pqid></control><display><type>article</type><title>POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference</title><source>Free E- Journals</source><creator>Kamath, Aditya K ; Prabhu, Ramya ; Mohan, Jayashree ; Simon, Peter ; Ramachandran Ramjee ; Panwar, Ashish</creator><creatorcontrib>Kamath, Aditya K ; Prabhu, Ramya ; Mohan, Jayashree ; Simon, Peter ; Ramachandran Ramjee ; Panwar, Ashish</creatorcontrib><description>Each request in LLM inference goes through two phases: compute-bound prefill and memory-bandwidth-bound decode. To improve GPU utilization, recent systems use hybrid batching that combines the prefill and decode phases of different requests into the same batch. Hybrid batching works well for linear operations as it amortizes the cost of loading model weights from HBM. However, attention computation in hybrid batches remains inefficient because existing attention kernels are optimized for either prefill or decode. In this paper, we present POD-Attention -- the first GPU kernel that efficiently computes attention for hybrid batches. POD-Attention aims to maximize the utilization of both compute and memory bandwidth by carefully allocating the GPU's resources such that prefill and decode operations happen concurrently on the same multiprocessor. We integrate POD-Attention in a state-of-the-art LLM inference scheduler Sarathi-Serve. POD-Attention speeds up attention computation by up to 75% (mean 28%) and increases LLM serving throughput by up to 22% in offline inference. In online inference, POD-Attention enables lower time-to-first-token (TTFT), time-between-tokens (TBT), and request execution latency versus Sarathi-Serve.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Computation ; Inference ; Multiprocessing</subject><ispartof>arXiv.org, 2024-10</ispartof><rights>2024. This work is published under http://creativecommons.org/licenses/by/4.0/ (the “License”). Notwithstanding the ProQuest Terms and Conditions, you may use this content in accordance with the terms of the License.</rights><oa>free_for_read</oa><woscitedreferencessubscribed>false</woscitedreferencessubscribed></display><links><openurl>$$Topenurl_article</openurl><openurlfulltext>$$Topenurlfull_article</openurlfulltext><thumbnail>$$Tsyndetics_thumb_exl</thumbnail><link.rule.ids>780,784</link.rule.ids></links><search><creatorcontrib>Kamath, Aditya K</creatorcontrib><creatorcontrib>Prabhu, Ramya</creatorcontrib><creatorcontrib>Mohan, Jayashree</creatorcontrib><creatorcontrib>Simon, Peter</creatorcontrib><creatorcontrib>Ramachandran Ramjee</creatorcontrib><creatorcontrib>Panwar, Ashish</creatorcontrib><title>POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference</title><title>arXiv.org</title><description>Each request in LLM inference goes through two phases: compute-bound prefill and memory-bandwidth-bound decode. To improve GPU utilization, recent systems use hybrid batching that combines the prefill and decode phases of different requests into the same batch. Hybrid batching works well for linear operations as it amortizes the cost of loading model weights from HBM. However, attention computation in hybrid batches remains inefficient because existing attention kernels are optimized for either prefill or decode. In this paper, we present POD-Attention -- the first GPU kernel that efficiently computes attention for hybrid batches. POD-Attention aims to maximize the utilization of both compute and memory bandwidth by carefully allocating the GPU's resources such that prefill and decode operations happen concurrently on the same multiprocessor. We integrate POD-Attention in a state-of-the-art LLM inference scheduler Sarathi-Serve. POD-Attention speeds up attention computation by up to 75% (mean 28%) and increases LLM serving throughput by up to 22% in offline inference. In online inference, POD-Attention enables lower time-to-first-token (TTFT), time-between-tokens (TBT), and request execution latency versus Sarathi-Serve.</description><subject>Computation</subject><subject>Inference</subject><subject>Multiprocessing</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>ABUWG</sourceid><sourceid>AFKRA</sourceid><sourceid>AZQEC</sourceid><sourceid>BENPR</sourceid><sourceid>CCPQU</sourceid><sourceid>DWQXO</sourceid><recordid>eNqNikELgjAYQEcQJOV_-KDzYG5a0S0yKVD0YGcR-xba2Gyb_f489APiHd7hvQUJuBARPcScr0jo3MAY47s9TxIRkKIqU3ryHrXvjT7CXSvTvXr9hGxSCiqLsleKptiZB0L5QavaEaSxkLXOo4U8L-CmJVrUHW7IUrbKYfjzmmyzS32-0tGa94TON4OZrJ5TIyLOZuKIif-uL-oGPGU</recordid><startdate>20241023</startdate><enddate>20241023</enddate><creator>Kamath, Aditya K</creator><creator>Prabhu, Ramya</creator><creator>Mohan, Jayashree</creator><creator>Simon, Peter</creator><creator>Ramachandran Ramjee</creator><creator>Panwar, Ashish</creator><general>Cornell University Library, arXiv.org</general><scope>8FE</scope><scope>8FG</scope><scope>ABJCF</scope><scope>ABUWG</scope><scope>AFKRA</scope><scope>AZQEC</scope><scope>BENPR</scope><scope>BGLVJ</scope><scope>CCPQU</scope><scope>DWQXO</scope><scope>HCIFZ</scope><scope>L6V</scope><scope>M7S</scope><scope>PIMPY</scope><scope>PQEST</scope><scope>PQQKQ</scope><scope>PQUKI</scope><scope>PRINS</scope><scope>PTHSS</scope></search><sort><creationdate>20241023</creationdate><title>POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference</title><author>Kamath, Aditya K ; Prabhu, Ramya ; Mohan, Jayashree ; Simon, Peter ; Ramachandran Ramjee ; Panwar, Ashish</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_31202024103</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Computation</topic><topic>Inference</topic><topic>Multiprocessing</topic><toplevel>online_resources</toplevel><creatorcontrib>Kamath, Aditya K</creatorcontrib><creatorcontrib>Prabhu, Ramya</creatorcontrib><creatorcontrib>Mohan, Jayashree</creatorcontrib><creatorcontrib>Simon, Peter</creatorcontrib><creatorcontrib>Ramachandran Ramjee</creatorcontrib><creatorcontrib>Panwar, Ashish</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science &amp; Engineering Collection</collection><collection>ProQuest Central (Alumni Edition)</collection><collection>ProQuest Central UK/Ireland</collection><collection>ProQuest Central Essentials</collection><collection>ProQuest Central</collection><collection>Technology Collection</collection><collection>ProQuest One Community College</collection><collection>ProQuest Central Korea</collection><collection>SciTech Premium Collection</collection><collection>ProQuest Engineering Collection</collection><collection>Engineering Database</collection><collection>Publicly Available Content Database</collection><collection>ProQuest One Academic Eastern Edition (DO NOT USE)</collection><collection>ProQuest One Academic</collection><collection>ProQuest One Academic UKI Edition</collection><collection>ProQuest Central China</collection><collection>Engineering Collection</collection></facets><delivery><delcategory>Remote Search Resource</delcategory><fulltext>fulltext</fulltext></delivery><addata><au>Kamath, Aditya K</au><au>Prabhu, Ramya</au><au>Mohan, Jayashree</au><au>Simon, Peter</au><au>Ramachandran Ramjee</au><au>Panwar, Ashish</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference</atitle><jtitle>arXiv.org</jtitle><date>2024-10-23</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>Each request in LLM inference goes through two phases: compute-bound prefill and memory-bandwidth-bound decode. To improve GPU utilization, recent systems use hybrid batching that combines the prefill and decode phases of different requests into the same batch. Hybrid batching works well for linear operations as it amortizes the cost of loading model weights from HBM. However, attention computation in hybrid batches remains inefficient because existing attention kernels are optimized for either prefill or decode. In this paper, we present POD-Attention -- the first GPU kernel that efficiently computes attention for hybrid batches. POD-Attention aims to maximize the utilization of both compute and memory bandwidth by carefully allocating the GPU's resources such that prefill and decode operations happen concurrently on the same multiprocessor. We integrate POD-Attention in a state-of-the-art LLM inference scheduler Sarathi-Serve. POD-Attention speeds up attention computation by up to 75% (mean 28%) and increases LLM serving throughput by up to 22% in offline inference. In online inference, POD-Attention enables lower time-to-first-token (TTFT), time-between-tokens (TBT), and request execution latency versus Sarathi-Serve.</abstract><cop>Ithaca</cop><pub>Cornell University Library, arXiv.org</pub><oa>free_for_read</oa></addata></record>
fulltext fulltext
identifier EISSN: 2331-8422
ispartof arXiv.org, 2024-10
issn 2331-8422
language eng
recordid cdi_proquest_journals_3120202410
source Free E- Journals
subjects Computation
Inference
Multiprocessing
title POD-Attention: Unlocking Full Prefill-Decode Overlap for Faster LLM Inference
url https://sfx.bib-bvb.de/sfx_tum?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2024-12-19T21%3A11%3A09IST&url_ver=Z39.88-2004&url_ctx_fmt=infofi/fmt:kev:mtx:ctx&rfr_id=info:sid/primo.exlibrisgroup.com:primo3-Article-proquest&rft_val_fmt=info:ofi/fmt:kev:mtx:book&rft.genre=document&rft.atitle=POD-Attention:%20Unlocking%20Full%20Prefill-Decode%20Overlap%20for%20Faster%20LLM%20Inference&rft.jtitle=arXiv.org&rft.au=Kamath,%20Aditya%20K&rft.date=2024-10-23&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E3120202410%3C/proquest%3E%3Curl%3E%3C/url%3E&disable_directlink=true&sfx.directlink=off&sfx.report_link=0&rft_id=info:oai/&rft_pqid=3120202410&rft_id=info:pmid/&rfr_iscdi=true