语言:
标签:
许可证: cc-by-4.0
模型索引:
- 名称: opus-mt-tc-big-en-fi
结果:
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: flores101-devtest
类型: flores_101
参数: eng fin devtest
指标:
- 名称: BLEU
类型: bleu
值: 27.6
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: newsdev2015
类型: newsdev2015
参数: eng-fin
指标:
- 名称: BLEU
类型: bleu
值: 24.2
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: tatoeba-test-v2021-08-07
类型: tatoeba_mt
参数: eng-fin
指标:
- 名称: BLEU
类型: bleu
值: 39.3
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: newstest2015
类型: wmt-2015-news
参数: eng-fin
指标:
- 名称: BLEU
类型: bleu
值: 26.4
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: newstest2016
类型: wmt-2016-news
参数: eng-fin
指标:
- 名称: BLEU
类型: bleu
值: 28.8
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: newstest2017
类型: wmt-2017-news
参数: eng-fin
指标:
- 名称: BLEU
类型: bleu
值: 31.3
- 任务:
名称: 英语-芬兰语翻译
类型: 翻译
参数: eng-fin
数据集:
名称: newstest2019
类型: wmt-2019-news
参数: eng-fin
指标:
- 名称: BLEU
类型: bleu
值: 26.4
opus-mt-tc-big-en-fi
用于从英语(en)翻译到芬兰语(fi)的神经机器翻译模型。
该模型是OPUS-MT项目的一部分,该项目致力于使神经机器翻译模型在全球多种语言中广泛可用和可访问。所有模型最初都是使用Marian NMT这一纯C++编写的高效NMT实现框架进行训练。模型已通过huggingface的transformers库转换为pyTorch格式。训练数据取自OPUS,训练流程使用OPUS-MT-train的程序。
@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",
}
模型信息
这是一个多目标语言的翻译模型。需要在句首添加语言标记,格式为>>id<<
(id = 有效目标语言ID),例如>>fin<<
。
使用方式
简短示例代码:
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"Russia is big.",
"Touch wood!"
]
model_name = "pytorch-models/opus-mt-tc-big-en-fi"
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) )
也可以使用transformers的pipeline功能:
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-fi")
print(pipe("Russia is big."))
基准测试
语言对 |
测试集 |
chr-F |
BLEU |
句子数 |
词数 |
eng-fin |
tatoeba-test-v2021-08-07 |
0.64352 |
39.3 |
10690 |
65122 |
eng-fin |
flores101-devtest |
0.61334 |
27.6 |
1012 |
18781 |
eng-fin |
newsdev2015 |
0.58367 |
24.2 |
1500 |
23091 |
eng-fin |
newstest2015 |
0.60080 |
26.4 |
1370 |
19735 |
eng-fin |
newstest2016 |
0.61636 |
28.8 |
3000 |
47678 |
eng-fin |
newstest2017 |
0.64381 |
31.3 |
3002 |
45269 |
eng-fin |
newstest2018 |
0.55626 |
19.7 |
3000 |
44836 |
eng-fin |
newstest2019 |
0.58420 |
26.4 |
1997 |
38369 |
eng-fin |
newstestB2016 |
0.57554 |
23.3 |
3000 |
45766 |
eng-fin |
newstestB2017 |
0.60212 |
26.8 |
3002 |
45506 |
致谢
该工作得到了欧洲语言网格作为试点项目2866的支持,由FoTran项目资助,该项目受欧洲研究理事会(ERC)根据欧盟Horizon 2020研究与创新计划(资助协议编号771113)资助,以及MeMAD项目,该项目受欧盟Horizon 2020研究与创新计划资助(资助协议编号780069)。我们也感谢CSC – 芬兰IT科学中心提供的慷慨计算资源和IT基础设施。
模型转换信息
- transformers版本: 4.16.2
- OPUS-MT git哈希值: f084bad
- 转换时间: 2022年3月22日星期二 EET 14:42:32
- 转换机器: LM0-400-22516.local