Convolution models with long filters have demonstrated state-of-the-art reasoning abilities in many long-sequence tasks but lag behind the most optimized Transformers in wall-clock time. A major bottleneck is the Fast Fourier Transform (FFT)--which allows long convolutions to run in $O(N logN)$ time in sequence length $N$ but has poor hardware utilization. In this paper, we study how to optimize the FFT convolution. We find two key bottlenecks: the FFT does not effectively use specialized matrix multiply units, and it incurs expensive I/O between layers of the memory hierarchy. In response, we propose FlashFFTConv. FlashFFTConv uses a matrix decomposition that computes the FFT using matrix multiply units and enables kernel fusion for long sequences, reducing I/O. We also present two sparse convolution algorithms--1) partial convolutions and 2) frequency-sparse convolutions--which can be implemented simply by skipping blocks in the matrix decomposition, enabling further opportunities for memory and compute savings. FlashFFTConv speeds up exact FFT convolutions by up to 7.93$\times$ over PyTorch and achieves up to 4.4$\times$ speedup end-to-end. Given the same compute budget, FlashFFTConv allows Hyena-GPT-s to achieve 2.3 points better perplexity on the PILE and M2-BERT-base to achieve 3.3 points higher GLUE score--matching models with twice the parameter count. FlashFFTConv also achieves 96.1% accuracy on Path-512, a high-resolution vision task where no model had previously achieved better than 50%. Furthermore, partial convolutions enable longer-sequence models--yielding the first DNA model that can process the longest human genes (2.3M base pairs)--and frequency-sparse convolutions speed up pretrained models while maintaining or improving model quality.
Tensor network compressibility of convolutional models
Multiverse Computing(多元宇宙计算公司);Donostia International Physics Center(多诺斯蒂亚国际物理中心);Institute for Advanced Studies in Basic Sciences (IASBS)(基础科学高级研究所);Ikerbasque Foundation for Science(伊克尔巴斯克科学基金会)
Speeding-up Convolutional Neural Networks Using Fine-tuned CP-Decomposition
Skolkovo Institute of Science and Technology (Skoltech)(斯科尔科沃科学技术学院(Skoltech));Yandex;Moscow Institute of Physics and Technology(莫斯科物理技术学院);Institute of Numerical Mathematics RAS(俄罗斯科学院数值数学研究所)
Flexible Coded Distributed Convolution Computing for Enhanced Straggler Resilience and Numerical Stability in Distributed CNNs
College of Computer Science, Chongqing University(重庆大学计算机学院);School of Electrical Engineering, Korea University(韩国大学电气工程学院);School of Electronic Information and Communications, Huazhong University of Science and Technology(华中科技大学电子信息与通信学院);City University of Hong Kong(香港城市大学)
Convolutional Surrogate for 3D Discrete Fracture-Matrix Tensor Upscaling
Institute of New Technologies and Applied Informatics, Faculty of Mechatronics, Informatics and Interdisciplinary Studies, Technical University of Liberec(新技术与应用信息学研究所,机电、信息与跨学科研究学院,利贝雷茨技术大学)
LunaTP: Enabling Efficient and Scalable Tensor Product for Equivariant MLIPs
State Key Lab of Processors, Institute of Computing Technology, Chinese Academy of Sciences(中国科学院计算技术研究所处理器重点实验室);University of Chinese Academy of Sciences(中国科学院大学)
Neural Networks for Predicting Permeability Tensors of 2D Porous Media: Comparison of Convolution- and Transformer-based Architectures
PoreLab, The Njord Centre, Department of Physics, University of Oslo(PoreLab、Njord中心、物理系、奥斯陆大学);PoreLab, Department of Physics, Norwegian University of Science and Technology(PoreLab、物理系、挪威科学技术大学);The Njord Centre, Department of Physics, University of Oslo(Njord中心、物理系、奥斯陆大学)