Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Models

Tri Dao, Beidi Chen, Kaizhao Liang, Jiaming Yang, Zhao Song +2 more
11/30/2021
cs.LG

Official code: HazyResearch/fly (224 stars, Python, Apache-2.0, last commit 2023-02-21).

Abstract

Overparameterized neural networks generalize well but are expensive to train. Ideally, one would like to reduce their computational cost while retaining their generalization benefits.

Show full abstract

Sparse model training is a simple and promising approach to achieve this, but there remain challenges as existing methods struggle with accuracy loss, slow training runtime, or difficulty in sparsifying all model components. The core problem is that searching for a sparsity mask over a discrete set of sparse matrices is difficult and expensive. To address this, our main insight is to optimize over a continuous superset of sparse matrices with a fixed structure known as products of butterfly matrices. As butterfly matrices are not hardware efficient, we propose simple variants of butterfly (block and flat) to take advantage of modern hardware. Our method (Pixelated Butterfly) uses a simple fixed sparsity pattern based on flat block butterfly and low-rank matrices to sparsify most network layers (e.g., attention, MLP). We empirically validate that Pixelated Butterfly is 3x faster than butterfly and speeds up training to achieve favorable accuracy--efficiency tradeoffs. On the ImageNet classification and WikiText-103 language modeling tasks, our sparse models train up to 2.5x faster than the dense MLP-Mixer, Vision Transformer, and GPT-2 medium with no drop in accuracy.

View on arXivView PDF

Code Implementations(1)

HazyResearch/flyOfficial100%
Apache-2.0
22424Python, DockerfileOct 26, 20213 years agoApache-2.0

Similar Papers

Cite this paper

@article{dao2021pixelated,
  title  = {Pixelated Butterfly: Simple and Efficient Sparse training for Neural Network Models},
  author = {Tri Dao and Beidi Chen and Kaizhao Liang and Jiaming Yang and Zhao Song and Atri Rudra and Christopher Ré},
  year   = {2021},
  eprint = {2112.00029},
  archivePrefix = {arXiv},
  url    = {https://arxiv.org/abs/2112.00029}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2112.00029.svg)](https://codeofpaper.com/paper/2112.00029)

Discussion