An Efficient Sparse Inference Software Accelerator for Transformer-based Language Models on CPUs
Not on the map. Why?
Abstract (arXiv)
In recent years, Transformer-based language models have become the standard approach for natural language processing tasks. However, stringent throughput and latency requirements in industrial applications are limiting their adoption. To mitigate the gap, model compression techniques such as structured pruning are being used to improve inference efficiency. However, most existing neural network inference runtimes lack adequate support for structured sparsity. In this paper, we propose an efficient sparse deep learning inference software stack for Transformer-based language models where the weights are pruned with constant block size. Our sparse software accelerator leverages Intel Deep Learning Boost to maximize the performance of sparse matrix - dense matrix multiplication (commonly abbreviated as SpMM) on CPUs. Our SpMM kernel outperforms the existing sparse libraries (oneMKL, TVM, and LIBXSMM) by an order of magnitude on a wide range of GEMM shapes under 5 representative sparsity ratios (70%, 75%, 80%, 85%, 90%). Moreover, our SpMM kernel shows up to 5x speedup over dense GEMM kernel of oneDNN, a well-optimized dense library widely used in industry. We apply our sparse accelerator on widely-used Transformer-based language models including Bert-Mini, DistilBERT, Bert-Base, and BERT-Large. Our sparse inference software shows up to 1.5x speedup over Neural Magic's Deepsparse under same configurations on Xeon on Amazon Web Services under proxy production latency constraints. We also compare our solution with two framework-based inference solutions, ONNX Runtime and PyTorch, and demonstrate up to 37x speedup over ONNX Runtime and 345x over PyTorch on Xeon under the latency constraints. All the source code is publicly available on Github: https://github.com/intel/intel-extension-for-transformers.
Key facts. Cited by 2 papers in the map (data through 7 Oct 2026). Builds on 23 of its 28 references that are in the map. First posted on arXiv 28 Jun 2023.
Builds on
23 of 28 references.
References · 23
- 2017Attention Is All You Needcited by 59,932
- 2020Language Models are Few-Shot Learnerscited by 32,199
- 2015Distilling the Knowledge in a Neural Networkcited by 10,076
- 2019DistilBERT, a distilled version of BERT: smaller, faster, cheaper and lightercited by 4,243
- 2015Learning both Weights and Connections for Efficient Neural Networkscited by 1,998
- 2017Quantization and Training of Neural Networks for Efficient Integer-Arithmetic-Only Inferencecited by 1,548
- 2019TinyBERT: Distilling BERT for Natural Language Understandingcited by 1,153
- 2022Using DeepSpeed and Megatron to Train Megatron-Turing NLG 530B, A Large-Scale Generative Language Modelcited by 557
- 2022ZeroQuant: Efficient and Affordable Post-Training Quantization for Large-Scale Transformerscited by 517
- 2020MobileBERT: a Compact Task-Agnostic BERT for Resource-Limited Devicescited by 476
- 2020Movement Pruning: Adaptive Sparsity by Fine-Tuningcited by 398
- 2019Q8BERT: Quantized 8Bit BERTcited by 296
11 more
- 2021I-BERT: Integer-only BERT Quantizationcited by 250
- 2020Compressing BERT: Studying the Effects of Weight Pruning on Transfer Learningcited by 184
- 2021Learning N:M Fine-grained Structured Sparse Neural Networks From Scratchcited by 177
- 2021Block Pruning For Faster Transformerscited by 176
- 2019Distilling Task-Specific Knowledge from BERT into Simple Neural Networkscited by 152
- 2022The Optimal BERT Surgeon: Scalable and Accurate Second-Order Pruning for Large Language Modelscited by 115
- 2018Glow: Graph Lowering Compiler Techniques for Neural Networkscited by 73
- 2021Prune Once for All: Sparse Pre-Trained Language Modelscited by 66
- 2019Efficient 8-Bit Quantization of Transformer Neural Machine Language Translation Modelcited by 58
- 2020SparseRT: Accelerating Unstructured Sparsity on GPUs for Deep Learning Inferencecited by 30
- 2021SparseDNN: Fast Sparse Deep Learning Inference on CPUscited by 13
Built on by
Citing papers per year: 2023: 1; 2024: 1.
2 papers.