语言:
- 阿拉伯语 (ar)
- 英语 (en)
标签:
- 翻译
- opus-mt-tc
许可证: cc-by-4.0
模型索引:
- 名称: opus-mt-tc-big-ar-en
结果:
- 任务:
名称: 阿拉伯语-英语翻译
类型: 翻译
参数: ara-eng
数据集:
名称: flores101-devtest
类型: flores_101
参数: ara eng devtest
指标:
- 名称: BLEU
类型: bleu
值: 42.6
- 任务:
名称: 阿拉伯语-英语翻译
类型: 翻译
参数: ara-eng
数据集:
名称: tatoeba-test-v2021-08-07
类型: tatoeba_mt
参数: ara-eng
指标:
- 名称: BLEU
类型: bleu
值: 47.3
- 任务:
名称: 阿拉伯语-英语翻译
类型: 翻译
参数: ara-eng
数据集:
名称: tico19-test
类型: tico19-test
参数: ara-eng
指标:
- 名称: BLEU
类型: bleu
值: 44.4
opus-mt-tc-big-ar-en
用于从阿拉伯语 (ar) 翻译到英语 (en) 的神经机器翻译模型。
该模型是 OPUS-MT 项目 的一部分,该项目致力于使神经机器翻译模型在全球多种语言中广泛可用和易于获取。所有模型最初都是使用 Marian NMT 这一纯 C++ 编写的高效 NMT 实现框架进行训练的。模型已通过 huggingface 的 transformers 库转换为 pyTorch 格式。训练数据取自 OPUS,训练流程使用了 OPUS-MT-train 的程序。
@inproceedings{tiedemann-thottingal-2020-opus,
title = "{OPUS}-{MT} {--} 为世界构建开放的翻译服务",
author = {Tiedemann, J{\"o}rg 和 Thottingal, Santhosh},
booktitle = "第22届欧洲机器翻译协会年会论文集",
month = 11月,
year = "2020",
address = "葡萄牙里斯本",
publisher = "欧洲机器翻译协会",
url = "https://aclanthology.org/2020.eamt-1.61",
pages = "479--480",
}
@inproceedings{tiedemann-2020-tatoeba,
title = "Tatoeba 翻译挑战 {--} 为低资源及多语言机器翻译提供真实数据集",
author = {Tiedemann, J{\"o}rg},
booktitle = "第五届机器翻译会议论文集",
month = 11月,
year = "2020",
address = "线上",
publisher = "计算语言学协会",
url = "https://aclanthology.org/2020.wmt-1.139",
pages = "1174--1182",
}
模型信息
使用示例
简短示例代码:
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"اتبع قلبك فحسب.",
"وين راهي دّوش؟"
]
model_name = "pytorch-models/opus-mt-tc-big-ar-en"
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 调用 OPUS-MT 模型:
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-ar-en")
print(pipe("اتبع قلبك فحسب."))
基准测试
语言对 |
测试集 |
chr-F |
BLEU |
句子数 |
词数 |
ara-eng |
tatoeba-test-v2021-08-07 |
0.63477 |
47.3 |
10305 |
76975 |
ara-eng |
flores101-devtest |
0.66987 |
42.6 |
1012 |
24721 |
ara-eng |
tico19-test |
0.68521 |
44.4 |
2100 |
56323 |
致谢
该工作得到了 欧洲语言网格 作为 试点项目 2866 的支持,以及由欧洲研究理事会 (ERC) 根据欧盟 Horizon 2020 研究与创新计划(资助协议编号 771113)资助的 FoTran 项目,和由欧盟 Horizon 2020 研究与创新计划(资助协议编号 780069)资助的 MeMAD 项目 的支持。同时感谢 CSC – 芬兰科学信息技术中心 提供的慷慨计算资源和 IT 基础设施。
模型转换信息
- transformers 版本: 4.16.2
- OPUS-MT git 哈希值: 3405783
- 转换时间: 2022年4月13日星期三 EEST 18:17:57
- 转换机器: LM0-400-22516.local