mT5 is a multilingual model that follows the recipe of the English language model T5 almost exactly, but is pretrained on web text in 101 languages. It was proposed by Xue et al. at Google in 2020 and presented at NAACL 2021. It handles every task, including translation, summarization, classification, and question answering, in a "string in, string out" (text-to-text) format.
T5 (Text-to-Text Transfer Transformer) has the encoder and decoder of the Transformer, and even for classification it generates the label as a string such as "positive". Its advantage is that every task can be learned with the same training objective (maximum likelihood of the target string), but it was pretrained only on English text. About 80% of the world's population does not speak English, so a model usable across languages was needed.
With the goal of staying as close as possible to the T5 recipe, mT5 changes the following.
- Data: It builds mC4, which extends T5's English dataset C4 to 101 languages
- Language sampling: It adjusts how often each language is sampled so that low-resource languages are also learned well
- Vocabulary: It enlarges the SentencePiece vocabulary to 250,000 tokens
In the paper, mT5 achieved state-of-the-art results at the time on the classification and question answering tasks of the multilingual benchmark XTREME. The largest model, mT5-XXL (13 billion parameters), reached 85.0% accuracy on the entailment task XNLI in the setting where it is fine-tuned only on English and evaluated on other languages. The paper also showed the problem of "accidental translation", where a model fine-tuned only on English translates part of its answer into English, along with a simple way to prevent it.

