HuggingFace镜像/opus-mt-tc-big-en-ko
模型介绍文件和版本分析
下载使用量0

opus-mt-tc-big-en-ko

目录

  • 模型详情
  • 用途
  • 风险、局限性与偏见
  • 如何开始使用模型
  • 训练
  • 评估
  • 引用信息
  • 致谢

模型详情

用于从英语(en)翻译成韩语(ko)的神经机器翻译模型。

该模型是OPUS-MT 项目的一部分,该项目旨在为世界上多种语言提供广泛可用且易于获取的神经机器翻译模型。所有模型最初均使用Marian NMT这一出色的框架进行训练,Marian NMT 是一个用纯 C++编写的高效 NMT 实现。这些模型已通过 huggingface 的 transformers 库转换为 PyTorch 格式。训练数据取自OPUS,训练流程采用OPUS-MT-train的程序。 模型说明:

  • 开发机构: 赫尔辛基大学语言技术研究组
  • 模型类型: 翻译(transformer-big)
  • 发布时间: 2022-07-28
  • 许可证: CC-BY-4.0
  • 语言:
    • 源语言:
    • 目标语言:
    • 有效目标语言标签:
  • 原始模型: opusTCv20210807-sepvoc_transformer-big_2022-07-28.zip
  • 更多信息资源:
    • OPUS-MT-train GitHub 仓库
    • 关于此语言对已发布模型的更多信息:OPUS-MT eng-kor 自述文件
    • transformers 库中 MarianNMT 模型的更多信息
    • [Tatoeba 翻译挑战赛](https://github.com/Helsinki-NLP/Tatoeba-Challenge/

这是一个具有多种目标语言的多语言翻译模型。需要以 >>id<<(id = 有效的目标语言 ID)的形式在句首添加语言标记,例如 >><<

用途

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

风险、局限性与偏见

内容警告:读者需注意,本模型基于多种公共数据集训练而成,这些数据可能包含令人不安、冒犯性的内容,并且可能传播历史及当前的刻板印象。

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

如何开始使用该模型

简短示例代码:

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) )

# expected output:
#     2, 4, 6 등은 짝수입니다.
#     그래

您也可以通过 transformers 流水线使用 OPUS-MT 模型,例如:

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."))

# expected output: 2, 4, 6 등은 짝수입니다.

训练

  • 数据:opusTCv20210807(来源)
  • 预处理:SentencePiece(spm32k,spm32k)
  • 模型类型:transformer-big
  • 原始MarianNMT模型:opusTCv20210807-sepvoc_transformer-big_2022-07-28.zip
  • 训练脚本:GitHub仓库

评估

  • 测试集翻译:opusTCv20210807-sepvoc_transformer-big_2022-07-28.test.txt
  • 测试集分数:opusTCv20210807-sepvoc_transformer-big_2022-07-28.eval.txt
  • 基准测试结果:benchmark_results.txt
  • 基准测试输出:benchmark_translations.zip
语言对测试集字符F值BLEU值句子数单词数

引用信息

  • 相关文献:OPUS-MT – Building open translation services for the World 和 The Tatoeba Translation Challenge – Realistic Data Sets for Low Resource and Multilingual MT(如果您使用此模型,请引用上述文献。)
@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,详见https://live.european-language-grid.eu/catalogue/#/resource/projects/2866)、[FoTran项目](https://www.helsinki.fi/en/researchgroups/natural-language-understanding-with-cross-lingual-grounding)(由欧洲研究理事会(ERC)在欧盟“地平线2020”研究与创新计划资助,资助协议编号771113)以及[MeMAD项目](https://memad.eu/)(由欧盟“地平线2020”研究与创新计划资助,资助协议编号780069)的支持。我们同样感谢芬兰[CSC——科学IT中心](https://www.csc.fi/)提供的慷慨计算资源和IT基础设施。

模型转换信息

  • transformers版本:4.16.2
  • OPUS-MT git哈希值:8b9f0b0
  • 转换时间:2022年8月12日星期五,欧洲东部夏令时间11:02:03
  • 转换机器:LM0-400-22516.local