Initial commit
Browse files- .gitattributes +1 -0
- README.md +234 -0
- benchmark_results.txt +12 -0
- benchmark_translations.zip +3 -0
- config.json +45 -0
- pytorch_model.bin +3 -0
- source.spm +3 -0
- special_tokens_map.json +1 -0
- target.spm +3 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
.gitattributes
CHANGED
@@ -29,3 +29,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
|
29 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
29 |
*.zip filter=lfs diff=lfs merge=lfs -text
|
30 |
*.zst filter=lfs diff=lfs merge=lfs -text
|
31 |
*tfevents* filter=lfs diff=lfs merge=lfs -text
|
32 |
+
*.spm filter=lfs diff=lfs merge=lfs -text
|
README.md
ADDED
@@ -0,0 +1,234 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
language:
|
3 |
+
- da
|
4 |
+
- gmq
|
5 |
+
- nb
|
6 |
+
- nn
|
7 |
+
- no
|
8 |
+
- sv
|
9 |
+
- tr
|
10 |
+
|
11 |
+
tags:
|
12 |
+
- translation
|
13 |
+
- opus-mt-tc
|
14 |
+
|
15 |
+
license: cc-by-4.0
|
16 |
+
model-index:
|
17 |
+
- name: opus-mt-tc-big-gmq-tr
|
18 |
+
results:
|
19 |
+
- task:
|
20 |
+
name: Translation dan-tur
|
21 |
+
type: translation
|
22 |
+
args: dan-tur
|
23 |
+
dataset:
|
24 |
+
name: flores101-devtest
|
25 |
+
type: flores_101
|
26 |
+
args: dan tur devtest
|
27 |
+
metrics:
|
28 |
+
- name: BLEU
|
29 |
+
type: bleu
|
30 |
+
value: 23.4
|
31 |
+
- name: chr-F
|
32 |
+
type: chrf
|
33 |
+
value: 0.56363
|
34 |
+
- task:
|
35 |
+
name: Translation nob-tur
|
36 |
+
type: translation
|
37 |
+
args: nob-tur
|
38 |
+
dataset:
|
39 |
+
name: flores101-devtest
|
40 |
+
type: flores_101
|
41 |
+
args: nob tur devtest
|
42 |
+
metrics:
|
43 |
+
- name: BLEU
|
44 |
+
type: bleu
|
45 |
+
value: 19.0
|
46 |
+
- name: chr-F
|
47 |
+
type: chrf
|
48 |
+
value: 0.52696
|
49 |
+
- task:
|
50 |
+
name: Translation swe-tur
|
51 |
+
type: translation
|
52 |
+
args: swe-tur
|
53 |
+
dataset:
|
54 |
+
name: flores101-devtest
|
55 |
+
type: flores_101
|
56 |
+
args: swe tur devtest
|
57 |
+
metrics:
|
58 |
+
- name: BLEU
|
59 |
+
type: bleu
|
60 |
+
value: 22.2
|
61 |
+
- name: chr-F
|
62 |
+
type: chrf
|
63 |
+
value: 0.54996
|
64 |
+
- task:
|
65 |
+
name: Translation dan-tur
|
66 |
+
type: translation
|
67 |
+
args: dan-tur
|
68 |
+
dataset:
|
69 |
+
name: tatoeba-test-v2021-08-07
|
70 |
+
type: tatoeba_mt
|
71 |
+
args: dan-tur
|
72 |
+
metrics:
|
73 |
+
- name: BLEU
|
74 |
+
type: bleu
|
75 |
+
value: 43.0
|
76 |
+
- name: chr-F
|
77 |
+
type: chrf
|
78 |
+
value: 0.67830
|
79 |
+
- task:
|
80 |
+
name: Translation swe-tur
|
81 |
+
type: translation
|
82 |
+
args: swe-tur
|
83 |
+
dataset:
|
84 |
+
name: tatoeba-test-v2021-08-07
|
85 |
+
type: tatoeba_mt
|
86 |
+
args: swe-tur
|
87 |
+
metrics:
|
88 |
+
- name: BLEU
|
89 |
+
type: bleu
|
90 |
+
value: 34.2
|
91 |
+
- name: chr-F
|
92 |
+
type: chrf
|
93 |
+
value: 0.63653
|
94 |
+
---
|
95 |
+
# opus-mt-tc-big-gmq-tr
|
96 |
+
|
97 |
+
## Table of Contents
|
98 |
+
- [Model Details](#model-details)
|
99 |
+
- [Uses](#uses)
|
100 |
+
- [Risks, Limitations and Biases](#risks-limitations-and-biases)
|
101 |
+
- [How to Get Started With the Model](#how-to-get-started-with-the-model)
|
102 |
+
- [Training](#training)
|
103 |
+
- [Evaluation](#evaluation)
|
104 |
+
- [Citation Information](#citation-information)
|
105 |
+
- [Acknowledgements](#acknowledgements)
|
106 |
+
|
107 |
+
## Model Details
|
108 |
+
|
109 |
+
Neural machine translation model for translating from North Germanic languages (gmq) to Turkish (tr).
|
110 |
+
|
111 |
+
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).
|
112 |
+
**Model Description:**
|
113 |
+
- **Developed by:** Language Technology Research Group at the University of Helsinki
|
114 |
+
- **Model Type:** Translation (transformer-big)
|
115 |
+
- **Release**: 2022-07-26
|
116 |
+
- **License:** CC-BY-4.0
|
117 |
+
- **Language(s):**
|
118 |
+
- Source Language(s): dan nno nob nor swe
|
119 |
+
- Target Language(s): tur
|
120 |
+
- **Original Model**: [opusTCv20210807_transformer-big_2022-07-26.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/gmq-tur/opusTCv20210807_transformer-big_2022-07-26.zip)
|
121 |
+
- **Resources for more information:**
|
122 |
+
- [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
|
123 |
+
- More information about released models for this language pair: [OPUS-MT gmq-tur README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/gmq-tur/README.md)
|
124 |
+
- [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
|
125 |
+
- [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/
|
126 |
+
|
127 |
+
## Uses
|
128 |
+
|
129 |
+
This model can be used for translation and text-to-text generation.
|
130 |
+
|
131 |
+
## Risks, Limitations and Biases
|
132 |
+
|
133 |
+
**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.**
|
134 |
+
|
135 |
+
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)).
|
136 |
+
|
137 |
+
## How to Get Started With the Model
|
138 |
+
|
139 |
+
A short example code:
|
140 |
+
|
141 |
+
```python
|
142 |
+
from transformers import MarianMTModel, MarianTokenizer
|
143 |
+
|
144 |
+
src_text = [
|
145 |
+
"Aftensmaden dufter lækkert.",
|
146 |
+
"Vi ser vad som händer tillsammans."
|
147 |
+
]
|
148 |
+
|
149 |
+
model_name = "pytorch-models/opus-mt-tc-big-gmq-tr"
|
150 |
+
tokenizer = MarianTokenizer.from_pretrained(model_name)
|
151 |
+
model = MarianMTModel.from_pretrained(model_name)
|
152 |
+
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
|
153 |
+
|
154 |
+
for t in translated:
|
155 |
+
print( tokenizer.decode(t, skip_special_tokens=True) )
|
156 |
+
|
157 |
+
# expected output:
|
158 |
+
# Akşam yemeği çok güzel kokuyor.
|
159 |
+
# Birlikte bakalım neler olacak.
|
160 |
+
```
|
161 |
+
|
162 |
+
You can also use OPUS-MT models with the transformers pipelines, for example:
|
163 |
+
|
164 |
+
```python
|
165 |
+
from transformers import pipeline
|
166 |
+
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-gmq-tr")
|
167 |
+
print(pipe("Aftensmaden dufter lækkert."))
|
168 |
+
|
169 |
+
# expected output: Akşam yemeği çok güzel kokuyor.
|
170 |
+
```
|
171 |
+
|
172 |
+
## Training
|
173 |
+
|
174 |
+
- **Data**: opusTCv20210807 ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
|
175 |
+
- **Pre-processing**: SentencePiece (spm32k,spm32k)
|
176 |
+
- **Model Type:** transformer-big
|
177 |
+
- **Original MarianNMT Model**: [opusTCv20210807_transformer-big_2022-07-26.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/gmq-tur/opusTCv20210807_transformer-big_2022-07-26.zip)
|
178 |
+
- **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
|
179 |
+
|
180 |
+
## Evaluation
|
181 |
+
|
182 |
+
* test set translations: [opusTCv20210807_transformer-big_2022-07-26.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/gmq-tur/opusTCv20210807_transformer-big_2022-07-26.test.txt)
|
183 |
+
* test set scores: [opusTCv20210807_transformer-big_2022-07-26.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/gmq-tur/opusTCv20210807_transformer-big_2022-07-26.eval.txt)
|
184 |
+
* benchmark results: [benchmark_results.txt](benchmark_results.txt)
|
185 |
+
* benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
|
186 |
+
|
187 |
+
| langpair | testset | chr-F | BLEU | #sent | #words |
|
188 |
+
|----------|---------|-------|-------|-------|--------|
|
189 |
+
| dan-tur | tatoeba-test-v2021-08-07 | 0.67830 | 43.0 | 758 | 3436 |
|
190 |
+
| swe-tur | tatoeba-test-v2021-08-07 | 0.63653 | 34.2 | 203 | 1008 |
|
191 |
+
| dan-tur | flores101-devtest | 0.56363 | 23.4 | 1012 | 20253 |
|
192 |
+
| nob-tur | flores101-devtest | 0.52696 | 19.0 | 1012 | 20253 |
|
193 |
+
| swe-tur | flores101-devtest | 0.54996 | 22.2 | 1012 | 20253 |
|
194 |
+
|
195 |
+
## Citation Information
|
196 |
+
|
197 |
+
* 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.)
|
198 |
+
|
199 |
+
```
|
200 |
+
@inproceedings{tiedemann-thottingal-2020-opus,
|
201 |
+
title = "{OPUS}-{MT} {--} Building open translation services for the World",
|
202 |
+
author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
|
203 |
+
booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
|
204 |
+
month = nov,
|
205 |
+
year = "2020",
|
206 |
+
address = "Lisboa, Portugal",
|
207 |
+
publisher = "European Association for Machine Translation",
|
208 |
+
url = "https://aclanthology.org/2020.eamt-1.61",
|
209 |
+
pages = "479--480",
|
210 |
+
}
|
211 |
+
|
212 |
+
@inproceedings{tiedemann-2020-tatoeba,
|
213 |
+
title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
|
214 |
+
author = {Tiedemann, J{\"o}rg},
|
215 |
+
booktitle = "Proceedings of the Fifth Conference on Machine Translation",
|
216 |
+
month = nov,
|
217 |
+
year = "2020",
|
218 |
+
address = "Online",
|
219 |
+
publisher = "Association for Computational Linguistics",
|
220 |
+
url = "https://aclanthology.org/2020.wmt-1.139",
|
221 |
+
pages = "1174--1182",
|
222 |
+
}
|
223 |
+
```
|
224 |
+
|
225 |
+
## Acknowledgements
|
226 |
+
|
227 |
+
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.
|
228 |
+
|
229 |
+
## Model conversion info
|
230 |
+
|
231 |
+
* transformers version: 4.16.2
|
232 |
+
* OPUS-MT git hash: 8b9f0b0
|
233 |
+
* port time: Fri Aug 12 18:05:57 EEST 2022
|
234 |
+
* port machine: LM0-400-22516.local
|
benchmark_results.txt
ADDED
@@ -0,0 +1,12 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
dan-tur flores101-dev 0.56062 22.4 997 19181
|
2 |
+
nob-tur flores101-dev 0.53047 18.9 997 19181
|
3 |
+
swe-tur flores101-dev 0.55638 22.5 997 19181
|
4 |
+
dan-tur flores101-devtest 0.56363 23.4 1012 20253
|
5 |
+
nob-tur flores101-devtest 0.52696 19.0 1012 20253
|
6 |
+
swe-tur flores101-devtest 0.54996 22.2 1012 20253
|
7 |
+
dan-tur tatoeba-test-v2020-07-28 0.67736 42.8 757 3429
|
8 |
+
swe-tur tatoeba-test-v2020-07-28 0.63451 33.1 201 993
|
9 |
+
dan-tur tatoeba-test-v2021-03-30 0.67803 42.9 764 3465
|
10 |
+
swe-tur tatoeba-test-v2021-03-30 0.64067 34.3 212 1063
|
11 |
+
dan-tur tatoeba-test-v2021-08-07 0.67830 43.0 758 3436
|
12 |
+
swe-tur tatoeba-test-v2021-08-07 0.63653 34.2 203 1008
|
benchmark_translations.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:a8459b7f7ace495323001d9d2b82e3013d6213bb5fcc67457f2eaf816c7ec24d
|
3 |
+
size 1012496
|
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"activation_dropout": 0.0,
|
3 |
+
"activation_function": "relu",
|
4 |
+
"architectures": [
|
5 |
+
"MarianMTModel"
|
6 |
+
],
|
7 |
+
"attention_dropout": 0.0,
|
8 |
+
"bad_words_ids": [
|
9 |
+
[
|
10 |
+
57176
|
11 |
+
]
|
12 |
+
],
|
13 |
+
"bos_token_id": 0,
|
14 |
+
"classifier_dropout": 0.0,
|
15 |
+
"d_model": 1024,
|
16 |
+
"decoder_attention_heads": 16,
|
17 |
+
"decoder_ffn_dim": 4096,
|
18 |
+
"decoder_layerdrop": 0.0,
|
19 |
+
"decoder_layers": 6,
|
20 |
+
"decoder_start_token_id": 57176,
|
21 |
+
"decoder_vocab_size": 57177,
|
22 |
+
"dropout": 0.1,
|
23 |
+
"encoder_attention_heads": 16,
|
24 |
+
"encoder_ffn_dim": 4096,
|
25 |
+
"encoder_layerdrop": 0.0,
|
26 |
+
"encoder_layers": 6,
|
27 |
+
"eos_token_id": 42578,
|
28 |
+
"forced_eos_token_id": 42578,
|
29 |
+
"init_std": 0.02,
|
30 |
+
"is_encoder_decoder": true,
|
31 |
+
"max_length": 512,
|
32 |
+
"max_position_embeddings": 1024,
|
33 |
+
"model_type": "marian",
|
34 |
+
"normalize_embedding": false,
|
35 |
+
"num_beams": 4,
|
36 |
+
"num_hidden_layers": 6,
|
37 |
+
"pad_token_id": 57176,
|
38 |
+
"scale_embedding": true,
|
39 |
+
"share_encoder_decoder_embeddings": true,
|
40 |
+
"static_position_embeddings": true,
|
41 |
+
"torch_dtype": "float16",
|
42 |
+
"transformers_version": "4.18.0.dev0",
|
43 |
+
"use_cache": true,
|
44 |
+
"vocab_size": 57177
|
45 |
+
}
|
pytorch_model.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:30846df215eb9bb680abaac71a0eb658f1c01be1d3ca3d3672ed16ffdca0a71c
|
3 |
+
size 587117763
|
source.spm
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3cafc555227e204d2046c12e403605d01d15681ca90fd1f5ca4226ce95b824f6
|
3 |
+
size 798335
|
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:d8f3c5c1adbd60846a654aa96500a154ac9a2dbfc3d7ccb6d701f198a7696cc6
|
3 |
+
size 832005
|
tokenizer_config.json
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"source_lang": "gmq", "target_lang": "tr", "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_transformer-big_2022-07-26/gmq-tr", "tokenizer_class": "MarianTokenizer"}
|
vocab.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|