Folding Attention: Memory and Power Optimization for On-Device Transformer-based Streaming Speech Recognition

Yang Li, Liangzhen Lai, Yuan Shangguan, Forrest N. Iandola, Zhaoheng Ni +3 more
9/14/2023
cs.LGcs.ARcs.SD

No confident code implementation found for this paper. 1 possible match can be shown below.

Abstract

Transformer-based models excel in speech recognition. Existing efforts to optimize Transformer inference, typically for long-context applications, center on simplifying attention score calculations. However, streaming speech recognition models usually process a limited number of tokens each time, making attention score calculation less of a bottleneck. Instead, the bottleneck lies in the linear projection layers of multi-head attention and feedforward networks, constituting a substantial portion of the model size and contributing significantly to computation, memory, and power usage. To address this bottleneck, we propose folding attention, a technique targeting these linear layers, significantly reducing model size and improving memory and power efficiency. Experiments on on-device Transformer-based streaming speech recognition models show that folding attention reduces model size (and corresponding memory consumption) by up to 24% and power consumption by up to 23%, all without compromising model accuracy or computation overhead.

View on arXivView PDF

Code Implementations

No confident code match yet

We couldn't find an author-owned or strongly-evidenced community implementation for this paper. 1 weaker match is hidden by default — verify before relying on them.

No code implementations found yet.

Know of an implementation? Let us know in the comments below!

Similar Papers

Cite this paper

@article{li2023folding,
  title  = {Folding Attention: Memory and Power Optimization for On-Device Transformer-based Streaming Speech Recognition},
  author = {Yang Li and Liangzhen Lai and Yuan Shangguan and Forrest N. Iandola and Zhaoheng Ni and Ernie Chang and Yangyang Shi and Vikas Chandra},
  year   = {2023},
  eprint = {2309.07988},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2309.07988v3}
}

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/2309.07988.svg)](https://codeofpaper.com/paper/2309.07988)

Discussion