NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

Pieces of Eight: 8-bit Neural Machine Translation

Jerry Quinn, Miguel Ballesteros

Abstract

Neural Machine Translation (NMT) has significantly improved translation fluency but remains computationally expensive for real-time deployment on standard CPU hardware. This paper presents a method for quantizing NMT models from 32-bit floating point to 8-bit integers during inference. By leveraging Intel SSE4 vector instructions for matrix operations, we achieve a 5x speedup with virtually no loss in translation quality as measured by BLEU scores and human evaluation. This approach requires no retraining, allowing for the immediate optimization of existing production models on ubiquitous CPU-based cloud infrastructure.

Introduction

The shift from phrase-based statistical models to NMT has revolutionized translation quality. However, the high latency of NMT models—typically executed using 32-bit floating-point arithmetic—often makes them unsuitable for interactive applications on standard CPUs. While GPUs offer a solution for batch processing, they are less cost-effective for single-sentence inference in cloud environments. This research addresses the speed gap by implementing 8-bit quantization for the decoding stage of attentional NMT models.

Methods

The optimization strategy focused on the primary computational bottleneck: matrix operations. Profiling of the 32-bit baseline indicated that over 85% of execution time was spent on matrix-vector and matrix-matrix multiplications.

To address this, the authors implemented 8-bit integer matrix multiplication using Intel SSE4 SIMD instructions. A hybrid precision approach was adopted to maintain accuracy: while the core multiplication is performed in 8-bit, the results are accumulated and stored in 32-bit floating point. This design choice avoids the complexity of dynamic rescaling between layers. Crucially, this technique is applied post-training, enabling the use of existing 32-bit models without modification.

Results

The system was evaluated on news domain data across several language pairs, including Dutch-English, Russian-English, and German-English.

Performance Gains

The 8-bit implementation delivered a substantial increase in translation throughput. As illustrated in Figure 3, the NMT 8-bit system achieved 32.3 words per core second (WPCS), a 5x improvement over the 32-bit baseline (6.5 WPCS). This performance surpasses that of syntax-based statistical systems while providing the superior quality of neural models.

Comparison of translation speed (WPCS) across different translation systems, highlighting the 5x gain of 8-bit NMT over 32-bit.

Quality Preservation

Despite the significant reduction in precision, translation quality remained nearly identical to the 32-bit baseline. BLEU scores across all tested language pairs showed minimal variance, as detailed in Figure 6. For example, English-to-Dutch translation scored 31.2 in both modes.

BLEU scores and speed (WPSC) comparison between 32-bit and 8-bit modes across various language pairs, demonstrating quality parity.

Human evaluation by native speakers corroborated these metrics. On a 0–5 scale, the 8-bit translations were rated as highly as their 32-bit counterparts. In some instances, the 8-bit version received slightly higher scores, suggesting that quantization may provide a beneficial regularizing effect.

Discussion and Conclusion

The success of 8-bit quantization underscores the inherent robustness of neural networks to numerical noise. By discarding 24 bits of precision, the system achieves significant efficiency gains without compromising the model's semantic understanding. Furthermore, the increased speed allows for the use of model ensembles—averaging the outputs of multiple models—to further enhance quality while still maintaining a lower latency than a single 32-bit model.

In conclusion, this work demonstrates that 8-bit quantization is a highly effective technique for accelerating NMT inference on standard CPUs. By providing a 5x speedup with no loss in quality and requiring no retraining, this method offers a practical path for deploying state-of-the-art translation in latency-sensitive, real-world applications.

Summary updated

BibTeX
@inproceedings{quinn2018pieces,
  author = {Jerry Quinn and Miguel Ballesteros},
  title = {{Pieces of Eight: 8-bit Neural Machine Translation}},
  booktitle = {Conference of the North American Chapter of the Association for Computational Linguistics},
  year = {2018},
  url = {https://openreview.net/forum?id=HkEwaGZd-B},
}
Figure