tiedeman commited on
Commit
84b5b18
1 Parent(s): e40b4b0

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,181 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - br
4
+ - cel
5
+ - cy
6
+ - en
7
+ - ga
8
+
9
+ tags:
10
+ - translation
11
+
12
+ license: cc-by-4.0
13
+ model-index:
14
+ - name: opus-mt-tc-big-cel-en
15
+ results:
16
+ - task:
17
+ name: Translation cym-eng
18
+ type: translation
19
+ args: cym-eng
20
+ dataset:
21
+ name: flores101-devtest
22
+ type: flores_101
23
+ args: cym eng devtest
24
+ metrics:
25
+ - name: BLEU
26
+ type: bleu
27
+ value: 50.2
28
+ - task:
29
+ name: Translation gle-eng
30
+ type: translation
31
+ args: gle-eng
32
+ dataset:
33
+ name: flores101-devtest
34
+ type: flores_101
35
+ args: gle eng devtest
36
+ metrics:
37
+ - name: BLEU
38
+ type: bleu
39
+ value: 37.4
40
+ - task:
41
+ name: Translation bre-eng
42
+ type: translation
43
+ args: bre-eng
44
+ dataset:
45
+ name: tatoeba-test-v2021-08-07
46
+ type: tatoeba_mt
47
+ args: bre-eng
48
+ metrics:
49
+ - name: BLEU
50
+ type: bleu
51
+ value: 36.1
52
+ - task:
53
+ name: Translation cym-eng
54
+ type: translation
55
+ args: cym-eng
56
+ dataset:
57
+ name: tatoeba-test-v2021-08-07
58
+ type: tatoeba_mt
59
+ args: cym-eng
60
+ metrics:
61
+ - name: BLEU
62
+ type: bleu
63
+ value: 53.6
64
+ - task:
65
+ name: Translation gle-eng
66
+ type: translation
67
+ args: gle-eng
68
+ dataset:
69
+ name: tatoeba-test-v2021-08-07
70
+ type: tatoeba_mt
71
+ args: gle-eng
72
+ metrics:
73
+ - name: BLEU
74
+ type: bleu
75
+ value: 57.7
76
+ ---
77
+ # opus-mt-tc-big-cel-en
78
+
79
+ Neural machine translation model for translating from Celtic languages (cel) to English (en).
80
+
81
+ 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).
82
+
83
+ * 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.)
84
+
85
+ ```
86
+ @inproceedings{tiedemann-thottingal-2020-opus,
87
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
88
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
89
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
90
+ month = nov,
91
+ year = "2020",
92
+ address = "Lisboa, Portugal",
93
+ publisher = "European Association for Machine Translation",
94
+ url = "https://aclanthology.org/2020.eamt-1.61",
95
+ pages = "479--480",
96
+ }
97
+
98
+ @inproceedings{tiedemann-2020-tatoeba,
99
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
100
+ author = {Tiedemann, J{\"o}rg},
101
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
102
+ month = nov,
103
+ year = "2020",
104
+ address = "Online",
105
+ publisher = "Association for Computational Linguistics",
106
+ url = "https://aclanthology.org/2020.wmt-1.139",
107
+ pages = "1174--1182",
108
+ }
109
+ ```
110
+
111
+ ## Model info
112
+
113
+ * Release: 2022-03-13
114
+ * source language(s): bre cym gle
115
+ * target language(s): eng
116
+ * model: transformer-big
117
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
118
+ * tokenization: SentencePiece (spm32k,spm32k)
119
+ * original model: [opusTCv20210807+bt_transformer-big_2022-03-13.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/cel-eng/opusTCv20210807+bt_transformer-big_2022-03-13.zip)
120
+ * more information released models: [OPUS-MT cel-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/cel-eng/README.md)
121
+
122
+ ## Usage
123
+
124
+ A short example code:
125
+
126
+ ```python
127
+ from transformers import MarianMTModel, MarianTokenizer
128
+
129
+ src_text = [
130
+ "A-du emaoc’h?",
131
+ "Ta'n ushtey glen."
132
+ ]
133
+
134
+ model_name = "pytorch-models/opus-mt-tc-big-cel-en"
135
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
136
+ model = MarianMTModel.from_pretrained(model_name)
137
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
138
+
139
+ for t in translated:
140
+ print( tokenizer.decode(t, skip_special_tokens=True) )
141
+
142
+ # expected output:
143
+ # Is that you?
144
+ # Ta'n ushtey glen.
145
+ ```
146
+
147
+ You can also use OPUS-MT models with the transformers pipelines, for example:
148
+
149
+ ```python
150
+ from transformers import pipeline
151
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-cel-en")
152
+ print(pipe("A-du emaoc’h?"))
153
+
154
+ # expected output: Is that you?
155
+ ```
156
+
157
+ ## Benchmarks
158
+
159
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-03-13.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/cel-eng/opusTCv20210807+bt_transformer-big_2022-03-13.test.txt)
160
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-03-13.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/cel-eng/opusTCv20210807+bt_transformer-big_2022-03-13.eval.txt)
161
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
162
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
163
+
164
+ | langpair | testset | chr-F | BLEU | #sent | #words |
165
+ |----------|---------|-------|-------|-------|--------|
166
+ | bre-eng | tatoeba-test-v2021-08-07 | 0.53712 | 36.1 | 383 | 2065 |
167
+ | cym-eng | tatoeba-test-v2021-08-07 | 0.69239 | 53.6 | 818 | 5563 |
168
+ | gle-eng | tatoeba-test-v2021-08-07 | 0.72087 | 57.7 | 1913 | 11190 |
169
+ | cym-eng | flores101-devtest | 0.71379 | 50.2 | 1012 | 24721 |
170
+ | gle-eng | flores101-devtest | 0.63946 | 37.4 | 1012 | 24721 |
171
+
172
+ ## Acknowledgements
173
+
174
+ 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.
175
+
176
+ ## Model conversion info
177
+
178
+ * transformers version: 4.16.2
179
+ * OPUS-MT git hash: 3405783
180
+ * port time: Wed Apr 13 18:36:25 EEST 2022
181
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,19 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cym-eng flores101-dev 0.72244 51.7 997 23555
2
+ gle-eng flores101-dev 0.65792 39.8 997 23555
3
+ cym-eng flores101-devtest 0.71379 50.2 1012 24721
4
+ gle-eng flores101-devtest 0.63946 37.4 1012 24721
5
+ bre-eng tatoeba-test-v2020-07-28 0.53712 36.1 383 2065
6
+ cor-eng tatoeba-test-v2020-07-28 0.15293 2.5 3198 16829
7
+ cym-eng tatoeba-test-v2020-07-28 0.69239 53.6 818 5563
8
+ gla-eng tatoeba-test-v2020-07-28 0.26426 11.6 917 6366
9
+ gle-eng tatoeba-test-v2020-07-28 0.72153 57.8 1924 11247
10
+ bre-eng tatoeba-test-v2021-03-30 0.53335 36.0 385 2091
11
+ cor-eng tatoeba-test-v2021-03-30 0.15293 2.5 3198 16829
12
+ cym-eng tatoeba-test-v2021-03-30 0.69434 53.9 840 5731
13
+ gla-eng tatoeba-test-v2021-03-30 0.26507 11.7 957 6628
14
+ gle-eng tatoeba-test-v2021-03-30 0.72153 57.8 1924 11247
15
+ bre-eng tatoeba-test-v2021-08-07 0.53712 36.1 383 2065
16
+ cor-eng tatoeba-test-v2021-08-07 0.15293 2.5 3198 16829
17
+ cym-eng tatoeba-test-v2021-08-07 0.69239 53.6 818 5563
18
+ gla-eng tatoeba-test-v2021-08-07 0.26501 11.7 955 6611
19
+ gle-eng tatoeba-test-v2021-08-07 0.72087 57.7 1913 11190
benchmark_translations.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f1e21df596a8f158cc76408b270d1d39484eed7c164a0b88d055c5bf01010d2e
3
+ size 1136621
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
+ 52334
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": 52334,
21
+ "decoder_vocab_size": 52335,
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": 41577,
28
+ "forced_eos_token_id": 41577,
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": 52334,
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": 52335
45
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9e8e8f50e304f24209c31b0ab64c2b43558a1a35f383378b80943156be33dafe
3
+ size 567275267
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8636bf80f2cceed672e9b638612b4d0f3ea93b6d1314da410a73f8e36d8fef14
3
+ size 793456
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:ff84fb8534e6a4ae5d0e8b32c7894cb413b2c6dcd19b2c3c1781604ca0167087
3
+ size 784798
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"source_lang": "cel", "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-13/cel-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff