英文

opus-mt-tc-big-ko-en

表格目录

  • 模型详情
  • 使用情况
  • 风险、限制和偏见
  • 如何开始使用该模型
  • 训练
  • 评估
  • 引用信息
  • 鸣谢

模型详情

韩语(ko)到英语(en)的神经机器翻译模型。

该模型是 OPUS-MT project 的一部分,旨在使神经机器翻译模型广泛可用和易于访问,服务于世界上的许多语言。所有模型最初都是使用令人惊叹的 Marian NMT 框架训练的,该框架是用纯 C++ 编写的高效 NMT 实现。这些模型已经使用 huggingface 的 transformers 库转换为 pyTorch。训练数据来自 OPUS ,训练流程使用 OPUS-MT-train 的程序。 模型描述:

使用情况

该模型可用于翻译和文本生成。

风险、限制和偏见

内容警告:读者应注意,该模型是使用可能包含令人不安、冒犯的内容的各种公共数据集进行训练的,并且可能传播历史和现实中的刻板印象。

已经有大量研究探讨了语言模型的偏见和公平性问题(参见,例如, Sheng et al. (2021) Bender et al. (2021) )。

如何开始使用该模型

简短的示例代码:

from transformers import MarianMTModel, MarianTokenizer

src_text = [
    "2, 4, 6 등은 짝수이다.",
    "네."
]

model_name = "pytorch-models/opus-mt-tc-big-ko-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) )

# expected output:
#     2, 4, and 6 are even.
#     Yeah.

您也可以使用 transformers 框架进行 OPUS-MT 模型的操作,例如:

from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-ko-en")
print(pipe("2, 4, 6 등은 짝수이다."))

# expected output: 2, 4, and 6 are even.

训练

评估

langpair testset chr-F BLEU #sent #words
kor-eng tatoeba-test-v2021-08-07 0.58829 41.3 2400 17619
kor-eng flores101-devtest 0.56615 27.7 1012 24721

引用信息

@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",
}

鸣谢

该工作得到 European Language Grid 的支持,作为 pilot project 2866 的一部分,由欧洲研究委员会(ERC)在欧洲联盟的Horizon 2020研究和创新计划下(资助协议号771113)以及欧洲联盟的Horizon 2020研究和创新计划下的资助,协议号780069的 MeMAD project 支持。我们还感谢芬兰的 CSC -- IT Center for Science 提供的慷慨计算资源和 IT 基础设施。

模型转换信息

  • transformers 版本:4.16.2
  • OPUS-MT Git 哈希值:8b9f0b0
  • 转换时间:2022年8月12日11:19:05 EEST
  • 转换机器:LM0-400-22516.local