CoolFace
Modelpublic

WindstormLabs/origin-Helsinki-NLP-opus-mt-tc-big-gmw-gmw

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

opus-mt-tc-big-gmw-gmw

Table of Contents

Model Details

Neural machine translation model for translating from West Germanic languages (gmw) to West Germanic languages (gmw).

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-11
  • —License: CC-BY-4.0
  • —Language(s):
  • —Source Language(s): afr deu eng enm fry gos gsw hrx ksh ltz multi nds nld pdc sco stq swg tpi yid
  • —Target Language(s): afr ang deu eng enm fry gos ltz multi nds nld sco tpi yid
  • —Language Pair(s): afr-deu afr-eng afr-nld deu-afr deu-deu deu-eng deu-nds deu-nld eng-afr eng-deu eng-eng eng-nld fry-eng fry-nld gos-deu gos-eng gos-nld hrx-deu hrx-eng ltz-deu ltz-eng ltz-nld multi-multi nds-deu nds-eng nds-nld nld-afr nld-deu nld-eng nld-fry nld-nds nld-nld
  • —Valid Target Language Labels: >>act<< >>afr<< >>afs<< >>aig<< >>ang<< >>angLatn<< >>bah<< >>bar<< >>bis<< >>bjs<< >>brc<< >>bzj<< >>bzjLatn<< >>bzk<< >>cim<< >>dcr<< >>deu<< >>djk<< >>djkLatn<< >>drt<< >>drtLatn<< >>dum<< >>eng<< >>enm<< >>enmLatn<< >>fpe<< >>frk<< >>frr<< >>fry<< >>gcl<< >>gct<< >>geh<< >>gmh<< >>gml<< >>goh<< >>gos<< >>gpe<< >>gsw<< >>gul<< >>gyn<< >>hrx<< >>hrxLatn<< >>hwc<< >>icr<< >>jam<< >>jvd<< >>kri<< >>ksh<< >>kww<< >>lim<< >>lng<< >>ltz<< >>mhn<< >>nds<< >>nld<< >>odt<< >>ofs<< >>ofsLatn<< >>oor<< >>osx<< >>pcm<< >>pdc<< >>pdt<< >>pey<< >>pfl<< >>pih<< >>pihLatn<< >>pis<< >>pisLatn<< >>qlm<< >>rop<< >>sco<< >>sdz<< >>skw<< >>sli<< >>srm<< >>srmLatn<< >>srn<< >>stl<< >>stq<< >>svc<< >>swg<< >>sxu<< >>tch<< >>tcs<< >>tgh<< >>tpi<< >>trf<< >>twd<< >>uln<< >>vel<< >>vic<< >>vls<< >>vmf<< >>wae<< >>wep<< >>wes<< >>wes_Latn<< >>wym<< >>ydd<< >>yec<< >>yid<< >>yih<< >>zea<<
  • —Original Model: opusTCv20210807_transformer-big_2022-08-11.zip
  • —Resources for more information:
  • —OPUS-MT-train GitHub Repo
  • —More information about released models for this language pair: OPUS-MT gmw-gmw 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. >>afr<<

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 = [
    ">>nds<< Red keinen Quatsch.",
    ">>eng<< Findet ihr das nicht etwas übereilt?"
]

model_name = "pytorch-models/opus-mt-tc-big-gmw-gmw"
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:
#     Kiek ok bi: Rott.
#     Aren't you in a hurry?

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-gmw-gmw")
print(pipe(">>nds<< Red keinen Quatsch."))

# expected output: Kiek ok bi: Rott.

Training

Evaluation

langpairtestsetchr-FBLEU#sent#words
afr-deutatoeba-test-v2020-07-28-v2021-08-070.6863350.315839105
afr-engtatoeba-test-v2020-07-28-v2021-08-070.7050256.413749622
afr-nldtatoeba-test-v2020-07-28-v2021-08-070.7150055.510566710
deu-afrtatoeba-test-v2020-07-28-v2021-08-070.7019154.215839507
deu-deutatoeba-test-v2020-07-28-v2021-08-070.5730434.6250020797
deu-engtatoeba-test-v2020-07-28-v2021-08-070.6591948.417565149415
deu-ndstatoeba-test-v2020-07-28-v2021-08-070.4802823.2999976119
deu-nldtatoeba-test-v2020-07-28-v2021-08-070.7136654.41021875208
deu-yidtatoeba-test-v2020-07-28-v2021-08-079.2340.48535353
eng-afrtatoeba-test-v2020-07-28-v2021-08-070.7194056.4137410314
eng-deutatoeba-test-v2020-07-28-v2021-08-070.6291241.817565151539
eng-engtatoeba-test-v2020-07-28-v2021-08-070.8013666.312062115099
eng-nldtatoeba-test-v2020-07-28-v2021-08-070.7092954.31269691769
eng-yidtatoeba-test-v2020-07-28-v2021-08-079.6480.4248316388
fry-engtatoeba-test-v2020-07-28-v2021-08-070.4030424.52201573
fry-nldtatoeba-test-v2020-07-28-v2021-08-070.5493940.52601854
gos-deutatoeba-test-v2020-07-28-v2021-08-070.4530225.42071168
gos-engtatoeba-test-v2020-07-28-v2021-08-070.3758723.911545634
gos-nldtatoeba-test-v2020-07-28-v2021-08-070.4570126.118529902
hrx-deutatoeba-test-v2020-07-28-v2021-08-070.5184030.04712805
hrx-engtatoeba-test-v2020-07-28-v2021-08-070.4277829.22211235
ltz-deutatoeba-test-v2020-07-28-v2021-08-070.3700521.03472208
ltz-engtatoeba-test-v2020-07-28-v2021-08-070.3776430.12931840
ltz-nldtatoeba-test-v2020-07-28-v2021-08-070.3239226.42921685
multi-multitatoeba-test-v2020-07-28-v2021-08-070.5940040.41000074505
nds-deutatoeba-test-v2020-07-28-v2021-08-070.6389845.5999974544
nds-engtatoeba-test-v2020-07-28-v2021-08-070.5511238.4250017584
nds-nldtatoeba-test-v2020-07-28-v2021-08-070.6667649.8165711489
nld-afrtatoeba-test-v2020-07-28-v2021-08-070.7661062.310566823
nld-deutatoeba-test-v2020-07-28-v2021-08-070.7304756.71021874121
nld-engtatoeba-test-v2020-07-28-v2021-08-070.7394060.21269689970
nld-frytatoeba-test-v2020-07-28-v2021-08-070.4795931.02601857
nld-ndstatoeba-test-v2020-07-28-v2021-08-070.4374320.0165711711
nld-nldtatoeba-test-v2020-07-28-v2021-08-070.6364644.910007196
swg-deutatoeba-test-v2020-07-28-v2021-08-070.4031916.3152315630
yid-deutatoeba-test-v2020-07-28-v2021-08-076.3040.18535172
yid-engtatoeba-test-v2020-07-28-v2021-08-073.7150.1248315449
yid-yidtatoeba-test-v2020-07-28-v2021-08-076.5960.12921802
deu-engnewssyscomb20090.5499228.250211821
eng-deunewssyscomb20090.5386723.250211271
deu-engnews-test20080.5458427.2205149380
eng-deunews-test20080.5320423.7205147427
deu-engnewstest20090.5374925.9252565402
eng-deunewstest20090.5328322.9252562816
deu-engnewstest20100.5835630.6248961724
eng-deunewstest20100.5488625.8248961511
deu-engnewstest20110.5488326.3300374681
eng-deunewstest20110.5271223.1300372981
deu-engnewstest20120.5616028.5300372812
eng-deunewstest20120.5266223.3300372886
deu-engnewstest20130.5777031.4300064505
eng-deunewstest20130.5577427.8300063737
deu-engnewstest2014-deen0.5982633.2300367337
eng-deunewstest2014-deen0.5944129.6300362964
deu-engnewstest2015-ende0.5966033.4216946443
eng-deunewstest2015-ende0.5988932.3216944260
deu-engnewstest2016-ende0.6473639.8299964126
eng-deunewstest2016-ende0.6442938.3299962670
deu-engnewstest2017-ende0.6093335.2300464399
eng-deunewstest2017-ende0.5925830.7300461291
deu-engnewstest2018-ende0.6679642.6299867013
eng-deunewstest2018-ende0.6960546.5299864276
deu-engnewstest2019-deen0.6376639.8200039282
eng-deunewstest2019-ende0.6688043.3199748969

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: c1980b5
  • —port time: Sun Oct 8 14:39:59 EEST 2023
  • —port machine: LM0-400-22516.local