VaishalBusiness commited on
Commit
2863d2b
·
verified ·
1 Parent(s): 5a5c0bd

Add README.md for Helsinki-NLP-opus-mt-tc-big-zle-pt

Browse files
Helsinki-NLP-opus-mt-tc-big-zle-pt/README.md ADDED
@@ -0,0 +1,167 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - pt
4
+ - ru
5
+ - uk
6
+ - zle
7
+ tags:
8
+ - translation
9
+ - opus-mt-tc
10
+ license: cc-by-4.0
11
+ model-index:
12
+ - name: opus-mt-tc-big-zle-pt
13
+ results:
14
+ - task:
15
+ name: Translation rus-por
16
+ type: translation
17
+ args: rus-por
18
+ dataset:
19
+ name: flores101-devtest
20
+ type: flores_101
21
+ args: rus por devtest
22
+ metrics:
23
+ - name: BLEU
24
+ type: bleu
25
+ value: 31.9
26
+ - task:
27
+ name: Translation ukr-por
28
+ type: translation
29
+ args: ukr-por
30
+ dataset:
31
+ name: flores101-devtest
32
+ type: flores_101
33
+ args: ukr por devtest
34
+ metrics:
35
+ - name: BLEU
36
+ type: bleu
37
+ value: 33.6
38
+ - task:
39
+ name: Translation rus-por
40
+ type: translation
41
+ args: rus-por
42
+ dataset:
43
+ name: tatoeba-test-v2021-08-07
44
+ type: tatoeba_mt
45
+ args: rus-por
46
+ metrics:
47
+ - name: BLEU
48
+ type: bleu
49
+ value: 42.8
50
+ - task:
51
+ name: Translation ukr-por
52
+ type: translation
53
+ args: ukr-por
54
+ dataset:
55
+ name: tatoeba-test-v2021-08-07
56
+ type: tatoeba_mt
57
+ args: ukr-por
58
+ metrics:
59
+ - name: BLEU
60
+ type: bleu
61
+ value: 45.2
62
+ ---
63
+ # opus-mt-tc-big-zle-pt
64
+
65
+ Neural machine translation model for translating from East Slavic languages (zle) to Portuguese (pt).
66
+
67
+ 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).
68
+
69
+ * 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.)
70
+
71
+ ```
72
+ @inproceedings{tiedemann-thottingal-2020-opus,
73
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
74
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
75
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
76
+ month = nov,
77
+ year = "2020",
78
+ address = "Lisboa, Portugal",
79
+ publisher = "European Association for Machine Translation",
80
+ url = "https://aclanthology.org/2020.eamt-1.61",
81
+ pages = "479--480",
82
+ }
83
+
84
+ @inproceedings{tiedemann-2020-tatoeba,
85
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
86
+ author = {Tiedemann, J{\"o}rg},
87
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
88
+ month = nov,
89
+ year = "2020",
90
+ address = "Online",
91
+ publisher = "Association for Computational Linguistics",
92
+ url = "https://aclanthology.org/2020.wmt-1.139",
93
+ pages = "1174--1182",
94
+ }
95
+ ```
96
+
97
+ ## Model info
98
+
99
+ * Release: 2022-03-23
100
+ * source language(s): rus ukr
101
+ * target language(s): por
102
+ * model: transformer-big
103
+ * data: opusTCv20210807 ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
104
+ * tokenization: SentencePiece (spm32k,spm32k)
105
+ * original model: [opusTCv20210807_transformer-big_2022-03-23.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-por/opusTCv20210807_transformer-big_2022-03-23.zip)
106
+ * more information released models: [OPUS-MT zle-por README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/zle-por/README.md)
107
+
108
+ ## Usage
109
+
110
+ A short example code:
111
+
112
+ ```python
113
+ from transformers import MarianMTModel, MarianTokenizer
114
+
115
+ src_text = [
116
+ ">>por<< Я маленькая.",
117
+ ">>por<< Я войду первым."
118
+ ]
119
+
120
+ model_name = "pytorch-models/opus-mt-tc-big-zle-pt"
121
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
122
+ model = MarianMTModel.from_pretrained(model_name)
123
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
124
+
125
+ for t in translated:
126
+ print( tokenizer.decode(t, skip_special_tokens=True) )
127
+
128
+ # expected output:
129
+ # Sou pequena.
130
+ # Eu entro primeiro.
131
+ ```
132
+
133
+ You can also use OPUS-MT models with the transformers pipelines, for example:
134
+
135
+ ```python
136
+ from transformers import pipeline
137
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zle-pt")
138
+ print(pipe(">>por<< Я маленькая."))
139
+
140
+ # expected output: Sou pequena.
141
+ ```
142
+
143
+ ## Benchmarks
144
+
145
+ * test set translations: [opusTCv20210807_transformer-big_2022-03-23.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-por/opusTCv20210807_transformer-big_2022-03-23.test.txt)
146
+ * test set scores: [opusTCv20210807_transformer-big_2022-03-23.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/zle-por/opusTCv20210807_transformer-big_2022-03-23.eval.txt)
147
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
148
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
149
+
150
+ | langpair | testset | chr-F | BLEU | #sent | #words |
151
+ |----------|---------|-------|-------|-------|--------|
152
+ | rus-por | tatoeba-test-v2021-08-07 | 0.63749 | 42.8 | 10000 | 74713 |
153
+ | ukr-por | tatoeba-test-v2021-08-07 | 0.65288 | 45.2 | 3372 | 21315 |
154
+ | bel-por | flores101-devtest | 0.48481 | 16.2 | 1012 | 26519 |
155
+ | rus-por | flores101-devtest | 0.58567 | 31.9 | 1012 | 26519 |
156
+ | ukr-por | flores101-devtest | 0.59378 | 33.6 | 1012 | 26519 |
157
+
158
+ ## Acknowledgements
159
+
160
+ 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.
161
+
162
+ ## Model conversion info
163
+
164
+ * transformers version: 4.16.2
165
+ * OPUS-MT git hash: 1bdabf7
166
+ * port time: Wed Mar 23 23:45:22 EET 2022
167
+ * port machine: LM0-400-22516.local