upstream-archive byte-perfect snapshot of Helsinki-NLP/opus-mt-tc-big-itc-bat (ADR-039 Phase D)
Browse files- .gitattributes +1 -4
- README.md +383 -0
- benchmark_results.txt +29 -0
- benchmark_translations.zip +3 -0
- config.json +46 -0
- generation_config.json +16 -0
- pytorch_model.bin +3 -0
- source.spm +3 -0
- special_tokens_map.json +1 -0
- target.spm +3 -0
- tf_model.h5 +3 -0
- tokenizer_config.json +1 -0
- vocab.json +0 -0
.gitattributes
CHANGED
|
@@ -2,13 +2,11 @@
|
|
| 2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
| 5 |
-
*.ckpt filter=lfs diff=lfs merge=lfs -text
|
| 6 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 10 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
| 11 |
-
*.mlmodel filter=lfs diff=lfs merge=lfs -text
|
| 12 |
*.model filter=lfs diff=lfs merge=lfs -text
|
| 13 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 14 |
*.npy filter=lfs diff=lfs merge=lfs -text
|
|
@@ -22,10 +20,8 @@
|
|
| 22 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 23 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 24 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
| 25 |
-
*.safetensors filter=lfs diff=lfs merge=lfs -text
|
| 26 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 27 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
| 28 |
-
*.tar filter=lfs diff=lfs merge=lfs -text
|
| 29 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 30 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 31 |
*.wasm filter=lfs diff=lfs merge=lfs -text
|
|
@@ -33,3 +29,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
|
|
|
|
|
|
| 2 |
*.arrow filter=lfs diff=lfs merge=lfs -text
|
| 3 |
*.bin filter=lfs diff=lfs merge=lfs -text
|
| 4 |
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 5 |
*.ftz filter=lfs diff=lfs merge=lfs -text
|
| 6 |
*.gz filter=lfs diff=lfs merge=lfs -text
|
| 7 |
*.h5 filter=lfs diff=lfs merge=lfs -text
|
| 8 |
*.joblib filter=lfs diff=lfs merge=lfs -text
|
| 9 |
*.lfs.* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 10 |
*.model filter=lfs diff=lfs merge=lfs -text
|
| 11 |
*.msgpack filter=lfs diff=lfs merge=lfs -text
|
| 12 |
*.npy filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 20 |
*.pt filter=lfs diff=lfs merge=lfs -text
|
| 21 |
*.pth filter=lfs diff=lfs merge=lfs -text
|
| 22 |
*.rar filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 23 |
saved_model/**/* filter=lfs diff=lfs merge=lfs -text
|
| 24 |
*.tar.* filter=lfs diff=lfs merge=lfs -text
|
|
|
|
| 25 |
*.tflite filter=lfs diff=lfs merge=lfs -text
|
| 26 |
*.tgz filter=lfs diff=lfs merge=lfs -text
|
| 27 |
*.wasm 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=lf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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- ca
|
| 4 |
+
- es
|
| 5 |
+
- fr
|
| 6 |
+
- gl
|
| 7 |
+
- it
|
| 8 |
+
- lt
|
| 9 |
+
- lv
|
| 10 |
+
- pt
|
| 11 |
+
|
| 12 |
+
tags:
|
| 13 |
+
- translation
|
| 14 |
+
- opus-mt-tc
|
| 15 |
+
|
| 16 |
+
license: cc-by-4.0
|
| 17 |
+
model-index:
|
| 18 |
+
- name: opus-mt-tc-big-itc-bat
|
| 19 |
+
results:
|
| 20 |
+
- task:
|
| 21 |
+
name: Translation cat-lav
|
| 22 |
+
type: translation
|
| 23 |
+
args: cat-lav
|
| 24 |
+
dataset:
|
| 25 |
+
name: flores101-devtest
|
| 26 |
+
type: flores_101
|
| 27 |
+
args: cat lav devtest
|
| 28 |
+
metrics:
|
| 29 |
+
- name: BLEU
|
| 30 |
+
type: bleu
|
| 31 |
+
value: 21.9
|
| 32 |
+
- name: chr-F
|
| 33 |
+
type: chrf
|
| 34 |
+
value: 0.52215
|
| 35 |
+
- task:
|
| 36 |
+
name: Translation cat-lit
|
| 37 |
+
type: translation
|
| 38 |
+
args: cat-lit
|
| 39 |
+
dataset:
|
| 40 |
+
name: flores101-devtest
|
| 41 |
+
type: flores_101
|
| 42 |
+
args: cat lit devtest
|
| 43 |
+
metrics:
|
| 44 |
+
- name: BLEU
|
| 45 |
+
type: bleu
|
| 46 |
+
value: 20.2
|
| 47 |
+
- name: chr-F
|
| 48 |
+
type: chrf
|
| 49 |
+
value: 0.52380
|
| 50 |
+
- task:
|
| 51 |
+
name: Translation fra-lav
|
| 52 |
+
type: translation
|
| 53 |
+
args: fra-lav
|
| 54 |
+
dataset:
|
| 55 |
+
name: flores101-devtest
|
| 56 |
+
type: flores_101
|
| 57 |
+
args: fra lav devtest
|
| 58 |
+
metrics:
|
| 59 |
+
- name: BLEU
|
| 60 |
+
type: bleu
|
| 61 |
+
value: 23.0
|
| 62 |
+
- name: chr-F
|
| 63 |
+
type: chrf
|
| 64 |
+
value: 0.53390
|
| 65 |
+
- task:
|
| 66 |
+
name: Translation fra-lit
|
| 67 |
+
type: translation
|
| 68 |
+
args: fra-lit
|
| 69 |
+
dataset:
|
| 70 |
+
name: flores101-devtest
|
| 71 |
+
type: flores_101
|
| 72 |
+
args: fra lit devtest
|
| 73 |
+
metrics:
|
| 74 |
+
- name: BLEU
|
| 75 |
+
type: bleu
|
| 76 |
+
value: 21.1
|
| 77 |
+
- name: chr-F
|
| 78 |
+
type: chrf
|
| 79 |
+
value: 0.53595
|
| 80 |
+
- task:
|
| 81 |
+
name: Translation glg-lav
|
| 82 |
+
type: translation
|
| 83 |
+
args: glg-lav
|
| 84 |
+
dataset:
|
| 85 |
+
name: flores101-devtest
|
| 86 |
+
type: flores_101
|
| 87 |
+
args: glg lav devtest
|
| 88 |
+
metrics:
|
| 89 |
+
- name: BLEU
|
| 90 |
+
type: bleu
|
| 91 |
+
value: 20.7
|
| 92 |
+
- name: chr-F
|
| 93 |
+
type: chrf
|
| 94 |
+
value: 0.51043
|
| 95 |
+
- task:
|
| 96 |
+
name: Translation glg-lit
|
| 97 |
+
type: translation
|
| 98 |
+
args: glg-lit
|
| 99 |
+
dataset:
|
| 100 |
+
name: flores101-devtest
|
| 101 |
+
type: flores_101
|
| 102 |
+
args: glg lit devtest
|
| 103 |
+
metrics:
|
| 104 |
+
- name: BLEU
|
| 105 |
+
type: bleu
|
| 106 |
+
value: 19.9
|
| 107 |
+
- name: chr-F
|
| 108 |
+
type: chrf
|
| 109 |
+
value: 0.51854
|
| 110 |
+
- task:
|
| 111 |
+
name: Translation ita-lav
|
| 112 |
+
type: translation
|
| 113 |
+
args: ita-lav
|
| 114 |
+
dataset:
|
| 115 |
+
name: flores101-devtest
|
| 116 |
+
type: flores_101
|
| 117 |
+
args: ita lav devtest
|
| 118 |
+
metrics:
|
| 119 |
+
- name: BLEU
|
| 120 |
+
type: bleu
|
| 121 |
+
value: 19.6
|
| 122 |
+
- name: chr-F
|
| 123 |
+
type: chrf
|
| 124 |
+
value: 0.51065
|
| 125 |
+
- task:
|
| 126 |
+
name: Translation ita-lit
|
| 127 |
+
type: translation
|
| 128 |
+
args: ita-lit
|
| 129 |
+
dataset:
|
| 130 |
+
name: flores101-devtest
|
| 131 |
+
type: flores_101
|
| 132 |
+
args: ita lit devtest
|
| 133 |
+
metrics:
|
| 134 |
+
- name: BLEU
|
| 135 |
+
type: bleu
|
| 136 |
+
value: 17.4
|
| 137 |
+
- name: chr-F
|
| 138 |
+
type: chrf
|
| 139 |
+
value: 0.51309
|
| 140 |
+
- task:
|
| 141 |
+
name: Translation por-lav
|
| 142 |
+
type: translation
|
| 143 |
+
args: por-lav
|
| 144 |
+
dataset:
|
| 145 |
+
name: flores101-devtest
|
| 146 |
+
type: flores_101
|
| 147 |
+
args: por lav devtest
|
| 148 |
+
metrics:
|
| 149 |
+
- name: BLEU
|
| 150 |
+
type: bleu
|
| 151 |
+
value: 22.9
|
| 152 |
+
- name: chr-F
|
| 153 |
+
type: chrf
|
| 154 |
+
value: 0.53493
|
| 155 |
+
- task:
|
| 156 |
+
name: Translation por-lit
|
| 157 |
+
type: translation
|
| 158 |
+
args: por-lit
|
| 159 |
+
dataset:
|
| 160 |
+
name: flores101-devtest
|
| 161 |
+
type: flores_101
|
| 162 |
+
args: por lit devtest
|
| 163 |
+
metrics:
|
| 164 |
+
- name: BLEU
|
| 165 |
+
type: bleu
|
| 166 |
+
value: 21.8
|
| 167 |
+
- name: chr-F
|
| 168 |
+
type: chrf
|
| 169 |
+
value: 0.53821
|
| 170 |
+
- task:
|
| 171 |
+
name: Translation spa-lav
|
| 172 |
+
type: translation
|
| 173 |
+
args: spa-lav
|
| 174 |
+
dataset:
|
| 175 |
+
name: flores101-devtest
|
| 176 |
+
type: flores_101
|
| 177 |
+
args: spa lav devtest
|
| 178 |
+
metrics:
|
| 179 |
+
- name: BLEU
|
| 180 |
+
type: bleu
|
| 181 |
+
value: 17.4
|
| 182 |
+
- name: chr-F
|
| 183 |
+
type: chrf
|
| 184 |
+
value: 0.49290
|
| 185 |
+
- task:
|
| 186 |
+
name: Translation spa-lit
|
| 187 |
+
type: translation
|
| 188 |
+
args: spa-lit
|
| 189 |
+
dataset:
|
| 190 |
+
name: flores101-devtest
|
| 191 |
+
type: flores_101
|
| 192 |
+
args: spa lit devtest
|
| 193 |
+
metrics:
|
| 194 |
+
- name: BLEU
|
| 195 |
+
type: bleu
|
| 196 |
+
value: 16.2
|
| 197 |
+
- name: chr-F
|
| 198 |
+
type: chrf
|
| 199 |
+
value: 0.49836
|
| 200 |
+
- task:
|
| 201 |
+
name: Translation ita-lit
|
| 202 |
+
type: translation
|
| 203 |
+
args: ita-lit
|
| 204 |
+
dataset:
|
| 205 |
+
name: tatoeba-test-v2021-08-07
|
| 206 |
+
type: tatoeba_mt
|
| 207 |
+
args: ita-lit
|
| 208 |
+
metrics:
|
| 209 |
+
- name: BLEU
|
| 210 |
+
type: bleu
|
| 211 |
+
value: 40.9
|
| 212 |
+
- name: chr-F
|
| 213 |
+
type: chrf
|
| 214 |
+
value: 0.67640
|
| 215 |
+
- task:
|
| 216 |
+
name: Translation spa-lit
|
| 217 |
+
type: translation
|
| 218 |
+
args: spa-lit
|
| 219 |
+
dataset:
|
| 220 |
+
name: tatoeba-test-v2021-08-07
|
| 221 |
+
type: tatoeba_mt
|
| 222 |
+
args: spa-lit
|
| 223 |
+
metrics:
|
| 224 |
+
- name: BLEU
|
| 225 |
+
type: bleu
|
| 226 |
+
value: 45.9
|
| 227 |
+
- name: chr-F
|
| 228 |
+
type: chrf
|
| 229 |
+
value: 0.68805
|
| 230 |
+
---
|
| 231 |
+
# opus-mt-tc-big-itc-bat
|
| 232 |
+
|
| 233 |
+
## Table of Contents
|
| 234 |
+
- [Model Details](#model-details)
|
| 235 |
+
- [Uses](#uses)
|
| 236 |
+
- [Risks, Limitations and Biases](#risks-limitations-and-biases)
|
| 237 |
+
- [How to Get Started With the Model](#how-to-get-started-with-the-model)
|
| 238 |
+
- [Training](#training)
|
| 239 |
+
- [Evaluation](#evaluation)
|
| 240 |
+
- [Citation Information](#citation-information)
|
| 241 |
+
- [Acknowledgements](#acknowledgements)
|
| 242 |
+
|
| 243 |
+
## Model Details
|
| 244 |
+
|
| 245 |
+
Neural machine translation model for translating from Italic languages (itc) to Baltic languages (bat).
|
| 246 |
+
|
| 247 |
+
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).
|
| 248 |
+
**Model Description:**
|
| 249 |
+
- **Developed by:** Language Technology Research Group at the University of Helsinki
|
| 250 |
+
- **Model Type:** Translation (transformer-big)
|
| 251 |
+
- **Release**: 2022-07-27
|
| 252 |
+
- **License:** CC-BY-4.0
|
| 253 |
+
- **Language(s):**
|
| 254 |
+
- Source Language(s): cat fra glg ita por spa
|
| 255 |
+
- Target Language(s): lav lit prg
|
| 256 |
+
- Language Pair(s): cat-lav cat-lit fra-lav fra-lit glg-lav glg-lit ita-lav ita-lit por-lav por-lit spa-lit
|
| 257 |
+
- Valid Target Language Labels: >>lav<< >>lit<< >>ltg<< >>ndf<< >>olt<< >>prg<< >>prg_Latn<< >>sgs<< >>svx<< >>sxl<< >>xcu<< >>xgl<< >>xsv<< >>xzm<<
|
| 258 |
+
- **Original Model**: [opusTCv20210807_transformer-big_2022-07-27.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-bat/opusTCv20210807_transformer-big_2022-07-27.zip)
|
| 259 |
+
- **Resources for more information:**
|
| 260 |
+
- [OPUS-MT-train GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
|
| 261 |
+
- More information about released models for this language pair: [OPUS-MT itc-bat README](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/models/itc-bat/README.md)
|
| 262 |
+
- [More information about MarianNMT models in the transformers library](https://huggingface.co/docs/transformers/model_doc/marian)
|
| 263 |
+
- [Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/
|
| 264 |
+
|
| 265 |
+
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. `>>lav<<`
|
| 266 |
+
|
| 267 |
+
## Uses
|
| 268 |
+
|
| 269 |
+
This model can be used for translation and text-to-text generation.
|
| 270 |
+
|
| 271 |
+
## Risks, Limitations and Biases
|
| 272 |
+
|
| 273 |
+
**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.**
|
| 274 |
+
|
| 275 |
+
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)).
|
| 276 |
+
|
| 277 |
+
## How to Get Started With the Model
|
| 278 |
+
|
| 279 |
+
A short example code:
|
| 280 |
+
|
| 281 |
+
```python
|
| 282 |
+
from transformers import MarianMTModel, MarianTokenizer
|
| 283 |
+
|
| 284 |
+
src_text = [
|
| 285 |
+
">>lit<< Els gats són complexos individus.",
|
| 286 |
+
">>sgs<< No."
|
| 287 |
+
]
|
| 288 |
+
|
| 289 |
+
model_name = "pytorch-models/opus-mt-tc-big-itc-bat"
|
| 290 |
+
tokenizer = MarianTokenizer.from_pretrained(model_name)
|
| 291 |
+
model = MarianMTModel.from_pretrained(model_name)
|
| 292 |
+
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))
|
| 293 |
+
|
| 294 |
+
for t in translated:
|
| 295 |
+
print( tokenizer.decode(t, skip_special_tokens=True) )
|
| 296 |
+
|
| 297 |
+
# expected output:
|
| 298 |
+
# Katės yra sudėtingi individai.
|
| 299 |
+
# no no no no no no no no no no no no no no no no no no no no no
|
| 300 |
+
```
|
| 301 |
+
|
| 302 |
+
You can also use OPUS-MT models with the transformers pipelines, for example:
|
| 303 |
+
|
| 304 |
+
```python
|
| 305 |
+
from transformers import pipeline
|
| 306 |
+
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-itc-bat")
|
| 307 |
+
print(pipe(">>lit<< Els gats són complexos individus."))
|
| 308 |
+
|
| 309 |
+
# expected output: Katės yra sudėtingi individai.
|
| 310 |
+
```
|
| 311 |
+
|
| 312 |
+
## Training
|
| 313 |
+
|
| 314 |
+
- **Data**: opusTCv20210807 ([source](https://github.com/Helsinki-NLP/Tatoeba-Challenge))
|
| 315 |
+
- **Pre-processing**: SentencePiece (spm32k,spm32k)
|
| 316 |
+
- **Model Type:** transformer-big
|
| 317 |
+
- **Original MarianNMT Model**: [opusTCv20210807_transformer-big_2022-07-27.zip](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-bat/opusTCv20210807_transformer-big_2022-07-27.zip)
|
| 318 |
+
- **Training Scripts**: [GitHub Repo](https://github.com/Helsinki-NLP/OPUS-MT-train)
|
| 319 |
+
|
| 320 |
+
## Evaluation
|
| 321 |
+
|
| 322 |
+
* test set translations: [opusTCv20210807_transformer-big_2022-07-27.test.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-bat/opusTCv20210807_transformer-big_2022-07-27.test.txt)
|
| 323 |
+
* test set scores: [opusTCv20210807_transformer-big_2022-07-27.eval.txt](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-bat/opusTCv20210807_transformer-big_2022-07-27.eval.txt)
|
| 324 |
+
* benchmark results: [benchmark_results.txt](benchmark_results.txt)
|
| 325 |
+
* benchmark output: [benchmark_translations.zip](benchmark_translations.zip)
|
| 326 |
+
|
| 327 |
+
| langpair | testset | chr-F | BLEU | #sent | #words |
|
| 328 |
+
|----------|---------|-------|-------|-------|--------|
|
| 329 |
+
| ita-lit | tatoeba-test-v2021-08-07 | 0.67640 | 40.9 | 224 | 1321 |
|
| 330 |
+
| spa-lit | tatoeba-test-v2021-08-07 | 0.68805 | 45.9 | 454 | 2352 |
|
| 331 |
+
| cat-lav | flores101-devtest | 0.52215 | 21.9 | 1012 | 22092 |
|
| 332 |
+
| cat-lit | flores101-devtest | 0.52380 | 20.2 | 1012 | 20695 |
|
| 333 |
+
| fra-lav | flores101-devtest | 0.53390 | 23.0 | 1012 | 22092 |
|
| 334 |
+
| fra-lit | flores101-devtest | 0.53595 | 21.1 | 1012 | 20695 |
|
| 335 |
+
| glg-lav | flores101-devtest | 0.51043 | 20.7 | 1012 | 22092 |
|
| 336 |
+
| glg-lit | flores101-devtest | 0.51854 | 19.9 | 1012 | 20695 |
|
| 337 |
+
| ita-lav | flores101-devtest | 0.51065 | 19.6 | 1012 | 22092 |
|
| 338 |
+
| ita-lit | flores101-devtest | 0.51309 | 17.4 | 1012 | 20695 |
|
| 339 |
+
| por-lav | flores101-devtest | 0.53493 | 22.9 | 1012 | 22092 |
|
| 340 |
+
| por-lit | flores101-devtest | 0.53821 | 21.8 | 1012 | 20695 |
|
| 341 |
+
| spa-lav | flores101-devtest | 0.49290 | 17.4 | 1012 | 22092 |
|
| 342 |
+
| spa-lit | flores101-devtest | 0.49836 | 16.2 | 1012 | 20695 |
|
| 343 |
+
|
| 344 |
+
## Citation Information
|
| 345 |
+
|
| 346 |
+
* 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.)
|
| 347 |
+
|
| 348 |
+
```
|
| 349 |
+
@inproceedings{tiedemann-thottingal-2020-opus,
|
| 350 |
+
title = "{OPUS}-{MT} {--} Building open translation services for the World",
|
| 351 |
+
author = {Tiedemann, J{\"o}rg and Thottingal, Santhosh},
|
| 352 |
+
booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
|
| 353 |
+
month = nov,
|
| 354 |
+
year = "2020",
|
| 355 |
+
address = "Lisboa, Portugal",
|
| 356 |
+
publisher = "European Association for Machine Translation",
|
| 357 |
+
url = "https://aclanthology.org/2020.eamt-1.61",
|
| 358 |
+
pages = "479--480",
|
| 359 |
+
}
|
| 360 |
+
|
| 361 |
+
@inproceedings{tiedemann-2020-tatoeba,
|
| 362 |
+
title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
|
| 363 |
+
author = {Tiedemann, J{\"o}rg},
|
| 364 |
+
booktitle = "Proceedings of the Fifth Conference on Machine Translation",
|
| 365 |
+
month = nov,
|
| 366 |
+
year = "2020",
|
| 367 |
+
address = "Online",
|
| 368 |
+
publisher = "Association for Computational Linguistics",
|
| 369 |
+
url = "https://aclanthology.org/2020.wmt-1.139",
|
| 370 |
+
pages = "1174--1182",
|
| 371 |
+
}
|
| 372 |
+
```
|
| 373 |
+
|
| 374 |
+
## Acknowledgements
|
| 375 |
+
|
| 376 |
+
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.
|
| 377 |
+
|
| 378 |
+
## Model conversion info
|
| 379 |
+
|
| 380 |
+
* transformers version: 4.16.2
|
| 381 |
+
* OPUS-MT git hash: 8b9f0b0
|
| 382 |
+
* port time: Sat Aug 13 00:04:44 EEST 2022
|
| 383 |
+
* port machine: LM0-400-22516.local
|
benchmark_results.txt
ADDED
|
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
cat-lav flores101-dev 0.52454 22.7 997 21381
|
| 2 |
+
cat-lit flores101-dev 0.52207 19.8 997 20018
|
| 3 |
+
fra-lav flores101-dev 0.53568 23.8 997 21381
|
| 4 |
+
fra-lit flores101-dev 0.52626 19.9 997 20018
|
| 5 |
+
glg-lav flores101-dev 0.51512 21.8 997 21381
|
| 6 |
+
glg-lit flores101-dev 0.50835 18.4 997 20018
|
| 7 |
+
ita-lav flores101-dev 0.50738 19.8 997 21381
|
| 8 |
+
ita-lit flores101-dev 0.50648 17.3 997 20018
|
| 9 |
+
por-lav flores101-dev 0.53692 24.6 997 21381
|
| 10 |
+
por-lit flores101-dev 0.52679 20.0 997 20018
|
| 11 |
+
spa-lav flores101-dev 0.48691 17.9 997 21381
|
| 12 |
+
spa-lit flores101-dev 0.48981 15.7 997 20018
|
| 13 |
+
cat-lav flores101-devtest 0.52215 21.9 1012 22092
|
| 14 |
+
cat-lit flores101-devtest 0.52380 20.2 1012 20695
|
| 15 |
+
fra-lav flores101-devtest 0.53390 23.0 1012 22092
|
| 16 |
+
fra-lit flores101-devtest 0.53595 21.1 1012 20695
|
| 17 |
+
glg-lav flores101-devtest 0.51043 20.7 1012 22092
|
| 18 |
+
glg-lit flores101-devtest 0.51854 19.9 1012 20695
|
| 19 |
+
ita-lav flores101-devtest 0.51065 19.6 1012 22092
|
| 20 |
+
ita-lit flores101-devtest 0.51309 17.4 1012 20695
|
| 21 |
+
por-lav flores101-devtest 0.53493 22.9 1012 22092
|
| 22 |
+
por-lit flores101-devtest 0.53821 21.8 1012 20695
|
| 23 |
+
spa-lav flores101-devtest 0.49290 17.4 1012 22092
|
| 24 |
+
spa-lit flores101-devtest 0.49836 16.2 1012 20695
|
| 25 |
+
spa-lit tatoeba-test-v2020-07-28 0.68681 45.7 452 2341
|
| 26 |
+
ita-lit tatoeba-test-v2021-03-30 0.67797 41.2 225 1327
|
| 27 |
+
spa-lit tatoeba-test-v2021-03-30 0.68862 45.8 457 2364
|
| 28 |
+
ita-lit tatoeba-test-v2021-08-07 0.67640 40.9 224 1321
|
| 29 |
+
spa-lit tatoeba-test-v2021-08-07 0.68805 45.9 454 2352
|
benchmark_translations.zip
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:e76f14f4d7d7ff0e3c00ae5a5b8aa189e2e6aabb333cb68974dbdde225dbafc6
|
| 3 |
+
size 4046842
|
config.json
ADDED
|
@@ -0,0 +1,46 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "/tmp/Helsinki-NLP/opus-mt-tc-big-itc-bat",
|
| 3 |
+
"activation_dropout": 0.0,
|
| 4 |
+
"activation_function": "relu",
|
| 5 |
+
"architectures": [
|
| 6 |
+
"MarianMTModel"
|
| 7 |
+
],
|
| 8 |
+
"attention_dropout": 0.0,
|
| 9 |
+
"bad_words_ids": [
|
| 10 |
+
[
|
| 11 |
+
60148
|
| 12 |
+
]
|
| 13 |
+
],
|
| 14 |
+
"bos_token_id": 0,
|
| 15 |
+
"classifier_dropout": 0.0,
|
| 16 |
+
"d_model": 1024,
|
| 17 |
+
"decoder_attention_heads": 16,
|
| 18 |
+
"decoder_ffn_dim": 4096,
|
| 19 |
+
"decoder_layerdrop": 0.0,
|
| 20 |
+
"decoder_layers": 6,
|
| 21 |
+
"decoder_start_token_id": 60148,
|
| 22 |
+
"decoder_vocab_size": 60149,
|
| 23 |
+
"dropout": 0.1,
|
| 24 |
+
"encoder_attention_heads": 16,
|
| 25 |
+
"encoder_ffn_dim": 4096,
|
| 26 |
+
"encoder_layerdrop": 0.0,
|
| 27 |
+
"encoder_layers": 6,
|
| 28 |
+
"eos_token_id": 47564,
|
| 29 |
+
"forced_eos_token_id": 47564,
|
| 30 |
+
"init_std": 0.02,
|
| 31 |
+
"is_encoder_decoder": true,
|
| 32 |
+
"max_length": 512,
|
| 33 |
+
"max_position_embeddings": 1024,
|
| 34 |
+
"model_type": "marian",
|
| 35 |
+
"normalize_embedding": false,
|
| 36 |
+
"num_beams": 4,
|
| 37 |
+
"num_hidden_layers": 6,
|
| 38 |
+
"pad_token_id": 60148,
|
| 39 |
+
"scale_embedding": true,
|
| 40 |
+
"share_encoder_decoder_embeddings": true,
|
| 41 |
+
"static_position_embeddings": true,
|
| 42 |
+
"torch_dtype": "float16",
|
| 43 |
+
"transformers_version": "4.22.0.dev0",
|
| 44 |
+
"use_cache": true,
|
| 45 |
+
"vocab_size": 60149
|
| 46 |
+
}
|
generation_config.json
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bad_words_ids": [
|
| 3 |
+
[
|
| 4 |
+
60148
|
| 5 |
+
]
|
| 6 |
+
],
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"decoder_start_token_id": 60148,
|
| 9 |
+
"eos_token_id": 47564,
|
| 10 |
+
"forced_eos_token_id": 47564,
|
| 11 |
+
"max_length": 512,
|
| 12 |
+
"num_beams": 4,
|
| 13 |
+
"pad_token_id": 60148,
|
| 14 |
+
"renormalize_logits": true,
|
| 15 |
+
"transformers_version": "4.32.0.dev0"
|
| 16 |
+
}
|
pytorch_model.bin
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:c97d61983e363efdfc3636e6ad333b13252608f5ee235f49a5a0fc785cfbcd28
|
| 3 |
+
size 599297027
|
source.spm
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:d35b299b86efbeb8ead80f6f9cb290d86c7281161bad00ac4860da74342e99be
|
| 3 |
+
size 824189
|
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:8bbf3276efb79db4d39ded39db4a19669ca987e5255422feb4431ce729a0d724
|
| 3 |
+
size 832676
|
tf_model.h5
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:acf242c43b5aeaa9f068016ddfe63977cdf509d2608ed9e1b3bbb83c7b8c25af
|
| 3 |
+
size 960957016
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1 @@
|
|
|
|
|
|
|
| 1 |
+
{"source_lang": "itc", "target_lang": "bat", "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-27/itc-bat", "tokenizer_class": "MarianTokenizer"}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|