tiedeman commited on
Commit
c6a5899
1 Parent(s): 71b7995

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,212 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ language:
4
+ - anp
5
+ - as
6
+ - awa
7
+ - bho
8
+ - bn
9
+ - bpy
10
+ - dv
11
+ - en
12
+ - gbm
13
+ - gu
14
+ - hi
15
+ - hif
16
+ - hne
17
+ - hns
18
+ - kok
19
+ - ks
20
+ - lah
21
+ - mag
22
+ - mai
23
+ - mr
24
+ - ne
25
+ - or
26
+ - pa
27
+ - pi
28
+ - rhg
29
+ - rmy
30
+ - rom
31
+ - sa
32
+ - sd
33
+ - si
34
+ - skr
35
+ - syl
36
+ - ur
37
+
38
+ tags:
39
+ - translation
40
+ - opus-mt-tc-bible
41
+
42
+ license: apache-2.0
43
+ model-index:
44
+ - name: opus-mt-tc-bible-big-inc-en
45
+ results:
46
+ - task:
47
+ name: Translation multi-eng
48
+ type: translation
49
+ args: multi-eng
50
+ dataset:
51
+ name: tatoeba-test-v2020-07-28-v2023-09-26
52
+ type: tatoeba_mt
53
+ args: multi-eng
54
+ metrics:
55
+ - name: BLEU
56
+ type: bleu
57
+ value: 44.3
58
+ - name: chr-F
59
+ type: chrf
60
+ value: 0.61252
61
+ ---
62
+ # opus-mt-tc-bible-big-inc-en
63
+
64
+ ## Table of Contents
65
+ - [Model Details](#model-details)
66
+ - [Uses](#uses)
67
+ - [Risks, Limitations and Biases](#risks-limitations-and-biases)
68
+ - [How to Get Started With the Model](#how-to-get-started-with-the-model)
69
+ - [Training](#training)
70
+ - [Evaluation](#evaluation)
71
+ - [Citation Information](#citation-information)
72
+ - [Acknowledgements](#acknowledgements)
73
+
74
+ ## Model Details
75
+
76
+ Neural machine translation model for translating from Indic languages (inc) to English (en).
77
+
78
+ 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).
79
+ **Model Description:**
80
+ - **Developed by:** Language Technology Research Group at the University of Helsinki
81
+ - **Model Type:** Translation (transformer-big)
82
+ - **Release**: 2024-08-17
83
+ - **License:** Apache-2.0
84
+ - **Language(s):**
85
+ - 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
86
+ - Target Language(s): eng
87
+ - **Original Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip)
88
+ - **Resources for more information:**
89
+ - [OPUS-MT dashboard](https://opus.nlpl.eu/dashboard/index.php?pkg=opusmt&test=all&scoreslang=all&chart=standard&model=Tatoeba-MT-models/inc-eng/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-17)
90
+ - [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
91
+ - [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
92
+ - [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/)
93
+ - [HPLT bilingual data v1 (as part of the Tatoeba Translation Challenge dataset)](https://hplt-project.org/datasets/v1)
94
+ - [A massively parallel Bible corpus](https://aclanthology.org/L14-1215/)
95
+
96
+ ## Uses
97
+
98
+ This model can be used for translation and text-to-text generation.
99
+
100
+ ## Risks, Limitations and Biases
101
+
102
+ **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.**
103
+
104
+ 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)).
105
+
106
+ ## How to Get Started With the Model
107
+
108
+ A short example code:
109
+
110
+ ```python
111
+ from transformers import MarianMTModel, MarianTokenizer
112
+
113
+ src_text = [
114
+ "हमें केवल सम्पूर्ण वाक्य चाहिएं।",
115
+ "टॉम ने मुझे बताया नहीं।"
116
+ ]
117
+
118
+ model_name = "pytorch-models/opus-mt-tc-bible-big-inc-en"
119
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
120
+ model = MarianMTModel.from_pretrained(model_name)
121
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
122
+
123
+ for t in translated:
124
+ print( tokenizer.decode(t, skip_special_tokens=True) )
125
+
126
+ # expected output:
127
+ # We just need the whole sentence.
128
+ # Tom didn't tell me.
129
+ ```
130
+
131
+ You can also use OPUS-MT models with the transformers pipelines, for example:
132
+
133
+ ```python
134
+ from transformers import pipeline
135
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-bible-big-inc-en")
136
+ print(pipe("हमें केवल सम्पूर्ण वाक्य चाहिएं।"))
137
+
138
+ # expected output: We just need the whole sentence.
139
+ ```
140
+
141
+ ## Training
142
+
143
+ - **Data**: opusTCv20230926max50+bt+jhubc ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
144
+ - **Pre-processing**: SentencePiece (spm32k,spm32k)
145
+ - **Model Type:** transformer-big
146
+ - **Original MarianNMT Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip)
147
+ - **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
148
+
149
+ ## Evaluation
150
+
151
+ * [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-eng/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-17)
152
+ * test set translations: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.test.txt)
153
+ * test set scores: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/inc-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.eval.txt)
154
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
155
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
156
+
157
+ | langpair | testset | chr-F | BLEU | #sent | #words |
158
+ |----------|---------|-------|-------|-------|--------|
159
+ | multi-eng | tatoeba-test-v2020-07-28-v2023-09-26 | 0.61252 | 44.3 | 10000 | 64786 |
160
+
161
+ ## Citation Information
162
+
163
+ * 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.)
164
+
165
+ ```bibtex
166
+ @article{tiedemann2023democratizing,
167
+ title={Democratizing neural machine translation with {OPUS-MT}},
168
+ 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},
169
+ journal={Language Resources and Evaluation},
170
+ number={58},
171
+ pages={713--755},
172
+ year={2023},
173
+ publisher={Springer Nature},
174
+ issn={1574-0218},
175
+ doi={10.1007/s10579-023-09704-w}
176
+ }
177
+
178
+ @inproceedings{tiedemann-thottingal-2020-opus,
179
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
180
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
181
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
182
+ month = nov,
183
+ year = "2020",
184
+ address = "Lisboa, Portugal",
185
+ publisher = "European Association for Machine Translation",
186
+ url = "https://aclanthology.org/2020.eamt-1.61",
187
+ pages = "479--480",
188
+ }
189
+
190
+ @inproceedings{tiedemann-2020-tatoeba,
191
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
192
+ author = {Tiedemann, J{\"o}rg},
193
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
194
+ month = nov,
195
+ year = "2020",
196
+ address = "Online",
197
+ publisher = "Association for Computational Linguistics",
198
+ url = "https://aclanthology.org/2020.wmt-1.139",
199
+ pages = "1174--1182",
200
+ }
201
+ ```
202
+
203
+ ## Acknowledgements
204
+
205
+ 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/).
206
+
207
+ ## Model conversion info
208
+
209
+ * transformers version: 4.45.1
210
+ * OPUS-MT git hash: 0882077
211
+ * port time: Tue Oct 8 11:46:05 EEST 2024
212
+ * port machine: LM0-400-22516.local
benchmark_results.txt ADDED
@@ -0,0 +1 @@
 
 
1
+ multi-eng tatoeba-test-v2020-07-28-v2023-09-26 0.61252 44.3 10000 64786
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-en",
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": 62025,
17
+ "decoder_vocab_size": 62026,
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": 701,
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": 62025,
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": 62026
41
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bad_words_ids": [
4
+ [
5
+ 62025
6
+ ]
7
+ ],
8
+ "bos_token_id": 0,
9
+ "decoder_start_token_id": 62025,
10
+ "eos_token_id": 701,
11
+ "forced_eos_token_id": 701,
12
+ "max_length": 512,
13
+ "num_beams": 4,
14
+ "pad_token_id": 62025,
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:a61aef2d82a5c9d619fc0176148e22ea130ae08a4bd24eac805b90b810b84d67
3
+ size 959765720
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c9657c201a7739c9bf2466caa21d9abb6399484eb5e7494a31a61b09a945309d
3
+ size 959816965
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:064f269ca20cddbefd4e62905ced665eb21b8bd078ccadae0554aa2c96985f26
3
+ size 985685
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:b291fbf44ab0a7da46c8d188349c2dbee760bd6b0ecf8e0cea31e6ca831b4de6
3
+ size 802433
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "inc", "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/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17/inc-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff