tiedeman commited on
Commit
a725fd5
1 Parent(s): 6f9a3ca

Initial commit

Browse files
.gitattributes CHANGED
@@ -29,3 +29,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zst filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
29
  *.zip filter=lfs diff=lfs merge=lfs -text
30
  *.zst filter=lfs diff=lfs merge=lfs -text
31
  *tfevents* filter=lfs diff=lfs merge=lfs -text
32
+ *.spm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,337 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - es
4
+ - fr
5
+ - he
6
+ - it
7
+ - itc
8
+ - pt
9
+ - xx
10
+ language_bcp47:
11
+ - es
12
+ - fr
13
+ - he
14
+ - it
15
+ - itc
16
+ - pt
17
+
18
+ tags:
19
+ - translation
20
+ - opus-mt-tc
21
+
22
+ license: cc-by-4.0
23
+ model-index:
24
+ - name: opus-mt-tc-big-itc-he
25
+ results:
26
+ - task:
27
+ name: Translation cat-heb
28
+ type: translation
29
+ args: cat-heb
30
+ dataset:
31
+ name: flores101-devtest
32
+ type: flores_101
33
+ args: cat heb devtest
34
+ metrics:
35
+ - name: BLEU
36
+ type: bleu
37
+ value: 23.0
38
+ - name: chr-F
39
+ type: chrf
40
+ value: 0.52457
41
+ - task:
42
+ name: Translation fra-heb
43
+ type: translation
44
+ args: fra-heb
45
+ dataset:
46
+ name: flores101-devtest
47
+ type: flores_101
48
+ args: fra heb devtest
49
+ metrics:
50
+ - name: BLEU
51
+ type: bleu
52
+ value: 23.2
53
+ - name: chr-F
54
+ type: chrf
55
+ value: 0.52953
56
+ - task:
57
+ name: Translation glg-heb
58
+ type: translation
59
+ args: glg-heb
60
+ dataset:
61
+ name: flores101-devtest
62
+ type: flores_101
63
+ args: glg heb devtest
64
+ metrics:
65
+ - name: BLEU
66
+ type: bleu
67
+ value: 20.8
68
+ - name: chr-F
69
+ type: chrf
70
+ value: 0.50918
71
+ - task:
72
+ name: Translation ita-heb
73
+ type: translation
74
+ args: ita-heb
75
+ dataset:
76
+ name: flores101-devtest
77
+ type: flores_101
78
+ args: ita heb devtest
79
+ metrics:
80
+ - name: BLEU
81
+ type: bleu
82
+ value: 18.3
83
+ - name: chr-F
84
+ type: chrf
85
+ value: 0.49007
86
+ - task:
87
+ name: Translation por-heb
88
+ type: translation
89
+ args: por-heb
90
+ dataset:
91
+ name: flores101-devtest
92
+ type: flores_101
93
+ args: por heb devtest
94
+ metrics:
95
+ - name: BLEU
96
+ type: bleu
97
+ value: 24.4
98
+ - name: chr-F
99
+ type: chrf
100
+ value: 0.53906
101
+ - task:
102
+ name: Translation ron-heb
103
+ type: translation
104
+ args: ron-heb
105
+ dataset:
106
+ name: flores101-devtest
107
+ type: flores_101
108
+ args: ron heb devtest
109
+ metrics:
110
+ - name: BLEU
111
+ type: bleu
112
+ value: 22.1
113
+ - name: chr-F
114
+ type: chrf
115
+ value: 0.52103
116
+ - task:
117
+ name: Translation spa-heb
118
+ type: translation
119
+ args: spa-heb
120
+ dataset:
121
+ name: flores101-devtest
122
+ type: flores_101
123
+ args: spa heb devtest
124
+ metrics:
125
+ - name: BLEU
126
+ type: bleu
127
+ value: 16.5
128
+ - name: chr-F
129
+ type: chrf
130
+ value: 0.47646
131
+ - task:
132
+ name: Translation fra-heb
133
+ type: translation
134
+ args: fra-heb
135
+ dataset:
136
+ name: tatoeba-test-v2021-08-07
137
+ type: tatoeba_mt
138
+ args: fra-heb
139
+ metrics:
140
+ - name: BLEU
141
+ type: bleu
142
+ value: 39.6
143
+ - name: chr-F
144
+ type: chrf
145
+ value: 0.60539
146
+ - task:
147
+ name: Translation ita-heb
148
+ type: translation
149
+ args: ita-heb
150
+ dataset:
151
+ name: tatoeba-test-v2021-08-07
152
+ type: tatoeba_mt
153
+ args: ita-heb
154
+ metrics:
155
+ - name: BLEU
156
+ type: bleu
157
+ value: 40.0
158
+ - name: chr-F
159
+ type: chrf
160
+ value: 0.60264
161
+ - task:
162
+ name: Translation por-heb
163
+ type: translation
164
+ args: por-heb
165
+ dataset:
166
+ name: tatoeba-test-v2021-08-07
167
+ type: tatoeba_mt
168
+ args: por-heb
169
+ metrics:
170
+ - name: BLEU
171
+ type: bleu
172
+ value: 44.4
173
+ - name: chr-F
174
+ type: chrf
175
+ value: 0.63087
176
+ - task:
177
+ name: Translation spa-heb
178
+ type: translation
179
+ args: spa-heb
180
+ dataset:
181
+ name: tatoeba-test-v2021-08-07
182
+ type: tatoeba_mt
183
+ args: spa-heb
184
+ metrics:
185
+ - name: BLEU
186
+ type: bleu
187
+ value: 44.5
188
+ - name: chr-F
189
+ type: chrf
190
+ value: 0.63883
191
+ ---
192
+ # opus-mt-tc-big-itc-he
193
+
194
+ ## Table of Contents
195
+ - [Model Details](#model-details)
196
+ - [Uses](#uses)
197
+ - [Risks, Limitations and Biases](#risks-limitations-and-biases)
198
+ - [How to Get Started With the Model](#how-to-get-started-with-the-model)
199
+ - [Training](#training)
200
+ - [Evaluation](#evaluation)
201
+ - [Citation Information](#citation-information)
202
+ - [Acknowledgements](#acknowledgements)
203
+
204
+ ## Model Details
205
+
206
+ Neural machine translation model for translating from Italic languages (itc) to Hebrew (he).
207
+
208
+ 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).
209
+ **Model Description:**
210
+ - **Developed by:** Language Technology Research Group at the University of Helsinki
211
+ - **Model Type:** Translation (transformer-big)
212
+ - **Release**: 2022-08-03
213
+ - **License:** CC-BY-4.0
214
+ - **Language(s):**
215
+ - Source Language(s): fra ita lad_Latn por spa
216
+ - Target Language(s): heb
217
+ - **Original Model**: [opusTCv20210807_transformer-big_2022-08-03.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-heb/opusTCv20210807_transformer-big_2022-08-03.zip)
218
+ - **Resources for more information:**
219
+ - [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
220
+ - More information about released models for this language pair: [OPUS-MT itc-heb README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/itc-heb/README.md)
221
+ - [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
222
+ - [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/
223
+
224
+ ## Uses
225
+
226
+ This model can be used for translation and text-to-text generation.
227
+
228
+ ## Risks, Limitations and Biases
229
+
230
+ **CONTENT WARNING: Readers should be aware that the model is trained on various public data sets that may contain content that is disturbing, offensive, and can propagate historical and current stereotypes.**
231
+
232
+ Significant research has explored bias and fairness issues with language models (see, e.g., [Sheng et al. (2021)](https://aclanthology.org/2021.acl-long.330.pdf) and [Bender et al. (2021)](https://dl.acm.org/doi/pdf/10.1145/3442188.3445922)).
233
+
234
+ ## How to Get Started With the Model
235
+
236
+ A short example code:
237
+
238
+ ```python
239
+ from transformers import MarianMTModel, MarianTokenizer
240
+
241
+ src_text = [
242
+ "La María és feminista.",
243
+ "Contribuyan en Tatoeba."
244
+ ]
245
+
246
+ model_name = "pytorch-models/opus-mt-tc-big-itc-he"
247
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
248
+ model = MarianMTModel.from_pretrained(model_name)
249
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
250
+
251
+ for t in translated:
252
+ print( tokenizer.decode(t, skip_special_tokens=True) )
253
+
254
+ # expected output:
255
+ # מרי היא פמיניסטית.
256
+ # תרום לטאטואבה.
257
+ ```
258
+
259
+ You can also use OPUS-MT models with the transformers pipelines, for example:
260
+
261
+ ```python
262
+ from transformers import pipeline
263
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-itc-he")
264
+ print(pipe("La María és feminista."))
265
+
266
+ # expected output: מרי היא פמיניסטית.
267
+ ```
268
+
269
+ ## Training
270
+
271
+ - **Data**: opusTCv20210807 ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
272
+ - **Pre-processing**: SentencePiece (spm32k,spm32k)
273
+ - **Model Type:** transformer-big
274
+ - **Original MarianNMT Model**: [opusTCv20210807_transformer-big_2022-08-03.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-heb/opusTCv20210807_transformer-big_2022-08-03.zip)
275
+ - **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
276
+
277
+ ## Evaluation
278
+
279
+ * test set translations: [opusTCv20210807_transformer-big_2022-08-03.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-heb/opusTCv20210807_transformer-big_2022-08-03.test.txt)
280
+ * test set scores: [opusTCv20210807_transformer-big_2022-08-03.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-heb/opusTCv20210807_transformer-big_2022-08-03.eval.txt)
281
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
282
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
283
+
284
+ | langpair | testset | chr-F | BLEU | #sent | #words |
285
+ |----------|---------|-------|-------|-------|--------|
286
+ | fra-heb | tatoeba-test-v2021-08-07 | 0.60539 | 39.6 | 3281 | 20655 |
287
+ | ita-heb | tatoeba-test-v2021-08-07 | 0.60264 | 40.0 | 1706 | 9796 |
288
+ | por-heb | tatoeba-test-v2021-08-07 | 0.63087 | 44.4 | 719 | 4423 |
289
+ | spa-heb | tatoeba-test-v2021-08-07 | 0.63883 | 44.5 | 1849 | 12112 |
290
+ | cat-heb | flores101-devtest | 0.52457 | 23.0 | 1012 | 20749 |
291
+ | fra-heb | flores101-devtest | 0.52953 | 23.2 | 1012 | 20749 |
292
+ | glg-heb | flores101-devtest | 0.50918 | 20.8 | 1012 | 20749 |
293
+ | ita-heb | flores101-devtest | 0.49007 | 18.3 | 1012 | 20749 |
294
+ | por-heb | flores101-devtest | 0.53906 | 24.4 | 1012 | 20749 |
295
+ | ron-heb | flores101-devtest | 0.52103 | 22.1 | 1012 | 20749 |
296
+ | spa-heb | flores101-devtest | 0.47646 | 16.5 | 1012 | 20749 |
297
+
298
+ ## Citation Information
299
+
300
+ * 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.)
301
+
302
+ ```
303
+ @inproceedings{tiedemann-thottingal-2020-opus,
304
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
305
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
306
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
307
+ month = nov,
308
+ year = "2020",
309
+ address = "Lisboa, Portugal",
310
+ publisher = "European Association for Machine Translation",
311
+ url = "https://aclanthology.org/2020.eamt-1.61",
312
+ pages = "479--480",
313
+ }
314
+
315
+ @inproceedings{tiedemann-2020-tatoeba,
316
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
317
+ author = {Tiedemann, J{\"o}rg},
318
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
319
+ month = nov,
320
+ year = "2020",
321
+ address = "Online",
322
+ publisher = "Association for Computational Linguistics",
323
+ url = "https://aclanthology.org/2020.wmt-1.139",
324
+ pages = "1174--1182",
325
+ }
326
+ ```
327
+
328
+ ## Acknowledgements
329
+
330
+ 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.
331
+
332
+ ## Model conversion info
333
+
334
+ * transformers version: 4.16.2
335
+ * OPUS-MT git hash: 8b9f0b0
336
+ * port time: Fri Aug 12 15:27:58 EEST 2022
337
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,22 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ cat-heb flores101-dev 0.52145 22.7 997 19946
2
+ fra-heb flores101-dev 0.51815 22.5 997 19946
3
+ glg-heb flores101-dev 0.50935 21.4 997 19946
4
+ ita-heb flores101-dev 0.48319 17.4 997 19946
5
+ por-heb flores101-dev 0.53251 24.0 997 19946
6
+ ron-heb flores101-dev 0.51691 21.7 997 19946
7
+ spa-heb flores101-dev 0.46577 15.9 997 19946
8
+ cat-heb flores101-devtest 0.52457 23.0 1012 20749
9
+ fra-heb flores101-devtest 0.52953 23.2 1012 20749
10
+ glg-heb flores101-devtest 0.50918 20.8 1012 20749
11
+ ita-heb flores101-devtest 0.49007 18.3 1012 20749
12
+ por-heb flores101-devtest 0.53906 24.4 1012 20749
13
+ ron-heb flores101-devtest 0.52103 22.1 1012 20749
14
+ spa-heb flores101-devtest 0.47646 16.5 1012 20749
15
+ por-heb tatoeba-test-v2020-07-28 0.63058 44.5 702 4341
16
+ lad-heb tatoeba-test-v2021-03-30 0.31596 10.3 237 1165
17
+ por-heb tatoeba-test-v2021-03-30 0.62960 44.4 735 4533
18
+ fra-heb tatoeba-test-v2021-08-07 0.60539 39.6 3281 20655
19
+ ita-heb tatoeba-test-v2021-08-07 0.60264 40.0 1706 9796
20
+ lad-heb tatoeba-test-v2021-08-07 0.30729 10.5 218 1086
21
+ por-heb tatoeba-test-v2021-08-07 0.63087 44.4 719 4423
22
+ spa-heb tatoeba-test-v2021-08-07 0.63883 44.5 1849 12112
benchmark_translations.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f8c9dc392675689a41756e93a09ecfbe28ffafd95211cdffdf08bcdf51532ff4
3
+ size 2730497
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
+ 61114
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": 61114,
21
+ "decoder_vocab_size": 61115,
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": 26900,
28
+ "forced_eos_token_id": 26900,
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": 61114,
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": 61115
45
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e0049f8d0e32457fbe23806ee38bf0b35ea7777bbe1a83bd404e169be60d1316
3
+ size 603255683
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e1948ea948efe877821ede2f6e625efe1eb9be7ffbfbf0f8bb6deec699e64cf9
3
+ size 805503
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:101a1667270e4b800d269ec1bdbf8bf80b840bd1877887a9c07dffdb2ad0adbb
3
+ size 878443
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "itc", "target_lang": "he", "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_transformer-big_2022-08-03/itc-he", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff