tiedeman commited on
Commit
2564f5d
1 Parent(s): a02e231

Initial commit

Browse files
.gitattributes CHANGED
@@ -26,3 +26,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
26
  *.zip filter=lfs diff=lfs merge=lfs -text
27
  *.zstandard filter=lfs diff=lfs merge=lfs -text
28
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
26
  *.zip filter=lfs diff=lfs merge=lfs -text
27
  *.zstandard filter=lfs diff=lfs merge=lfs -text
28
  *tfevents* filter=lfs diff=lfs merge=lfs -text
29
+ *.spm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,290 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - bg
4
+ - bs_Latn
5
+ - en
6
+ - hr
7
+ - mk
8
+ - sh
9
+ - sl
10
+ - sr_Cyrl
11
+ - sr_Latn
12
+ - zls
13
+
14
+ tags:
15
+ - translation
16
+
17
+ license: cc-by-4.0
18
+ model-index:
19
+ - name: opus-mt-tc-big-zls-en
20
+ results:
21
+ - task:
22
+ name: Translation bul-eng
23
+ type: translation
24
+ args: bul-eng
25
+ dataset:
26
+ name: flores101-devtest
27
+ type: flores_101
28
+ args: bul eng devtest
29
+ metrics:
30
+ - name: BLEU
31
+ type: bleu
32
+ value: 42.0
33
+ - task:
34
+ name: Translation hrv-eng
35
+ type: translation
36
+ args: hrv-eng
37
+ dataset:
38
+ name: flores101-devtest
39
+ type: flores_101
40
+ args: hrv eng devtest
41
+ metrics:
42
+ - name: BLEU
43
+ type: bleu
44
+ value: 37.1
45
+ - task:
46
+ name: Translation mkd-eng
47
+ type: translation
48
+ args: mkd-eng
49
+ dataset:
50
+ name: flores101-devtest
51
+ type: flores_101
52
+ args: mkd eng devtest
53
+ metrics:
54
+ - name: BLEU
55
+ type: bleu
56
+ value: 43.2
57
+ - task:
58
+ name: Translation slv-eng
59
+ type: translation
60
+ args: slv-eng
61
+ dataset:
62
+ name: flores101-devtest
63
+ type: flores_101
64
+ args: slv eng devtest
65
+ metrics:
66
+ - name: BLEU
67
+ type: bleu
68
+ value: 35.2
69
+ - task:
70
+ name: Translation srp_Cyrl-eng
71
+ type: translation
72
+ args: srp_Cyrl-eng
73
+ dataset:
74
+ name: flores101-devtest
75
+ type: flores_101
76
+ args: srp_Cyrl eng devtest
77
+ metrics:
78
+ - name: BLEU
79
+ type: bleu
80
+ value: 36.8
81
+ - task:
82
+ name: Translation bos_Latn-eng
83
+ type: translation
84
+ args: bos_Latn-eng
85
+ dataset:
86
+ name: tatoeba-test-v2021-08-07
87
+ type: tatoeba_mt
88
+ args: bos_Latn-eng
89
+ metrics:
90
+ - name: BLEU
91
+ type: bleu
92
+ value: 66.5
93
+ - task:
94
+ name: Translation bul-eng
95
+ type: translation
96
+ args: bul-eng
97
+ dataset:
98
+ name: tatoeba-test-v2021-08-07
99
+ type: tatoeba_mt
100
+ args: bul-eng
101
+ metrics:
102
+ - name: BLEU
103
+ type: bleu
104
+ value: 59.3
105
+ - task:
106
+ name: Translation hbs-eng
107
+ type: translation
108
+ args: hbs-eng
109
+ dataset:
110
+ name: tatoeba-test-v2021-08-07
111
+ type: tatoeba_mt
112
+ args: hbs-eng
113
+ metrics:
114
+ - name: BLEU
115
+ type: bleu
116
+ value: 57.3
117
+ - task:
118
+ name: Translation hrv-eng
119
+ type: translation
120
+ args: hrv-eng
121
+ dataset:
122
+ name: tatoeba-test-v2021-08-07
123
+ type: tatoeba_mt
124
+ args: hrv-eng
125
+ metrics:
126
+ - name: BLEU
127
+ type: bleu
128
+ value: 59.2
129
+ - task:
130
+ name: Translation mkd-eng
131
+ type: translation
132
+ args: mkd-eng
133
+ dataset:
134
+ name: tatoeba-test-v2021-08-07
135
+ type: tatoeba_mt
136
+ args: mkd-eng
137
+ metrics:
138
+ - name: BLEU
139
+ type: bleu
140
+ value: 57.4
141
+ - task:
142
+ name: Translation slv-eng
143
+ type: translation
144
+ args: slv-eng
145
+ dataset:
146
+ name: tatoeba-test-v2021-08-07
147
+ type: tatoeba_mt
148
+ args: slv-eng
149
+ metrics:
150
+ - name: BLEU
151
+ type: bleu
152
+ value: 23.5
153
+ - task:
154
+ name: Translation srp_Cyrl-eng
155
+ type: translation
156
+ args: srp_Cyrl-eng
157
+ dataset:
158
+ name: tatoeba-test-v2021-08-07
159
+ type: tatoeba_mt
160
+ args: srp_Cyrl-eng
161
+ metrics:
162
+ - name: BLEU
163
+ type: bleu
164
+ value: 47.0
165
+ - task:
166
+ name: Translation srp_Latn-eng
167
+ type: translation
168
+ args: srp_Latn-eng
169
+ dataset:
170
+ name: tatoeba-test-v2021-08-07
171
+ type: tatoeba_mt
172
+ args: srp_Latn-eng
173
+ metrics:
174
+ - name: BLEU
175
+ type: bleu
176
+ value: 58.5
177
+ ---
178
+ # opus-mt-tc-big-zls-en
179
+
180
+ Neural machine translation model for translating from South Slavic languages (zls) to English (en).
181
+
182
+ This model is part of the [OPUS-MT project](https://github.com/Helsinki-NLP/Opus-MT), an effort to make neural machine translation models widely available and accessible for many languages in the world. All models are originally trained using the amazing framework of [Marian NMT](https://marian-nmt.github.io/), an efficient NMT implementation written in pure C++. The models have been converted to pyTorch using the transformers library by huggingface. Training data is taken from [OPUS](https://opus.nlpl.eu/) and training pipelines use the procedures of [OPUS-MT-train](https://github.com/Helsinki-NLP/Opus-MT-train).
183
+
184
+ * Publications: [OPUS-MT – Building open translation services for the World](https://aclanthology.org/2020.eamt-1.61/) and [The Tatoeba Translation Challenge – Realistic Data Sets for Low Resource and Multilingual MT](https://aclanthology.org/2020.wmt-1.139/) (Please, cite if you use this model.)
185
+
186
+ ```
187
+ @inproceedings{tiedemann-thottingal-2020-opus,
188
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
189
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
190
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
191
+ month = nov,
192
+ year = "2020",
193
+ address = "Lisboa, Portugal",
194
+ publisher = "European Association for Machine Translation",
195
+ url = "https://aclanthology.org/2020.eamt-1.61",
196
+ pages = "479--480",
197
+ }
198
+
199
+ @inproceedings{tiedemann-2020-tatoeba,
200
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
201
+ author = {Tiedemann, J{\"o}rg},
202
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
203
+ month = nov,
204
+ year = "2020",
205
+ address = "Online",
206
+ publisher = "Association for Computational Linguistics",
207
+ url = "https://aclanthology.org/2020.wmt-1.139",
208
+ pages = "1174--1182",
209
+ }
210
+ ```
211
+
212
+ ## Model info
213
+
214
+ * Release: 2022-03-17
215
+ * source language(s): bos_Latn bul hbs hrv mkd slv srp_Cyrl srp_Latn
216
+ * target language(s): eng
217
+ * model: transformer-big
218
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
219
+ * tokenization: SentencePiece (spm32k,spm32k)
220
+ * original model: [opusTCv20210807+bt_transformer-big_2022-03-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/zls-eng/opusTCv20210807+bt_transformer-big_2022-03-17.zip)
221
+ * more information released models: [OPUS-MT zls-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/zls-eng/README.md)
222
+
223
+ ## Usage
224
+
225
+ A short example code:
226
+
227
+ ```python
228
+ from transformers import MarianMTModel, MarianTokenizer
229
+
230
+ src_text = [
231
+ "Да не би случайно Том да остави Мери да кара колата?",
232
+ "Какво е времето днес?"
233
+ ]
234
+
235
+ model_name = "pytorch-models/opus-mt-tc-big-zls-en"
236
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
237
+ model = MarianMTModel.from_pretrained(model_name)
238
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
239
+
240
+ for t in translated:
241
+ print( tokenizer.decode(t, skip_special_tokens=True) )
242
+
243
+ # expected output:
244
+ # Did Tom just let Mary drive the car?
245
+ # What's the weather like today?
246
+ ```
247
+
248
+ You can also use OPUS-MT models with the transformers pipelines, for example:
249
+
250
+ ```python
251
+ from transformers import pipeline
252
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zls-en")
253
+ print(pipe("Да не би случайно Том да остави Мери да кара колата?"))
254
+
255
+ # expected output: Did Tom just let Mary drive the car?
256
+ ```
257
+
258
+ ## Benchmarks
259
+
260
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-03-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zls-eng/opusTCv20210807+bt_transformer-big_2022-03-17.test.txt)
261
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-03-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zls-eng/opusTCv20210807+bt_transformer-big_2022-03-17.eval.txt)
262
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
263
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
264
+
265
+ | langpair | testset | chr-F | BLEU | #sent | #words |
266
+ |----------|---------|-------|-------|-------|--------|
267
+ | bos_Latn-eng | tatoeba-test-v2021-08-07 | 0.79339 | 66.5 | 301 | 1826 |
268
+ | bul-eng | tatoeba-test-v2021-08-07 | 0.72656 | 59.3 | 10000 | 71872 |
269
+ | hbs-eng | tatoeba-test-v2021-08-07 | 0.71783 | 57.3 | 10017 | 68934 |
270
+ | hrv-eng | tatoeba-test-v2021-08-07 | 0.74066 | 59.2 | 1480 | 10620 |
271
+ | mkd-eng | tatoeba-test-v2021-08-07 | 0.70043 | 57.4 | 10010 | 65667 |
272
+ | slv-eng | tatoeba-test-v2021-08-07 | 0.39534 | 23.5 | 2495 | 16940 |
273
+ | srp_Cyrl-eng | tatoeba-test-v2021-08-07 | 0.67628 | 47.0 | 1580 | 10181 |
274
+ | srp_Latn-eng | tatoeba-test-v2021-08-07 | 0.71878 | 58.5 | 6656 | 46307 |
275
+ | bul-eng | flores101-devtest | 0.67375 | 42.0 | 1012 | 24721 |
276
+ | hrv-eng | flores101-devtest | 0.63914 | 37.1 | 1012 | 24721 |
277
+ | mkd-eng | flores101-devtest | 0.67444 | 43.2 | 1012 | 24721 |
278
+ | slv-eng | flores101-devtest | 0.62087 | 35.2 | 1012 | 24721 |
279
+ | srp_Cyrl-eng | flores101-devtest | 0.67810 | 36.8 | 1012 | 24721 |
280
+
281
+ ## Acknowledgements
282
+
283
+ The work is supported by the [European Language Grid](https://www.european-language-grid.eu/) as [pilot project 2866](https://live.european-language-grid.eu/catalogue/#/resource/projects/2866), by the [FoTran project](https://www.helsinki.fi/en/researchgroups/natural-language-understanding-with-cross-lingual-grounding), funded by the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement No 771113), and the [MeMAD project](https://memad.eu/), funded by the European Union’s Horizon 2020 Research and Innovation Programme under grant agreement No 780069. We are also grateful for the generous computational resources and IT infrastructure provided by [CSC -- IT Center for Science](https://www.csc.fi/), Finland.
284
+
285
+ ## Model conversion info
286
+
287
+ * transformers version: 4.16.2
288
+ * OPUS-MT git hash: 3405783
289
+ * port time: Wed Apr 13 20:12:26 EEST 2022
290
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,34 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ bul-eng flores101-dev 0.68294 43.6 997 23555
2
+ hrv-eng flores101-dev 0.64283 37.6 997 23555
3
+ mkd-eng flores101-dev 0.68438 44.4 997 23555
4
+ slv-eng flores101-dev 0.62309 35.6 997 23555
5
+ srp_Cyrl-eng flores101-dev 0.68505 37.9 997 23555
6
+ bul-eng flores101-devtest 0.67375 42.0 1012 24721
7
+ hrv-eng flores101-devtest 0.63914 37.1 1012 24721
8
+ mkd-eng flores101-devtest 0.67444 43.2 1012 24721
9
+ slv-eng flores101-devtest 0.62087 35.2 1012 24721
10
+ srp_Cyrl-eng flores101-devtest 0.67810 36.8 1012 24721
11
+ bos_Latn-eng tatoeba-test-v2020-07-28 0.79462 66.7 300 1820
12
+ bul-eng tatoeba-test-v2020-07-28 0.72662 59.3 10000 71872
13
+ hbs-eng tatoeba-test-v2020-07-28 0.71769 57.3 10000 68840
14
+ hrv-eng tatoeba-test-v2020-07-28 0.73974 59.2 1468 10556
15
+ mkd-eng tatoeba-test-v2020-07-28 0.70036 57.4 10000 65604
16
+ slv-eng tatoeba-test-v2020-07-28 0.42882 26.5 2007 13702
17
+ srp_Cyrl-eng tatoeba-test-v2020-07-28 0.67610 47.0 1577 10163
18
+ srp_Latn-eng tatoeba-test-v2020-07-28 0.71877 58.5 6655 46301
19
+ bos_Latn-eng tatoeba-test-v2021-03-30 0.79462 66.7 300 1820
20
+ bul-eng tatoeba-test-v2021-03-30 0.72662 59.3 10000 71872
21
+ hbs-eng tatoeba-test-v2021-03-30 0.71768 57.3 10002 68852
22
+ hrv-eng tatoeba-test-v2021-03-30 0.73968 59.2 1469 10562
23
+ mkd-eng tatoeba-test-v2021-03-30 0.70043 57.4 10009 65663
24
+ slv-eng tatoeba-test-v2021-03-30 0.42882 26.5 2007 13702
25
+ srp_Cyrl-eng tatoeba-test-v2021-03-30 0.67610 47.0 1577 10163
26
+ srp_Latn-eng tatoeba-test-v2021-03-30 0.71878 58.5 6656 46307
27
+ bos_Latn-eng tatoeba-test-v2021-08-07 0.79339 66.5 301 1826
28
+ bul-eng tatoeba-test-v2021-08-07 0.72656 59.3 10000 71872
29
+ hbs-eng tatoeba-test-v2021-08-07 0.71783 57.3 10017 68934
30
+ hrv-eng tatoeba-test-v2021-08-07 0.74066 59.2 1480 10620
31
+ mkd-eng tatoeba-test-v2021-08-07 0.70043 57.4 10010 65667
32
+ slv-eng tatoeba-test-v2021-08-07 0.39534 23.5 2495 16940
33
+ srp_Cyrl-eng tatoeba-test-v2021-08-07 0.67628 47.0 1580 10181
34
+ srp_Latn-eng tatoeba-test-v2021-08-07 0.71878 58.5 6656 46307
benchmark_translations.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:453efdef5397c909e94e45850ab943aa25315ea8c83fd1c9d9c1342ada7c0af5
3
+ size 5789685
config.json ADDED
@@ -0,0 +1,45 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "activation_dropout": 0.0,
3
+ "activation_function": "relu",
4
+ "architectures": [
5
+ "MarianMTModel"
6
+ ],
7
+ "attention_dropout": 0.0,
8
+ "bad_words_ids": [
9
+ [
10
+ 59882
11
+ ]
12
+ ],
13
+ "bos_token_id": 0,
14
+ "classifier_dropout": 0.0,
15
+ "d_model": 1024,
16
+ "decoder_attention_heads": 16,
17
+ "decoder_ffn_dim": 4096,
18
+ "decoder_layerdrop": 0.0,
19
+ "decoder_layers": 6,
20
+ "decoder_start_token_id": 59882,
21
+ "decoder_vocab_size": 59883,
22
+ "dropout": 0.1,
23
+ "encoder_attention_heads": 16,
24
+ "encoder_ffn_dim": 4096,
25
+ "encoder_layerdrop": 0.0,
26
+ "encoder_layers": 6,
27
+ "eos_token_id": 33523,
28
+ "forced_eos_token_id": 33523,
29
+ "init_std": 0.02,
30
+ "is_encoder_decoder": true,
31
+ "max_length": 512,
32
+ "max_position_embeddings": 1024,
33
+ "model_type": "marian",
34
+ "normalize_embedding": false,
35
+ "num_beams": 4,
36
+ "num_hidden_layers": 6,
37
+ "pad_token_id": 59882,
38
+ "scale_embedding": true,
39
+ "share_encoder_decoder_embeddings": true,
40
+ "static_position_embeddings": true,
41
+ "torch_dtype": "float16",
42
+ "transformers_version": "4.18.0.dev0",
43
+ "use_cache": true,
44
+ "vocab_size": 59883
45
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7883601c7e64de7da07266e400f32178601d105945a7917cc0d5877b389faea8
3
+ size 598206979
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:533310227f43bd2f1f71368fc983ba8cbe2332896967409bb9bc67cf14a0af07
3
+ size 895870
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"eos_token": "</s>", "unk_token": "<unk>", "pad_token": "<pad>"}
target.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:216ebb622b4d2842e9d71b1f7917aa1ff65b8687e37c0f66a9cdaa195dc2dbc9
3
+ size 797979
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "zls", "target_lang": "en", "unk_token": "<unk>", "eos_token": "</s>", "pad_token": "<pad>", "model_max_length": 512, "sp_model_kwargs": {}, "separate_vocabs": false, "special_tokens_map_file": null, "name_or_path": "marian-models/opusTCv20210807+bt_transformer-big_2022-03-17/zls-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff