VaishalBusiness commited on
Commit
b074204
·
verified ·
1 Parent(s): 54fa597

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

Browse files
Helsinki-NLP-opus-mt-tc-big-tr-en/README.md ADDED
@@ -0,0 +1,190 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - tr
5
+ tags:
6
+ - translation
7
+ - opus-mt-tc
8
+ license: cc-by-4.0
9
+ model-index:
10
+ - name: opus-mt-tc-big-tr-en
11
+ results:
12
+ - task:
13
+ name: Translation tur-eng
14
+ type: translation
15
+ args: tur-eng
16
+ dataset:
17
+ name: flores101-devtest
18
+ type: flores_101
19
+ args: tur eng devtest
20
+ metrics:
21
+ - name: BLEU
22
+ type: bleu
23
+ value: 37.6
24
+ - task:
25
+ name: Translation tur-eng
26
+ type: translation
27
+ args: tur-eng
28
+ dataset:
29
+ name: newsdev2016
30
+ type: newsdev2016
31
+ args: tur-eng
32
+ metrics:
33
+ - name: BLEU
34
+ type: bleu
35
+ value: 32.1
36
+ - task:
37
+ name: Translation tur-eng
38
+ type: translation
39
+ args: tur-eng
40
+ dataset:
41
+ name: tatoeba-test-v2021-08-07
42
+ type: tatoeba_mt
43
+ args: tur-eng
44
+ metrics:
45
+ - name: BLEU
46
+ type: bleu
47
+ value: 57.6
48
+ - task:
49
+ name: Translation tur-eng
50
+ type: translation
51
+ args: tur-eng
52
+ dataset:
53
+ name: newstest2016
54
+ type: wmt-2016-news
55
+ args: tur-eng
56
+ metrics:
57
+ - name: BLEU
58
+ type: bleu
59
+ value: 29.3
60
+ - task:
61
+ name: Translation tur-eng
62
+ type: translation
63
+ args: tur-eng
64
+ dataset:
65
+ name: newstest2017
66
+ type: wmt-2017-news
67
+ args: tur-eng
68
+ metrics:
69
+ - name: BLEU
70
+ type: bleu
71
+ value: 29.7
72
+ - task:
73
+ name: Translation tur-eng
74
+ type: translation
75
+ args: tur-eng
76
+ dataset:
77
+ name: newstest2018
78
+ type: wmt-2018-news
79
+ args: tur-eng
80
+ metrics:
81
+ - name: BLEU
82
+ type: bleu
83
+ value: 30.7
84
+ ---
85
+ # opus-mt-tc-big-tr-en
86
+
87
+ Neural machine translation model for translating from Turkish (tr) to English (en).
88
+
89
+ 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).
90
+
91
+ * 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.)
92
+
93
+ ```
94
+ @inproceedings{tiedemann-thottingal-2020-opus,
95
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
96
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
97
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
98
+ month = nov,
99
+ year = "2020",
100
+ address = "Lisboa, Portugal",
101
+ publisher = "European Association for Machine Translation",
102
+ url = "https://aclanthology.org/2020.eamt-1.61",
103
+ pages = "479--480",
104
+ }
105
+
106
+ @inproceedings{tiedemann-2020-tatoeba,
107
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
108
+ author = {Tiedemann, J{\"o}rg},
109
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
110
+ month = nov,
111
+ year = "2020",
112
+ address = "Online",
113
+ publisher = "Association for Computational Linguistics",
114
+ url = "https://aclanthology.org/2020.wmt-1.139",
115
+ pages = "1174--1182",
116
+ }
117
+ ```
118
+
119
+ ## Model info
120
+
121
+ * Release: 2022-03-17
122
+ * source language(s): tur
123
+ * target language(s): eng
124
+ * model: transformer-big
125
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
126
+ * tokenization: SentencePiece (spm32k,spm32k)
127
+ * original model: [opusTCv20210807+bt_transformer-big_2022-03-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/tur-eng/opusTCv20210807+bt_transformer-big_2022-03-17.zip)
128
+ * more information released models: [OPUS-MT tur-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/tur-eng/README.md)
129
+
130
+ ## Usage
131
+
132
+ A short example code:
133
+
134
+ ```python
135
+ from transformers import MarianMTModel, MarianTokenizer
136
+
137
+ src_text = [
138
+ "Allahsızlığı Yayma Kürsüsü başkanıydı.",
139
+ "Tom'a ne olduğunu öğrenin."
140
+ ]
141
+
142
+ model_name = "pytorch-models/opus-mt-tc-big-tr-en"
143
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
144
+ model = MarianMTModel.from_pretrained(model_name)
145
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
146
+
147
+ for t in translated:
148
+ print( tokenizer.decode(t, skip_special_tokens=True) )
149
+
150
+ # expected output:
151
+ # He was the president of the Curse of Spreading Godlessness.
152
+ # Find out what happened to Tom.
153
+ ```
154
+
155
+ You can also use OPUS-MT models with the transformers pipelines, for example:
156
+
157
+ ```python
158
+ from transformers import pipeline
159
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-tr-en")
160
+ print(pipe("Allahsızlığı Yayma Kürsüsü başkanıydı."))
161
+
162
+ # expected output: He was the president of the Curse of Spreading Godlessness.
163
+ ```
164
+
165
+ ## Benchmarks
166
+
167
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-03-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/tur-eng/opusTCv20210807+bt_transformer-big_2022-03-17.test.txt)
168
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-03-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/tur-eng/opusTCv20210807+bt_transformer-big_2022-03-17.eval.txt)
169
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
170
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
171
+
172
+ | langpair | testset | chr-F | BLEU | #sent | #words |
173
+ |----------|---------|-------|-------|-------|--------|
174
+ | tur-eng | tatoeba-test-v2021-08-07 | 0.71895 | 57.6 | 13907 | 109231 |
175
+ | tur-eng | flores101-devtest | 0.64152 | 37.6 | 1012 | 24721 |
176
+ | tur-eng | newsdev2016 | 0.58658 | 32.1 | 1001 | 21988 |
177
+ | tur-eng | newstest2016 | 0.56960 | 29.3 | 3000 | 66175 |
178
+ | tur-eng | newstest2017 | 0.57455 | 29.7 | 3007 | 67703 |
179
+ | tur-eng | newstest2018 | 0.58488 | 30.7 | 3000 | 68725 |
180
+
181
+ ## Acknowledgements
182
+
183
+ 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.
184
+
185
+ ## Model conversion info
186
+
187
+ * transformers version: 4.16.2
188
+ * OPUS-MT git hash: 3405783
189
+ * port time: Wed Apr 13 20:02:48 EEST 2022
190
+ * port machine: LM0-400-22516.local