atlas

Research map / Large language models / Language, safety and interpretability

When Linear Attention Meets Autoregressive Decoding: Towards More Effective and Efficient Linearized Large Language Models

ICML 2024 · Large language models › Language, safety and interpretability · approach: Parallel and early-exit decoding · 0 citations (OpenAlex)

Read the paperCheck your idea against 108,967 papers

AI-extracted summary. Written by AI from the paper's full text. Numbers and claims can be wrong or missing context, so check the paper before you cite or build on it.

Studies seven linear attention methods on autoregressive LLMs and proposes a causally masked depthwise-conv augmentation with grouped linear attention that is compatible with Medusa-style tree-based speculative decoding.

Problem

Linear attention methods were designed for encoder models and leak future information or fail in autoregressive decoding; they also clash with speculative decoding's tree-based attention, so the combined benefit for training and serving LLMs is unclear.

Approach

Apply a causal (masked) depthwise convolution inside the attention block on top of grouped linear attention with local softmax attention, and unfold the convolution (img2col-style) so it respects Medusa's tree attention mask during speculative decoding.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace original attention with augmented linear attentionLLaMA-2-7B · sequence length 8192inference latency: 2355.0 -> 1029.7 msHelped
Replace original attention with augmented linear attentionLLaMA-2-13B · sequence length 8192inference latency: 3805.0 -> 1737.1 msHelped
Add local augmentation and grouped LA (ablation)LLaMA-2-7B · PG-19perplexity: 15.04 -> 13.47Helped
Add local augmentation and grouped LA (ablation)LLaMA-2-13B · PG-19perplexity: 12.92 -> 11.55Helped
Add local augmentation to grouped LA (ablation)GPT-2 · GLUEaverage accuracy: 70.22 -> 71.55Helped
Add local augmentation to grouped LA (ablation)T5 · GLUEaverage accuracy: 62.75 -> 64.51Helped
Integrate speculative decodingLLaMA-7B with local attention · MT-Benchthroughput: 32.3 (1.0x) -> 63.3 (2.0x)Helped
Use causal, speculative-decoding-compatible augmentation instead of direct FLASH + Medusa integrationLLaMA-2-7B · speculative decodingtotal latency: 137.2 ms -> 49.7 ms (-64%)Helped
Replace original attention with augmented linear attentionFLASH · training sequence length 4Kseconds per training step: 1.60 seconds -> 1.05 secondsHelped
Use augmented linear attention for longer-sequence fine-tuningLLaMA-2-7B · sequence length extension 4K to 8Kperplexity: 15.29 -> 13.86Helped

Surprising findings

Limitations

Experimental setup

Datasets: Wiki40B RedPajama GLUE enwik8 PG-19 MT-Bench CNN/Daily Mail Wikitext2 PTB

Benchmarks: GLUE PG-19 Wiki40B MT-Bench BBH PIQA MMLU COPA ARC-C AGNews CNN/Daily Mail

Metrics: accuracy perplexity latency throughput memory ROUGE

Baselines: FLASH-Local FLASH-Global Linformer Performer TransNormer YOSO ReLU linear attention Medusa

Builds on: FLASH Medusa LongLoRA Performer Linformer

Closest papers by meaning

Writing a paper in this area? scime draft is a free LaTeX editor with AI included, real-time co-authors and a check of your references and venue rules before you submit. It also imports OpenAI Prism projects.

Open scime draft

Get the next scime Dispatch and a monthly field update

Free. We send a confirmation link first; every email has a one-click unsubscribe. Privacy