Computer Science > Computation and Language
arXiv:2211.07715 (cs)
[Submitted on 27 Oct 2022 (v1), last revised 6 Dec 2022 (this version, v2)]
Title:Fast DistilBERT on CPUs
Authors:Haihao Shen,Ofir Zafrir,Bo Dong,Hengyu Meng,Xinyu Ye,Zhe Wang,Yi Ding,Hanwen Chang,Guy Boudoukh,Moshe Wasserblat
View a PDF of the paper titled Fast DistilBERT on CPUs, by Haihao Shen and 9 other authors
View PDFAbstract:Transformer-based language models have become the standard approach to solving natural language processing tasks. However, industry adoption usually requires the maximum throughput to comply with certain latency constraints that prevents Transformer models from being used in production. To address this gap, model compression techniques such as quantization and pruning may be used to improve inference efficiency. However, these compression techniques require specialized software to apply and deploy at scale. In this work, we propose a new pipeline for creating and running Fast Transformer models on CPUs, utilizing hardware-aware pruning, knowledge distillation, quantization, and our own Transformer inference runtime engine with optimized kernels for sparse and quantized operators. We demonstrate the efficiency of our pipeline by creating a Fast DistilBERT model showing minimal accuracy loss on the question-answering SQuADv1.1 benchmark, and throughput results under typical production constraints and environments. Our results outperform existing state-of-the-art Neural Magic's DeepSparse runtime performance by up to 50% and up to 4.1x performance speedup over ONNX Runtime. Source code is publicly available atthis https URL.
Comments: | 9 pages, NeurIPS 2022, ENLSP Workshop |
Subjects: | Computation and Language (cs.CL); Artificial Intelligence (cs.AI); Machine Learning (cs.LG) |
Cite as: | arXiv:2211.07715 [cs.CL] |
(orarXiv:2211.07715v2 [cs.CL] for this version) | |
https://doi.org/10.48550/arXiv.2211.07715 arXiv-issued DOI via DataCite |
Submission history
From: Haihao Shen [view email][v1] Thu, 27 Oct 2022 07:22:50 UTC (509 KB)
[v2] Tue, 6 Dec 2022 23:12:12 UTC (511 KB)
Full-text links:
Access Paper:
- View PDF
- TeX Source
- Other Formats
View a PDF of the paper titled Fast DistilBERT on CPUs, by Haihao Shen and 9 other authors
References & Citations
Bibliographic and Citation Tools
Bibliographic Explorer(What is the Explorer?)
Connected Papers(What is Connected Papers?)
Litmaps(What is Litmaps?)
scite Smart Citations(What are Smart Citations?)
Code, Data and Media Associated with this Article
alphaXiv(What is alphaXiv?)
CatalyzeX Code Finder for Papers(What is CatalyzeX?)
DagsHub(What is DagsHub?)
Gotit.pub(What is GotitPub?)
Hugging Face(What is Huggingface?)
Papers with Code(What is Papers with Code?)
ScienceCast(What is ScienceCast?)
Demos
Recommenders and Search Tools
Influence Flower(What are Influence Flowers?)
CORE Recommender(What is CORE?)
arXivLabs: experimental projects with community collaborators
arXivLabs is a framework that allows collaborators to develop and share new arXiv features directly on our website.
Both individuals and organizations that work with arXivLabs have embraced and accepted our values of openness, community, excellence, and user data privacy. arXiv is committed to these values and only works with partners that adhere to them.
Have an idea for a project that will add value for arXiv's community?Learn more about arXivLabs.