Memory-efficient NLLB-200: Language-specific Expert Pruning of a Massively Multilingual Machine Translation Model

Yeskendir Koishekenov, Alexandre Berard, Vassilina Nikoulina

Introduction

Massively multilingual machine translation (MMMT) models, such as Meta’s NLLB-200, have revolutionized the field by supporting over 200 languages. However, the largest iterations of these models—specifically the 54.5 billion parameter Mixture-of-Experts (MoE) version—present significant deployment challenges. While MoE architectures are computationally efficient during inference because they only activate a subset of parameters per token, they are notoriously "memory-hungry." Standard inference typically requires at least four 32GB GPUs just to accommodate the model weights. This research investigates whether all experts are truly necessary for every language pair and proposes a pruning method to enable state-of-the-art translation on consumer-grade or single-GPU setups.

Methodology: Identifying and Pruning "Lazy" Experts

The researchers explored techniques to identify which experts contribute most to translation quality for specific languages. They evaluated two primary metrics:

  • Activity: A frequency-based count of how often tokens are routed to a specific expert.
  • Importance: A weighted metric combining activity with the "confidence" (gate value) assigned by the model's routing mechanism.

Pruning was tested at various granularities, including global (uniform across all languages), language-pair specific, and language-specific (based on source or target language). A key discovery was the asymmetric requirement for experts between the model's components.

Figure 1: Distribution of experts per layer in the encoder and decoder. The encoder (green) consistently requires significantly more experts than the decoder (blue) to maintain performance.

As shown in Figure 1, the encoder—responsible for multilingual understanding—retains a much higher number of experts compared to the decoder. The optimal configuration utilized a 3:1 ratio, keeping three times as many experts in the encoder as in the decoder.

Performance and Hardware Efficiency

The pruning strategy allows for an 80% reduction in the number of experts (from 1,536 down to approximately 300) without requiring any retraining or fine-tuning. This reduction is critical for hardware accessibility, as it allows the 54.5B parameter model to fit within the memory of a single 32GB V100 GPU.

Figure 4: Average validation performance (chrF++ and spBLEU) across different language resource categories as a function of the percentage of experts retained.

Figure 4 illustrates that the pruned model maintains high translation quality across high, low, and very-low resource languages. On a 53-language test set, the pruned model achieved a chrF++ score of 36.61, representing a negligible 0.2-point drop from the full model (36.81) while still significantly outperforming the 3.3B dense NLLB baseline (35.81). Furthermore, running the pruned model on a single GPU matches the speed of the full model distributed across four GPUs by eliminating inter-GPU communication overhead.

Key Insights

  • Understanding vs. Generation: The 3:1 expert ratio suggests that multilingual comprehension is a more complex task for the model than generation.
  • Expert Specialization: Hierarchical clustering revealed that experts naturally specialize in linguistically related language groups (e.g., Romance languages sharing experts).
  • Encoder Independence: Encoder experts are largely independent of the target language, meaning an encoder pruned for a specific source language can be reused across multiple translation directions.

Limitations and Future Directions

While highly effective, extreme pruning can occasionally lead to "over-generation" or hallucinations, likely due to the accidental removal of experts responsible for "End of Sentence" tokens. Future work may involve protecting these critical experts or applying minimal fine-tuning to bridge the small remaining performance gap. By releasing the IDs of the pruned experts, the authors have made high-fidelity translation across 200+ languages accessible to a much broader range of researchers.

Summary updated

BibTeX
@inproceedings{koishekenov2023memory,
  author = {Yeskendir Koishekenov and Alexandre Berard and Vassilina Nikoulina},
  title = {{Memory-efficient NLLB-200: Language-specific Expert Pruning of a Massively Multilingual Machine Translation Model}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2023},
  doi = {10.18653/v1/2023.acl-long.198},
}
Figure