Loading…
BASS: Batched Attention-optimized Speculative Sampling
Speculative decoding has emerged as a powerful method to improve latency and throughput in hosting large language models. However, most existing implementations focus on generating a single sequence. Real-world generative AI applications often require multiple responses and how to perform speculativ...
Saved in:
Published in: | arXiv.org 2024-06 |
---|---|
Main Authors: | , , , , , , , , |
Format: | Article |
Language: | English |
Subjects: | |
Online Access: | Get full text |
Tags: |
Add Tag
No Tags, Be the first to tag this record!
|
cited_by | |
---|---|
cites | |
container_end_page | |
container_issue | |
container_start_page | |
container_title | arXiv.org |
container_volume | |
creator | Qian, Haifeng Gonugondla, Sujan Kumar Ha, Sungsoo Shang, Mingyue Gouda, Sanjay Krishna Nallapati, Ramesh Sengupta, Sudipta Ma, Xiaofei Deoras, Anoop |
description | Speculative decoding has emerged as a powerful method to improve latency and throughput in hosting large language models. However, most existing implementations focus on generating a single sequence. Real-world generative AI applications often require multiple responses and how to perform speculative decoding in a batched setting while preserving its latency benefits poses non-trivial challenges. This paper describes a system of batched speculative decoding that sets a new state of the art in multi-sequence generation latency and that demonstrates superior GPU utilization as well as quality of generations within a time budget. For example, for a 7.8B-size model on a single A100 GPU and with a batch size of 8, each sequence is generated at an average speed of 5.8ms per token, the overall throughput being 1.1K tokens per second. These results represent state-of-the-art latency and a 2.15X speed-up over optimized regular decoding. Within a time budget that regular decoding does not finish, our system is able to generate sequences with HumanEval Pass@First of 43% and Pass@All of 61%, far exceeding what's feasible with single-sequence speculative decoding. Our peak GPU utilization during decoding reaches as high as 15.8%, more than 3X the highest of that of regular decoding and around 10X of single-sequence speculative decoding. |
format | article |
fullrecord | <record><control><sourceid>proquest</sourceid><recordid>TN_cdi_proquest_journals_3045955876</recordid><sourceformat>XML</sourceformat><sourcesystem>PC</sourcesystem><sourcerecordid>3045955876</sourcerecordid><originalsourceid>FETCH-proquest_journals_30459558763</originalsourceid><addsrcrecordid>eNpjYuA0MjY21LUwMTLiYOAtLs4yMDAwMjM3MjU15mQwc3IMDrZScEosSc5ITVFwLClJzSvJzM_TzS8oyczNrAKKBRekJpfmJJZklqUqBCfmFuRk5qXzMLCmJeYUp_JCaW4GZTfXEGcP3YKi_MLS1OKS-Kz80qI8oFS8sYGJqaWpqYW5mTFxqgCZhjUp</addsrcrecordid><sourcetype>Aggregation Database</sourcetype><iscdi>true</iscdi><recordtype>article</recordtype><pqid>3045955876</pqid></control><display><type>article</type><title>BASS: Batched Attention-optimized Speculative Sampling</title><source>Publicly Available Content Database</source><creator>Qian, Haifeng ; Gonugondla, Sujan Kumar ; Ha, Sungsoo ; Shang, Mingyue ; Gouda, Sanjay Krishna ; Nallapati, Ramesh ; Sengupta, Sudipta ; Ma, Xiaofei ; Deoras, Anoop</creator><creatorcontrib>Qian, Haifeng ; Gonugondla, Sujan Kumar ; Ha, Sungsoo ; Shang, Mingyue ; Gouda, Sanjay Krishna ; Nallapati, Ramesh ; Sengupta, Sudipta ; Ma, Xiaofei ; Deoras, Anoop</creatorcontrib><description>Speculative decoding has emerged as a powerful method to improve latency and throughput in hosting large language models. However, most existing implementations focus on generating a single sequence. Real-world generative AI applications often require multiple responses and how to perform speculative decoding in a batched setting while preserving its latency benefits poses non-trivial challenges. This paper describes a system of batched speculative decoding that sets a new state of the art in multi-sequence generation latency and that demonstrates superior GPU utilization as well as quality of generations within a time budget. For example, for a 7.8B-size model on a single A100 GPU and with a batch size of 8, each sequence is generated at an average speed of 5.8ms per token, the overall throughput being 1.1K tokens per second. These results represent state-of-the-art latency and a 2.15X speed-up over optimized regular decoding. Within a time budget that regular decoding does not finish, our system is able to generate sequences with HumanEval Pass@First of 43% and Pass@All of 61%, far exceeding what's feasible with single-sequence speculative decoding. Our peak GPU utilization during decoding reaches as high as 15.8%, more than 3X the highest of that of regular decoding and around 10X of single-sequence speculative decoding.</description><identifier>EISSN: 2331-8422</identifier><language>eng</language><publisher>Ithaca: Cornell University Library, arXiv.org</publisher><subject>Budgets ; Generative artificial intelligence ; Large language models ; Sequences</subject><ispartof>arXiv.org, 2024-06</ispartof><rights>2024. This work is published under http://arxiv.org/licenses/nonexclusive-distrib/1.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><linktohtml>$$Uhttps://www.proquest.com/docview/3045955876?pq-origsite=primo$$EHTML$$P50$$Gproquest$$Hfree_for_read</linktohtml><link.rule.ids>780,784,25753,37012,44590</link.rule.ids></links><search><creatorcontrib>Qian, Haifeng</creatorcontrib><creatorcontrib>Gonugondla, Sujan Kumar</creatorcontrib><creatorcontrib>Ha, Sungsoo</creatorcontrib><creatorcontrib>Shang, Mingyue</creatorcontrib><creatorcontrib>Gouda, Sanjay Krishna</creatorcontrib><creatorcontrib>Nallapati, Ramesh</creatorcontrib><creatorcontrib>Sengupta, Sudipta</creatorcontrib><creatorcontrib>Ma, Xiaofei</creatorcontrib><creatorcontrib>Deoras, Anoop</creatorcontrib><title>BASS: Batched Attention-optimized Speculative Sampling</title><title>arXiv.org</title><description>Speculative decoding has emerged as a powerful method to improve latency and throughput in hosting large language models. However, most existing implementations focus on generating a single sequence. Real-world generative AI applications often require multiple responses and how to perform speculative decoding in a batched setting while preserving its latency benefits poses non-trivial challenges. This paper describes a system of batched speculative decoding that sets a new state of the art in multi-sequence generation latency and that demonstrates superior GPU utilization as well as quality of generations within a time budget. For example, for a 7.8B-size model on a single A100 GPU and with a batch size of 8, each sequence is generated at an average speed of 5.8ms per token, the overall throughput being 1.1K tokens per second. These results represent state-of-the-art latency and a 2.15X speed-up over optimized regular decoding. Within a time budget that regular decoding does not finish, our system is able to generate sequences with HumanEval Pass@First of 43% and Pass@All of 61%, far exceeding what's feasible with single-sequence speculative decoding. Our peak GPU utilization during decoding reaches as high as 15.8%, more than 3X the highest of that of regular decoding and around 10X of single-sequence speculative decoding.</description><subject>Budgets</subject><subject>Generative artificial intelligence</subject><subject>Large language models</subject><subject>Sequences</subject><issn>2331-8422</issn><fulltext>true</fulltext><rsrctype>article</rsrctype><creationdate>2024</creationdate><recordtype>article</recordtype><sourceid>PIMPY</sourceid><recordid>eNpjYuA0MjY21LUwMTLiYOAtLs4yMDAwMjM3MjU15mQwc3IMDrZScEosSc5ITVFwLClJzSvJzM_TzS8oyczNrAKKBRekJpfmJJZklqUqBCfmFuRk5qXzMLCmJeYUp_JCaW4GZTfXEGcP3YKi_MLS1OKS-Kz80qI8oFS8sYGJqaWpqYW5mTFxqgCZhjUp</recordid><startdate>20240626</startdate><enddate>20240626</enddate><creator>Qian, Haifeng</creator><creator>Gonugondla, Sujan Kumar</creator><creator>Ha, Sungsoo</creator><creator>Shang, Mingyue</creator><creator>Gouda, Sanjay Krishna</creator><creator>Nallapati, Ramesh</creator><creator>Sengupta, Sudipta</creator><creator>Ma, Xiaofei</creator><creator>Deoras, Anoop</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>20240626</creationdate><title>BASS: Batched Attention-optimized Speculative Sampling</title><author>Qian, Haifeng ; Gonugondla, Sujan Kumar ; Ha, Sungsoo ; Shang, Mingyue ; Gouda, Sanjay Krishna ; Nallapati, Ramesh ; Sengupta, Sudipta ; Ma, Xiaofei ; Deoras, Anoop</author></sort><facets><frbrtype>5</frbrtype><frbrgroupid>cdi_FETCH-proquest_journals_30459558763</frbrgroupid><rsrctype>articles</rsrctype><prefilter>articles</prefilter><language>eng</language><creationdate>2024</creationdate><topic>Budgets</topic><topic>Generative artificial intelligence</topic><topic>Large language models</topic><topic>Sequences</topic><toplevel>online_resources</toplevel><creatorcontrib>Qian, Haifeng</creatorcontrib><creatorcontrib>Gonugondla, Sujan Kumar</creatorcontrib><creatorcontrib>Ha, Sungsoo</creatorcontrib><creatorcontrib>Shang, Mingyue</creatorcontrib><creatorcontrib>Gouda, Sanjay Krishna</creatorcontrib><creatorcontrib>Nallapati, Ramesh</creatorcontrib><creatorcontrib>Sengupta, Sudipta</creatorcontrib><creatorcontrib>Ma, Xiaofei</creatorcontrib><creatorcontrib>Deoras, Anoop</creatorcontrib><collection>ProQuest SciTech Collection</collection><collection>ProQuest Technology Collection</collection><collection>Materials Science & Engineering Collection</collection><collection>ProQuest Central (Alumni)</collection><collection>ProQuest Central</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>Qian, Haifeng</au><au>Gonugondla, Sujan Kumar</au><au>Ha, Sungsoo</au><au>Shang, Mingyue</au><au>Gouda, Sanjay Krishna</au><au>Nallapati, Ramesh</au><au>Sengupta, Sudipta</au><au>Ma, Xiaofei</au><au>Deoras, Anoop</au><format>book</format><genre>document</genre><ristype>GEN</ristype><atitle>BASS: Batched Attention-optimized Speculative Sampling</atitle><jtitle>arXiv.org</jtitle><date>2024-06-26</date><risdate>2024</risdate><eissn>2331-8422</eissn><abstract>Speculative decoding has emerged as a powerful method to improve latency and throughput in hosting large language models. However, most existing implementations focus on generating a single sequence. Real-world generative AI applications often require multiple responses and how to perform speculative decoding in a batched setting while preserving its latency benefits poses non-trivial challenges. This paper describes a system of batched speculative decoding that sets a new state of the art in multi-sequence generation latency and that demonstrates superior GPU utilization as well as quality of generations within a time budget. For example, for a 7.8B-size model on a single A100 GPU and with a batch size of 8, each sequence is generated at an average speed of 5.8ms per token, the overall throughput being 1.1K tokens per second. These results represent state-of-the-art latency and a 2.15X speed-up over optimized regular decoding. Within a time budget that regular decoding does not finish, our system is able to generate sequences with HumanEval Pass@First of 43% and Pass@All of 61%, far exceeding what's feasible with single-sequence speculative decoding. Our peak GPU utilization during decoding reaches as high as 15.8%, more than 3X the highest of that of regular decoding and around 10X of single-sequence speculative decoding.</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-06 |
issn | 2331-8422 |
language | eng |
recordid | cdi_proquest_journals_3045955876 |
source | Publicly Available Content Database |
subjects | Budgets Generative artificial intelligence Large language models Sequences |
title | BASS: Batched Attention-optimized Speculative Sampling |
url | http://sfxeu10.hosted.exlibrisgroup.com/loughborough?ctx_ver=Z39.88-2004&ctx_enc=info:ofi/enc:UTF-8&ctx_tim=2025-01-01T17%3A49%3A32IST&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=BASS:%20Batched%20Attention-optimized%20Speculative%20Sampling&rft.jtitle=arXiv.org&rft.au=Qian,%20Haifeng&rft.date=2024-06-26&rft.eissn=2331-8422&rft_id=info:doi/&rft_dat=%3Cproquest%3E3045955876%3C/proquest%3E%3Cgrp_id%3Ecdi_FETCH-proquest_journals_30459558763%3C/grp_id%3E%3Coa%3E%3C/oa%3E%3Curl%3E%3C/url%3E&rft_id=info:oai/&rft_pqid=3045955876&rft_id=info:pmid/&rfr_iscdi=true |