Bactrian-X : A Multilingual Replicable Instruction-Following Model with Low-Rank Adaptation

Haonan Li, Fajri Koto, Minghao Wu, Alham Fikri Aji, Timothy Baldwin · OpenReview

Abstract

Instruction tuning has shown great promise in the field of natural language processing. However, the research on multilingual instruction tuning has been limited due to the scarcity of high-quality instruction-response datasets. To address this gap, we present Bactrian-X, a comprehensive multilingual parallel dataset of 3.4 million instruction-response pairs across 52 languages. Leveraging this dataset, we train a set of adapters using low-rank adaptation (LoRA), which are lightweight components seamlessly integrated with foundational models. These adapters have a significantly smaller parameter count than the base model, making them easily replaceable and usable as plug-ins for different languages or language groups. Through extensive experiments on 52 languages, we demonstrate the superior performance of our models in various multilingual evaluation settings. Our proposed models outperform both the vanilla models and the existing instruction-tuned models. The code and models are publicly available at https://github.com/mbzuai-nlp/bactrian-x.

Introduction: Bridging the Multilingual Gap

While Large Language Models (LLMs) are often pre-trained on massive multilingual corpora, their "instruction tuning"—the process that teaches them to follow specific commands—has remained stubbornly English-centric. Popular datasets like Alpaca and Dolly are almost entirely English. Existing multilingual alternatives, such as xP3, often rely on rigid, human-written templates for classic NLP tasks (like summarization), which lack the linguistic variety and "organic" feel of general-purpose instructions.

This scarcity of high-quality, diverse instruction-response pairs in other languages hinders the development of open-source models that can follow instructions globally. The authors aim to democratize instruction-following capabilities by creating a replicable pipeline for multilingual tuning.

Methodology: The Bactrian-X Pipeline

The authors developed a two-step pipeline to create the Bactrian-X dataset and subsequent models:

  1. Instruction Translation: They took 67k English instructions from the Alpaca and Dolly datasets and translated them into 51 other languages using the Google Translate API.
  2. Response Distillation: Instead of translating the original English responses (which can result in awkward "translationese"), they used ChatGPT (gpt-3.5-turbo) to generate fresh responses based on the translated instructions. This "distillation" method ensures the responses are more natural and contextually appropriate for each language.
  3. Parameter-Efficient Fine-Tuning (PEFT): Rather than updating all billions of parameters in a model, they used LoRA (Low-Rank Adaptation). This involves adding small, trainable "adapter" layers to the base model. These adapters are lightweight and can be easily swapped out or shared, making the models highly portable.
The Bactrian-X data generation and model training pipeline.

Datasets and Evaluation

The resulting Bactrian-X dataset is a parallel collection of 3.4 million instances (67k per language) across 52 languages. To test the models, the authors used a battery of multilingual tasks including XCOPA (causal commonsense reasoning), XStoryCloze (predicting story endings), XWinograd (resolving pronoun ambiguities), SentimentX (multilingual sentiment analysis), and EXAMS (multiple-choice questions from high school exams in 16 languages).

Key Results and Insights

BX-LLaMA and BX-BLOOM consistently outperformed their vanilla base models and existing instruction-tuned versions (like Alpaca-LoRA and BLOOMZ) across almost all benchmarks. On the EXAMS benchmark, BX-LLaMA (13B) outperformed the base LLaMA model by an average of 5.5%.

Performance comparison of Bactrian-X models against base and instruction-tuned baselines across multilingual benchmarks.

Key Insights

  • The Power of Adapters: Using LoRA allows for "modular" multilinguality. You can have one base LLaMA model and simply plug in the "Bactrian-X" adapter to enable high-quality instruction following across dozens of languages without needing a massive GPU cluster for full fine-tuning.
  • Distillation > Translation: By using ChatGPT to generate responses in the target language rather than translating English responses, the authors avoided the "translationese" trap, resulting in higher-quality training data.
  • Pre-training is Still King: The models performed best on languages that were well-represented during their initial pre-training phase. However, instruction tuning on Bactrian-X provided a significant boost even for "unseen" languages, suggesting that the model learns the concept of following instructions across linguistic boundaries.
  • Reasoning remains the "Final Boss": While the models improved across the board, "Fermi" (estimation) and "Math" problems remained difficult for all models in all languages, highlighting a persistent weakness in current LLM reasoning capabilities.

Limitations and Future Work

Due to hardware constraints, the maximum sequence length was limited to 768 tokens, which is shorter than the 1024 or 2048 tokens used by many state-of-the-art models. This may limit the model's ability to handle very long prompts or documents. Additionally, while ChatGPT distillation helps, the initial instructions still rely on Google Translate, which may introduce subtle errors in low-resource languages. The authors acknowledge they did not perform an exhaustive audit for hallucination, toxicity, or cultural bias, which are critical for real-world deployment. Future work could explore whether these multilingual benefits scale linearly to 70B+ parameter models.

Summary updated

Abstract

Instruction tuning has shown great promise in the field of natural language processing. However, the research on multilingual instruction tuning has been limited due to the scarcity of high-quality instruction-response datasets. To address this gap, we present Bactrian-X, a comprehensive multilingual parallel dataset of 3.4 million instruction-response pairs across 52 languages. Leveraging this dataset, we train a set of adapters using low-rank adaptation (LoRA), which are lightweight components seamlessly integrated with foundational models. These adapters have a significantly smaller parameter count than the base model, making them easily replaceable and usable as plug-ins for different languages or language groups. Through extensive experiments on 52 languages, we demonstrate the superior performance of our models in various multilingual evaluation settings. Our proposed models outperform both the vanilla models and the existing instruction-tuned models. The code and models are publicly available at https://github.com/mbzuai-nlp/bactrian-x.
BibTeX
@misc{li2023bactrian,
  author = {Haonan Li and Fajri Koto and Minghao Wu and Alham Fikri Aji and Timothy Baldwin},
  title = {{Bactrian-X : A Multilingual Replicable Instruction-Following Model with Low-Rank Adaptation}},
  year = {2023},
  eprint = {2305.15011},
  archivePrefix = {arXiv},
  url = {https://arxiv.org/abs/2305.15011},
}
Figure