File size: 17,012 Bytes
e6b0084
 
2d84ea7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
e6b0084
2d84ea7
 
 
31021ed
2d84ea7
 
 
 
 
 
 
 
 
 
 
 
31021ed
2d84ea7
 
 
 
 
 
 
 
 
 
 
 
31021ed
2d84ea7
 
 
 
31021ed
 
 
 
 
 
 
 
 
 
 
 
2d84ea7
 
 
 
31021ed
2d84ea7
 
31021ed
2d84ea7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
31021ed
 
2d84ea7
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
---
license: apache-2.0
datasets:
  - CohereForAI/xP3x
  - CohereForAI/aya_dataset
  - CohereForAI/aya_collection
  - DataProvenanceInitiative/Commercially-Verified-Licenses
  - CohereForAI/aya_evaluation_suite
language:
  - afr
  - amh
  - ara
  - aze
  - bel
  - ben
  - bul
  - cat
  - ceb
  - ces
  - cym
  - dan
  - deu
  - ell
  - eng
  - epo
  - est
  - eus
  - fin
  - fil
  - fra
  - fry
  - gla
  - gle
  - glg
  - guj
  - hat
  - hau
  - heb
  - hin
  - hun
  - hye
  - ibo
  - ind
  - isl
  - ita
  - jav
  - jpn
  - kan
  - kat
  - kaz
  - khm
  - kir
  - kor
  - kur
  - lao
  - lav
  - lat
  - lit
  - ltz
  - mal
  - mar
  - mkd
  - mlg
  - mlt
  - mon
  - mri
  - msa
  - mya
  - nep
  - nld
  - nor
  - nso
  - nya
  - ory
  - pan
  - pes
  - pol
  - por
  - pus
  - ron
  - rus
  - sin
  - slk
  - slv
  - smo
  - sna
  - snd
  - som
  - sot
  - spa
  - sqi
  - srp
  - sun
  - swa
  - swe
  - tam
  - tel
  - tgk
  - tha
  - tur
  - twi
  - ukr
  - urd
  - uzb
  - vie
  - xho
  - yid
  - yor
  - zho
  - zul
metrics:
  - accuracy
  - bleu
---

<img src="aya-fig1.png" alt="Aya model summary image" width="800" style="margin-left:'auto' margin-right:'auto' display:'block'"/>

# Model Card for Aya 101

## Model Summary

> The Aya model is a massively multilingual generative language model that follows instructions in 101 languages.
> Aya outperforms [mT0](https://huggingface.co/bigscience/mt0-xxl) and [BLOOMZ](https://huggingface.co/bigscience/bloomz) a wide variety of automatic and human evaluations despite covering double the number of languages.
> The Aya model is trained using [xP3x](https://huggingface.co/datasets/CohereForAI/xP3x), [Aya Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset), [Aya Collection](https://huggingface.co/datasets/CohereForAI/aya_collection), a subset of [DataProvenance collection](https://huggingface.co/datasets/DataProvenanceInitiative/Commercially-Verified-Licenses) and ShareGPT-Command.
> We release the checkpoints under a Apache-2.0 license to further our mission of multilingual technologies empowering a
> multilingual world.

- **Developed by:** Cohere For AI
- **Model type:** a Transformer style autoregressive massively multilingual language model.
- **Paper**: [Aya Model: An Instruction Finetuned Open-Access Multilingual Language Model](arxiv.com)
- **Point of Contact**: Cohere For AI: [cohere.for.ai](cohere.for.ai)
- **Languages**: Refer to the list of languages in the `language` section of this model card.
- **License**: Apache-2.0
- **Model**: [Aya](https://huggingface.co/CohereForAI/aya)
- **Model Size**: 13 billion parameters
- **Datasets**: [xP3x](https://huggingface.co/datasets/CohereForAI/xP3x), [Aya Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset), [Aya Collection](https://huggingface.co/datasets/CohereForAI/aya_collection), [DataProvenance collection](https://huggingface.co/datasets/DataProvenanceInitiative/Commercially-Verified-Licenses), ShareGPT-Command.

## Use

```bash
# pip install -q transformers
from transformers import AutoModelForSeq2SeqLM, AutoTokenizer

checkpoint = "CohereForAI/aya-101"

tokenizer = AutoTokenizer.from_pretrained(checkpoint)
aya_model = AutoModelForSeq2SeqLM.from_pretrained(checkpoint)

# Turkish to English translation
tur_inputs = tokenizer.encode("Translate to English: Aya cok dilli bir dil modelidir.", return_tensors="pt")
tur_outputs = aya_model.generate(inputs, max_new_tokens=128)
print(tokenizer.decode(tur_outputs[0]))
# Aya is a multi-lingual language model

# Q: Why are there so many languages in India?
hin_inputs = tokenizer.encode("भारत में इतनी सारी भाषाएँ क्यों हैं?", return_tensors="pt")
hin_outputs = aya_model.generate(inputs, max_new_tokens=128)
print(tokenizer.decode(hin_outputs[0]))
# Expected output: भारत में कई भाषाएँ हैं और विभिन्न भाषाओं के बोली जाने वाले लोग हैं। यह विभिन्नता भाषाई विविधता और सांस्कृतिक विविधता का परिणाम है। Translates to "India has many languages and people speaking different languages. This diversity is the result of linguistic diversity and cultural diversity."

```

## Model Details

### Finetuning

- Architecture: Same as [mt5-xxl](https://huggingface.co/google/mt5-xxl)
- Number of Samples seen during Finetuning: 25M
- Batch size: 256
- Hardware: TPUv4-128
- Software: T5X, Jax

### Data Sources

The Aya model is trained on the following datasets:

- [xP3x](https://huggingface.co/datasets/CohereForAI/xP3x)
- [Aya Dataset](https://huggingface.co/datasets/CohereForAI/aya_dataset)
- [Aya Collection](https://huggingface.co/datasets/CohereForAI/aya_collection)
- [DataProvenance collection](https://huggingface.co/datasets/DataProvenanceInitiative/Commercially-Verified-Licenses)
- ShareGPT-Command

All datasets are subset to the 101 languages supported by [mT5]. See the [paper](arxiv.com) for details about filtering and pruning.

## Evaluation

We refer to Section 5 from our paper for multilingual eval across 99 languages – including discriminative, generative tasks, human evaluation and simulated win rates that cover both held-out tasks and in-distribution performance.

## Bias, Risks, and Limitations


For a detailed overview of our effort at safety mitigation and benchmarking toxicity and bias across multiple languages, we refer Sections 6 and 7 of our paper: [Aya Model: An Instruction Finetuned Open-Access Multilingual Language Model](arxiv.com).

We hope that the release of the Aya model will make community-based redteaming efforts possible, by exposing an open-source massively-multilingual model for community research.

## Citation

**BibTeX:**

```
@article{,
  title={Aya Model: An Instruction Finetuned Open-Access Multilingual Language Model},
  author={Ahmet Üstün, Viraat Aryabumi, Zheng-Xin Yong, Wei-Yin Ko, Daniel D'souza, Gbemileke Onilude, Neel Bhandari, Shivalika Singh, Hui-Lee Ooi, Amr Kayid, Freddie Vargus, Phil Blunsom, Shayne Longpre, Niklas Muennighoff, Marzieh Fadaee, Julia Kreutzer, Sara Hooker},
  journal={Preprint},
  year={2024}
}
```

## Languages Covered

Below is the list of languages used in finetuning the Aya Model. We group languages into higher-, mid-, and lower-resourcedness based on a language classification by [Joshi et. al, 2020](https://microsoft.github.io/linguisticdiversity/). For further details, refer to our [paper]()

| ISO Code | Language Name   |    Script    |     Family      |    Subgrouping    | Resourcedness |
| :------- | :-------------- | :----------: | :-------------: | :---------------: | :-----------: |
| afr      | Afrikaans       |    Latin     |  Indo-European  |     Germanic      |      Mid      |
| amh      | Amharic         |    Ge'ez     |  Afro-Asiatic   |      Semitic      |      Low      |
| ara      | Arabic          |    Arabic    |  Afro-Asiatic   |      Semitic      |     High      |
| aze      | Azerbaijani     | Arabic/Latin |     Turkic      |   Common Turkic   |      Low      |
| bel      | Belarusian      |   Cyrillic   |  Indo-European  |   Balto-Slavic    |      Mid      |
| ben      | Bengali         |   Bengali    |  Indo-European  |    Indo-Aryan     |      Mid      |
| bul      | Bulgarian       |   Cyrillic   |  Indo-European  |   Balto-Slavic    |      Mid      |
| cat      | Catalan         |    Latin     |  Indo-European  |      Italic       |     High      |
| ceb      | Cebuano         |    Latin     |  Austronesian   | Malayo-Polynesian |      Mid      |
| ces      | Czech           |    Latin     |  Indo-European  |   Balto-Slavic    |     High      |
| cym      | Welsh           |    Latin     |  Indo-European  |      Celtic       |      Low      |
| dan      | Danish          |    Latin     |  Indo-European  |     Germanic      |      Mid      |
| deu      | German          |    Latin     |  Indo-European  |     Germanic      |     High      |
| ell      | Greek           |    Greek     |  Indo-European  |  Graeco-Phrygian  |      Mid      |
| eng      | English         |    Latin     |  Indo-European  |     Germanic      |     High      |
| epo      | Esperanto       |    Latin     |   Constructed   |    Esperantic     |      Low      |
| est      | Estonian        |    Latin     |     Uralic      |      Finnic       |      Mid      |
| eus      | Basque          |    Latin     |     Basque      |         -         |     High      |
| fin      | Finnish         |    Latin     |     Uralic      |      Finnic       |     High      |
| fil      | Tagalog         |    Latin     |  Austronesian   | Malayo-Polynesian |      Mid      |
| fra      | French          |    Latin     |  Indo-European  |      Italic       |     High      |
| fry      | Western Frisian |    Latin     |  Indo-European  |     Germanic      |      Low      |
| gla      | Scottish Gaelic |    Latin     |  Indo-European  |      Celtic       |      Low      |
| gle      | Irish           |    Latin     |  Indo-European  |      Celtic       |      Low      |
| glg      | Galician        |    Latin     |  Indo-European  |      Italic       |      Mid      |
| guj      | Gujarati        |   Gujarati   |  Indo-European  |    Indo-Aryan     |      Low      |
| hat      | Haitian Creole  |    Latin     |  Indo-European  |      Italic       |      Low      |
| hau      | Hausa           |    Latin     |  Afro-Asiatic   |      Chadic       |      Low      |
| heb      | Hebrew          |    Hebrew    |  Afro-Asiatic   |      Semitic      |      Mid      |
| hin      | Hindi           |  Devanagari  |  Indo-European  |    Indo-Aryan     |     High      |
| hun      | Hungarian       |    Latin     |     Uralic      |         -         |     High      |
| hye      | Armenian        |   Armenian   |  Indo-European  |      Armenic      |      Low      |
| ibo      | Igbo            |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| ind      | Indonesian      |    Latin     |  Austronesian   | Malayo-Polynesian |      Mid      |
| isl      | Icelandic       |    Latin     |  Indo-European  |     Germanic      |      Low      |
| ita      | Italian         |    Latin     |  Indo-European  |      Italic       |     High      |
| jav      | Javanese        |    Latin     |  Austronesian   | Malayo-Polynesian |      Low      |
| jpn      | Japanese        |   Japanese   |     Japonic     |     Japanesic     |     High      |
| kan      | Kannada         |   Kannada    |    Dravidian    |  South Dravidian  |      Low      |
| kat      | Georgian        |   Georgian   |   Kartvelian    |   Georgian-Zan    |      Mid      |
| kaz      | Kazakh          |   Cyrillic   |     Turkic      |   Common Turkic   |      Mid      |
| khm      | Khmer           |    Khmer     |  Austroasiatic  |      Khmeric      |      Low      |
| kir      | Kyrgyz          |   Cyrillic   |     Turkic      |   Common Turkic   |      Low      |
| kor      | Korean          |    Hangul    |    Koreanic     |      Korean       |     High      |
| kur      | Kurdish         |    Latin     |  Indo-European  |      Iranian      |      Low      |
| lao      | Lao             |     Lao      |    Tai-Kadai    |      Kam-Tai      |      Low      |
| lav      | Latvian         |    Latin     |  Indo-European  |   Balto-Slavic    |      Mid      |
| lat      | Latin           |    Latin     |  Indo-European  |      Italic       |      Mid      |
| lit      | Lithuanian      |    Latin     |  Indo-European  |   Balto-Slavic    |      Mid      |
| ltz      | Luxembourgish   |    Latin     |  Indo-European  |     Germanic      |      Low      |
| mal      | Malayalam       |  Malayalam   |    Dravidian    |  South Dravidian  |      Low      |
| mar      | Marathi         |  Devanagari  |  Indo-European  |    Indo-Aryan     |      Low      |
| mkd      | Macedonian      |   Cyrillic   |  Indo-European  |   Balto-Slavic    |      Low      |
| mlg      | Malagasy        |    Latin     |  Austronesian   | Malayo-Polynesian |      Low      |
| mlt      | Maltese         |    Latin     |  Afro-Asiatic   |      Semitic      |      Low      |
| mon      | Mongolian       |   Cyrillic   | Mongolic-Khitan |     Mongolic      |      Low      |
| mri      | Maori           |    Latin     |  Austronesian   | Malayo-Polynesian |      Low      |
| msa      | Malay           |    Latin     |  Austronesian   | Malayo-Polynesian |      Mid      |
| mya      | Burmese         |   Myanmar    |  Sino-Tibetan   |   Burmo-Qiangic   |      Low      |
| nep      | Nepali          |  Devanagari  |  Indo-European  |    Indo-Aryan     |      Low      |
| nld      | Dutch           |    Latin     |  Indo-European  |     Germanic      |     High      |
| nor      | Norwegian       |    Latin     |  Indo-European  |     Germanic      |      Low      |
| nso      | Northern Sotho  |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| nya      | Chichewa        |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| ory      | Oriya           |    Oriya     |  Indo-European  |    Indo-Aryan     |      Low      |
| pan      | Punjabi         |   Gurmukhi   |  Indo-European  |    Indo-Aryan     |      Low      |
| pes      | Persian         |    Arabic    |  Indo-European  |      Iranian      |     High      |
| pol      | Polish          |    Latin     |  Indo-European  |   Balto-Slavic    |     High      |
| por      | Portuguese      |    Latin     |  Indo-European  |      Italic       |     High      |
| pus      | Pashto          |    Arabic    |  Indo-European  |      Iranian      |      Low      |
| ron      | Romanian        |    Latin     |  Indo-European  |      Italic       |      Mid      |
| rus      | Russian         |   Cyrillic   |  Indo-European  |   Balto-Slavic    |     High      |
| sin      | Sinhala         |   Sinhala    |  Indo-European  |    Indo-Aryan     |      Low      |
| slk      | Slovak          |    Latin     |  Indo-European  |   Balto-Slavic    |      Mid      |
| slv      | Slovenian       |    Latin     |  Indo-European  |   Balto-Slavic    |      Mid      |
| smo      | Samoan          |    Latin     |  Austronesian   | Malayo-Polynesian |      Low      |
| sna      | Shona           |    Latin     |  Indo-European  |    Indo-Aryan     |      Low      |
| snd      | Sindhi          |    Arabic    |  Indo-European  |    Indo-Aryan     |      Low      |
| som      | Somali          |    Latin     |  Afro-Asiatic   |     Cushitic      |      Low      |
| sot      | Southern Sotho  |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| spa      | Spanish         |    Latin     |  Indo-European  |      Italic       |     High      |
| sqi      | Albanian        |    Latin     |  Indo-European  |     Albanian      |      Low      |
| srp      | Serbian         |   Cyrillic   |  Indo-European  |   Balto-Slavic    |     High      |
| sun      | Sundanese       |    Latin     |  Austronesian   | Malayo-Polynesian |      Low      |
| swa      | Swahili         |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| swe      | Swedish         |    Latin     |  Indo-European  |     Germanic      |     High      |
| tam      | Tamil           |    Tamil     |    Dravidian    |  South Dravidian  |      Mid      |
| tel      | Telugu          |    Telugu    |    Dravidian    |  South Dravidian  |      Low      |
| tgk      | Tajik           |   Cyrillic   |  Indo-European  |      Iranian      |      Low      |
| tha      | Thai            |     Thai     |    Tai-Kadai    |      Kam-Tai      |      Mid      |
| tur      | Turkish         |    Latin     |     Turkic      |   Common Turkic   |     High      |
| twi      | Twi             |    Latin     | Atlantic-Congo  |    Niger-Congo    |      Low      |
| ukr      | Ukrainian       |   Cyrillic   |  Indo-European  |   Balto-Slavic    |      Mid      |
| urd      | Urdu            |    Arabic    |  Indo-European  |    Indo-Aryan     |      Mid      |
| uzb      | Uzbek           |    Latin     |     Turkic      |   Common Turkic   |      Mid      |
| vie      | Vietnamese      |    Latin     |  Austroasiatic  |      Vietic       |     High      |
| xho      | Xhosa           |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| yid      | Yiddish         |    Hebrew    |  Indo-European  |     Germanic      |      Low      |
| yor      | Yoruba          |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |
| zho      | Chinese         |     Han      |  Sino-Tibetan   |      Sinitic      |     High      |
| zul      | Zulu            |    Latin     | Atlantic-Congo  |    Benue-Congo    |      Low      |

## Model Card Contact

For errors in this model card, contact Ahmet or Viraat, `{ahmet, viraat} at cohere dot com`.