CoolFace
Modelpublic

Helsinki-NLP/opus-mt-tc-bible-big-afa-deu_eng_fra_por_spa

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes91downloads
Model Card

opus-mt-tc-bible-big-afa-deuengfraporspa

Table of Contents

Model Details

Neural machine translation model for translating from Afro-Asiatic languages (afa) to unknown (deu+eng+fra+por+spa).

This model is part of the OPUS-MT project, 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, 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 and training pipelines use the procedures of OPUS-MT-train. Model Description:

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<<

Uses

This model can be used for translation and text-to-text generation.

Risks, Limitations and Biases

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.

Significant research has explored bias and fairness issues with language models (see, e.g., Sheng et al. (2021) and Bender et al. (2021)).

How to Get Started With the Model

A short example code:

python
from transformers import MarianMTModel, MarianTokenizer

src_text = [
    ">>eng<< Anta i ak-d-yennan ur yerbiḥ ara Tom?",
    ">>fra<< Iselman d aɣbalu axatar i wučči n yemdanen."
]

model_name = "pytorch-models/opus-mt-tc-bible-big-afa-deu_eng_fra_por_spa"
tokenizer = MarianTokenizer.from_pretrained(model_name)
model = MarianMTModel.from_pretrained(model_name)
translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=True))

for t in translated:
    print( tokenizer.decode(t, skip_special_tokens=True) )

# expected output:
#     Who told you that he didn't?
#     L'eau est une source importante de nourriture pour les gens.

You can also use OPUS-MT models with the transformers pipelines, for example:

python
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-bible-big-afa-deu_eng_fra_por_spa")
print(pipe(">>eng<< Anta i ak-d-yennan ur yerbiḥ ara Tom?"))

# expected output: Who told you that he didn't?

Training

Evaluation

langpairtestsetchr-FBLEU#sent#words
ara-deutatoeba-test-v2021-08-070.6103941.712098371
ara-engtatoeba-test-v2021-08-075.4300.01030576975
ara-fratatoeba-test-v2021-08-070.5612038.8156911066
ara-spatatoeba-test-v2021-08-070.6256743.715119708
heb-deutatoeba-test-v2021-08-070.6313142.4309025101
heb-engtatoeba-test-v2021-08-070.6496049.21051977427
heb-fratatoeba-test-v2021-08-070.6434846.3328126123
heb-portatoeba-test-v2021-08-070.6335043.27195335
mlt-engtatoeba-test-v2021-08-070.6665351.02031165
amh-engflores101-devtest0.4735721.0101224721
amh-fraflores101-devtest0.4315516.2101228343
amh-porflores101-devtest0.4210915.1101226519
ara-deuflores101-devtest0.5111020.4101225094
ara-fraflores101-devtest0.5693429.7101228343
ara-porflores101-devtest0.5572728.2101226519
ara-spaflores101-devtest0.4835019.5101229199
hau-engflores101-devtest0.4680421.6101224721
hau-fraflores101-devtest0.4182715.9101228343
heb-engflores101-devtest0.6242236.6101224721
mlt-engflores101-devtest0.7239049.1101224721
mlt-fraflores101-devtest0.6084034.7101228343
mlt-porflores101-devtest0.5986331.8101226519
acm-deuflores200-devtest0.4894717.6101225094
acm-engflores200-devtest0.5679928.5101224721
acm-fraflores200-devtest0.5357726.1101228343
acm-porflores200-devtest0.5244123.9101226519
acm-spaflores200-devtest0.4698518.2101229199
amh-deuflores200-devtest0.4155312.6101225094
amh-engflores200-devtest0.4933322.5101224721
amh-fraflores200-devtest0.4489017.8101228343
amh-porflores200-devtest0.4377116.5101226519
apc-deuflores200-devtest0.4748016.0101225094
apc-engflores200-devtest0.5607528.1101224721
apc-fraflores200-devtest0.5232524.6101228343
apc-porflores200-devtest0.5105522.9101226519
apc-spaflores200-devtest0.4563417.2101229199
arz-deuflores200-devtest0.4584414.1101225094
arz-engflores200-devtest0.5253422.7101224721
arz-fraflores200-devtest0.5033621.8101228343
arz-porflores200-devtest0.4874120.0101226519
arz-spaflores200-devtest0.4451615.8101229199
hau-engflores200-devtest0.4813723.4101224721
hau-fraflores200-devtest0.4298117.2101228343
hau-porflores200-devtest0.4138515.7101226519
heb-deuflores200-devtest0.5348222.8101225094
heb-engflores200-devtest0.6336838.0101224721
heb-fraflores200-devtest0.5841732.6101228343
heb-porflores200-devtest0.5714030.7101226519
mlt-engflores200-devtest0.7341551.1101224721
mlt-fraflores200-devtest0.6162635.8101228343
mlt-spaflores200-devtest0.5053421.8101229199
som-engflores200-devtest0.4276417.7101224721
tir-porflores200-devtest2.9310.0101226519
hau-engnewstest20210.4374415.599727372
amh-engntrex1280.4204215.0199747673
hau-engntrex1280.5034926.1199747673
hau-frantrex1280.4183715.8199753481
hau-porntrex1280.4085115.3199751631
hau-spantrex1280.4337618.5199754107
heb-deuntrex1280.4948217.7199748761
heb-engntrex1280.5924131.3199747673
heb-frantrex1280.5218024.0199753481
heb-porntrex1280.5124823.2199751631
mlt-spantrex1280.5707830.9199754107
som-engntrex1280.4918724.3199747673
som-frantrex1280.4123615.1199753481
som-porntrex1280.4155015.2199751631
som-spantrex1280.4327817.6199754107
tir-engtico19-test2.6550.0210056824

Citation Information

bibtex
@article{tiedemann2023democratizing,
  title={Democratizing neural machine translation with {OPUS-MT}},
  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},
  journal={Language Resources and Evaluation},
  number={58},
  pages={713--755},
  year={2023},
  publisher={Springer Nature},
  issn={1574-0218},
  doi={10.1007/s10579-023-09704-w}
}

@inproceedings{tiedemann-thottingal-2020-opus,
    title = "{OPUS}-{MT} {--} Building open translation services for the World",
    author = {Tiedemann, J{\"o}rg  and Thottingal, Santhosh},
    booktitle = "Proceedings of the 22nd Annual Conference of the European Association for Machine Translation",
    month = nov,
    year = "2020",
    address = "Lisboa, Portugal",
    publisher = "European Association for Machine Translation",
    url = "https://aclanthology.org/2020.eamt-1.61",
    pages = "479--480",
}

@inproceedings{tiedemann-2020-tatoeba,
    title = "The Tatoeba Translation Challenge {--} Realistic Data Sets for Low Resource and Multilingual {MT}",
    author = {Tiedemann, J{\"o}rg},
    booktitle = "Proceedings of the Fifth Conference on Machine Translation",
    month = nov,
    year = "2020",
    address = "Online",
    publisher = "Association for Computational Linguistics",
    url = "https://aclanthology.org/2020.wmt-1.139",
    pages = "1174--1182",
}

Acknowledgements

The work is supported by the HPLT project, 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, Finland, and the EuroHPC supercomputer LUMI.

Model conversion info

  • —transformers version: 4.45.1
  • —OPUS-MT git hash: a0ea3b3
  • —port time: Mon Oct 7 17:08:30 EEST 2024
  • —port machine: LM0-400-22516.local