tiedeman commited on
Commit
3ede52e
1 Parent(s): dbfa076

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,357 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: transformers
3
+ language:
4
+ - acf
5
+ - af
6
+ - an
7
+ - ang
8
+ - anp
9
+ - as
10
+ - ast
11
+ - awa
12
+ - bal
13
+ - bar
14
+ - be
15
+ - bg
16
+ - bho
17
+ - bi
18
+ - bn
19
+ - bpy
20
+ - br
21
+ - bs
22
+ - bzj
23
+ - ca
24
+ - cbk
25
+ - co
26
+ - crs
27
+ - cs
28
+ - csb
29
+ - cu
30
+ - cy
31
+ - da
32
+ - de
33
+ - diq
34
+ - djk
35
+ - drt
36
+ - dsb
37
+ - dv
38
+ - egl
39
+ - el
40
+ - en
41
+ - enm
42
+ - es
43
+ - ext
44
+ - fa
45
+ - fo
46
+ - fr
47
+ - frm
48
+ - frp
49
+ - frr
50
+ - fur
51
+ - fy
52
+ - ga
53
+ - gbm
54
+ - gcf
55
+ - gd
56
+ - gl
57
+ - glk
58
+ - gos
59
+ - got
60
+ - grc
61
+ - gsw
62
+ - gu
63
+ - gv
64
+ - hi
65
+ - hif
66
+ - hne
67
+ - hns
68
+ - hr
69
+ - hrx
70
+ - hsb
71
+ - ht
72
+ - hwc
73
+ - hy
74
+ - hyw
75
+ - icr
76
+ - is
77
+ - it
78
+ - jam
79
+ - jdt
80
+ - kea
81
+ - kok
82
+ - kri
83
+ - ks
84
+ - ksh
85
+ - ku
86
+ - kw
87
+ - la
88
+ - lad
89
+ - lah
90
+ - lb
91
+ - li
92
+ - lij
93
+ - lld
94
+ - lmo
95
+ - lou
96
+ - lrc
97
+ - lt
98
+ - lv
99
+ - mag
100
+ - mai
101
+ - mfe
102
+ - mk
103
+ - mo
104
+ - mr
105
+ - mwl
106
+ - mzn
107
+ - nap
108
+ - nb
109
+ - nds
110
+ - ne
111
+ - nl
112
+ - nn
113
+ - no
114
+ - non
115
+ - oc
116
+ - ofs
117
+ - or
118
+ - orv
119
+ - os
120
+ - osp
121
+ - pa
122
+ - pal
123
+ - pap
124
+ - pcm
125
+ - pdc
126
+ - pfl
127
+ - pi
128
+ - pih
129
+ - pis
130
+ - pl
131
+ - pms
132
+ - pnt
133
+ - prg
134
+ - ps
135
+ - pt
136
+ - rhg
137
+ - rm
138
+ - rmy
139
+ - ro
140
+ - rom
141
+ - rop
142
+ - ru
143
+ - rue
144
+ - rup
145
+ - sa
146
+ - sc
147
+ - scn
148
+ - sco
149
+ - sd
150
+ - sgs
151
+ - sh
152
+ - si
153
+ - sk
154
+ - skr
155
+ - sl
156
+ - sq
157
+ - sr
158
+ - srm
159
+ - srn
160
+ - stq
161
+ - sv
162
+ - swg
163
+ - syl
164
+ - szl
165
+ - tcs
166
+ - tg
167
+ - tly
168
+ - tpi
169
+ - uk
170
+ - ur
171
+ - vec
172
+ - vls
173
+ - wa
174
+ - wae
175
+ - xcl
176
+ - yi
177
+ - zea
178
+ - zza
179
+
180
+ tags:
181
+ - translation
182
+ - opus-mt-tc-bible
183
+
184
+ license: apache-2.0
185
+ model-index:
186
+ - name: opus-mt-tc-bible-big-ine-deu_eng_nld
187
+ results:
188
+ - task:
189
+ name: Translation multi-multi
190
+ type: translation
191
+ args: multi-multi
192
+ dataset:
193
+ name: tatoeba-test-v2020-07-28-v2023-09-26
194
+ type: tatoeba_mt
195
+ args: multi-multi
196
+ metrics:
197
+ - name: BLEU
198
+ type: bleu
199
+ value: 50.4
200
+ - name: chr-F
201
+ type: chrf
202
+ value: 0.68202
203
+ ---
204
+ # opus-mt-tc-bible-big-ine-deu_eng_nld
205
+
206
+ ## Table of Contents
207
+ - [Model Details](#model-details)
208
+ - [Uses](#uses)
209
+ - [Risks, Limitations and Biases](#risks-limitations-and-biases)
210
+ - [How to Get Started With the Model](#how-to-get-started-with-the-model)
211
+ - [Training](#training)
212
+ - [Evaluation](#evaluation)
213
+ - [Citation Information](#citation-information)
214
+ - [Acknowledgements](#acknowledgements)
215
+
216
+ ## Model Details
217
+
218
+ Neural machine translation model for translating from Indo-European languages (ine) to unknown (deu+eng+nld).
219
+
220
+ 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).
221
+ **Model Description:**
222
+ - **Developed by:** Language Technology Research Group at the University of Helsinki
223
+ - **Model Type:** Translation (transformer-big)
224
+ - **Release**: 2024-08-18
225
+ - **License:** Apache-2.0
226
+ - **Language(s):**
227
+ - Source Language(s): acf afr aln ang anp arg asm ast awa bal bar bel ben bho bis bos bpy bre bul bzj cat cbk ces chu ckb cnr cor cos crs csb cym dan deu diq div djk drt dsb dty egl ell eng enm ext fao fas fra frm frp frr fry fur gbm gcf gla gle glg glk glv gos got grc gsw guj hat hbs hif hin hne hns hrv hrx hsb hwc hye hyw icr isl ita jam jdt kas kea kmr kok kri ksh kur lad lah lat lav lij lim lit lld lmo lou lrc ltz mag mai mar mfe mkd mol multi mwl mzn nap nds nep nld nno nob non nor npi oci ofs ori orv osp oss pal pan pap pcm pdc pes pfl pih pis pli pms pnt pol por prg prs pus rhg rmy roh rom ron rop rue rup rus san scn sco sdh sgs sin skr slk slv snd spa sqi srd srm srn srp stq swe swg syl szl tcs tgk tly tpi ukr urd vec vls wae wln xcl yid zea zza
228
+ - Target Language(s): deu eng multi nld
229
+ - Valid Target Language Labels: >>deu<< >>eng<< >>nld<< >>xxx<<
230
+ - **Original Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/ine-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip)
231
+ - **Resources for more information:**
232
+ - [OPUS-MT dashboard](https://opus.nlpl.eu/dashboard/index.php?pkg=opusmt&test=all&scoreslang=all&chart=standard&model=Tatoeba-MT-models/ine-deu%2Beng%2Bnld/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-18)
233
+ - [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
234
+ - [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
235
+ - [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/)
236
+ - [HPLT bilingual data v1 (as part of the Tatoeba Translation Challenge dataset)](https://hplt-project.org/datasets/v1)
237
+ - [A massively parallel Bible corpus](https://aclanthology.org/L14-1215/)
238
+
239
+ 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<<`
240
+
241
+ ## Uses
242
+
243
+ This model can be used for translation and text-to-text generation.
244
+
245
+ ## Risks, Limitations and Biases
246
+
247
+ **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.**
248
+
249
+ 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)).
250
+
251
+ ## How to Get Started With the Model
252
+
253
+ A short example code:
254
+
255
+ ```python
256
+ from transformers import MarianMTModel, MarianTokenizer
257
+
258
+ src_text = [
259
+ ">>eng<< To był pracowity dzień.",
260
+ ">>eng<< Wie lange würde ich zu dir brauchen?"
261
+ ]
262
+
263
+ model_name = "pytorch-models/opus-mt-tc-bible-big-ine-deu_eng_nld"
264
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
265
+ model = MarianMTModel.from_pretrained(model_name)
266
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
267
+
268
+ for t in translated:
269
+ print( tokenizer.decode(t, skip_special_tokens=True) )
270
+
271
+ # expected output:
272
+ # It was a busy day.
273
+ # How long would I need to see you?
274
+ ```
275
+
276
+ You can also use OPUS-MT models with the transformers pipelines, for example:
277
+
278
+ ```python
279
+ from transformers import pipeline
280
+ pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-bible-big-ine-deu_eng_nld")
281
+ print(pipe(">>eng<< To był pracowity dzień."))
282
+
283
+ # expected output: It was a busy day.
284
+ ```
285
+
286
+ ## Training
287
+
288
+ - **Data**: opusTCv20230926max50+bt+jhubc ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
289
+ - **Pre-processing**: SentencePiece (spm32k,spm32k)
290
+ - **Model Type:** transformer-big
291
+ - **Original MarianNMT Model**: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/ine-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.zip)
292
+ - **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
293
+
294
+ ## Evaluation
295
+
296
+ * [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/ine-deu%2Beng%2Bnld/opusTCv20230926max50%2Bbt%2Bjhubc_transformer-big_2024-08-18)
297
+ * test set translations: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ine-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.test.txt)
298
+ * test set scores: [opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/ine-deu+eng+nld/opusTCv20230926max50+bt+jhubc_transformer-big_2024-08-18.eval.txt)
299
+ * benchmark results: [benchmark_results.txt](benchmark_results.txt)
300
+ * benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
301
+
302
+ | langpair | testset | chr-F | BLEU | #sent | #words |
303
+ |----------|---------|-------|-------|-------|--------|
304
+ | multi-multi | tatoeba-test-v2020-07-28-v2023-09-26 | 0.68202 | 50.4 | 10000 | 78987 |
305
+
306
+ ## Citation Information
307
+
308
+ * 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.)
309
+
310
+ ```bibtex
311
+ @article{tiedemann2023democratizing,
312
+ title={Democratizing neural machine translation with {OPUS-MT}},
313
+ 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},
314
+ journal={Language Resources and Evaluation},
315
+ number={58},
316
+ pages={713--755},
317
+ year={2023},
318
+ publisher={Springer Nature},
319
+ issn={1574-0218},
320
+ doi={10.1007/s10579-023-09704-w}
321
+ }
322
+
323
+ @inproceedings{tiedemann-thottingal-2020-opus,
324
+ title = "{OPUS}-{MT} {--} Building open translation services for the World",
325
+ author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
326
+ booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
327
+ month = nov,
328
+ year = "2020",
329
+ address = "Lisboa, Portugal",
330
+ publisher = "European Association for Machine Translation",
331
+ url = "https://aclanthology.org/2020.eamt-1.61",
332
+ pages = "479--480",
333
+ }
334
+
335
+ @inproceedings{tiedemann-2020-tatoeba,
336
+ title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
337
+ author = {Tiedemann, J{\"o}rg},
338
+ booktitle = "Proceedings of the Fifth Conference on Machine Translation",
339
+ month = nov,
340
+ year = "2020",
341
+ address = "Online",
342
+ publisher = "Association for Computational Linguistics",
343
+ url = "https://aclanthology.org/2020.wmt-1.139",
344
+ pages = "1174--1182",
345
+ }
346
+ ```
347
+
348
+ ## Acknowledgements
349
+
350
+ 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/).
351
+
352
+ ## Model conversion info
353
+
354
+ * transformers version: 4.45.1
355
+ * OPUS-MT git hash: ae3fcbd
356
+ * port time: Sun Oct 6 23:44:17 EEST 2024
357
+ * 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.68202 50.4 10000 78987
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-ine-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": 55208,
17
+ "decoder_vocab_size": 55209,
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": 549,
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": 55208,
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": 55209
41
+ }
generation_config.json ADDED
@@ -0,0 +1,16 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_from_model_config": true,
3
+ "bad_words_ids": [
4
+ [
5
+ 55208
6
+ ]
7
+ ],
8
+ "bos_token_id": 0,
9
+ "decoder_start_token_id": 55208,
10
+ "eos_token_id": 549,
11
+ "forced_eos_token_id": 549,
12
+ "max_length": 512,
13
+ "num_beams": 4,
14
+ "pad_token_id": 55208,
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:9038212e1949ef2a64a7f74d6140a5c5e8e872032d64aedca5f9de821032b677
3
+ size 931816020
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:34bf6d44763635fc46040a736cf0075cd617a08d297ef2579a3fd1b6f36f655a
3
+ size 931867269
source.spm ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:41a00603446d78d629f3233d561720bf10a55021a85a08e43d4cfbefc24b5d2a
3
+ size 785917
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:af7c07fdbc503f5d94d5815946356e68b27a28304722369ecac91542c15fb4b3
3
+ size 805185
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"source_lang": "ine", "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/ine-deu+eng+nld", "tokenizer_class": "MarianTokenizer"}
vocab.json ADDED
The diff for this file is too large to render. See raw diff