cointegrated
commited on
Commit
•
71ff111
1
Parent(s):
3e140a9
Update README.md
Browse files
README.md
CHANGED
@@ -1,216 +1,244 @@
|
|
1 |
---
|
2 |
license: cc-by-nc-4.0
|
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 |
This is a port of the multilingual text encoder from https://huggingface.co/facebook/SONAR to `transformers` format from `fairseq2`.
|
208 |
|
|
|
|
|
|
|
|
|
209 |
For advanced examples of usage, please take a look at https://github.com/facebookresearch/SONAR.
|
210 |
|
211 |
How to use:
|
212 |
```Python
|
213 |
-
!pip install transformers sentencepiece -q
|
214 |
|
215 |
import torch
|
216 |
from transformers import AutoTokenizer
|
|
|
1 |
---
|
2 |
license: cc-by-nc-4.0
|
3 |
+
language:
|
4 |
+
- ace
|
5 |
+
- acm
|
6 |
+
- acq
|
7 |
+
- aeb
|
8 |
+
- af
|
9 |
+
- ajp
|
10 |
+
- ak
|
11 |
+
- als
|
12 |
+
- am
|
13 |
+
- apc
|
14 |
+
- ar
|
15 |
+
- ars
|
16 |
+
- ary
|
17 |
+
- arz
|
18 |
+
- as
|
19 |
+
- ast
|
20 |
+
- awa
|
21 |
+
- ayr
|
22 |
+
- azb
|
23 |
+
- azj
|
24 |
+
- ba
|
25 |
+
- bm
|
26 |
+
- ban
|
27 |
+
- be
|
28 |
+
- bem
|
29 |
+
- bn
|
30 |
+
- bho
|
31 |
+
- bjn
|
32 |
+
- bo
|
33 |
+
- bs
|
34 |
+
- bug
|
35 |
+
- bg
|
36 |
+
- ca
|
37 |
+
- ceb
|
38 |
+
- cs
|
39 |
+
- cjk
|
40 |
+
- ckb
|
41 |
+
- crh
|
42 |
+
- cy
|
43 |
+
- da
|
44 |
+
- de
|
45 |
+
- dik
|
46 |
+
- dyu
|
47 |
+
- dz
|
48 |
+
- el
|
49 |
+
- en
|
50 |
+
- eo
|
51 |
+
- et
|
52 |
+
- eu
|
53 |
+
- ee
|
54 |
+
- fo
|
55 |
+
- fj
|
56 |
+
- fi
|
57 |
+
- fon
|
58 |
+
- fr
|
59 |
+
- fur
|
60 |
+
- fuv
|
61 |
+
- gaz
|
62 |
+
- gd
|
63 |
+
- ga
|
64 |
+
- gl
|
65 |
+
- gn
|
66 |
+
- gu
|
67 |
+
- ht
|
68 |
+
- ha
|
69 |
+
- he
|
70 |
+
- hi
|
71 |
+
- hne
|
72 |
+
- hr
|
73 |
+
- hu
|
74 |
+
- hy
|
75 |
+
- ig
|
76 |
+
- ilo
|
77 |
+
- id
|
78 |
+
- is
|
79 |
+
- it
|
80 |
+
- jv
|
81 |
+
- ja
|
82 |
+
- kab
|
83 |
+
- kac
|
84 |
+
- kam
|
85 |
+
- kn
|
86 |
+
- ks
|
87 |
+
- ka
|
88 |
+
- kk
|
89 |
+
- kbp
|
90 |
+
- kea
|
91 |
+
- khk
|
92 |
+
- km
|
93 |
+
- ki
|
94 |
+
- rw
|
95 |
+
- ky
|
96 |
+
- kmb
|
97 |
+
- kmr
|
98 |
+
- knc
|
99 |
+
- kg
|
100 |
+
- ko
|
101 |
+
- lo
|
102 |
+
- lij
|
103 |
+
- li
|
104 |
+
- ln
|
105 |
+
- lt
|
106 |
+
- lmo
|
107 |
+
- ltg
|
108 |
+
- lb
|
109 |
+
- lua
|
110 |
+
- lg
|
111 |
+
- luo
|
112 |
+
- lus
|
113 |
+
- lvs
|
114 |
+
- mag
|
115 |
+
- mai
|
116 |
+
- ml
|
117 |
+
- mar
|
118 |
+
- min
|
119 |
+
- mk
|
120 |
+
- mt
|
121 |
+
- mni
|
122 |
+
- mos
|
123 |
+
- mi
|
124 |
+
- my
|
125 |
+
- nl
|
126 |
+
- nn
|
127 |
+
- nb
|
128 |
+
- npi
|
129 |
+
- nso
|
130 |
+
- nus
|
131 |
+
- ny
|
132 |
+
- oc
|
133 |
+
- ory
|
134 |
+
- pag
|
135 |
+
- pa
|
136 |
+
- pap
|
137 |
+
- pbt
|
138 |
+
- pes
|
139 |
+
- plt
|
140 |
+
- pl
|
141 |
+
- pt
|
142 |
+
- prs
|
143 |
+
- quy
|
144 |
+
- ro
|
145 |
+
- rn
|
146 |
+
- ru
|
147 |
+
- sg
|
148 |
+
- sa
|
149 |
+
- sat
|
150 |
+
- scn
|
151 |
+
- shn
|
152 |
+
- si
|
153 |
+
- sk
|
154 |
+
- sl
|
155 |
+
- sm
|
156 |
+
- sn
|
157 |
+
- sd
|
158 |
+
- so
|
159 |
+
- st
|
160 |
+
- es
|
161 |
+
- sc
|
162 |
+
- sr
|
163 |
+
- ss
|
164 |
+
- su
|
165 |
+
- sv
|
166 |
+
- swh
|
167 |
+
- szl
|
168 |
+
- ta
|
169 |
+
- taq
|
170 |
+
- tt
|
171 |
+
- te
|
172 |
+
- tg
|
173 |
+
- tl
|
174 |
+
- th
|
175 |
+
- ti
|
176 |
+
- tpi
|
177 |
+
- tn
|
178 |
+
- ts
|
179 |
+
- tk
|
180 |
+
- tum
|
181 |
+
- tr
|
182 |
+
- tw
|
183 |
+
- tzm
|
184 |
+
- ug
|
185 |
+
- uk
|
186 |
+
- umb
|
187 |
+
- ur
|
188 |
+
- uzn
|
189 |
+
- vec
|
190 |
+
- vi
|
191 |
+
- war
|
192 |
+
- wo
|
193 |
+
- xh
|
194 |
+
- ydd
|
195 |
+
- yo
|
196 |
+
- yue
|
197 |
+
- zh
|
198 |
+
- zsm
|
199 |
+
- zu
|
200 |
+
language_details: >-
|
201 |
+
ace_Arab, ace_Latn, acm_Arab, acq_Arab, aeb_Arab, afr_Latn, ajp_Arab,
|
202 |
+
aka_Latn, amh_Ethi, apc_Arab, arb_Arab, ars_Arab, ary_Arab, arz_Arab,
|
203 |
+
asm_Beng, ast_Latn, awa_Deva, ayr_Latn, azb_Arab, azj_Latn, bak_Cyrl,
|
204 |
+
bam_Latn, ban_Latn,bel_Cyrl, bem_Latn, ben_Beng, bho_Deva, bjn_Arab, bjn_Latn,
|
205 |
+
bod_Tibt, bos_Latn, bug_Latn, bul_Cyrl, cat_Latn, ceb_Latn, ces_Latn,
|
206 |
+
cjk_Latn, ckb_Arab, crh_Latn, cym_Latn, dan_Latn, deu_Latn, dik_Latn,
|
207 |
+
dyu_Latn, dzo_Tibt, ell_Grek, eng_Latn, epo_Latn, est_Latn, eus_Latn,
|
208 |
+
ewe_Latn, fao_Latn, pes_Arab, fij_Latn, fin_Latn, fon_Latn, fra_Latn,
|
209 |
+
fur_Latn, fuv_Latn, gla_Latn, gle_Latn, glg_Latn, grn_Latn, guj_Gujr,
|
210 |
+
hat_Latn, hau_Latn, heb_Hebr, hin_Deva, hne_Deva, hrv_Latn, hun_Latn,
|
211 |
+
hye_Armn, ibo_Latn, ilo_Latn, ind_Latn, isl_Latn, ita_Latn, jav_Latn,
|
212 |
+
jpn_Jpan, kab_Latn, kac_Latn, kam_Latn, kan_Knda, kas_Arab, kas_Deva,
|
213 |
+
kat_Geor, knc_Arab, knc_Latn, kaz_Cyrl, kbp_Latn, kea_Latn, khm_Khmr,
|
214 |
+
kik_Latn, kin_Latn, kir_Cyrl, kmb_Latn, kon_Latn, kor_Hang, kmr_Latn,
|
215 |
+
lao_Laoo, lvs_Latn, lij_Latn, lim_Latn, lin_Latn, lit_Latn, lmo_Latn,
|
216 |
+
ltg_Latn, ltz_Latn, lua_Latn, lug_Latn, luo_Latn, lus_Latn, mag_Deva,
|
217 |
+
mai_Deva, mal_Mlym, mar_Deva, min_Latn, mkd_Cyrl, plt_Latn, mlt_Latn,
|
218 |
+
mni_Beng, khk_Cyrl, mos_Latn, mri_Latn, zsm_Latn, mya_Mymr, nld_Latn,
|
219 |
+
nno_Latn, nob_Latn, npi_Deva, nso_Latn, nus_Latn, nya_Latn, oci_Latn,
|
220 |
+
gaz_Latn, ory_Orya, pag_Latn, pan_Guru, pap_Latn, pol_Latn, por_Latn,
|
221 |
+
prs_Arab, pbt_Arab, quy_Latn, ron_Latn, run_Latn, rus_Cyrl, sag_Latn,
|
222 |
+
san_Deva, sat_Beng, scn_Latn, shn_Mymr, sin_Sinh, slk_Latn, slv_Latn,
|
223 |
+
smo_Latn, sna_Latn, snd_Arab, som_Latn, sot_Latn, spa_Latn, als_Latn,
|
224 |
+
srd_Latn, srp_Cyrl, ssw_Latn, sun_Latn, swe_Latn, swh_Latn, szl_Latn,
|
225 |
+
tam_Taml, tat_Cyrl, tel_Telu, tgk_Cyrl, tgl_Latn, tha_Thai, tir_Ethi,
|
226 |
+
taq_Latn, taq_Tfng, tpi_Latn, tsn_Latn, tso_Latn, tuk_Latn, tum_Latn,
|
227 |
+
tur_Latn, twi_Latn, tzm_Tfng, uig_Arab, ukr_Cyrl, umb_Latn, urd_Arab,
|
228 |
+
uzn_Latn, vec_Latn, vie_Latn, war_Latn, wol_Latn, xho_Latn, ydd_Hebr,
|
229 |
+
yor_Latn, yue_Hant, zho_Hans, zho_Hant, zul_Latn
|
230 |
---
|
231 |
This is a port of the multilingual text encoder from https://huggingface.co/facebook/SONAR to `transformers` format from `fairseq2`.
|
232 |
|
233 |
+
It supports the same 202 languages as [NLLB-200](https://huggingface.co/facebook/nllb-200-distilled-600M)
|
234 |
+
(see also [the source model card](https://github.com/facebookresearch/SONAR/blob/main/sonar/store/cards/text_sonar_basic_encoder.yaml#L14)
|
235 |
+
and [FLORES-200 lang code mapping](https://github.com/facebookresearch/flores/blob/main/flores200/README.md#languages-in-flores-200)).
|
236 |
+
|
237 |
For advanced examples of usage, please take a look at https://github.com/facebookresearch/SONAR.
|
238 |
|
239 |
How to use:
|
240 |
```Python
|
241 |
+
# !pip install transformers sentencepiece -q
|
242 |
|
243 |
import torch
|
244 |
from transformers import AutoTokenizer
|