CoolFace
Modelpublic

WindstormLabs/origin-Helsinki-NLP-opus-mt-tc-big-zls-itc

sourceHugging Facecc-by-4.0updated 4mo agoView on Hugging Face
0likes13downloads
Model Card

opus-mt-tc-big-zls-itc

Table of Contents

Model Details

Neural machine translation model for translating from South Slavic languages (zls) to Italic languages (itc).

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: 2022-08-10
  • —License: CC-BY-4.0
  • —Language(s):
  • —Source Language(s): bosLatn bul hbs hrv mkd slv srpCyrl srp_Latn
  • —Target Language(s): fra ita por ron spa
  • —Language Pair(s): bul-fra bul-ita bul-por bul-ron bul-spa hbs-fra hbs-ita hbs-spa hrv-fra hrv-ita hrv-por hrv-ron hrv-spa mkd-fra mkd-ita mkd-por mkd-ron mkd-spa slv-fra slv-ita slv-por slv-ron slv-spa srpCyrl-fra srpCyrl-ita srpCyrl-por srpCyrl-ron srpCyrl-spa srpLatn-ita
  • —Valid Target Language Labels: >>acf<< >>aoa<< >>arg<< >>ast<< >>cat<< >>cbk<< >>ccd<< >>cks<< >>cos<< >>cri<< >>crs<< >>dlm<< >>drc<< >>egl<< >>ext<< >>fab<< >>fax<< >>fra<< >>frc<< >>frm<< >>fro<< >>frp<< >>fur<< >>gcf<< >>gcr<< >>glg<< >>hat<< >>idb<< >>ist<< >>ita<< >>itk<< >>kea<< >>kmv<< >>lad<< >>ladLatn<< >>lat<< >>latLatn<< >>lij<< >>lld<< >>lmo<< >>lou<< >>mcm<< >>mfe<< >>mol<< >>mwl<< >>mxi<< >>mzs<< >>nap<< >>nrf<< >>oci<< >>osc<< >>osp<< >>pap<< >>pcd<< >>pln<< >>pms<< >>pob<< >>por<< >>pov<< >>pre<< >>pro<< >>qbb<< >>qhr<< >>rcf<< >>rgn<< >>roh<< >>ron<< >>ruo<< >>rup<< >>ruq<< >>scf<< >>scn<< >>sdc<< >>sdn<< >>spa<< >>spq<< >>spx<< >>src<< >>srd<< >>sro<< >>tmg<< >>tvy<< >>vec<< >>vkp<< >>wln<< >>xfa<< >>xum<<
  • —Original Model: opusTCv20210807_transformer-big_2022-08-10.zip
  • —Resources for more information:
  • —OPUS-MT-train GitHub Repo
  • —More information about released models for this language pair: OPUS-MT zls-itc README
  • —More information about MarianNMT models in the transformers library
  • —[Tatoeba Translation Challenge](https://github.com/Helsinki-NLP/Tatoeba-Challenge/

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

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 = [
    ">>fra<< Dobar dan, kako si?",
    ">>spa<< Znam da je ovo čudno."
]

model_name = "pytorch-models/opus-mt-tc-big-zls-itc"
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:
#     Bonjour, comment allez-vous ?
#     Sé que esto es raro.

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-big-zls-itc")
print(pipe(">>fra<< Dobar dan, kako si?"))

# expected output: Bonjour, comment allez-vous ?

Training

Evaluation

langpairtestsetchr-FBLEU#sent#words
bul-fratatoeba-test-v2021-08-070.6897152.94463669
bul-itatatoeba-test-v2021-08-070.6641245.1250016951
bul-spatatoeba-test-v2021-08-070.6667249.72861783
hbs-fratatoeba-test-v2021-08-070.6643448.14743370
hbs-itatatoeba-test-v2021-08-070.7238153.55343208
hbs-spatatoeba-test-v2021-08-070.7310558.06073766
hrv-fratatoeba-test-v2021-08-070.6280044.32581943
hrv-spatatoeba-test-v2021-08-070.7137057.52541702
mkd-spatatoeba-test-v2021-08-070.7536662.12171121
srp_Latn-itatatoeba-test-v2021-08-070.7604559.62121292
bul-fraflores101-devtest0.6064034.4101228343
bul-itaflores101-devtest0.5413524.0101227306
bul-porflores101-devtest0.5932232.4101226519
bul-ronflores101-devtest0.5555827.1101226799
bul-spaflores101-devtest0.5096222.4101229199
hrv-fraflores101-devtest0.5934933.1101228343
hrv-itaflores101-devtest0.5298023.5101227306
hrv-porflores101-devtest0.5740230.2101226519
hrv-ronflores101-devtest0.5365025.9101226799
hrv-spaflores101-devtest0.5016121.5101229199
mkd-fraflores101-devtest0.6080135.2101228343
mkd-itaflores101-devtest0.5354323.9101227306
mkd-porflores101-devtest0.5964833.9101226519
mkd-ronflores101-devtest0.5499828.0101226799
mkd-spaflores101-devtest0.5107922.8101229199
slv-fraflores101-devtest0.5823331.5101228343
slv-itaflores101-devtest0.5239022.4101227306
slv-porflores101-devtest0.5643629.0101226519
slv-ronflores101-devtest0.5311625.0101226799
slv-spaflores101-devtest0.4962121.1101229199
srp_Cyrl-fraflores101-devtest0.6211036.0101228343
srp_Cyrl-itaflores101-devtest0.5408323.9101227306
srp_Cyrl-porflores101-devtest0.6124834.9101226519
srp_Cyrl-ronflores101-devtest0.5623528.8101226799
srp_Cyrl-spaflores101-devtest0.5169822.8101229199

Citation Information

@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 European Language Grid as pilot project 2866, by the FoTran project, 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, 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, Finland.

Model conversion info

  • —transformers version: 4.16.2
  • —OPUS-MT git hash: 8b9f0b0
  • —port time: Fri Aug 12 23:59:29 EEST 2022
  • —port machine: LM0-400-22516.local