🚀 opus-mt-tc-big-en-ko
这是一个用于英文(en)到韩文(ko)翻译的神经机器翻译模型。它属于OPUS - MT项目,旨在让神经机器翻译模型广泛可用,适用于全球多种语言。
🚀 快速开始
基础用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"2, 4, 6 etc. are even numbers.",
"Yes."
]
model_name = "pytorch-models/opus-mt-tc-big-en-ko"
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-ko")
print(pipe("2, 4, 6 etc. are even numbers."))
✨ 主要特性
- 此模型是多语言翻译模型,支持多种目标语言。
- 可用于翻译和文本到文本的生成任务。
📦 安装指南
文档未提及安装步骤,暂不展示。
📚 详细文档
模型详情
该模型是用于从英语(en)翻译成韩语(ko)的神经机器翻译模型。
此模型是OPUS - MT项目的一部分,该项目致力于使神经机器翻译模型广泛适用于世界上的多种语言。所有模型最初都使用Marian NMT这一出色的框架进行训练,Marian NMT是一个用纯C++编写的高效NMT实现。这些模型已使用huggingface的transformers库转换为pyTorch。训练数据来自OPUS,训练管道采用OPUS - MT - train的流程。
模型描述:
这是一个具有多个目标语言的多语言翻译模型。需要以>>id<<
(id = 有效的目标语言ID)的形式使用句子初始语言标记,例如>><<
。
用途
此模型可用于翻译和文本到文本的生成。
风险、限制和偏差
⚠️ 重要提示
读者应注意,该模型是在各种公共数据集上训练的,这些数据集可能包含令人不安、冒犯性的内容,并且可能传播历史和当前的刻板印象。
大量研究已经探讨了语言模型的偏差和公平性问题(例如,参见Sheng等人(2021)和Bender等人(2021))。
训练
评估
语言对 |
测试集 |
chr - F |
BLEU |
句子数量 |
单词数量 |
引用信息
@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",
}
致谢
这项工作得到了欧洲语言网格的试点项目2866、由欧洲研究理事会(ERC)在欧盟的“地平线2020”研究和创新计划(资助协议编号771113)资助的FoTran项目以及由欧盟的“地平线2020”研究和创新计划(资助协议编号780069)资助的MeMAD项目的支持。我们也感谢芬兰CSC - 科学信息技术中心提供的慷慨计算资源和IT基础设施。
模型转换信息
- transformers版本:4.16.2
- OPUS - MT git哈希值:8b9f0b0
- 转换时间:2022年8月12日星期五11:02:03 EEST
- 转换机器:LM0 - 400 - 22516.local
📄 许可证
本项目采用CC - BY - 4.0许可证。