TL;DR
This paper investigates how to best adapt Large Language Models (LLMs) to a wider range of languages using Continual Pretraining (CPT). They found that while bilingual data helps classification, it causes language mixing in generation. Surprisingly, code data significantly boosts classification and language modeling, especially for low-resource languages, but at a slight cost to generation quality. Crucially, existing language classifications (altruistic, selfish, stagnant) don't reliably predict how CPT will affect them, highlighting the complexity of multilingual adaptation.
What Problem Does This Paper Address?
Large Language Models (LLMs) are incredibly powerful, but their performance is often uneven across languages. High-resource languages (like English) tend to perform much better than low-resource languages, creating a digital language divide. Continual Pretraining (CPT) is a promising technique to bridge this gap by further training pre-trained LLMs on new data. However, it's not clear what kind of data is most effective for CPT in a multilingual setting. Specifically, the authors want to understand:
- How do monolingual, bilingual, and code-augmented data strategies compare for multilingual CPT?
- How do different language characteristics (like their tendency to help or hinder other languages) interact with CPT strategies?
- Can existing classifications of languages based on their cross-lingual transfer behavior predict CPT outcomes?
Methods
The researchers conducted a large-scale, systematic evaluation of 36 different Continual Pretraining (CPT) configurations. They used three popular multilingual base models (Llama-3.1-8B, Llama-2-7B, and Viking-7B) and trained them on over 30 languages, spanning high, medium, and low resource levels.
Their CPT configurations varied in:
- Data Type: Monolingual (single language texts), Bilingual (parallel sentence pairs), and Code (programming code).
- Language Category: Languages were grouped into "altruistic," "selfish," and "stagnant" based on prior work's hypotheses about their cross-lingual transfer behavior.
- Inclusion of Code: Some configurations explicitly included programming code data.
They evaluated the models on two main tasks:
- Topic Classification (SIB-200): To assess how well models understand text within a language.
- Machine Translation (FLORES-200): To evaluate cross-lingual alignment and transfer.
Datasets
The study utilized several datasets:
- Bilingual Translation Data: Subsets from Lego-MT (derived from OPUS) and NLLB, providing parallel sentence pairs across many languages.
- Monolingual Data: A subset of MADLAD-400, a large multilingual dataset derived from Common Crawl, filtered for monolingual integrity.
- Code Data: From "The Stack" dataset, focusing on data science-related code and common programming languages, with LLVM code also included.
The evaluation benchmarks were:
- SIB-200: A multilingual news topic classification benchmark.
- FLORES-200: A benchmark for multilingual machine translation.
Key Insights and Ideas
- Bilingual CPT: Good for Classification, Bad for Generation: While bilingual CPT significantly improves classification accuracy, especially for lower-resource languages, it introduces problematic "language mixing" during generation tasks. This means the model might output text in multiple languages unintentionally, making it less useful for translation.
- Code Data is a Multilingual Power-Up (with a Trade-off): Including programming code in CPT consistently boosts classification accuracy and language modeling capabilities across all resource levels. It's particularly beneficial for low-resource languages, acting as a "scaffold" for learning. However, this comes at a cost: a slight degradation in generation quality.
- Language Classifications Don't Hold Up: The authors found that existing classifications of languages as "altruistic," "selfish," or "stagnant" (based on their hypothesized cross-lingual transfer behavior) do not reliably predict how CPT will affect them. For instance, "altruistic" languages sometimes hurt related languages, and "stagnant" languages can show surprising adaptability. This suggests a need for more nuanced ways to categorize languages for CPT.
Key Results
- Bilingual CPT: Improved classification accuracy for mid- and low-resource languages but led to significant language mixing in generation. For example, in FLORES-200, bilingual CPT configurations underperformed monolingual CPT across all resource levels, with Llama-3.1-8B showing a -71% relative drop in BLEU score for high-resource languages.
- Code Data: Consistently improved SIB-200 classification accuracy. For low-resource languages, code integration led to substantial gains (e.g., Viking-7B saw a +63.2% improvement in classification accuracy). However, it slightly degraded generation quality in some scenarios. For instance, in FLORES-200, code integration sometimes led to small drops in BLEU scores for high-resource languages.
- Language Category Hypotheses: The study found significant deviations from prior work. For example, 83% of configurations degraded related language performance when trained on "altruistic" languages. "Stagnant" languages, contrary to their name, showed significant performance shifts in 92% of configurations.
Limitations and Future Work
- Language Mixing: The persistent issue of language mixing in bilingual CPT generation remains a significant limitation, hindering its utility for translation tasks.
- Trade-offs: The paper highlights a trade-off between classification/language modeling improvements and generation quality when using code data.
- Generalizability of Classifications: The failure of existing language classifications to generalize across different CPT strategies indicates a need for more adaptive frameworks.
The authors suggest future research should focus on developing more adaptive CPT methods that can better balance classification gains with generation quality, and explore more flexible frameworks for language categorization to better inform multilingual CPT strategies.
Summary updated