paper-with-me

홈 › Papers

Lossless Acceleration of Large Language Model via Adaptive N-gram Parallel Decoding

2024-04-10 · Jie Ou, Yueming Chen, Wenhong Tian

While Large Language Models (LLMs) have shown remarkable abilities, they are hindered by significant resource consumption and considerable latency due to autoregressive processing. In this study, we introduce Adaptive N-gram Parallel Decoding (ANPD), an innovative and lossless approach that accelerates inference by allowing the simultaneous generation of multiple tokens. ANPD incorporates a two-stage approach: it begins with a rapid drafting phase that employs an N-gram module, which adapts based on the current interactive context, followed by a verification phase, during which the original LLM assesses and confirms the proposed tokens. Consequently, ANPD preserves the integrity of the LLM's original output while enhancing processing speed. We further leverage a multi-level architecture for the N-gram module to enhance the precision of the initial draft, consequently reducing inference latency. ANPD eliminates the need for retraining or extra GPU memory, making it an efficient and plug-and-play enhancement. In our experiments, models such as LLaMA and its fine-tuned variants have shown speed improvements up to 3.67x, validating the effectiveness of our proposed ANPD.

📄 PDF Abstract BibTeX arXiv:2404.08698

Code (1)

oujieww/anpd 공식 구현 pytorch

Tasks

GPULanguage ModelingLanguage ModellingLarge Language Model

Methods 이 논문이 사용한 방법론

SPEED The monocular depth estimation (MDE) is the task of estimating depth from a single frame. This information is an essential knowledge in many computer vision tasks such as scene…
LLaMA LLaMA is a collection of foundation language models ranging from 7B to 65B parameters. It is based on the transformer architecture with various improvements that were…

Similar Papers 제목 키워드 기반

CAS-Spec: Cascade Adaptive Self-Speculative Decoding for On-the-Fly Lossless Inference Acceleration of LLMs

2025-10-30 · Zhiyuan Ning, Jiawei Shao, Ruge Xu, Xinfei Guo 외 arxiv

Speculative decoding has become a widely adopted as an effective technique for lossless inference acceleration when deploying large language models (LLMs). While on-the-fly self-speculative methods offer seamless integra…

SampleAttention: Near-Lossless Acceleration of Long Context LLM Inference with Adaptive Structured Sparse Attention

2024-06-17 · Qianchao Zhu, Jiangfei Duan, Chang Chen, Siran Liu 외

Large language models (LLMs) now support extremely long context windows, but the quadratic complexity of vanilla attention results in significantly long Time-to-First-Token (TTFT) latency. Existing approaches to address …

LaCache: Exact Caching and Precision-Adaptive Inference for Diffusion Large Language Models

2026-07-16 · Xingru Chen, Zelang Liang, Yongjia Ma, Jiqing Zhan 외 arxiv

Diffusion-based Large Language Models(DLLMs) enable parallel generation via Semi-Autoregressive (SAR) decoding in text generation. However, current methods suffer from severe operator-level redundancy: they recompute the…

Text Generation

BiTA: Bi-Directional Tuning for Lossless Acceleration in Large Language Models

2024-01-23 · Feng Lin, Hanling Yi, Hongbin Li, Yifan Yang 외

Large language models (LLMs) commonly employ autoregressive generation during inference, leading to high memory bandwidth demand and consequently extended latency. To mitigate this inefficiency, we present Bi-directional…

Lossless Acceleration for Seq2seq Generation with Aggressive Decoding

2022-05-20 · Tao Ge, Heming Xia, Xin Sun, Si-Qing Chen 외

We study lossless acceleration for seq2seq generation with a novel decoding algorithm -- Aggressive Decoding. Unlike the previous efforts (e.g., non-autoregressive decoding) speeding up seq2seq generation at the cost of …

Abstractive Text SummarizationGPUGrammatical Error CorrectionMachine Translation+3