VaishalBusiness commited on
Commit
b0bf657
·
verified ·
1 Parent(s): d3a725a

Add README.md for Helsinki-NLP-opus-mt-tc-big-fr-en

Browse files
Helsinki-NLP-opus-mt-tc-big-fr-en/README.md ADDED
@@ -0,0 +1,321 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - fr
5
+ tags:
6
+ - translation
7
+ - opus-mt-tc
8
+ license: cc-by-4.0
9
+ model-index:
10
+ - name: opus-mt-tc-big-fr-en
11
+ results:
12
+ - task:
13
+ name: Translation fra-eng
14
+ type: translation
15
+ args: fra-eng
16
+ dataset:
17
+ name: flores101-devtest
18
+ type: flores_101
19
+ args: fra eng devtest
20
+ metrics:
21
+ - name: BLEU
22
+ type: bleu
23
+ value: 46.0
24
+ - task:
25
+ name: Translation fra-eng
26
+ type: translation
27
+ args: fra-eng
28
+ dataset:
29
+ name: multi30k_test_2016_flickr
30
+ type: multi30k-2016_flickr
31
+ args: fra-eng
32
+ metrics:
33
+ - name: BLEU
34
+ type: bleu
35
+ value: 49.7
36
+ - task:
37
+ name: Translation fra-eng
38
+ type: translation
39
+ args: fra-eng
40
+ dataset:
41
+ name: multi30k_test_2017_flickr
42
+ type: multi30k-2017_flickr
43
+ args: fra-eng
44
+ metrics:
45
+ - name: BLEU
46
+ type: bleu
47
+ value: 52.0
48
+ - task:
49
+ name: Translation fra-eng
50
+ type: translation
51
+ args: fra-eng
52
+ dataset:
53
+ name: multi30k_test_2017_mscoco
54
+ type: multi30k-2017_mscoco
55
+ args: fra-eng
56
+ metrics:
57
+ - name: BLEU
58
+ type: bleu
59
+ value: 50.6
60
+ - task:
61
+ name: Translation fra-eng
62
+ type: translation
63
+ args: fra-eng
64
+ dataset:
65
+ name: multi30k_test_2018_flickr
66
+ type: multi30k-2018_flickr
67
+ args: fra-eng
68
+ metrics:
69
+ - name: BLEU
70
+ type: bleu
71
+ value: 44.9
72
+ - task:
73
+ name: Translation fra-eng
74
+ type: translation
75
+ args: fra-eng
76
+ dataset:
77
+ name: news-test2008
78
+ type: news-test2008
79
+ args: fra-eng
80
+ metrics:
81
+ - name: BLEU
82
+ type: bleu
83
+ value: 26.5
84
+ - task:
85
+ name: Translation fra-eng
86
+ type: translation
87
+ args: fra-eng
88
+ dataset:
89
+ name: newsdiscussdev2015
90
+ type: newsdiscussdev2015
91
+ args: fra-eng
92
+ metrics:
93
+ - name: BLEU
94
+ type: bleu
95
+ value: 34.4
96
+ - task:
97
+ name: Translation fra-eng
98
+ type: translation
99
+ args: fra-eng
100
+ dataset:
101
+ name: newsdiscusstest2015
102
+ type: newsdiscusstest2015
103
+ args: fra-eng
104
+ metrics:
105
+ - name: BLEU
106
+ type: bleu
107
+ value: 40.2
108
+ - task:
109
+ name: Translation fra-eng
110
+ type: translation
111
+ args: fra-eng
112
+ dataset:
113
+ name: tatoeba-test-v2021-08-07
114
+ type: tatoeba_mt
115
+ args: fra-eng
116
+ metrics:
117
+ - name: BLEU
118
+ type: bleu
119
+ value: 59.8
120
+ - task:
121
+ name: Translation fra-eng
122
+ type: translation
123
+ args: fra-eng
124
+ dataset:
125
+ name: tico19-test
126
+ type: tico19-test
127
+ args: fra-eng
128
+ metrics:
129
+ - name: BLEU
130
+ type: bleu
131
+ value: 41.3
132
+ - task:
133
+ name: Translation fra-eng
134
+ type: translation
135
+ args: fra-eng
136
+ dataset:
137
+ name: newstest2009
138
+ type: wmt-2009-news
139
+ args: fra-eng
140
+ metrics:
141
+ - name: BLEU
142
+ type: bleu
143
+ value: 30.4
144
+ - task:
145
+ name: Translation fra-eng
146
+ type: translation
147
+ args: fra-eng
148
+ dataset:
149
+ name: newstest2010
150
+ type: wmt-2010-news
151
+ args: fra-eng
152
+ metrics:
153
+ - name: BLEU
154
+ type: bleu
155
+ value: 33.4
156
+ - task:
157
+ name: Translation fra-eng
158
+ type: translation
159
+ args: fra-eng
160
+ dataset:
161
+ name: newstest2011
162
+ type: wmt-2011-news
163
+ args: fra-eng
164
+ metrics:
165
+ - name: BLEU
166
+ type: bleu
167
+ value: 33.8
168
+ - task:
169
+ name: Translation fra-eng
170
+ type: translation
171
+ args: fra-eng
172
+ dataset:
173
+ name: newstest2012
174
+ type: wmt-2012-news
175
+ args: fra-eng
176
+ metrics:
177
+ - name: BLEU
178
+ type: bleu
179
+ value: 33.6
180
+ - task:
181
+ name: Translation fra-eng
182
+ type: translation
183
+ args: fra-eng
184
+ dataset:
185
+ name: newstest2013
186
+ type: wmt-2013-news
187
+ args: fra-eng
188
+ metrics:
189
+ - name: BLEU
190
+ type: bleu
191
+ value: 34.8
192
+ - task:
193
+ name: Translation fra-eng
194
+ type: translation
195
+ args: fra-eng
196
+ dataset:
197
+ name: newstest2014
198
+ type: wmt-2014-news
199
+ args: fra-eng
200
+ metrics:
201
+ - name: BLEU
202
+ type: bleu
203
+ value: 39.4
204
+ ---
205
+ # opus-mt-tc-big-fr-en
206
+
207
+ Neural machine translation model for translating from French (fr) to English (en).
208
+
209
+ 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).
210
+
211
+ * 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.)
212
+
213
+ ```
214
+ @inproceedings{tiedemann-thottingal-2020-opus,
215
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
216
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
217
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
218
+ month = nov,
219
+ year = "2020",
220
+ address = "Lisboa, Portugal",
221
+ publisher = "European Association for Machine Translation",
222
+ url = "https://aclanthology.org/2020.eamt-1.61",
223
+ pages = "479--480",
224
+ }
225
+
226
+ @inproceedings{tiedemann-2020-tatoeba,
227
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
228
+ author = {Tiedemann, J{\"o}rg},
229
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
230
+ month = nov,
231
+ year = "2020",
232
+ address = "Online",
233
+ publisher = "Association for Computational Linguistics",
234
+ url = "https://aclanthology.org/2020.wmt-1.139",
235
+ pages = "1174--1182",
236
+ }
237
+ ```
238
+
239
+ ## Model info
240
+
241
+ * Release: 2022-03-09
242
+ * source language(s): fra
243
+ * target language(s): eng
244
+ * model: transformer-big
245
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
246
+ * tokenization: SentencePiece (spm32k,spm32k)
247
+ * original model: [opusTCv20210807+bt_transformer-big_2022-03-09.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/fra-eng/opusTCv20210807+bt_transformer-big_2022-03-09.zip)
248
+ * more information released models: [OPUS-MT fra-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/fra-eng/README.md)
249
+
250
+ ## Usage
251
+
252
+ A short example code:
253
+
254
+ ```python
255
+ from transformers import MarianMTModel, MarianTokenizer
256
+
257
+ src_text = [
258
+ "J'ai adoré l'Angleterre.",
259
+ "C'était la seule chose à faire."
260
+ ]
261
+
262
+ model_name = "pytorch-models/opus-mt-tc-big-fr-en"
263
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
264
+ model = MarianMTModel.from_pretrained(model_name)
265
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
266
+
267
+ for t in translated:
268
+ print( tokenizer.decode(t, skip_special_tokens=True) )
269
+
270
+ # expected output:
271
+ # I loved England.
272
+ # It was the only thing to do.
273
+ ```
274
+
275
+ You can also use OPUS-MT models with the transformers pipelines, for example:
276
+
277
+ ```python
278
+ from transformers import pipeline
279
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-fr-en")
280
+ print(pipe("J'ai adoré l'Angleterre."))
281
+
282
+ # expected output: I loved England.
283
+ ```
284
+
285
+ ## Benchmarks
286
+
287
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-03-09.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/fra-eng/opusTCv20210807+bt_transformer-big_2022-03-09.test.txt)
288
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-03-09.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/fra-eng/opusTCv20210807+bt_transformer-big_2022-03-09.eval.txt)
289
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
290
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
291
+
292
+ | langpair | testset | chr-F | BLEU | #sent | #words |
293
+ |----------|---------|-------|-------|-------|--------|
294
+ | fra-eng | tatoeba-test-v2021-08-07 | 0.73772 | 59.8 | 12681 | 101754 |
295
+ | fra-eng | flores101-devtest | 0.69350 | 46.0 | 1012 | 24721 |
296
+ | fra-eng | multi30k_test_2016_flickr | 0.68005 | 49.7 | 1000 | 12955 |
297
+ | fra-eng | multi30k_test_2017_flickr | 0.70596 | 52.0 | 1000 | 11374 |
298
+ | fra-eng | multi30k_test_2017_mscoco | 0.69356 | 50.6 | 461 | 5231 |
299
+ | fra-eng | multi30k_test_2018_flickr | 0.65751 | 44.9 | 1071 | 14689 |
300
+ | fra-eng | newsdiscussdev2015 | 0.59008 | 34.4 | 1500 | 27759 |
301
+ | fra-eng | newsdiscusstest2015 | 0.62603 | 40.2 | 1500 | 26982 |
302
+ | fra-eng | newssyscomb2009 | 0.57488 | 31.1 | 502 | 11818 |
303
+ | fra-eng | news-test2008 | 0.54316 | 26.5 | 2051 | 49380 |
304
+ | fra-eng | newstest2009 | 0.56959 | 30.4 | 2525 | 65399 |
305
+ | fra-eng | newstest2010 | 0.59561 | 33.4 | 2489 | 61711 |
306
+ | fra-eng | newstest2011 | 0.60271 | 33.8 | 3003 | 74681 |
307
+ | fra-eng | newstest2012 | 0.59507 | 33.6 | 3003 | 72812 |
308
+ | fra-eng | newstest2013 | 0.59691 | 34.8 | 3000 | 64505 |
309
+ | fra-eng | newstest2014 | 0.64533 | 39.4 | 3003 | 70708 |
310
+ | fra-eng | tico19-test | 0.63326 | 41.3 | 2100 | 56323 |
311
+
312
+ ## Acknowledgements
313
+
314
+ 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.
315
+
316
+ ## Model conversion info
317
+
318
+ * transformers version: 4.16.2
319
+ * OPUS-MT git hash: 3405783
320
+ * port time: Wed Apr 13 19:02:28 EEST 2022
321
+ * port machine: LM0-400-22516.local