tiedeman commited on
Commit
5010e32
1 Parent(s): 8b4f79b

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