Hyperparameter Optimization for Transformer-Based Translation Models on Low-Power Devices

Closed

Muhammad Jauharul Fuady, Alvalen Shafelbilyunazra, Agusta Rakhmat Taufani, Yogi Dwi Mahandi, Shofiyah Al Idrus

2024 2024 Beyond Technology Summit on Informatics International Conference, BTS-I2C 2024 Conference paper Cited by 0 Quartile

Abstract

The limited English proficiency in Indonesia, ranked 79th globally according to the English Proficiency Index (EPI), creates significant barriers in accessing global opportunities across education, business, and technology. Machine Translation (MT), particularly Neural Machine Translation (NMT), has emerged as a promising solution to overcome such linguistic challenges. This study explores the impact of hyperparameter optimization on translation accuracy in models deployed on edge devices, such as the Raspberry Pi Zero, which have limited computational power and memory. A Transformer-based NMT model was developed and trained using the Tatoeba dataset, consisting of English-Indonesian sentence pairs. The primary focus was on optimizing four key hyperparameters: the number of layers (num-layers), model dimension (d-model), feed-forward dimension (dff), and the number of attention heads (num-heads). Eight different scenarios were designed to evaluate how variations in these hyperparameters affect both the model's translation accuracy, measured by the BLEU score, and the execution time on the edge device. The results reveal a trade-off between model accuracy and execution time. While higher values of num-layers, d-model, and num-heads led to improved BLEU scores, they also significantly increased the execution time, sometimes making the model impractical for real-time applications on devices with limited resources. Conversely, configurations with lower hyperparameter values were more efficient in terms of execution time but at the cost of reduced translation accuracy. The findings underscore the importance of carefully balancing hyperparameter settings to achieve a model that is both accurate and efficient on edge devices. This study provides valuable insights for developers aiming to deploy deep learning models on low-power hardware, emphasizing the need for strategic hyperparameter optimization in such constrained environments. © 2024 IEEE.

Affiliations

Universitas Negeri Malang, Malang, Indonesia