Improving the Inference Efficiency of Transformer Models in Machine Translation Tasks by Low-rank Decomposition Methods
In recent years, Transformer model has made remarkable progress in machine translation tasks and has become the mainstream translation model. However, the calculation complexity of Transformer model is high, especially when dealing with long sequences, the inference efficiency becomes a key issue. In order to improve the inference efficiency of Transformer model, a method based on low-rank decomposition is adopted, and the calculation amount is significantly reduced by optimizing the key modules of the model. Firstly, this paper decomposes the self-attention mechanism in the Transformer model into low-rank, and decomposes the high-dimensional matrix into the product of several low-dimensional matrices by using matrix decomposition technology, thus reducing the computational complexity. Secondly, in the process of model training, pruning technology is combined to remove redundant parameters, so as to further reduce the calculation amount and model scale. On the premise of ensuring the translation quality, this paper carries out experimental verification on large-scale data sets, and the results show that this method can greatly improve the inference speed of the model while maintaining the translation performance. For short sentences with less than 100 words, the inference time of the original model is from 50 milliseconds to 140 milliseconds, and the inference time of the low-rank decomposition model is shortened to 40-100 milliseconds, which is a significant improvement for the real-time translation system. The experimental results show that the low-rank decomposition method not only significantly improves the inference efficiency of the model, but also effectively reduces the consumption of computing resources, which provides a more economical and efficient choice for practical application.
Authors
- Liu Zhi-jia
Institutions
- University of Electronic Science and Technology of China (CN)
Publication Details
- Published
- 2024-09-23
- DOI
- https://doi.org/10.1109/icedcs64328.2024.00173
- Citations
- 1
- Primary Topic
- Natural Language Processing Techniques
- Type
- article
- Field-Weighted Citation Impact
- 0.35