madlad400-3b-mt / README.md
jbochi's picture
Add more languages and dataset
e355542
|
raw
history blame
2.01 kB
---
license: apache-2.0
language:
- en
- pt
- es
- de
- it
- ru
- fr
- pl
- nl
- vi
- tr
- sv
- id
- ro
- cs
- zh
- hu
- ja
- th
- fi
- fa
- uk
- da
- el
- 'no'
- bg
- sk
- ko
- ar
- lt
- ca
- sl
- he
- et
- lv
- hi
- sq
- af
library_name: transformers
tags:
- text-generation-inference
---
T5ForConditionalGeneration files for Google's [Madlad-400](https://github.com/google-research/google-research/tree/master/madlad_400) 3B parameter MT model.
Article: [MADLAD-400: A Multilingual And Document-Level Large Audited Dataset](https://arxiv.org/abs/2309.04662)
Abstract:
> We introduce MADLAD-400, a manually audited, general domain 3T token monolingual dataset based on CommonCrawl, spanning 419 languages. We discuss the limitations revealed by self-auditing MADLAD-400, and the role data auditing had in the dataset creation process. We then train and release a 10.7B-parameter multilingual machine translation model on 250 billion tokens covering over 450 languages using publicly available data, and find that it is competitive with models that are significantly larger, and report the results on different domains. In addition, we train a 8B-parameter language model, and assess the results on few-shot translation. We make the baseline models available to the research community.
```python
from transformers import T5ForConditionalGeneration, T5Tokenizer, GenerationConfig
model = T5ForConditionalGeneration.from_pretrained('jbochi/madlad400-3b-mt')
tokenizer = T5Tokenizer.from_pretrained('jbochi/madlad400-3b-mt')
text = "<2es> how do you say torch in portuguese?"
input_ids = tokenizer(text, return_tensors="pt").input_ids
outputs = model.generate(
input_ids=input_ids,
generation_config=GenerationConfig(
decoder_start_token_id=2,
))
tokenizer.decode(outputs[0], skip_special_tokens=True)
# como se dice antorcha en portugués?
```
Colab to generate these files is [here](https://colab.research.google.com/drive/1rZ2NRyl2zwmg0sQ2Wi-uZZF48iVYulTC#scrollTo=pVODoE6gA9sw).