🚀 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許可證。