sneakyfree commited on
Commit
5878f90
·
verified ·
1 Parent(s): cfda5a5

upstream-archive byte-perfect snapshot of Helsinki-NLP/opus-mt-tc-bible-big-afa-en (ADR-039 Phase D)

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,236 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ language:
4
+ - aa
5
+ - am
6
+ - ar
7
+ - arc
8
+ - bcw
9
+ - byn
10
+ - cop
11
+ - daa
12
+ - dsh
13
+ - en
14
+ - gde
15
+ - gnd
16
+ - ha
17
+ - hbo
18
+ - he
19
+ - hig
20
+ - irk
21
+ - jpa
22
+ - kab
23
+ - ker
24
+ - kqp
25
+ - ktb
26
+ - kxc
27
+ - lln
28
+ - lme
29
+ - meq
30
+ - mfh
31
+ - mfi
32
+ - mfk
33
+ - mif
34
+ - mpg
35
+ - mqb
36
+ - mt
37
+ - muy
38
+ - oar
39
+ - om
40
+ - pbi
41
+ - phn
42
+ - rif
43
+ - sgw
44
+ - shi
45
+ - shy
46
+ - so
47
+ - sur
48
+ - syc
49
+ - syr
50
+ - taq
51
+ - ti
52
+ - tig
53
+ - tmc
54
+ - tmh
55
+ - tmr
56
+ - ttr
57
+ - tzm
58
+ - wal
59
+ - xed
60
+ - zgh
61
+
62
+ tags:
63
+ - translation
64
+ - opus-mt-tc-bible
65
+
66
+ license: apache-2.0
67
+ model-index:
68
+ - name: opus-mt-tc-bible-big-afa-en
69
+ results:
70
+ - task:
71
+ name: Translation multi-eng
72
+ type: translation
73
+ args: multi-eng
74
+ dataset:
75
+ name: tatoeba-test-v2020-07-28-v2023-09-26
76
+ type: tatoeba_mt
77
+ args: multi-eng
78
+ metrics:
79
+ - name: BLEU
80
+ type: bleu
81
+ value: 39.0
82
+ - name: chr-F
83
+ type: chrf
84
+ value: 0.56433
85
+ ---
86
+ # opus-mt-tc-bible-big-afa-en
87
+
88
+ ## Table of Contents
89
+ - [Model Details](#model-details)
90
+ - [Uses](#uses)
91
+ - [Risks, Limitations and Biases](#risks-limitations-and-biases)
92
+ - [How to Get Started With the Model](#how-to-get-started-with-the-model)
93
+ - [Training](#training)
94
+ - [Evaluation](#evaluation)
95
+ - [Citation Information](#citation-information)
96
+ - [Acknowledgements](#acknowledgements)
97
+
98
+ ## Model Details
99
+
100
+ Neural machine translation model for translating from Afro-Asiatic languages (afa) to English (en).
101
+
102
+ 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).
103
+ **Model Description:**
104
+ - **Developed by:** Language Technology Research Group at the University of Helsinki
105
+ - **Model Type:** Translation (transformer-big)
106
+ - **Release**: 2024-08-17
107
+ - **License:** Apache-2.0
108
+ - **Language(s):**
109
+ - Source Language(s): aar acm afb amh apc ara arc arq arz bcw byn cop daa dsh gde gnd hau hbo heb hig irk jpa kab ker kqp ktb kxc lln lme meq mfh mfi mfk mif mlt mpg mqb muy oar orm pbi phn rif sgw shi shy som sur syc syr taq tig tir tmc tmh tmr ttr tzm wal xed zgh
110
+ - Target Language(s): eng
111
+ - **Original Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/afa-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip)
112
+ - **Resources for more information:**
113
+ - [OPUS-MT dashboard](https://opus.nlpl.eu/dashboard/index.php?pkg=opusmt&test=all&scoreslang=all&chart=standard&model=Tatoeba-MT-models/afa-eng/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-17)
114
+ - [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
115
+ - [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
116
+ - [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/)
117
+ - [HPLT bilingual data v1 (as part of the Tatoeba Translation Challenge dataset)](https://hplt-project.org/datasets/v1)
118
+ - [A massively parallel Bible corpus](https://aclanthology.org/L14-1215/)
119
+
120
+ ## Uses
121
+
122
+ This model can be used for translation and text-to-text generation.
123
+
124
+ ## Risks, Limitations and Biases
125
+
126
+ **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.**
127
+
128
+ 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)).
129
+
130
+ ## How to Get Started With the Model
131
+
132
+ A short example code:
133
+
134
+ ```python
135
+ from transformers import MarianMTModel, MarianTokenizer
136
+
137
+ src_text = [
138
+ "لا أريد أن أبدو غبيّا.",
139
+ "أكيليز بطل أسطوري عند الإغريق."
140
+ ]
141
+
142
+ model_name = "pytorch-models/opus-mt-tc-bible-big-afa-en"
143
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
144
+ model = MarianMTModel.from_pretrained(model_name)
145
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
146
+
147
+ for t in translated:
148
+ print( tokenizer.decode(t, skip_special_tokens=True) )
149
+
150
+ # expected output:
151
+ # I don't want to look stupid.
152
+ # Achilles is a legendary hero of the Greeks.
153
+ ```
154
+
155
+ You can also use OPUS-MT models with the transformers pipelines, for example:
156
+
157
+ ```python
158
+ from transformers import pipeline
159
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-bible-big-afa-en")
160
+ print(pipe("لا أريد أن أبدو غبيّا."))
161
+
162
+ # expected output: I don't want to look stupid.
163
+ ```
164
+
165
+ ## Training
166
+
167
+ - **Data**: opusTCv20230926max50+bt+jhubc ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
168
+ - **Pre-processing**: SentencePiece (spm32k,spm32k)
169
+ - **Model Type:** transformer-big
170
+ - **Original MarianNMT Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/afa-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.zip)
171
+ - **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
172
+
173
+ ## Evaluation
174
+
175
+ * [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/afa-eng/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-17)
176
+ * test set translations: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/afa-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.test.txt)
177
+ * test set scores: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/afa-eng/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-17.eval.txt)
178
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
179
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
180
+
181
+ | langpair | testset | chr-F | BLEU | #sent | #words |
182
+ |----------|---------|-------|-------|-------|--------|
183
+ | multi-eng | tatoeba-test-v2020-07-28-v2023-09-26 | 0.56433 | 39.0 | 10000 | 72071 |
184
+
185
+ ## Citation Information
186
+
187
+ * 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.)
188
+
189
+ ```bibtex
190
+ @article{tiedemann2023democratizing,
191
+ title={Democratizing neural machine translation with {OPUS-MT}},
192
+ 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},
193
+ journal={Language Resources and Evaluation},
194
+ number={58},
195
+ pages={713--755},
196
+ year={2023},
197
+ publisher={Springer Nature},
198
+ issn={1574-0218},
199
+ doi={10.1007/s10579-023-09704-w}
200
+ }
201
+
202
+ @inproceedings{tiedemann-thottingal-2020-opus,
203
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
204
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
205
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
206
+ month = nov,
207
+ year = "2020",
208
+ address = "Lisboa, Portugal",
209
+ publisher = "European Association for Machine Translation",
210
+ url = "https://aclanthology.org/2020.eamt-1.61",
211
+ pages = "479--480",
212
+ }
213
+
214
+ @inproceedings{tiedemann-2020-tatoeba,
215
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
216
+ author = {Tiedemann, J{\"o}rg},
217
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
218
+ month = nov,
219
+ year = "2020",
220
+ address = "Online",
221
+ publisher = "Association for Computational Linguistics",
222
+ url = "https://aclanthology.org/2020.wmt-1.139",
223
+ pages = "1174--1182",
224
+ }
225
+ ```
226
+
227
+ ## Acknowledgements
228
+
229
+ 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/).
230
+
231
+ ## Model conversion info
232
+
233
+ * transformers version: 4.45.1
234
+ * OPUS-MT git hash: a0ea3b3
235
+ * port time: Mon Oct 7 17:11:01 EEST 2024
236
+ * 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.56433 39.0 10000 72071
benchmark_translations.zip ADDED
File without changes
config.json ADDED
@@ -0,0 +1,41 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "opus-mt-tc-bible-big-afa-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": 61388,
17
+ "decoder_vocab_size": 61389,
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": 835,
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": 61388,
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": 61389
41
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bad_words_ids": [
4
+ [
5
+ 61388
6
+ ]
7
+ ],
8
+ "bos_token_id": 0,
9
+ "decoder_start_token_id": 61388,
10
+ "eos_token_id": 835,
11
+ "forced_eos_token_id": 835,
12
+ "max_length": 512,
13
+ "num_beams": 4,
14
+ "pad_token_id": 61388,
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:50877591d55dc8d738437a2ed1be89836d0a35d040a2e4eaa50c5fd54b71d847
3
+ size 957154020
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1c731267185face683281cc7bc2b685f94b17fcbdb3223edfb04dbe9d4a16c9a
3
+ size 957205253
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b7b8ced5502cb37f9bfb041612109ff1543cd99d9b36fb2173d0f8a3be53b546
3
+ size 810863
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:d63ee1eb34c6275299fc49cffddd014844f3f230570632dd706c01e277d9c899
3
+ size 806049
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "afa", "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/afa-en", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff