aplamhden commited on
Commit
41d215d
1 Parent(s): c6809d8

add translate model

Browse files
.gitattributes CHANGED
@@ -1,35 +1,29 @@
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
 
4
  *.bz2 filter=lfs diff=lfs merge=lfs -text
5
- *.ckpt filter=lfs diff=lfs merge=lfs -text
6
  *.ftz filter=lfs diff=lfs merge=lfs -text
7
  *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
- *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
  *.model filter=lfs diff=lfs merge=lfs -text
13
  *.msgpack filter=lfs diff=lfs merge=lfs -text
14
- *.npy filter=lfs diff=lfs merge=lfs -text
15
- *.npz filter=lfs diff=lfs merge=lfs -text
16
  *.onnx filter=lfs diff=lfs merge=lfs -text
17
  *.ot filter=lfs diff=lfs merge=lfs -text
18
  *.parquet filter=lfs diff=lfs merge=lfs -text
19
  *.pb filter=lfs diff=lfs merge=lfs -text
20
- *.pickle filter=lfs diff=lfs merge=lfs -text
21
- *.pkl filter=lfs diff=lfs merge=lfs -text
22
  *.pt filter=lfs diff=lfs merge=lfs -text
23
  *.pth filter=lfs diff=lfs merge=lfs -text
24
  *.rar filter=lfs diff=lfs merge=lfs -text
25
- *.safetensors filter=lfs diff=lfs merge=lfs -text
26
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
  *.tar.* filter=lfs diff=lfs merge=lfs -text
28
- *.tar filter=lfs diff=lfs merge=lfs -text
29
  *.tflite filter=lfs diff=lfs merge=lfs -text
30
  *.tgz filter=lfs diff=lfs merge=lfs -text
31
  *.wasm filter=lfs diff=lfs merge=lfs -text
32
  *.xz filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
- *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
1
  *.7z filter=lfs diff=lfs merge=lfs -text
2
  *.arrow filter=lfs diff=lfs merge=lfs -text
3
  *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bin.* filter=lfs diff=lfs merge=lfs -text
5
  *.bz2 filter=lfs diff=lfs merge=lfs -text
 
6
  *.ftz filter=lfs diff=lfs merge=lfs -text
7
  *.gz filter=lfs diff=lfs merge=lfs -text
8
  *.h5 filter=lfs diff=lfs merge=lfs -text
9
  *.joblib filter=lfs diff=lfs merge=lfs -text
10
  *.lfs.* filter=lfs diff=lfs merge=lfs -text
 
11
  *.model filter=lfs diff=lfs merge=lfs -text
12
  *.msgpack filter=lfs diff=lfs merge=lfs -text
 
 
13
  *.onnx filter=lfs diff=lfs merge=lfs -text
14
  *.ot filter=lfs diff=lfs merge=lfs -text
15
  *.parquet filter=lfs diff=lfs merge=lfs -text
16
  *.pb filter=lfs diff=lfs merge=lfs -text
 
 
17
  *.pt filter=lfs diff=lfs merge=lfs -text
18
  *.pth filter=lfs diff=lfs merge=lfs -text
19
  *.rar filter=lfs diff=lfs merge=lfs -text
 
20
  saved_model/**/* filter=lfs diff=lfs merge=lfs -text
21
  *.tar.* filter=lfs diff=lfs merge=lfs -text
 
22
  *.tflite filter=lfs diff=lfs merge=lfs -text
23
  *.tgz filter=lfs diff=lfs merge=lfs -text
24
  *.wasm filter=lfs diff=lfs merge=lfs -text
25
  *.xz 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 CHANGED
@@ -1,3 +1,138 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ language:
3
+ - el
4
+ - en
5
+ tags:
6
+ - translation
7
+ - opus-mt-tc
8
+ license: cc-by-4.0
9
+ model-index:
10
+ - name: opus-mt-tc-big-el-en
11
+ results:
12
+ - task:
13
+ name: Translation ell-eng
14
+ type: translation
15
+ args: ell-eng
16
+ dataset:
17
+ name: flores101-devtest
18
+ type: flores_101
19
+ args: ell eng devtest
20
+ metrics:
21
+ - name: BLEU
22
+ type: bleu
23
+ value: 33.9
24
+ - task:
25
+ name: Translation ell-eng
26
+ type: translation
27
+ args: ell-eng
28
+ dataset:
29
+ name: tatoeba-test-v2021-08-07
30
+ type: tatoeba_mt
31
+ args: ell-eng
32
+ metrics:
33
+ - name: BLEU
34
+ type: bleu
35
+ value: 68.8
36
  ---
37
+ # opus-mt-tc-big-el-en
38
+
39
+ Neural machine translation model for translating from Modern Greek (1453-) (el) to English (en).
40
+
41
+ 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).
42
+
43
+ * 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.)
44
+
45
+ ```
46
+ @inproceedings{tiedemann-thottingal-2020-opus,
47
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
48
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
49
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
50
+ month = nov,
51
+ year = "2020",
52
+ address = "Lisboa, Portugal",
53
+ publisher = "European Association for Machine Translation",
54
+ url = "https://aclanthology.org/2020.eamt-1.61",
55
+ pages = "479--480",
56
+ }
57
+
58
+ @inproceedings{tiedemann-2020-tatoeba,
59
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
60
+ author = {Tiedemann, J{\"o}rg},
61
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
62
+ month = nov,
63
+ year = "2020",
64
+ address = "Online",
65
+ publisher = "Association for Computational Linguistics",
66
+ url = "https://aclanthology.org/2020.wmt-1.139",
67
+ pages = "1174--1182",
68
+ }
69
+ ```
70
+
71
+ ## Model info
72
+
73
+ * Release: 2022-02-25
74
+ * source language(s): ell
75
+ * target language(s): eng
76
+ * model: transformer-big
77
+ * data: opusTCv20210807+bt ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
78
+ * tokenization: SentencePiece (spm32k,spm32k)
79
+ * original model: [opusTCv20210807+bt_transformer-big_2022-02-25.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/ell-eng/opusTCv20210807+bt_transformer-big_2022-02-25.zip)
80
+ * more information released models: [OPUS-MT ell-eng README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/ell-eng/README.md)
81
+
82
+ ## Usage
83
+
84
+ A short example code:
85
+
86
+ ```python
87
+ from transformers import MarianMTModel, MarianTokenizer
88
+
89
+ src_text = [
90
+ "Το σχολείο μας έχει εννιά τάξεις.",
91
+ "Άρχισε να τρέχει."
92
+ ]
93
+
94
+ model_name = "pytorch-models/opus-mt-tc-big-el-en"
95
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
96
+ model = MarianMTModel.from_pretrained(model_name)
97
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
98
+
99
+ for t in translated:
100
+ print( tokenizer.decode(t, skip_special_tokens=True) )
101
+
102
+ # expected output:
103
+ # Our school has nine classes.
104
+ # He started running.
105
+ ```
106
+
107
+ You can also use OPUS-MT models with the transformers pipelines, for example:
108
+
109
+ ```python
110
+ from transformers import pipeline
111
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-el-en")
112
+ print(pipe("Το σχολείο μας έχει εννιά τάξεις."))
113
+
114
+ # expected output: Our school has nine classes.
115
+ ```
116
+
117
+ ## Benchmarks
118
+
119
+ * test set translations: [opusTCv20210807+bt_transformer-big_2022-02-25.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ell-eng/opusTCv20210807+bt_transformer-big_2022-02-25.test.txt)
120
+ * test set scores: [opusTCv20210807+bt_transformer-big_2022-02-25.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ell-eng/opusTCv20210807+bt_transformer-big_2022-02-25.eval.txt)
121
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
122
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
123
+
124
+ | langpair | testset | chr-F | BLEU | #sent | #words |
125
+ |----------|---------|-------|-------|-------|--------|
126
+ | ell-eng | tatoeba-test-v2021-08-07 | 0.79708 | 68.8 | 10899 | 68682 |
127
+ | ell-eng | flores101-devtest | 0.61252 | 33.9 | 1012 | 24721 |
128
+
129
+ ## Acknowledgements
130
+
131
+ 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.
132
+
133
+ ## Model conversion info
134
+
135
+ * transformers version: 4.16.2
136
+ * OPUS-MT git hash: 3405783
137
+ * port time: Wed Apr 13 18:48:34 EEST 2022
138
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1,5 @@
 
 
 
 
 
 
1
+ ell-eng flores101-dev 0.62022 35.2 997 23555
2
+ ell-eng flores101-devtest 0.61252 33.9 1012 24721
3
+ ell-eng tatoeba-test-v2020-07-28 0.81113 70.8 10000 60970
4
+ ell-eng tatoeba-test-v2021-03-30 0.80231 69.6 10456 64736
5
+ ell-eng tatoeba-test-v2021-08-07 0.79708 68.8 10899 68682
benchmark_translations.zip ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:89533bdf278e3dae59624bd97f2091d4f6ec888e8ed56140ee423744f7e281e6
3
+ size 1294107
config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/tmp/Helsinki-NLP/opus-mt-tc-big-el-en",
3
+ "activation_dropout": 0.0,
4
+ "activation_function": "relu",
5
+ "architectures": [
6
+ "MarianMTModel"
7
+ ],
8
+ "attention_dropout": 0.0,
9
+ "bad_words_ids": [
10
+ [
11
+ 58828
12
+ ]
13
+ ],
14
+ "bos_token_id": 0,
15
+ "classifier_dropout": 0.0,
16
+ "d_model": 1024,
17
+ "decoder_attention_heads": 16,
18
+ "decoder_ffn_dim": 4096,
19
+ "decoder_layerdrop": 0.0,
20
+ "decoder_layers": 6,
21
+ "decoder_start_token_id": 58828,
22
+ "decoder_vocab_size": 58829,
23
+ "dropout": 0.1,
24
+ "encoder_attention_heads": 16,
25
+ "encoder_ffn_dim": 4096,
26
+ "encoder_layerdrop": 0.0,
27
+ "encoder_layers": 6,
28
+ "eos_token_id": 25697,
29
+ "forced_eos_token_id": 25697,
30
+ "init_std": 0.02,
31
+ "is_encoder_decoder": true,
32
+ "max_length": 512,
33
+ "max_position_embeddings": 1024,
34
+ "model_type": "marian",
35
+ "normalize_embedding": false,
36
+ "num_beams": 4,
37
+ "num_hidden_layers": 6,
38
+ "pad_token_id": 58828,
39
+ "scale_embedding": true,
40
+ "share_encoder_decoder_embeddings": true,
41
+ "static_position_embeddings": true,
42
+ "torch_dtype": "float16",
43
+ "transformers_version": "4.22.0.dev0",
44
+ "use_cache": true,
45
+ "vocab_size": 58829
46
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bad_words_ids": [
3
+ [
4
+ 58828
5
+ ]
6
+ ],
7
+ "bos_token_id": 0,
8
+ "decoder_start_token_id": 58828,
9
+ "eos_token_id": 25697,
10
+ "forced_eos_token_id": 25697,
11
+ "max_length": 512,
12
+ "num_beams": 4,
13
+ "pad_token_id": 58828,
14
+ "renormalize_logits": true,
15
+ "transformers_version": "4.32.0.dev0"
16
+ }
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a30b159a0e11459c18e5613255087f3adfa3ecaffb551e9609638fe69ca6d6d
3
+ size 593887683
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1f78d71e80e2dc22697802dfea24855499c5d482d1c47611f96a96af0b38ea4f
3
+ size 1003051
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:eb161fb698225d722b251738042d6e27481a66ba96477ab0fb046d8aa937ab2c
3
+ size 798530
tf_model.h5 ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:51bc2c571e63d5beb07f936c82f8104d8cb1d38b61b543655f506975827da687
3
+ size 955539736
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "el", "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-02-25/el-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff