语言:
- 英语
- 意大利语
标签:
- 翻译
- opus-mt-tc
许可证: cc-by-4.0
模型索引:
- 名称: opus-mt-tc-big-en-it
结果:
- 任务:
名称: 英语-意大利语翻译
类型: 翻译
参数: eng-ita
数据集:
名称: flores101-devtest
类型: flores_101
参数: eng ita devtest
指标:
- 名称: BLEU
类型: bleu
值: 29.6
- 任务:
名称: 英语-意大利语翻译
类型: 翻译
参数: eng-ita
数据集:
名称: tatoeba-test-v2021-08-07
类型: tatoeba_mt
参数: eng-ita
指标:
- 名称: BLEU
类型: bleu
值: 53.9
- 任务:
名称: 英语-意大利语翻译
类型: 翻译
参数: eng-ita
数据集:
名称: newstest2009
类型: wmt-2009-news
参数: eng-ita
指标:
- 名称: BLEU
类型: bleu
值: 31.6
opus-mt-tc-big-en-it
用于从英语(en)翻译到意大利语(it)的神经机器翻译模型。
该模型是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",
}
模型信息
使用示例
简短示例代码:
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"He was always very respectful.",
"This cat is black. Is the dog, too?"
]
model_name = "pytorch-models/opus-mt-tc-big-en-it"
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-it")
print(pipe("He was always very respectful."))
基准测试
语言对 |
测试集 |
chr-F |
BLEU |
句子数 |
词数 |
eng-ita |
tatoeba-test-v2021-08-07 |
0.72539 |
53.9 |
17320 |
116336 |
eng-ita |
flores101-devtest |
0.59002 |
29.6 |
1012 |
27306 |
eng-ita |
newssyscomb2009 |
0.60759 |
31.2 |
502 |
11551 |
eng-ita |
newstest2009 |
0.60441 |
31.6 |
2525 |
63466 |
致谢
本工作得到了欧洲语言网格作为试点项目2866、由欧洲研究理事会(ERC)根据欧盟Horizon 2020研究与创新计划(资助协议编号771113)资助的FoTran项目,以及欧盟Horizon 2020研究与创新计划(资助协议编号780069)资助的MeMAD项目的支持。同时感谢CSC – IT科学中心提供的慷慨计算资源和IT基础设施。
模型转换信息
- transformers版本: 4.16.2
- OPUS-MT git哈希: 3405783
- 转换时间: 2022年4月13日星期三 EEST 17:27:22
- 转换机器: LM0-400-22516.local