tiedeman commited on
Commit
f8aec42
1 Parent(s): ba5b0a6

Initial commit

Browse files
.gitattributes CHANGED
@@ -25,3 +25,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
25
  *.zip filter=lfs diff=lfs merge=lfs -text
26
  *.zstandard filter=lfs diff=lfs merge=lfs -text
27
  *tfevents* filter=lfs diff=lfs merge=lfs -text
28
+ *.spm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,317 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - be
4
+ - en
5
+ - ru
6
+ - uk
7
+ - zle
8
+
9
+ tags:
10
+ - translation
11
+
12
+ license: cc-by-4.0
13
+ model-index:
14
+ - name: opus-mt-tc-big-zle-en
15
+ results:
16
+ - task:
17
+ name: Translation rus-eng
18
+ type: translation
19
+ args: rus-eng
20
+ dataset:
21
+ name: flores101-devtest
22
+ type: flores_101
23
+ args: rus eng devtest
24
+ metrics:
25
+ - name: BLEU
26
+ type: bleu
27
+ value: 35.2
28
+ - task:
29
+ name: Translation ukr-eng
30
+ type: translation
31
+ args: ukr-eng
32
+ dataset:
33
+ name: flores101-devtest
34
+ type: flores_101
35
+ args: ukr eng devtest
36
+ metrics:
37
+ - name: BLEU
38
+ type: bleu
39
+ value: 39.2
40
+ - task:
41
+ name: Translation bel-eng
42
+ type: translation
43
+ args: bel-eng
44
+ dataset:
45
+ name: tatoeba-test-v2021-08-07
46
+ type: tatoeba_mt
47
+ args: bel-eng
48
+ metrics:
49
+ - name: BLEU
50
+ type: bleu
51
+ value: 48.1
52
+ - task:
53
+ name: Translation rus-eng
54
+ type: translation
55
+ args: rus-eng
56
+ dataset:
57
+ name: tatoeba-test-v2021-08-07
58
+ type: tatoeba_mt
59
+ args: rus-eng
60
+ metrics:
61
+ - name: BLEU
62
+ type: bleu
63
+ value: 57.4
64
+ - task:
65
+ name: Translation ukr-eng
66
+ type: translation
67
+ args: ukr-eng
68
+ dataset:
69
+ name: tatoeba-test-v2021-08-07
70
+ type: tatoeba_mt
71
+ args: ukr-eng
72
+ metrics:
73
+ - name: BLEU
74
+ type: bleu
75
+ value: 56.9
76
+ - task:
77
+ name: Translation rus-eng
78
+ type: translation
79
+ args: rus-eng
80
+ dataset:
81
+ name: tico19-test
82
+ type: tico19-test
83
+ args: rus-eng
84
+ metrics:
85
+ - name: BLEU
86
+ type: bleu
87
+ value: 33.3
88
+ - task:
89
+ name: Translation rus-eng
90
+ type: translation
91
+ args: rus-eng
92
+ dataset:
93
+ name: newstest2012
94
+ type: wmt-2012-news
95
+ args: rus-eng
96
+ metrics:
97
+ - name: BLEU
98
+ type: bleu
99
+ value: 39.2
100
+ - task:
101
+ name: Translation rus-eng
102
+ type: translation
103
+ args: rus-eng
104
+ dataset:
105
+ name: newstest2013
106
+ type: wmt-2013-news
107
+ args: rus-eng
108
+ metrics:
109
+ - name: BLEU
110
+ type: bleu
111
+ value: 31.3
112
+ - task:
113
+ name: Translation rus-eng
114
+ type: translation
115
+ args: rus-eng
116
+ dataset:
117
+ name: newstest2014
118
+ type: wmt-2014-news
119
+ args: rus-eng
120
+ metrics:
121
+ - name: BLEU
122
+ type: bleu
123
+ value: 40.5
124
+ - task:
125
+ name: Translation rus-eng
126
+ type: translation
127
+ args: rus-eng
128
+ dataset:
129
+ name: newstest2015
130
+ type: wmt-2015-news
131
+ args: rus-eng
132
+ metrics:
133
+ - name: BLEU
134
+ type: bleu
135
+ value: 36.1
136
+ - task:
137
+ name: Translation rus-eng
138
+ type: translation
139
+ args: rus-eng
140
+ dataset:
141
+ name: newstest2016
142
+ type: wmt-2016-news
143
+ args: rus-eng
144
+ metrics:
145
+ - name: BLEU
146
+ type: bleu
147
+ value: 35.7
148
+ - task:
149
+ name: Translation rus-eng
150
+ type: translation
151
+ args: rus-eng
152
+ dataset:
153
+ name: newstest2017
154
+ type: wmt-2017-news
155
+ args: rus-eng
156
+ metrics:
157
+ - name: BLEU
158
+ type: bleu
159
+ value: 40.8
160
+ - task:
161
+ name: Translation rus-eng
162
+ type: translation
163
+ args: rus-eng
164
+ dataset:
165
+ name: newstest2018
166
+ type: wmt-2018-news
167
+ args: rus-eng
168
+ metrics:
169
+ - name: BLEU
170
+ type: bleu
171
+ value: 35.2
172
+ - task:
173
+ name: Translation rus-eng
174
+ type: translation
175
+ args: rus-eng
176
+ dataset:
177
+ name: newstest2019
178
+ type: wmt-2019-news
179
+ args: rus-eng
180
+ metrics:
181
+ - name: BLEU
182
+ type: bleu
183
+ value: 41.6
184
+ - task:
185
+ name: Translation rus-eng
186
+ type: translation
187
+ args: rus-eng
188
+ dataset:
189
+ name: newstest2020
190
+ type: wmt-2020-news
191
+ args: rus-eng
192
+ metrics:
193
+ - name: BLEU
194
+ type: bleu
195
+ value: 36.9
196
+ ---
197
+ # opus-mt-tc-big-zle-en
198
+
199
+ Neural machine translation model for translating from East Slavic languages (zle) to English (en).
200
+
201
+ 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).
202
+
203
+ * 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.)
204
+
205
+ ```
206
+ @inproceedings{tiedemann-thottingal-2020-opus,
207
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
208
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
209
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
210
+ month = nov,
211
+ year = "2020",
212
+ address = "Lisboa, Portugal",
213
+ publisher = "European Association for Machine Translation",
214
+ url = "https://aclanthology.org/2020.eamt-1.61",
215
+ pages = "479--480",
216
+ }
217
+
218
+ @inproceedings{tiedemann-2020-tatoeba,
219
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
220
+ author = {Tiedemann, J{\"o}rg},
221
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
222
+ month = nov,
223
+ year = "2020",
224
+ address = "Online",
225
+ publisher = "Association for Computational Linguistics",
226
+ url = "https://aclanthology.org/2020.wmt-1.139",
227
+ pages = "1174--1182",
228
+ }
229
+ ```
230
+
231
+ ## Model info
232
+
233
+ * Release: big_2022-03-17
234
+ * source language(s): bel rus ukr
235
+ * target language(s): eng
236
+ * valid target language labels: >>eng<<
237
+ * model: transformer-big (big)
238
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
239
+ * tokenization: SentencePiece (spm32k,spm32k)
240
+ * original model: [opusTCv20210807+bt_transformer-big_2022-03-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-eng/opusTCv20210807+bt_transformer-big_2022-03-17.zip)
241
+ * more information released models: [OPUS-MT zle-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/zle-eng/README.md)
242
+ * more information about the model: [MarianMT](https://huggingface.co/docs/transformers/model_doc/marian)
243
+
244
+ This is a multilingual translation model with multiple target languages. A sentence initial language token is required in the form of `>>id<<` (id = valid target language ID), e.g. `>>eng<<`
245
+
246
+ ## Usage
247
+
248
+ A short example code:
249
+
250
+ ```python
251
+ from transformers import MarianMTModel, MarianTokenizer
252
+
253
+ src_text = [
254
+ "Скільки мені слід купити пива?",
255
+ "Я клієнтка."
256
+ ]
257
+
258
+ model_name = "pytorch-models/opus-mt-tc-big-zle-en"
259
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
260
+ model = MarianMTModel.from_pretrained(model_name)
261
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
262
+
263
+ for t in translated:
264
+ print( tokenizer.decode(t, skip_special_tokens=True) )
265
+
266
+ # expected output:
267
+ # How much beer should I buy?
268
+ # I'm a client.
269
+ ```
270
+
271
+ You can also use OPUS-MT models with the transformers pipelines, for example:
272
+
273
+ ```python
274
+ from transformers import pipeline
275
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zle-en")
276
+ print(pipe("Скільки мені слід купити пива?"))
277
+
278
+ # expected output: How much beer should I buy?
279
+ ```
280
+
281
+ ## Benchmarks
282
+
283
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-03-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-eng/opusTCv20210807+bt_transformer-big_2022-03-17.test.txt)
284
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-03-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-eng/opusTCv20210807+bt_transformer-big_2022-03-17.eval.txt)
285
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
286
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
287
+
288
+ | langpair | testset | chr-F | BLEU | #sent | #words |
289
+ |----------|---------|-------|-------|-------|--------|
290
+ | bel-eng | tatoeba-test-v2021-08-07 | 0.65221 | 48.1 | 2500 | 18571 |
291
+ | rus-eng | tatoeba-test-v2021-08-07 | 0.71452 | 57.4 | 19425 | 147872 |
292
+ | ukr-eng | tatoeba-test-v2021-08-07 | 0.71162 | 56.9 | 13127 | 88607 |
293
+ | bel-eng | flores101-devtest | 0.51689 | 18.1 | 1012 | 24721 |
294
+ | rus-eng | flores101-devtest | 0.62581 | 35.2 | 1012 | 24721 |
295
+ | ukr-eng | flores101-devtest | 0.65001 | 39.2 | 1012 | 24721 |
296
+ | rus-eng | newstest2012 | 0.63724 | 39.2 | 3003 | 72812 |
297
+ | rus-eng | newstest2013 | 0.57641 | 31.3 | 3000 | 64505 |
298
+ | rus-eng | newstest2014 | 0.65667 | 40.5 | 3003 | 69190 |
299
+ | rus-eng | newstest2015 | 0.61747 | 36.1 | 2818 | 64428 |
300
+ | rus-eng | newstest2016 | 0.61414 | 35.7 | 2998 | 69278 |
301
+ | rus-eng | newstest2017 | 0.65365 | 40.8 | 3001 | 69025 |
302
+ | rus-eng | newstest2018 | 0.61386 | 35.2 | 3000 | 71291 |
303
+ | rus-eng | newstest2019 | 0.65476 | 41.6 | 2000 | 42642 |
304
+ | rus-eng | newstest2020 | 0.64878 | 36.9 | 991 | 20217 |
305
+ | rus-eng | newstestB2020 | 0.65685 | 39.3 | 991 | 20423 |
306
+ | rus-eng | tico19-test | 0.63280 | 33.3 | 2100 | 56323 |
307
+
308
+ ## Acknowledgements
309
+
310
+ 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.
311
+
312
+ ## Model conversion info
313
+
314
+ * transformers version: 4.16.2
315
+ * OPUS-MT git hash: f084bad
316
+ * port time: Mon Mar 21 23:10:40 EET 2022
317
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ bel-eng flores101-dev 0.52003 18.0 997 23555
2
+ rus-eng flores101-dev 0.62931 35.2 997 23555
3
+ bel-eng flores101-devtest 0.51689 18.1 1012 24721
4
+ rus-eng flores101-devtest 0.62581 35.2 1012 24721
5
+ ukr-eng flores101-devtest 0.65001 39.2 1012 24721
6
+ ukr-eng flores101-dev 0.65088 39.3 997 23555
7
+ rus-eng newstest2012 0.63724 39.2 3003 72812
8
+ rus-eng newstest2013 0.57641 31.3 3000 64505
9
+ rus-eng newstest2014 0.65667 40.5 3003 69190
10
+ rus-eng newstest2015 0.61747 36.1 2818 64428
11
+ rus-eng newstest2016 0.61414 35.7 2998 69278
12
+ rus-eng newstest2017 0.65365 40.8 3001 69025
13
+ rus-eng newstest2018 0.61386 35.2 3000 71291
14
+ rus-eng newstest2019 0.65476 41.6 2000 42642
15
+ rus-eng newstest2020 0.64878 36.9 991 20217
16
+ rus-eng newstestB2020 0.65685 39.3 991 20423
17
+ bel-eng tatoeba-test-v2020-07-28 0.65221 48.1 2500 18571
18
+ rus-eng tatoeba-test-v2020-07-28 0.72653 59.4 10000 72902
19
+ ukr-eng tatoeba-test-v2020-07-28 0.70935 56.8 10000 66118
20
+ bel-eng tatoeba-test-v2021-03-30 0.65221 48.1 2500 18571
21
+ rus-eng tatoeba-test-v2021-03-30 0.72153 58.5 15118 111813
22
+ ukr-eng tatoeba-test-v2021-03-30 0.71069 56.9 11969 80246
23
+ bel-eng tatoeba-test-v2021-08-07 0.65221 48.1 2500 18571
24
+ rus-eng tatoeba-test-v2021-08-07 0.71452 57.4 19425 147872
25
+ ukr-eng tatoeba-test-v2021-08-07 0.71162 56.9 13127 88607
26
+ rus-eng tico19-test 0.63280 33.3 2100 56323
benchmark_translations.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d7a21a813a306af023fcb738669076987f4cd7ac9ff05b9de4f42c65bacb94af
3
+ size 8232860
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
+ 61016
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": 61016,
21
+ "decoder_vocab_size": 61017,
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": 25565,
28
+ "forced_eos_token_id": 25565,
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": 61016,
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": 61017
45
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:fc3f59dbfc8cf37096358a748b7f9e4ec90efa79ca6b90338d304f3f39ff470c
3
+ size 602854083
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a982dbb9362861151e36b0db1595b324cd1ce09acf46ce1f4d6d624e11c5807f
3
+ size 1016851
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:e69faed7f1e60eec38c64cceba35cc4fb05ec6478082f4c8a14b141fd6596e9e
3
+ size 802387
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"source_lang": "zle", "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/zle-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff