sPhinX: Sample Efficient Multilingual Instruction Fine-Tuning Through N-shot Guided Prompting

Sanchit Ahuja, Kumar Tanmay, Hardik Hansrajbhai Chauhan, Barun Patra, Kriti Aggarwal, Luciano Del Corro, Arindam Mitra, Tejas Indulal Dhamecha, Ahmed Hassan Awadallah, Monojit Choudhury, Vishrav Chaudhary, Sunayana Sitaram

TL;DR

This paper introduces SPHINX, a novel multilingual instruction fine-tuning dataset and strategy that significantly improves Large Language Model (LLM) performance across 51 languages, particularly in low-resource settings. By selectively augmenting existing English instruction data with multilingual translations and employing an N-shot guided fine-tuning approach (LANGIT), SPHINX achieves substantial gains without catastrophic forgetting of English capabilities.

What Problem Does This Paper Address?

Large Language Models (LLMs) excel in English but exhibit a significant performance gap in many other languages, especially low-resource ones. Existing methods for multilingual instruction fine-tuning often rely on direct translation of English datasets, which can lead to a loss of semantic nuance and diversity, or require extensive pre-training resources. Furthermore, fine-tuning on specific languages can cause "catastrophic forgetting" of English performance. This paper aims to bridge this gap by creating a more diverse and effective multilingual instruction dataset and a novel fine-tuning strategy.

Methods

The core of this work lies in two main contributions:

  • SPHINX Dataset Construction: Instead of direct translation of entire instruction-response pairs, SPHINX employs "Selective Translated Augmentation." This method intelligently translates only the necessary components of English instruction-response pairs from the Orca dataset into 50 other languages, using GPT-4. This preserves semantic intent and linguistic context, leading to a more diverse and higher-quality dataset. The dataset comprises 1.8 million instruction-response pairs across 51 languages, with a tiered sampling strategy for high, mid, and low-resource languages to mitigate catastrophic forgetting.
  • LANGIT (Language-Specific N-shot Guided Instruction Tuning): This novel fine-tuning strategy augments each training example with a few contextually relevant N-shot examples from the same language. This provides the model with in-context learning examples, guiding it to better understand and follow instructions within that specific language. The number of few-shot examples is sampled probabilistically, up to six, to respect context length limitations.

Datasets

  • Training Data: The primary training dataset is SPHINX, comprising 1.8 million instruction-response pairs in 51 languages, generated by selectively translating and augmenting the Orca dataset.
  • Evaluation Datasets: The authors evaluate their models on several multilingual instruction tuning datasets, including:
  • BACTRIAN: A machine-translated dataset from Alpaca and Dolly.
  • M-ALPACA: A self-instruct dataset translated into 11 languages.
  • AYA: A human-curated prompt-completion dataset in 65 languages.
  • SPHINX-T: A baseline dataset created by directly translating the SPHINX dataset using the Azure Translator API.
  • Evaluation Benchmarks: The models are evaluated on a suite of discriminative and generative tasks, including:
  • XCOPA, XStoryCloze, XWinograd, Belebele: For commonsense reasoning and reading comprehension.
  • XQuAD: For question answering.
  • WMT14, WMT16, WMT23: For machine translation.
  • Standard English LLM benchmarks: MMLU, MedQA, Arc-C, Arc-E, PiQA, WinoGrande, OpenBookQA, BoolQ, Common Sense QA, and GSM-8k.

Key Insights and Ideas

  • Selective Translation is Key: Directly translating entire instruction-response pairs can be suboptimal. Translating only the essential parts of an instruction, guided by a powerful LLM like GPT-4, preserves semantic nuance and leads to higher-quality multilingual data.
  • N-shot Guidance Enhances Multilingualism: Providing a few in-context examples in the target language during fine-tuning (LANGIT) significantly boosts a model's ability to follow instructions in that language, especially for complex or nuanced tasks.
  • Diversity Prevents Catastrophic Forgetting: The SPHINX dataset's diverse sampling strategy, which avoids identical instruction sets across languages, helps maintain strong performance on English benchmarks even after extensive multilingual fine-tuning.
  • Low-Resource Languages Benefit Most: The most significant performance gains are observed in low-resource languages, demonstrating SPHINX's effectiveness in bridging the performance gap.

Key Results

  • Fine-tuning MISTRAL-7B and PHI-3-SMALL on SPHINX resulted in an average performance improvement of 39.8% and 11.2%, respectively, across multilingual benchmarks.
  • The LANGIT strategy further boosted performance by an average of 15% and 3.2% for MISTRAL-7B and PHI-3-SMALL, respectively, compared to vanilla fine-tuning with SPHINX.
  • SPHINX-trained models outperformed the SPHINX-T (API-translated baseline) by an average of 11.7% and 6.3% for MISTRAL-7B and PHI-3-SMALL, respectively.
  • SPHINX models maintained strong performance on standard English benchmarks, showing minimal to no catastrophic forgetting.
  • GPT-40 evaluations favored outputs from the Mistral base model trained with SPHINX and LANGIT, indicating qualitative improvements.

Limitations and Future Work

  • Resource Intensive: The full fine-tuning approach requires significant GPU resources and time, making it potentially difficult to apply to very large models.
  • Model Size: The study was confined to 7B models, excluding larger LLMs.
  • Future Work:
    • Explore adaptive fine-tuning techniques like LoRA and PEFT for efficiency.
  • Investigate using N examples from the same script (not just language) in LANGIT for increased diversity, especially for low-resource languages.
  • Further explore the emergent code-switching phenomena observed in the generated data.
  • The authors plan to release a subset of the augmented dataset (OPEN-SPHINX).

Summary updated

BibTeX
@inproceedings{ahuja2025sphinx,
  author = {Sanchit Ahuja and Kumar Tanmay and Hardik Hansrajbhai Chauhan and Barun Patra and Kriti Aggarwal and Luciano Del Corro and Arindam Mitra and Tejas Indulal Dhamecha and Ahmed Hassan Awadallah and Monojit Choudhury and Vishrav Chaudhary and Sunayana Sitaram},
  title = {{sPhinX: Sample Efficient Multilingual Instruction Fine-Tuning Through N-shot Guided Prompting}},
  booktitle = {Annual Meeting of the Association for Computational Linguistics},
  year = {2025},
}
Figure