tiedeman commited on
Commit
adeb96b
1 Parent(s): 0b283ef

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,194 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - be
4
+ - fr
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-fr
15
+ results:
16
+ - task:
17
+ name: Translation bel-fra
18
+ type: translation
19
+ args: bel-fra
20
+ dataset:
21
+ name: tatoeba-test-v2020-07-28-v2021-08-07
22
+ type: tatoeba_mt
23
+ args: bel-fra
24
+ metrics:
25
+ - name: BLEU
26
+ type: bleu
27
+ value: 46.4
28
+ - task:
29
+ name: Translation multi-fra
30
+ type: translation
31
+ args: multi-fra
32
+ dataset:
33
+ name: tatoeba-test-v2020-07-28-v2021-08-07
34
+ type: tatoeba_mt
35
+ args: multi-fra
36
+ metrics:
37
+ - name: BLEU
38
+ type: bleu
39
+ value: 52.4
40
+ - task:
41
+ name: Translation rus-fra
42
+ type: translation
43
+ args: rus-fra
44
+ dataset:
45
+ name: tatoeba-test-v2020-07-28-v2021-08-07
46
+ type: tatoeba_mt
47
+ args: rus-fra
48
+ metrics:
49
+ - name: BLEU
50
+ type: bleu
51
+ value: 51.8
52
+ - task:
53
+ name: Translation ukr-fra
54
+ type: translation
55
+ args: ukr-fra
56
+ dataset:
57
+ name: tatoeba-test-v2020-07-28-v2021-08-07
58
+ type: tatoeba_mt
59
+ args: ukr-fra
60
+ metrics:
61
+ - name: BLEU
62
+ type: bleu
63
+ value: 50.7
64
+ - task:
65
+ name: Translation rus-fra
66
+ type: translation
67
+ args: rus-fra
68
+ dataset:
69
+ name: newstest2012
70
+ type: wmt-2012-news
71
+ args: rus-fra
72
+ metrics:
73
+ - name: BLEU
74
+ type: bleu
75
+ value: 25.3
76
+ - task:
77
+ name: Translation rus-fra
78
+ type: translation
79
+ args: rus-fra
80
+ dataset:
81
+ name: newstest2013
82
+ type: wmt-2013-news
83
+ args: rus-fra
84
+ metrics:
85
+ - name: BLEU
86
+ type: bleu
87
+ value: 29.7
88
+ ---
89
+ # opus-mt-tc-big-zle-fr
90
+
91
+ Neural machine translation model for translating from East Slavic languages (zle) to French (fr).
92
+
93
+ 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).
94
+
95
+ * 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.)
96
+
97
+ ```
98
+ @inproceedings{tiedemann-thottingal-2020-opus,
99
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
100
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
101
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
102
+ month = nov,
103
+ year = "2020",
104
+ address = "Lisboa, Portugal",
105
+ publisher = "European Association for Machine Translation",
106
+ url = "https://aclanthology.org/2020.eamt-1.61",
107
+ pages = "479--480",
108
+ }
109
+
110
+ @inproceedings{tiedemann-2020-tatoeba,
111
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
112
+ author = {Tiedemann, J{\"o}rg},
113
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
114
+ month = nov,
115
+ year = "2020",
116
+ address = "Online",
117
+ publisher = "Association for Computational Linguistics",
118
+ url = "https://aclanthology.org/2020.wmt-1.139",
119
+ pages = "1174--1182",
120
+ }
121
+ ```
122
+
123
+ ## Model info
124
+
125
+ * Release: 2022-03-23
126
+ * source language(s): bel rus ukr
127
+ * target language(s): fra
128
+ * model: transformer-big
129
+ * data: opusTCv20210807 ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
130
+ * tokenization: SentencePiece (spm32k,spm32k)
131
+ * original model: [opusTCv20210807_transformer-big_2022-03-23.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-fra/opusTCv20210807_transformer-big_2022-03-23.zip)
132
+ * more information released models: [OPUS-MT zle-fra README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/zle-fra/README.md)
133
+
134
+ ## Usage
135
+
136
+ A short example code:
137
+
138
+ ```python
139
+ from transformers import MarianMTModel, MarianTokenizer
140
+
141
+ src_text = [
142
+ "Подавай блюдо на тарелке.",
143
+ "Операція не може чекати."
144
+ ]
145
+
146
+ model_name = "pytorch-models/opus-mt-tc-big-zle-fr"
147
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
148
+ model = MarianMTModel.from_pretrained(model_name)
149
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
150
+
151
+ for t in translated:
152
+ print( tokenizer.decode(t, skip_special_tokens=True) )
153
+
154
+ # expected output:
155
+ # Servez le plat dans l'assiette.
156
+ # L'opération ne peut pas attendre.
157
+ ```
158
+
159
+ You can also use OPUS-MT models with the transformers pipelines, for example:
160
+
161
+ ```python
162
+ from transformers import pipeline
163
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zle-fr")
164
+ print(pipe("Подавай блюдо на тарелке."))
165
+
166
+ # expected output: Servez le plat dans l'assiette.
167
+ ```
168
+
169
+ ## Benchmarks
170
+
171
+ * test set translations: [opusTCv20210807_transformer-big_2022-03-23.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-fra/opusTCv20210807_transformer-big_2022-03-23.test.txt)
172
+ * test set scores: [opusTCv20210807_transformer-big_2022-03-23.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-fra/opusTCv20210807_transformer-big_2022-03-23.eval.txt)
173
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
174
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
175
+
176
+ | langpair | testset | chr-F | BLEU | #sent | #words |
177
+ |----------|---------|-------|-------|-------|--------|
178
+ | bel-fra | tatoeba-test-v2020-07-28-v2021-08-07 | 0.65415 | 46.4 | 283 | 2005 |
179
+ | multi-fra | tatoeba-test-v2020-07-28-v2021-08-07 | 0.68422 | 52.4 | 10000 | 66671 |
180
+ | rus-fra | tatoeba-test-v2020-07-28-v2021-08-07 | 0.68699 | 51.8 | 11490 | 80573 |
181
+ | ukr-fra | tatoeba-test-v2020-07-28-v2021-08-07 | 0.67887 | 50.7 | 10035 | 63222 |
182
+ | rus-fra | newstest2012 | 0.53679 | 25.3 | 3003 | 78011 |
183
+ | rus-fra | newstest2013 | 0.56211 | 29.7 | 3000 | 70037 |
184
+
185
+ ## Acknowledgements
186
+
187
+ 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.
188
+
189
+ ## Model conversion info
190
+
191
+ * transformers version: 4.16.2
192
+ * OPUS-MT git hash: 1bdabf7
193
+ * port time: Wed Mar 23 22:45:20 EET 2022
194
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ rus-fra newstest2012 0.53679 25.3 3003 78011
2
+ rus-fra newstest2013 0.56211 29.7 3000 70037
3
+ bel-fra tatoeba-test-v2020-07-28-v2021-08-07 0.65415 46.4 283 2005
4
+ multi-fra tatoeba-test-v2020-07-28-v2021-08-07 0.68422 52.4 10000 66671
5
+ orv-fra tatoeba-test-v2020-07-28-v2021-08-07 0.22337 6.3 37 290
6
+ rus-fra tatoeba-test-v2020-07-28-v2021-08-07 0.68699 51.8 11490 80573
7
+ ukr-fra tatoeba-test-v2020-07-28-v2021-08-07 0.67887 50.7 10035 63222
benchmark_translations.zip ADDED
File without changes
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
+ 61428
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": 61428,
21
+ "decoder_vocab_size": 61429,
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": 27246,
28
+ "forced_eos_token_id": 27246,
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": 61428,
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": 61429
45
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e3b428f5533aafba80cbdcee51dbf82b1aa798a47f7e3b7d55a4b9c32f84a2a2
3
+ size 604542467
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b661c1ee48af0dbfb5e37fb3835ab6f38a94143d0813114652153603f2b3146b
3
+ size 1034758
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:6fa3c380fb13bb59ef07803ed09620ea0cc6f5600d68640da9bbb919bb0edde2
3
+ size 824805
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "zle", "target_lang": "fr", "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_transformer-big_2022-03-23/zle-fr", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff