Model reference · open weights
mt0-xxl-mt is an open-weight language model from bigscience. AxForge deploys and operates it for you on dedicated EU-owned hardware — with the licence handled where one is required.
Available as managed deployment — configured and operated for you on dedicated EU hardware, quoted per deployment.
What it is
| Maker | bigscience |
|---|---|
| Type | Language models |
| Task | Text gen |
| Parameters (lead) | 13.9B |
| Runs with | transformers |
| Released | 2022-10-27 |
| Popularity | 55 downloads / month |
| Licence | Open weights |
About
We present BLOOMZ & mT0, a family of models capable of following human instructions in dozens of languages zero-shot. We finetune BLOOM & mT5 pretrained multilingual language models on our crosslingual task mixture (xP3) and find our resulting models capable of crosslingual generalization to unseen tasks & languages.
We recommend using the model to perform tasks expressed in natural language. For example, given the prompt "Translate to English: Je t’aime.", the model will most likely answer "I love you.". Some prompt ideas from our paper:
Feel free to share your generations in the Community tab!
# pip install -q transformers
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
checkpoint = "bigscience/mt0-xxl-mt"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)
inputs = tokenizer.encode("Translate to English: Je t’aime.", return_tensors="pt")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
# pip install -q transformers accelerate
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
checkpoint = "bigscience/mt0-xxl-mt"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint, torch_dtype="auto", device_map="auto")
inputs = tokenizer.encode("Translate to English: Je t’aime.", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
# pip install -q transformers accelerate bitsandbytes
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
checkpoint = "bigscience/mt0-xxl-mt"
tokenizer = AutoTokenizer.from_pretrained(checkpoint)
model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint, device_map="auto", load_in_8bit=True)
inputs = tokenizer.encode("Translate to English: Je t’aime.", return_tensors="pt").to("cuda")
outputs = model.generate(inputs)
print(tokenizer.decode(outputs[0]))
Prompt Engineering: The performance may vary depending on the prompt. For BLOOMZ models, we recommend making it very clear when the input stops to avoid the model trying to continue it. For example, the prompt "Translate to English: Je t'aime" without the full stop (.) at the end, may result in the model trying to continue the French sentence. Better prompts are e.g. "Translate to English: Je t'aime.", "Translate to English: Je t'aime. Translation:" "What is "Je t'aime." in English?", where it is clear for the model when it should answer. Further, we recommend providing the model as much context as possible. For example, if you want it to answer in Telugu, then tell the model, e.g. "Explain in a sentence in Telugu what is backpropagation in neural networks.".
config.json fileWe refer to Table 7 from our paper & bigscience/evaluation-results for zero-shot results on unseen tasks. The sidebar reports zero-shot performance of the best prompt per dataset config.
@article{muennighoff2022crosslingual,
title={Crosslingual generalization through multitask finetuning},
author={Muennighoff, Niklas and Wang, Thomas and Sutawika, Lintang and Roberts, Adam and Biderman, Stella and Scao, Teven Le and Bari, M Saiful and Shen, Sheng and Yong, Zheng-Xin and Schoelkopf, Hailey and others},
journal={arXiv preprint arXiv:2211.01786},
year={2022}
}
From the published model card. Full card on the HuggingFace links in the sidebar.
Benchmarks
As published on the model card — the maker's own numbers, not measured by AxForge.
| Task | Dataset | Metric | Score |
|---|---|---|---|
| Coreference resolution | Winogrande XL (xl) | Accuracy | 62.670 |
| Coreference resolution | XWinograd (en) | Accuracy | 83.310 |
| Coreference resolution | XWinograd (fr) | Accuracy | 78.310 |
| Coreference resolution | XWinograd (jp) | Accuracy | 80.190 |
| Coreference resolution | XWinograd (pt) | Accuracy | 80.990 |
| Coreference resolution | XWinograd (ru) | Accuracy | 79.050 |
| Coreference resolution | XWinograd (zh) | Accuracy | 82.340 |
| Natural language inference | ANLI (r1) | Accuracy | 49.500 |
| Natural language inference | ANLI (r2) | Accuracy | 42 |
| Natural language inference | ANLI (r3) | Accuracy | 48.170 |
| Natural language inference | SuperGLUE (cb) | Accuracy | 87.500 |
| Natural language inference | SuperGLUE (rte) | Accuracy | 84.840 |
| Natural language inference | XNLI (ar) | Accuracy | 58.030 |
| Natural language inference | XNLI (bg) | Accuracy | 59.920 |
| Natural language inference | XNLI (de) | Accuracy | 60.160 |
| Natural language inference | XNLI (el) | Accuracy | 59.200 |
| Natural language inference | XNLI (en) | Accuracy | 62.250 |
| Natural language inference | XNLI (es) | Accuracy | 60.920 |
| Natural language inference | XNLI (fr) | Accuracy | 59.880 |
| Natural language inference | XNLI (hi) | Accuracy | 57.470 |
| Natural language inference | XNLI (ru) | Accuracy | 58.670 |
| Natural language inference | XNLI (sw) | Accuracy | 56.790 |
| Natural language inference | XNLI (th) | Accuracy | 58.030 |
| Natural language inference | XNLI (tr) | Accuracy | 57.670 |
Using it via the API
Once AxForge deploys mt0-xxl-mt for you, it answers on the OpenAI-compatible API — the same base URL and keys as every other model. (mt0-xxl-mt below is illustrative; you get the exact model name on deployment.)
$ curl -sS https://api.axforge.ai/v1/chat/completions \
-H "Authorization: Bearer $AXFORGE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"mt0-xxl-mt","messages":[{"role":"user","content":"Hello"}]}'
Create an account — your API key is available in the console. 5M tokens/month currently included with every new account at launch.