atlas

Research map / Architectures and efficiency / Attention and transformers

DiJiang: Efficient Large Language Models through Compact Kernelization

ICML 2024 · Architectures and efficiency › Attention and transformers · approach: Long-context KV and memory attention · 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.

Converts pre-trained softmax-attention Transformers into linear-complexity models via frequency-domain (DCT-based) weighted quasi-Monte Carlo kernelization, requiring only light fine-tuning.

Problem

Quadratic attention cost in Transformers, and the fact that existing linear-attention methods require costly retraining, which is impractical for large language models.

Approach

Approximates the Gaussian/softmax attention kernel with positive fixed features built from quasi-Monte Carlo points, adds a learnable per-feature weight, and computes the random-feature projection with a DCT so that a pre-trained vanilla Transformer can be converted to linear attention with little fine-tuning.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Replace Pythia-70M vanilla attention with DiJiang attentionPythia-70M · Pythia-70M evaluation averageAvg: 0.375 -> 0.389Helped
Replace Pythia-160M vanilla attention with DiJiang attentionPythia-160M · Pythia-160M evaluation averageAvg: 0.391 -> 0.398Helped
Replace Pythia-410M vanilla attention with DiJiang attentionPythia-410M · Pythia-410M evaluation averageAvg: 0.454 -> 0.456Helped
Replace Pythia-1B vanilla attention with DiJiang attentionPythia-1B · Pythia-1B evaluation averageAvg: 0.456 -> 0.440Hurt
Replace Pythia-2.8B vanilla attention with DiJiang attentionPythia-2.8B · Pythia-2.8B evaluation averageAvg: 0.478 -> 0.473Hurt
Replace vanilla attention with DiJiang attentionPythia-70M · Pythia-70M fine-tuningTraining time (day): 21.3 -> 1.3Helped
Replace vanilla attention with DiJiang attentionPythia-70M · Pythia-70M, token length 2048Inference throughput (tokens/s): 2037 -> 2605Helped
Use weighted frequency-domain features rather than PFF (ablation)DiJiang on Pythia-410M · Pythia-410M fine-tuning, six benchmarksAvg: 0.4264 -> 0.4567Helped
Replace Pythia-410M vanilla attention with DiJiangPythia-410M · Pythia-410M fine-tuning, six benchmarksAvg: 0.454 -> 0.4567Helped
Replace LLaMA2-7B with fine-tuned DiJiang-7BLLaMA2-7B · LLaMA2-7B benchmark averageAvg: 0.565 -> 0.557Hurt
Fine-tune using DiJiang rather than original-scale trainingLLaMA2-7B · LLaMA2-7B trainingTraining tokens: 2000B -> 40BHelped

Surprising findings

Limitations

Experimental setup

Datasets: The Pile

Benchmarks: PIQA WinoGrande WSC ARC-E ARC-C LogiQA SIQA BoolQ HellaSwag MMLU NQ COPA

Metrics: accuracy average accuracy training time (day) inference throughput (tokens/s) perplexity/loss curves

Baselines: Pythia Linformer Cosformer Performer RetNet OPT-350M TinyLLaMA-1.1B LLaMA2-7B Mamba-1.3B

Builds on: Performer Linear Transformer RetNet Bochner's theorem

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