An Architecture for Accelerated Large-Scale Inference of Transformer-Based Language Models

Amir Ganiev, Colton Chapin, Anderson De Andrade, Chen Liu


Abstract
This work demonstrates the development process of a machine learning architecture for inference that can scale to a large volume of requests. We used a BERT model that was fine-tuned for emotion analysis, returning a probability distribution of emotions given a paragraph. The model was deployed as a gRPC service on Kubernetes. Apache Spark was used to perform inference in batches by calling the service. We encountered some performance and concurrency challenges and created solutions to achieve faster running time. Starting with 200 successful inference requests per minute, we were able to achieve as high as 18 thousand successful requests per minute with the same batch job resource allocation. As a result, we successfully stored emotion probabilities for 95 million paragraphs within 96 hours.
Anthology ID:
2021.naacl-industry.21
Volume:
Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Industry Papers
Month:
June
Year:
2021
Address:
Online
Editors:
Young-bum Kim, Yunyao Li, Owen Rambow
Venue:
NAACL
SIG:
Publisher:
Association for Computational Linguistics
Note:
Pages:
163–169
Language:
URL:
https://aclanthology.org/2021.naacl-industry.21
DOI:
10.18653/v1/2021.naacl-industry.21
Bibkey:
Cite (ACL):
Amir Ganiev, Colton Chapin, Anderson De Andrade, and Chen Liu. 2021. An Architecture for Accelerated Large-Scale Inference of Transformer-Based Language Models. In Proceedings of the 2021 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies: Industry Papers, pages 163–169, Online. Association for Computational Linguistics.
Cite (Informal):
An Architecture for Accelerated Large-Scale Inference of Transformer-Based Language Models (Ganiev et al., NAACL 2021)
Copy Citation:
PDF:
https://aclanthology.org/2021.naacl-industry.21.pdf
Video:
 https://aclanthology.org/2021.naacl-industry.21.mp4