tiedeman commited on
Commit
c3f7488
1 Parent(s): c87bea6

Initial commit

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* 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
 
 
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
36
+ *.spm filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,217 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ language:
4
+ - anp
5
+ - as
6
+ - awa
7
+ - bho
8
+ - bn
9
+ - bpy
10
+ - de
11
+ - dv
12
+ - en
13
+ - gbm
14
+ - gu
15
+ - hi
16
+ - hif
17
+ - hne
18
+ - hns
19
+ - kok
20
+ - ks
21
+ - lah
22
+ - mag
23
+ - mai
24
+ - mr
25
+ - ne
26
+ - nl
27
+ - or
28
+ - pa
29
+ - pi
30
+ - rhg
31
+ - rmy
32
+ - rom
33
+ - sa
34
+ - sd
35
+ - si
36
+ - skr
37
+ - syl
38
+ - ur
39
+
40
+ tags:
41
+ - translation
42
+ - opus-mt-tc-bible
43
+
44
+ license: apache-2.0
45
+ model-index:
46
+ - name: opus-mt-tc-bible-big-inc-deu_eng_nld
47
+ results:
48
+ - task:
49
+ name: Translation multi-multi
50
+ type: translation
51
+ args: multi-multi
52
+ dataset:
53
+ name: tatoeba-test-v2020-07-28-v2023-09-26
54
+ type: tatoeba_mt
55
+ args: multi-multi
56
+ metrics:
57
+ - name: BLEU
58
+ type: bleu
59
+ value: 44.1
60
+ - name: chr-F
61
+ type: chrf
62
+ value: 0.60937
63
+ ---
64
+ # opus-mt-tc-bible-big-inc-deu_eng_nld
65
+
66
+ ## Table of Contents
67
+ - [Model Details](#model-details)
68
+ - [Uses](#uses)
69
+ - [Risks, Limitations and Biases](#risks-limitations-and-biases)
70
+ - [How to Get Started With the Model](#how-to-get-started-with-the-model)
71
+ - [Training](#training)
72
+ - [Evaluation](#evaluation)
73
+ - [Citation Information](#citation-information)
74
+ - [Acknowledgements](#acknowledgements)
75
+
76
+ ## Model Details
77
+
78
+ Neural machine translation model for translating from Indic languages (inc) to unknown (deu+eng+nld).
79
+
80
+ 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).
81
+ **Model Description:**
82
+ - **Developed by:** Language Technology Research Group at the University of Helsinki
83
+ - **Model Type:** Translation (transformer-big)
84
+ - **Release**: 2024-08-18
85
+ - **License:** Apache-2.0
86
+ - **Language(s):**
87
+ - Source Language(s): anp asm awa ben bho bpy div dty gbm guj hif hin hne hns kas kok lah mag mai mar nep npi ori pan pli rhg rmy rom san sin skr snd syl urd
88
+ - Target Language(s): deu eng nld
89
+ - Valid Target Language Labels: >>deu<< >>eng<< >>nld<< >>xxx<<
90
+ - **Original Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip)
91
+ - **Resources for more information:**
92
+ - [OPUS-MT dashboard](https://opus.nlpl.eu/dashboard/index.php?pkg=opusmt&test=all&scoreslang=all&chart=standard&model=Tatoeba-MT-models/inc-deu%2Beng%2Bnld/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-18)
93
+ - [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
94
+ - [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
95
+ - [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/)
96
+ - [HPLT bilingual data v1 (as part of the Tatoeba Translation Challenge dataset)](https://hplt-project.org/datasets/v1)
97
+ - [A massively parallel Bible corpus](https://aclanthology.org/L14-1215/)
98
+
99
+ This is a multilingual translation model with multiple target languages. A sentence initial language token is required in the form of `>>id<<` (id = valid target language ID), e.g. `>>deu<<`
100
+
101
+ ## Uses
102
+
103
+ This model can be used for translation and text-to-text generation.
104
+
105
+ ## Risks, Limitations and Biases
106
+
107
+ **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.**
108
+
109
+ 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)).
110
+
111
+ ## How to Get Started With the Model
112
+
113
+ A short example code:
114
+
115
+ ```python
116
+ from transformers import MarianMTModel, MarianTokenizer
117
+
118
+ src_text = [
119
+ ">>eng<< सुरूवातीला त्यांना इंग्रजी अजीबात बोलता येत नव्हती.",
120
+ ">>eng<< मला थोडे स्कोन खायचे आहेत."
121
+ ]
122
+
123
+ model_name = "pytorch-models/opus-mt-tc-bible-big-inc-deu_eng_nld"
124
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
125
+ model = MarianMTModel.from_pretrained(model_name)
126
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
127
+
128
+ for t in translated:
129
+ print( tokenizer.decode(t, skip_special_tokens=True) )
130
+
131
+ # expected output:
132
+ # At first, he couldn’t speak English.
133
+ # I want to eat a few scones.
134
+ ```
135
+
136
+ You can also use OPUS-MT models with the transformers pipelines, for example:
137
+
138
+ ```python
139
+ from transformers import pipeline
140
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-bible-big-inc-deu_eng_nld")
141
+ print(pipe(">>eng<< सुरूवातीला त्यांना इंग्रजी अजीबात बोलता येत नव्हती."))
142
+
143
+ # expected output: At first, he couldn’t speak English.
144
+ ```
145
+
146
+ ## Training
147
+
148
+ - **Data**: opusTCv20230926max50+bt+jhubc ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
149
+ - **Pre-processing**: SentencePiece (spm32k,spm32k)
150
+ - **Model Type:** transformer-big
151
+ - **Original MarianNMT Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip)
152
+ - **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
153
+
154
+ ## Evaluation
155
+
156
+ * [Model scores at the OPUS-MT dashboard](https://opus.nlpl.eu/dashboard/index.php?pkg=opusmt&test=all&scoreslang=all&chart=standard&model=Tatoeba-MT-models/inc-deu%2Beng%2Bnld/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-18)
157
+ * test set translations: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.test.txt)
158
+ * test set scores: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.eval.txt)
159
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
160
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
161
+
162
+ | langpair | testset | chr-F | BLEU | #sent | #words |
163
+ |----------|---------|-------|-------|-------|--------|
164
+ | multi-multi | tatoeba-test-v2020-07-28-v2023-09-26 | 0.60937 | 44.1 | 10000 | 64896 |
165
+
166
+ ## Citation Information
167
+
168
+ * Publications: [Democratizing neural machine translation with OPUS-MT](https://doi.org/10.1007/s10579-023-09704-w) and [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.)
169
+
170
+ ```bibtex
171
+ @article{tiedemann2023democratizing,
172
+ title={Democratizing neural machine translation with {OPUS-MT}},
173
+ author={Tiedemann, J{\"o}rg and Aulamo, Mikko and Bakshandaeva, Daria and Boggia, Michele and Gr{\"o}nroos, Stig-Arne and Nieminen, Tommi and Raganato, Alessandro and Scherrer, Yves and Vazquez, Raul and Virpioja, Sami},
174
+ journal={Language Resources and Evaluation},
175
+ number={58},
176
+ pages={713--755},
177
+ year={2023},
178
+ publisher={Springer Nature},
179
+ issn={1574-0218},
180
+ doi={10.1007/s10579-023-09704-w}
181
+ }
182
+
183
+ @inproceedings{tiedemann-thottingal-2020-opus,
184
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
185
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
186
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
187
+ month = nov,
188
+ year = "2020",
189
+ address = "Lisboa, Portugal",
190
+ publisher = "European Association for Machine Translation",
191
+ url = "https://aclanthology.org/2020.eamt-1.61",
192
+ pages = "479--480",
193
+ }
194
+
195
+ @inproceedings{tiedemann-2020-tatoeba,
196
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
197
+ author = {Tiedemann, J{\"o}rg},
198
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
199
+ month = nov,
200
+ year = "2020",
201
+ address = "Online",
202
+ publisher = "Association for Computational Linguistics",
203
+ url = "https://aclanthology.org/2020.wmt-1.139",
204
+ pages = "1174--1182",
205
+ }
206
+ ```
207
+
208
+ ## Acknowledgements
209
+
210
+ The work is supported by the [HPLT project](https://hplt-project.org/), funded by the European Union’s Horizon Europe research and innovation programme under grant agreement No 101070350. We are also grateful for the generous computational resources and IT infrastructure provided by [CSC -- IT Center for Science](https://www.csc.fi/), Finland, and the [EuroHPC supercomputer LUMI](https://www.lumi-supercomputer.eu/).
211
+
212
+ ## Model conversion info
213
+
214
+ * transformers version: 4.45.1
215
+ * OPUS-MT git hash: 0882077
216
+ * port time: Tue Oct 8 11:42:46 EEST 2024
217
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ multi-multi tatoeba-test-v2020-07-28-v2023-09-26 0.60937 44.1 10000 64896
benchmark_translations.zip ADDED
File without changes
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "pytorch-models/opus-mt-tc-bible-big-inc-deu_eng_nld",
3
+ "activation_dropout": 0.0,
4
+ "activation_function": "relu",
5
+ "architectures": [
6
+ "MarianMTModel"
7
+ ],
8
+ "attention_dropout": 0.0,
9
+ "bos_token_id": 0,
10
+ "classifier_dropout": 0.0,
11
+ "d_model": 1024,
12
+ "decoder_attention_heads": 16,
13
+ "decoder_ffn_dim": 4096,
14
+ "decoder_layerdrop": 0.0,
15
+ "decoder_layers": 6,
16
+ "decoder_start_token_id": 62163,
17
+ "decoder_vocab_size": 62164,
18
+ "dropout": 0.1,
19
+ "encoder_attention_heads": 16,
20
+ "encoder_ffn_dim": 4096,
21
+ "encoder_layerdrop": 0.0,
22
+ "encoder_layers": 6,
23
+ "eos_token_id": 433,
24
+ "forced_eos_token_id": null,
25
+ "init_std": 0.02,
26
+ "is_encoder_decoder": true,
27
+ "max_length": null,
28
+ "max_position_embeddings": 1024,
29
+ "model_type": "marian",
30
+ "normalize_embedding": false,
31
+ "num_beams": null,
32
+ "num_hidden_layers": 6,
33
+ "pad_token_id": 62163,
34
+ "scale_embedding": true,
35
+ "share_encoder_decoder_embeddings": true,
36
+ "static_position_embeddings": true,
37
+ "torch_dtype": "float32",
38
+ "transformers_version": "4.45.1",
39
+ "use_cache": true,
40
+ "vocab_size": 62164
41
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bad_words_ids": [
4
+ [
5
+ 62163
6
+ ]
7
+ ],
8
+ "bos_token_id": 0,
9
+ "decoder_start_token_id": 62163,
10
+ "eos_token_id": 433,
11
+ "forced_eos_token_id": 433,
12
+ "max_length": 512,
13
+ "num_beams": 4,
14
+ "pad_token_id": 62163,
15
+ "transformers_version": "4.45.1"
16
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9ea78ec13788dd4e628c2e7e27ae3dd5d692cea2849334519ff952b450051742
3
+ size 960331520
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:af9558b81fcddd2f52190ce12c733391ffe57b2948c7397b1254fa16b4b0d6f2
3
+ size 960382789
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e8b1869f22dc51e754bdc3fb832ba42ade8aa2e452979adeee1c5ace6b7c4898
3
+ size 979652
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:6c4430fab1099fb91f7405351fa8cf174f762d35932c741dba61e34727325d64
3
+ size 810755
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "inc", "target_lang": "deu+eng+nld", "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/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18/inc-deu+eng+nld", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff