CoolFace
Modelpublic

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

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

opus-mt-tc-bible-big-deuengfraporspa-aav

Table of Contents

Model Details

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

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:

  • —Developed by: Language Technology Research Group at the University of Helsinki
  • —Model Type: Translation (transformer-big)
  • —Release: 2024-05-29
  • —License: Apache-2.0
  • —Language(s):
  • —Source Language(s): deu eng fra por spa
  • —Target Language(s): bru cmo hoc jun kha khm kxm mnw ngt sat vie wbm
  • —Valid Target Language Labels: >>aem<< >>alk<< >>aml<< >>asr<< >>bbh<< >>bdq<< >>bfw<< >>bgk<< >>bgl<< >>bix<< >>biy<< >>blr<< >>brb<< >>bru<< >>brv<< >>btq<< >>caq<< >>cbn<< >>cdz<< >>cma<< >>cmo<< >>cog<< >>crv<< >>crw<< >>cua<< >>cwg<< >>dnu<< >>ekl<< >>gaq<< >>gbj<< >>hal<< >>hld<< >>hnu<< >>hoc<< >>hocWara<< >>hre<< >>huo<< >>irr<< >>jah<< >>jeh<< >>jhi<< >>jun<< >>juy<< >>kdt<< >>kfp<< >>kfq<< >>kha<< >>khf<< >>khm<< >>khr<< >>kjg<< >>kjm<< >>knq<< >>kns<< >>kpm<< >>krr<< >>krv<< >>ksz<< >>kta<< >>ktv<< >>kuf<< >>kxm<< >>kxy<< >>lbn<< >>lbo<< >>lcp<< >>lnh<< >>lwl<< >>lyg<< >>mef<< >>mhe<< >>mjx<< >>mlf<< >>mmj<< >>mml<< >>mng<< >>mnn<< >>mnq<< >>mnw<< >>moo<< >>mqt<< >>mra<< >>mtq<< >>mzt<< >>ncb<< >>ncq<< >>nev<< >>ngt<< >>ngtLatn<< >>nik<< >>nuo<< >>nyl<< >>omx<< >>oog<< >>oyb<< >>pac<< >>pbv<< >>pcb<< >>pce<< >>pcj<< >>phg<< >>pkt<< >>pll<< >>ply<< >>pnx<< >>prk<< >>prt<< >>puo<< >>rbb<< >>ren<< >>ril<< >>rka<< >>rmx<< >>sat<< >>sat_Latn<< >>sbo<< >>scb<< >>scq<< >>sct<< >>sea<< >>sed<< >>sii<< >>smu<< >>spu<< >>sqq<< >>srb<< >>ssm<< >>sss<< >>stg<< >>sti<< >>stt<< >>stu<< >>syo<< >>sza<< >>szc<< >>tdf<< >>tdr<< >>tea<< >>tef<< >>thm<< >>tkz<< >>tlq<< >>tmo<< >>tnz<< >>tou<< >>tpu<< >>trd<< >>tth<< >>tto<< >>tyh<< >>unr<< >>uuu<< >>vie<< >>vwa<< >>wbm<< >>xao<< >>xkk<< >>xnh<< >>xxx<< >>yin<< >>zng<<
  • —Original Model: opusTCv20230926max50+bt+jhubc_transformer-big_2024-05-29.zip
  • —Resources for more information:
  • —OPUS-MT dashboard
  • —OPUS-MT-train GitHub Repo
  • —More information about MarianNMT models in the transformers library
  • —Tatoeba Translation Challenge
  • —HPLT bilingual data v1 (as part of the Tatoeba Translation Challenge dataset)
  • —A massively parallel Bible corpus

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

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 = [
    ">>khm<< Der Junge wirft einen Stein.",
    ">>vie<< ¿Y tú?"
]

model_name = "pytorch-models/opus-mt-tc-bible-big-deu_eng_fra_por_spa-aav"
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:
#     ក្មេងប្រុស នោះ យក ដុំ ថ្ម គប់ ។
#     Còn anh thì sao?

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-deu_eng_fra_por_spa-aav")
print(pipe(">>khm<< Der Junge wirft einen Stein."))

# expected output: ក្មេងប្រុស នោះ យក ដុំ ថ្ម គប់ ។

Training

Evaluation

langpairtestsetchr-FBLEU#sent#words
deu-vietatoeba-test-v2021-08-070.4579525.64003768
eng-hoctatoeba-test-v2021-08-076.4380.26602591
eng-khatatoeba-test-v2021-08-075.7410.013149269
eng-vietatoeba-test-v2021-08-070.5646139.4250024427
fra-vietatoeba-test-v2021-08-070.5280635.2129913219
spa-vietatoeba-test-v2021-08-070.5213134.25944740
deu-vieflores101-devtest0.5338133.8101233331
eng-khmflores101-devtest0.423021.310127006
eng-vieflores101-devtest0.5962142.1101233331
fra-khmflores101-devtest0.400422.210127006
por-khmflores101-devtest0.405852.110127006
por-vieflores101-devtest0.5491936.0101233331
spa-vieflores101-devtest0.4992127.8101233331
deu-vieflores200-devtest0.5367134.0101233331
eng-khmflores200-devtest0.421481.310127006
eng-vieflores200-devtest0.5984242.4101233331
fra-vieflores200-devtest0.5410134.6101233331
por-khmflores200-devtest0.408321.910127006
por-vieflores200-devtest0.5497036.1101233331
spa-vieflores200-devtest0.5002528.1101233331
deu-khmntrex1280.449033.5199715866
deu-vientrex1280.5212431.4199764655
eng-khmntrex1280.504941.6199715866
eng-vientrex1283.8310.0199764655
fra-khmntrex1280.438412.4199715866
fra-vientrex1280.5204431.8199764655
por-khmntrex1280.466552.5199715866
por-vientrex1280.5306033.3199764655
spa-khmntrex1280.464432.7199715866
spa-vientrex1280.5329333.4199764655
eng-khmtico19-test0.478062.5210015810
fra-khmtico19-test3.2681.0210015810
por-khmtico19-test3.9001.1210015810
spa-khmtico19-test3.7841.0210015810

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: 0882077
  • —port time: Tue Oct 8 08:57:20 EEST 2024
  • —port machine: LM0-400-22516.local