🚀 opus-mt-tc-big-en-ro
这是一个用于将英语(en)翻译成罗马尼亚语(ro)的神经机器翻译模型。本模型属于 OPUS - MT 项目,该项目致力于让神经机器翻译模型广泛适用于世界上多种语言。所有模型最初都使用 Marian NMT 这一出色的框架进行训练,它是一个用纯 C++ 编写的高效神经机器翻译实现。这些模型通过 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",
}
✨ 主要特性
- 支持英语到罗马尼亚语的翻译。
- 基于优秀的 Marian NMT 框架训练,并转换为 pyTorch 格式。
- 训练数据丰富,采用了 OPUS 数据集和特定的训练流程。
📦 安装指南
文档未提及安装步骤,此处跳过。
💻 使用示例
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
">>ron<< A bad writer's prose is full of hackneyed phrases.",
">>ron<< Zero is a special number."
]
model_name = "pytorch-models/opus-mt-tc-big-en-ro"
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) )
高级用法
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-en-ro")
print(pipe(">>ron<< A bad writer's prose is full of hackneyed phrases."))
📚 详细文档
模型信息
基准测试
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
eng - ron |
tatoeba - test - v2021 - 08 - 07 |
0.68606 |
48.6 |
5508 |
40367 |
eng - ron |
flores101 - devtest |
0.64876 |
40.4 |
1012 |
26799 |
eng - ron |
newsdev2016 |
0.62682 |
36.4 |
1999 |
51300 |
eng - ron |
newstest2016 |
0.60702 |
34.0 |
1999 |
48945 |
🔧 技术细节
文档未提供足够详细的技术实现细节,此处跳过。
📄 许可证
本模型使用的许可证为 cc - by - 4.0。
致谢
这项工作得到了以下项目的支持:
我们也感谢 芬兰科学信息技术中心(CSC) 提供的慷慨计算资源和 IT 基础设施。
模型转换信息
- transformers 版本:4.16.2
- OPUS - MT git 哈希值:3405783
- 转换时间:2022 年 4 月 13 日星期三 17:55:46 EEST
- 转换机器:LM0 - 400 - 22516.local