tiedeman commited on
Commit
9d41da8
1 Parent(s): 050a214

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,272 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ca
4
+ - cat+oci+spa
5
+ - en
6
+ - es
7
+
8
+ tags:
9
+ - translation
10
+
11
+ license: cc-by-4.0
12
+ model-index:
13
+ - name: opus-mt-tc-big-cat_oci_spa-en
14
+ results:
15
+ - task:
16
+ name: Translation cat-eng
17
+ type: translation
18
+ args: cat-eng
19
+ dataset:
20
+ name: flores101-devtest
21
+ type: flores_101
22
+ args: cat eng devtest
23
+ metrics:
24
+ - name: BLEU
25
+ type: bleu
26
+ value: 45.4
27
+ - task:
28
+ name: Translation oci-eng
29
+ type: translation
30
+ args: oci-eng
31
+ dataset:
32
+ name: flores101-devtest
33
+ type: flores_101
34
+ args: oci eng devtest
35
+ metrics:
36
+ - name: BLEU
37
+ type: bleu
38
+ value: 37.5
39
+ - task:
40
+ name: Translation spa-eng
41
+ type: translation
42
+ args: spa-eng
43
+ dataset:
44
+ name: flores101-devtest
45
+ type: flores_101
46
+ args: spa eng devtest
47
+ metrics:
48
+ - name: BLEU
49
+ type: bleu
50
+ value: 29.9
51
+ - task:
52
+ name: Translation spa-eng
53
+ type: translation
54
+ args: spa-eng
55
+ dataset:
56
+ name: news-test2008
57
+ type: news-test2008
58
+ args: spa-eng
59
+ metrics:
60
+ - name: BLEU
61
+ type: bleu
62
+ value: 27.9
63
+ - task:
64
+ name: Translation cat-eng
65
+ type: translation
66
+ args: cat-eng
67
+ dataset:
68
+ name: tatoeba-test-v2021-08-07
69
+ type: tatoeba_mt
70
+ args: cat-eng
71
+ metrics:
72
+ - name: BLEU
73
+ type: bleu
74
+ value: 57.3
75
+ - task:
76
+ name: Translation spa-eng
77
+ type: translation
78
+ args: spa-eng
79
+ dataset:
80
+ name: tatoeba-test-v2021-08-07
81
+ type: tatoeba_mt
82
+ args: spa-eng
83
+ metrics:
84
+ - name: BLEU
85
+ type: bleu
86
+ value: 62.3
87
+ - task:
88
+ name: Translation spa-eng
89
+ type: translation
90
+ args: spa-eng
91
+ dataset:
92
+ name: tico19-test
93
+ type: tico19-test
94
+ args: spa-eng
95
+ metrics:
96
+ - name: BLEU
97
+ type: bleu
98
+ value: 51.8
99
+ - task:
100
+ name: Translation spa-eng
101
+ type: translation
102
+ args: spa-eng
103
+ dataset:
104
+ name: newstest2009
105
+ type: wmt-2009-news
106
+ args: spa-eng
107
+ metrics:
108
+ - name: BLEU
109
+ type: bleu
110
+ value: 30.2
111
+ - task:
112
+ name: Translation spa-eng
113
+ type: translation
114
+ args: spa-eng
115
+ dataset:
116
+ name: newstest2010
117
+ type: wmt-2010-news
118
+ args: spa-eng
119
+ metrics:
120
+ - name: BLEU
121
+ type: bleu
122
+ value: 36.8
123
+ - task:
124
+ name: Translation spa-eng
125
+ type: translation
126
+ args: spa-eng
127
+ dataset:
128
+ name: newstest2011
129
+ type: wmt-2011-news
130
+ args: spa-eng
131
+ metrics:
132
+ - name: BLEU
133
+ type: bleu
134
+ value: 34.7
135
+ - task:
136
+ name: Translation spa-eng
137
+ type: translation
138
+ args: spa-eng
139
+ dataset:
140
+ name: newstest2012
141
+ type: wmt-2012-news
142
+ args: spa-eng
143
+ metrics:
144
+ - name: BLEU
145
+ type: bleu
146
+ value: 38.6
147
+ - task:
148
+ name: Translation spa-eng
149
+ type: translation
150
+ args: spa-eng
151
+ dataset:
152
+ name: newstest2013
153
+ type: wmt-2013-news
154
+ args: spa-eng
155
+ metrics:
156
+ - name: BLEU
157
+ type: bleu
158
+ value: 35.3
159
+ ---
160
+ # opus-mt-tc-big-cat_oci_spa-en
161
+
162
+ Neural machine translation model for translating from unknown (cat+oci+spa) to English (en).
163
+
164
+ 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).
165
+
166
+ * 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.)
167
+
168
+ ```
169
+ @inproceedings{tiedemann-thottingal-2020-opus,
170
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
171
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
172
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
173
+ month = nov,
174
+ year = "2020",
175
+ address = "Lisboa, Portugal",
176
+ publisher = "European Association for Machine Translation",
177
+ url = "https://aclanthology.org/2020.eamt-1.61",
178
+ pages = "479--480",
179
+ }
180
+
181
+ @inproceedings{tiedemann-2020-tatoeba,
182
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
183
+ author = {Tiedemann, J{\"o}rg},
184
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
185
+ month = nov,
186
+ year = "2020",
187
+ address = "Online",
188
+ publisher = "Association for Computational Linguistics",
189
+ url = "https://aclanthology.org/2020.wmt-1.139",
190
+ pages = "1174--1182",
191
+ }
192
+ ```
193
+
194
+ ## Model info
195
+
196
+ * Release: 2022-03-13
197
+ * source language(s): cat spa
198
+ * target language(s): eng
199
+ * model: transformer-big
200
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
201
+ * tokenization: SentencePiece (spm32k,spm32k)
202
+ * original model: [opusTCv20210807+bt_transformer-big_2022-03-13.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/cat+oci+spa-eng/opusTCv20210807+bt_transformer-big_2022-03-13.zip)
203
+ * more information released models: [OPUS-MT cat+oci+spa-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/cat+oci+spa-eng/README.md)
204
+
205
+ ## Usage
206
+
207
+ A short example code:
208
+
209
+ ```python
210
+ from transformers import MarianMTModel, MarianTokenizer
211
+
212
+ src_text = [
213
+ "¿Puedo hacerte una pregunta?",
214
+ "Toca algo de música."
215
+ ]
216
+
217
+ model_name = "pytorch-models/opus-mt-tc-big-cat_oci_spa-en"
218
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
219
+ model = MarianMTModel.from_pretrained(model_name)
220
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
221
+
222
+ for t in translated:
223
+ print( tokenizer.decode(t, skip_special_tokens=True) )
224
+
225
+ # expected output:
226
+ # Can I ask you a question?
227
+ # He plays some music.
228
+ ```
229
+
230
+ You can also use OPUS-MT models with the transformers pipelines, for example:
231
+
232
+ ```python
233
+ from transformers import pipeline
234
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-cat_oci_spa-en")
235
+ print(pipe("¿Puedo hacerte una pregunta?"))
236
+
237
+ # expected output: Can I ask you a question?
238
+ ```
239
+
240
+ ## Benchmarks
241
+
242
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-03-13.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/cat+oci+spa-eng/opusTCv20210807+bt_transformer-big_2022-03-13.test.txt)
243
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-03-13.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/cat+oci+spa-eng/opusTCv20210807+bt_transformer-big_2022-03-13.eval.txt)
244
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
245
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
246
+
247
+ | langpair | testset | chr-F | BLEU | #sent | #words |
248
+ |----------|---------|-------|-------|-------|--------|
249
+ | cat-eng | tatoeba-test-v2021-08-07 | 0.72019 | 57.3 | 1631 | 12627 |
250
+ | spa-eng | tatoeba-test-v2021-08-07 | 0.76017 | 62.3 | 16583 | 138123 |
251
+ | cat-eng | flores101-devtest | 0.69572 | 45.4 | 1012 | 24721 |
252
+ | oci-eng | flores101-devtest | 0.63347 | 37.5 | 1012 | 24721 |
253
+ | spa-eng | flores101-devtest | 0.59696 | 29.9 | 1012 | 24721 |
254
+ | spa-eng | newssyscomb2009 | 0.57104 | 30.8 | 502 | 11818 |
255
+ | spa-eng | news-test2008 | 0.55440 | 27.9 | 2051 | 49380 |
256
+ | spa-eng | newstest2009 | 0.57153 | 30.2 | 2525 | 65399 |
257
+ | spa-eng | newstest2010 | 0.61890 | 36.8 | 2489 | 61711 |
258
+ | spa-eng | newstest2011 | 0.60278 | 34.7 | 3003 | 74681 |
259
+ | spa-eng | newstest2012 | 0.62760 | 38.6 | 3003 | 72812 |
260
+ | spa-eng | newstest2013 | 0.60994 | 35.3 | 3000 | 64505 |
261
+ | spa-eng | tico19-test | 0.74033 | 51.8 | 2100 | 56315 |
262
+
263
+ ## Acknowledgements
264
+
265
+ 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.
266
+
267
+ ## Model conversion info
268
+
269
+ * transformers version: 4.16.2
270
+ * OPUS-MT git hash: 3405783
271
+ * port time: Wed Apr 13 18:30:38 EEST 2022
272
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,23 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cat-eng flores101-dev 0.69946 46.6 997 23555
2
+ oci-eng flores101-dev 0.63621 37.8 997 23555
3
+ spa-eng flores101-dev 0.60055 30.4 997 23555
4
+ cat-eng flores101-devtest 0.69572 45.4 1012 24721
5
+ oci-eng flores101-devtest 0.63347 37.5 1012 24721
6
+ spa-eng flores101-devtest 0.59696 29.9 1012 24721
7
+ spa-eng newssyscomb2009 0.57104 30.8 502 11818
8
+ spa-eng news-test2008 0.55440 27.9 2051 49380
9
+ spa-eng newstest2009 0.57153 30.2 2525 65399
10
+ spa-eng newstest2010 0.61890 36.8 2489 61711
11
+ spa-eng newstest2011 0.60278 34.7 3003 74681
12
+ spa-eng newstest2012 0.62760 38.6 3003 72812
13
+ spa-eng newstest2013 0.60994 35.3 3000 64505
14
+ cat-eng tatoeba-test-v2020-07-28 0.72019 57.3 1631 12627
15
+ oci-eng tatoeba-test-v2020-07-28 0.36363 19.3 841 5299
16
+ spa-eng tatoeba-test-v2020-07-28 0.75093 61.4 10000 79376
17
+ cat-eng tatoeba-test-v2021-03-30 0.72019 57.3 1631 12627
18
+ oci-eng tatoeba-test-v2021-03-30 0.36346 19.3 842 5306
19
+ spa-eng tatoeba-test-v2021-03-30 0.75106 61.4 11940 96122
20
+ cat-eng tatoeba-test-v2021-08-07 0.72019 57.3 1631 12627
21
+ oci-eng tatoeba-test-v2021-08-07 0.36363 19.3 841 5299
22
+ spa-eng tatoeba-test-v2021-08-07 0.76017 62.3 16583 138123
23
+ spa-eng tico19-test 0.74033 51.8 2100 56315
benchmark_translations.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:529f574e93e1f27fa0cdb7b9be33fed45211476760d2cdef4bd594183731591c
3
+ size 5157296
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
+ 54728
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": 54728,
21
+ "decoder_vocab_size": 54729,
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": 44614,
28
+ "forced_eos_token_id": 44614,
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": 54728,
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": 54729
45
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cbd1e70a9eb5ec95aaf1407319e91acfbe0e1b0d5f7855b3e4f3cfd2422ba7e3
3
+ size 577085891
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0a23783d3c79054e9033fa55aaaeeeb6513cf712063ea87b4eeff5014ee49134
3
+ size 820182
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:e8ba58a95c4029a5c5a16c43f6784ee30fe197a1766bf2dbacc9f9b255f9361e
3
+ size 802657
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"source_lang": "cat+oci+spa", "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-13/cat+oci+spa-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff