Fast Vocabulary Projection Method via Clustering for Multilingual Machine Translation on GPU

Hossam Amer, Mohamed Afify, Young Jin Kim, Hitokazu Matsushita, Hany Hassan


Abstract
Multilingual Neural Machine Translation has been showing great success using transformer models. Deploying these models is challenging because they usually require large vocabulary (vocab) sizes for various languages. This limits the speed of predicting the output tokens in the last vocab projection layer. To alleviate these challenges, this paper proposes a fast vocabulary projection method via clustering which can be used for multilingual transformers on GPUs. First, we offline split the vocab search space into disjoint clusters given the hidden context vector of the decoder output, which results in much smaller vocab columns for vocab projection. Second, at inference time, the proposed method predicts the clusters and candidate active tokens for hidden context vectors at the vocab projection. This paper also includes analysis of different ways of building these clusters in multilingual settings. Our results show end-to-end speed gains in float16 GPU inference up to 25% while maintaining the BLEU score and slightly increasing memory cost. The proposed method speeds up the vocab projection step itself by up to 2.6x. We also conduct an extensive human evaluation to verify the proposed method preserves the quality of the translations from the original model.
Anthology ID:
2022.amta-research.5
Volume:
Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track)
Month:
September
Year:
2022
Address:
Orlando, USA
Venue:
AMTA
SIG:
Publisher:
Association for Machine Translation in the Americas
Note:
Pages:
58–69
Language:
URL:
https://aclanthology.org/2022.amta-research.5
DOI:
Bibkey:
Cite (ACL):
Hossam Amer, Mohamed Afify, Young Jin Kim, Hitokazu Matsushita, and Hany Hassan. 2022. Fast Vocabulary Projection Method via Clustering for Multilingual Machine Translation on GPU. In Proceedings of the 15th biennial conference of the Association for Machine Translation in the Americas (Volume 1: Research Track), pages 58–69, Orlando, USA. Association for Machine Translation in the Americas.
Cite (Informal):
Fast Vocabulary Projection Method via Clustering for Multilingual Machine Translation on GPU (Amer et al., AMTA 2022)
Copy Citation:
PDF:
https://preview.aclanthology.org/ingestion-script-update/2022.amta-research.5.pdf