English

A Compression-Compilation Framework for On-mobile Real-time BERT Applications

Machine Learning 2021-06-08 v2 Artificial Intelligence

Abstract

Transformer-based deep learning models have increasingly demonstrated high accuracy on many natural language processing (NLP) tasks. In this paper, we propose a compression-compilation co-design framework that can guarantee the identified model to meet both resource and real-time specifications of mobile devices. Our framework applies a compiler-aware neural architecture optimization method (CANAO), which can generate the optimal compressed model that balances both accuracy and latency. We are able to achieve up to 7.8x speedup compared with TensorFlow-Lite with only minor accuracy loss. We present two types of BERT applications on mobile devices: Question Answering (QA) and Text Generation. Both can be executed in real-time with latency as low as 45ms. Videos for demonstrating the framework can be found on https://www.youtube.com/watch?v=_WIRvK_2PZI

Keywords

Cite

@article{arxiv.2106.00526,
  title  = {A Compression-Compilation Framework for On-mobile Real-time BERT Applications},
  author = {Wei Niu and Zhenglun Kong and Geng Yuan and Weiwen Jiang and Jiexiong Guan and Caiwen Ding and Pu Zhao and Sijia Liu and Bin Ren and Yanzhi Wang},
  journal= {arXiv preprint arXiv:2106.00526},
  year   = {2021}
}

Comments

arXiv admin note: substantial text overlap with arXiv:2009.06823

R2 v1 2026-06-24T02:42:43.917Z