Abstract
Large-scale generative language models such as GPT-3 are competitive few-shot learners. While these models are known to be able to jointly represent many different languages, their training data is dominated by English, potentially limiting their cross-lingual generalization. In this work, we train multilingual generative language models on a corpus covering a diverse set of languages, and study their few- and zero-shot learning capabilities in a wide range of tasks. Our largest model with 7.5 billion parameters sets new state of the art in few-shot learning in more than 20 representative languages, outperforming GPT-3 of comparable size in multilingual commonsense reasoning (with +7.4% absolute accuracy improvement in 0-shot settings and +9.4% in 4-shot settings) and natural language inference (+5.4% in each of 0-shot and 4-shot settings). On the FLORES-101 machine translation benchmark, our model outperforms GPT-3 on 171 out of 182 directions with 32 training examples, while surpassing the official supervised baseline in 45 directions. We conduct an in-depth analysis of different multilingual prompting approaches, showing in particular that strong few-shot learning performance across languages can be achieved via cross-lingual transfer through both templates and demonstration examples. Finally, we evaluate our models in social value tasks such as hate speech detection in five languages and find it has limitations similar to comparable sized GPT-3 models.
Introduction
The advent of large-scale autoregressive language models like GPT-3 has transformed Natural Language Processing through "in-context learning." This paradigm allows models to perform tasks using only a natural language prompt and a few examples, without any parameter fine-tuning. However, these foundation models are predominantly English-centric, leaving their multilingual capabilities largely unexplored. While existing multilingual models like mBERT or XLM-R are effective, they are typically masked language models that require extensive task-specific fine-tuning on labeled datasets.
This paper introduces XGLM, a family of multilingual generative language models designed to bridge this gap. By training on a diverse corpus and scaling up to 7.5 billion parameters, the authors investigate whether GPT-3-style few-shot learning can be effectively extended to dozens of languages, including those with limited resources.
Methodology
The authors developed XGLM using a decoder-only Transformer architecture, scaling across four sizes: 564M, 1.7B, 2.9B, and 7.5B parameters.
Pre-training and Data Balancing
The models were trained on CC100-XL, a massive 500-billion-token corpus curated from 68 Common Crawl snapshots across 30 languages. A critical challenge in multilingual training is the dominance of English data. To address this, the authors artificially up-sampled medium- and low-resource languages to ensure the model's capacity was not entirely consumed by English.
Vocabulary and Prompting
To handle diverse scripts and morphologies, a massive joint sub-word vocabulary of 250,000 tokens was used. The study also systematically evaluated prompting strategies, comparing native-language prompts (handcrafted or translated) against "cross-lingual prompting," which uses English templates to frame non-English tasks.
Evaluation Framework
XGLM was evaluated across a broad spectrum of tasks:
- Multilingual Benchmarks: XNLI (inference), XCOPA (commonsense), XWinograd (anaphora), and PAWS-X (paraphrasing).
- XStoryCloze: A new benchmark created by professionally translating the StoryCloze validation set into 10 typologically diverse languages (e.g., Swahili, Telugu, Basque).
- Machine Translation: WMT and FLORES-101.
- English Benchmarks: Standard tasks like StoryCloze, COPA, and PIQA to provide a direct comparison with GPT-3.
Key Results and Insights
Performance Gains
XGLM 7.5B established a new state-of-the-art for few-shot learning in over 20 representative languages. Compared to a similarly sized GPT-3 model (6.7B), XGLM 7.5B achieved significant improvements:
- XCOPA: +7.4% in 0-shot and +9.4% in 4-shot accuracy.
- XNLI: +5.4% improvement in both 0-shot and 4-shot settings.
- Machine Translation: On FLORES-101, XGLM outperformed GPT-3 in 171 out of 182 directions and even surpassed supervised baselines in 45 directions.
The "Universal Anchor" and Cross-lingual Transfer
A surprising finding was that English prompts often yielded better results for non-English tasks than native-language prompts. English appears to act as a "universal anchor," likely because its prevalence in the training data makes it the most robust language for understanding task instructions. Furthermore, the models demonstrated strong cross-lingual transfer: task formats learned from demonstrations in high-resource languages (like English) could be successfully applied to low-resource languages.
Discussion and Limitations
Despite its success, XGLM faces the "curse of multilinguality"—a performance penalty on any single high-resource language (like English) due to capacity sharing across 30 languages. XGLM 7.5B underperformed GPT-3 6.7B on English-only tasks by about 10.9% in zero-shot settings.
Additionally, the reliance on translated benchmarks may introduce "translationese" artifacts that inflate cross-lingual scores. The authors also noted that XGLM shares social value limitations with other large models, such as biases in hate speech detection. Future work will focus on scaling model size further and developing native multilingual datasets to better evaluate true cross-lingual understanding.
Summary updated