atlas

Research map / Architectures and efficiency / Attention and transformers

FlashFFTConv: Efficient Convolutions for Long Sequences with Tensor Cores

ICLR 2024 · Architectures and efficiency › Attention and transformers · approach: Sparse efficient transformers for long context · 1 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.

Proposes FlashFFTConv, a fused GPU kernel that computes exact FFT convolutions for long sequences via a Monarch matrix decomposition mapped onto tensor cores, plus partial and frequency-sparse convolutions that skip blocks.

Problem

Long convolution models (long filters equal to sequence length) lag Transformers in wall-clock time because FFT convolutions use poorly on modern accelerators: they do not use tensor cores and incur high I/O between memory levels as sequence length grows.

Approach

Rewrites the FFT convolution as an order-p Monarch decomposition of matrix-matrix multiplies broadcast across the sequence (not batch/hidden), so permutations become on-chip transposes and kernels can be fused up to 32K+ sequence length; sparsity in the convolution (partial kernels and frequency-sparse kernels) is realized by skipping blocks of these matmuls.

Key results

Measured effects reported in the paper

What was changedWhereMeasuredEffect
Use FlashFFTConv instead of PyTorch under the same compute budgetM2-BERT-base-110M · GLUEGLUE score: 77.6 -> 80.9Helped
Use FlashFFTConv instead of PyTorch under the same compute budgetHyena-s-155M · Pileperplexity: 13.4 -> 11.1Helped
Enable a 256K sequence length with FlashFFTConvLong convolution model · Path-512accuracyHelped
Use FlashFFTConv instead of PyTorchFFT convolution · Sequence length 1Kforward latency: 1.57 -> 0.24 msHelped
Remove the tensor-core Monarch decomposition while retaining fusion (ablation)FlashFFTConv · FFT convolution, sequence length 1Kforward latency: 0.24 -> 0.67 msHurt
Fuse gating operations into the convolutionGated convolution · Sequence length 1Kforward latency: 2.30 -> 0.29 msHelped
Use FlashFFTConv instead of PyTorchM2-BERT-base-110M · Sequence length 128throughput: 4,480 -> 8,580 seqs/sHelped
Use FlashFFTConv rather than FlashAttention-v2Hyena-2.7B compared with GPT-2.7B · Sequence length 16Kthroughput: 21.6 -> 32.3 thousands of tokens per secondHelped
Shorten the convolution filter to 2K (ablation)Hyena-s-8K · Hyena-s-8Kperplexity: 13.8 -> 13.8No clear effect
Extend the pretrained HyenaDNA-1M model to 4M sequence length using partial convolutions (ablation)HyenaDNA-1M · DNA validationperplexity: 2.91 -> 2.90No clear effect
Set 75% of frequency-domain filter entries to zero (ablation)HyenaDNA-1M · DNA validationperplexity: 2.91 -> 2.90Helped
Set 79% of frequency-domain filter entries to zero (ablation)HyenaDNA-1M · DNA validationperplexity: 2.91 -> 2.91No clear effect

Surprising findings

Limitations

Experimental setup

Datasets: The Pile C4 GLUE Path-X Path-512 HyenaDNA genome data

Benchmarks: GLUE Path-X Path-512 The Pile perplexity HyenaDNA validation perplexity

Metrics: wall-clock time (ms) throughput memory footprint FLOP utilization perplexity GLUE score classification accuracy speedup

Baselines: PyTorch FFT convolution cuFFTdx fusion-only FlashAttention-v2 GPT-2.7B PyTorch convolution end-to-end

Builds on: Monarch FFT decomposition FlashAttention HyenaDNA Hyena M2-BERT

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