Abstract
Leveraging large language models for machine translation has demonstrated promising results. However, it does require the large language models to possess the capability of handling both the source and target languages in machine translation. When it is challenging to find large models that support the desired languages, resorting to continuous learning methods becomes a costly endeavor. To mitigate these expenses, we propose an innovative approach called RD (Relay Decoding), which entails concatenating two distinct large models that individually support the source and target languages. By incorporating a simple mapping layer to facilitate the connection between these two models and utilizing a limited amount of parallel data for training, we successfully achieve superior results in the machine translation task. Experimental results conducted on the Multi30k and WikiMatrix datasets validate the effectiveness of our proposed method.
Introduction
While Large Language Models (LLMs) like LLaMA or GPT-4 have revolutionized natural language processing, their translation capabilities are often constrained by the linguistic breadth of their training data. A model may excel in English-French translation but falter when tasked with Chinese, or vice versa.
When researchers encounter a language pair where no single "bilingual expert" model exists, they typically face two suboptimal choices: Continuous Pre-training, which is computationally prohibitive, or Fine-tuning, which often triggers "catastrophic forgetting" of the model's original linguistic proficiency. Relay Decoding (RD) addresses this by proposing a modular framework: instead of forcing one model to master all languages, we can concatenate two specialized experts.
Methodology
Relay Decoding (RD) utilizes a modular "relay chain" to bridge the gap between two specialized LLMs. The architecture consists of four primary components:
- The Relay Chain: The system connects Model A ($M_a$, the source language expert) to Model B ($M_b$, the target language expert).
- The Mapping Layer: Rather than passing raw text, RD extracts hidden representations from the final layer of $M_a$. A simple linear mapping layer projects these internal mathematical representations into the input space of $M_b$.
- Prompting: A specific prompt structure (e.g.,
###[Chinese]: X ###[English]:) is used to guide the second model's generation process. - Efficient Tuning: To ensure seamless integration, only the small mapping layer is trained, while LoRA (Low-Rank Adaptation) is used to minimally adjust the target model ($M_b$). This allows the bulk of both models' weights to remain frozen, preserving their original capabilities.
Interestingly, while the researchers tested complex cross-attention mechanisms, they found that a simple Fully Connected (FC) linear layer provided the best performance, suggesting that different LLMs represent semantic concepts in surprisingly compatible latent spaces.
Experimental Setup
The effectiveness of RD was evaluated using two primary benchmarks:
- Multi30k: A dataset of image captions. The authors generated a Chinese version using ChatGPT, followed by rigorous manual human revision to ensure quality.
- WikiMatrix: A large-scale corpus of parallel sentences extracted from Wikipedia.
The experiments focused on translating from Chinese (Zh) to French (Fr), German (De), and Czech (Cs). The setup utilized Aquila2 as the Chinese expert and LLaMA as the Western language expert.
Results and Key Insights
The Relay Decoding method consistently outperformed standalone models and traditional baselines across multiple language pairs.
Key Findings:
- Superior Performance: On the Zh-Fr task, RD achieved a 27.36 BLEU score, significantly outperforming standalone LLaMA (25.76) and Aquila2 (19.65), as well as a standard Transformer-based bilingual model (20.70).
- Target Expert Importance: Ablation studies revealed that fine-tuning the second model (the target generator) is more critical than fine-tuning the first. The generator must be optimized to interpret the "relay" signal from the source model.
- Data Efficiency: RD is remarkably efficient, achieving state-of-the-art results with as few as 60,000 parallel sentences, far fewer than the millions typically required for training bilingual models from scratch.
- Modular Flexibility: The framework allows for a "plug-and-play" approach. As better language-specific models are released, they can be integrated into the relay chain without requiring a full retraining of the entire system.
Conclusion and Future Work
Relay Decoding offers a cost-effective and high-performance alternative to traditional multilingual LLM training. While the approach doubles the inference overhead (requiring two models to run), its modularity and data efficiency make it a compelling choice for low-resource or specialized language pairs. Future research will explore training the mapping layer using monolingual data and back-translation, potentially removing the need for human-translated parallel datasets entirely.
Summary updated