Mix-of-Language-Experts Architecture for Multilingual Programming

Yifan Zong, Yuntian Deng, Pengyu Nie
6/18/2025
2 citations
cs.PLcs.CLcs.SE
lora-peft-merging

Official code: uw-swag/mole (2 stars, Python, Apache-2.0, last commit 2025-06-25).

Abstract

Large language models (LLMs) have demonstrated impressive capabilities in aiding developers with tasks like code comprehension, generation, and translation. Supporting multilingual programming -- i.e., coding tasks across multiple programming languages -- typically requires either (1) finetuning a single LLM across all programming languages, which is cost-efficient but sacrifices language-specific specialization and performance, or (2) finetuning separate LLMs for each programming language, which allows for specialization but is computationally expensive and storage-intensive due to the duplication of parameters.

Show full abstract

This paper introduces MoLE (Mix-of-Language-Experts), a novel architecture that balances efficiency and specialization for multilingual programming. MoLE is composed of a base model, a shared LoRA (low-rank adaptation) module, and a collection of language-specific LoRA modules. These modules are jointly optimized during the finetuning process, enabling effective knowledge sharing and specialization across programming languages. During inference, MoLE automatically routes to the language-specific LoRA module corresponding to the programming language of the code token being generated. Our experiments demonstrate that MoLE achieves greater parameter efficiency compared to training separate language-specific LoRAs, while outperforming a single shared LLM finetuned for all programming languages in terms of accuracy.

View on arXivView PDF

Code Implementations(1)

uw-swag/moleOfficial100%
Apache-2.0

MoLE (Mix-of-Language-Experts) model architecture for multilingual programming

20Python, ShellApr 1, 20251 years agoApache-2.0
code-generationcode-summarizationcode-translationllmllm4code+3 more

Similar Papers

Cite this paper

@article{zong2025mixoflanguageexperts,
  title  = {Mix-of-Language-Experts Architecture for Multilingual Programming},
  author = {Yifan Zong and Yuntian Deng and Pengyu Nie},
  year   = {2025},
  eprint = {2506.18923},
  archivePrefix = {arXiv},
  url    = {http://arxiv.org/abs/2506.18923v1}
}

Add a badge to your README

Shows whether official code is linked for this paper.

Code of Paper badge
[![Code of Paper](https://codeofpaper.com/badge/2506.18923.svg)](https://codeofpaper.com/paper/2506.18923)

Discussion