🚀 opus-mt-tc-big-he-en
这是一个用于从希伯来语(he)翻译成英语(en)的神经机器翻译模型。该模型是 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",
}
✨ 主要特性
- 支持希伯来语到英语的翻译。
- 属于 OPUS - MT 项目,依托广泛可用的训练资源和成熟的训练流程。
- 经过转换可在 pyTorch 环境下使用。
📦 安装指南
文档未提及安装步骤,暂不提供。
💻 使用示例
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"היא שכחה לכתוב לו.",
"אני רוצה לדעת מיד כשמשהו יקרה."
]
model_name = "pytorch-models/opus-mt-tc-big-he-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) )
高级用法
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-he-en")
print(pipe("היא שכחה לכתוב לו."))
📚 详细文档
模型信息
基准测试
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
heb - eng |
tatoeba - test - v2021 - 08 - 07 |
0.68565 |
53.8 |
10519 |
77427 |
heb - eng |
flores101 - devtest |
0.68116 |
44.1 |
1012 |
24721 |
模型转换信息
属性 |
详情 |
transformers 版本 |
4.16.2 |
OPUS - MT git 哈希值 |
3405783 |
转换时间 |
Wed Apr 13 19:27:12 EEST 2022 |
转换机器 |
LM0 - 400 - 22516.local |
🔧 技术细节
文档未提供足够技术实现细节,暂不提供。
📄 许可证
本模型使用的许可证为 cc - by - 4.0。
致谢
本工作得到了以下项目和机构的支持:
同时,我们感谢 芬兰科学信息技术中心(CSC) 提供的慷慨计算资源和 IT 基础设施。