🚀 opus-mt-tc-big-zh-ja
這是一個用於中文(zh)到日文(ja)翻譯的神經機器翻譯模型。它屬於OPUS - MT項目,旨在讓神經機器翻譯模型廣泛適用於全球多種語言。
🚀 快速開始
示例代碼
from transformers import MarianMTModel, MarianTokenizer
src_text = [
"生日快樂,Muiriel!",
"好凍。"
]
model_name = "pytorch-models/opus-mt-tc-big-zh-ja"
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) )
你也可以使用transformers管道來使用OPUS - MT模型,例如:
from transformers import pipeline
pipe = pipeline("translation", model="Helsinki-NLP/opus-mt-tc-big-zh-ja")
print(pipe("生日快樂,Muiriel!"))
✨ 主要特性
該模型可用於翻譯和文本到文本的生成。
📚 詳細文檔
模型詳情
這是一個用於從中文(zh)翻譯成日文(ja)的神經機器翻譯模型。
此模型是OPUS - MT項目的一部分,該項目致力於讓神經機器翻譯模型在世界上多種語言中廣泛可用且易於獲取。所有模型最初都使用Marian NMT這一出色的框架進行訓練,它是一個用純C++編寫的高效NMT實現。這些模型已使用huggingface的transformers庫轉換為pyTorch。訓練數據來自OPUS,訓練管道採用OPUS - MT - train的流程。
模型描述:
風險、侷限性和偏差
⚠️ 重要提示
讀者應該注意,該模型是在各種公共數據集上訓練的,這些數據集可能包含令人不安、冒犯性的內容,並且可能傳播歷史和當前的刻板印象。
大量研究已經探討了語言模型的偏差和公平性問題(例如,參見Sheng等人(2021)和Bender等人(2021))。
訓練
評估
語言對 |
測試集 |
chr - F |
BLEU |
句子數量 |
單詞數量 |
中文 - 日文 |
tatoeba - test - v2021 - 08 - 07 |
0.27790 |
24.6 |
2497 |
21956 |
引用信息
@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月13日星期六00:02:56 EEST
- 轉換機器:LM0 - 400 - 22516.local
📄 許可證
本模型使用CC - BY - 4.0許可證。