🚀 opus-mt-tc-big-en-ro
這是一個用於將英語(en)翻譯成羅馬尼亞語(ro)的神經機器翻譯模型。本模型屬於 OPUS - MT 項目,該項目致力於讓神經機器翻譯模型廣泛適用於世界上多種語言。所有模型最初都使用 Marian NMT 這一出色的框架進行訓練,它是一個用純 C++ 編寫的高效神經機器翻譯實現。這些模型通過 huggingface 的 transformers 庫轉換為 pyTorch 格式。訓練數據來自 OPUS,訓練流程採用 OPUS - MT - train 的程序。
@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",
}
✨ 主要特性
- 支持英語到羅馬尼亞語的翻譯。
- 基於優秀的 Marian NMT 框架訓練,並轉換為 pyTorch 格式。
- 訓練數據豐富,採用了 OPUS 數據集和特定的訓練流程。
📦 安裝指南
文檔未提及安裝步驟,此處跳過。
💻 使用示例
基礎用法
from transformers import MarianMTModel, MarianTokenizer
src_text = [
">>ron<< A bad writer's prose is full of hackneyed phrases.",
">>ron<< Zero is a special number."
]
model_name = "pytorch-models/opus-mt-tc-big-en-ro"
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-ro")
print(pipe(">>ron<< A bad writer's prose is full of hackneyed phrases."))
📚 詳細文檔
模型信息
基準測試
語言對 |
測試集 |
chr - F |
BLEU |
句子數量 |
單詞數量 |
eng - ron |
tatoeba - test - v2021 - 08 - 07 |
0.68606 |
48.6 |
5508 |
40367 |
eng - ron |
flores101 - devtest |
0.64876 |
40.4 |
1012 |
26799 |
eng - ron |
newsdev2016 |
0.62682 |
36.4 |
1999 |
51300 |
eng - ron |
newstest2016 |
0.60702 |
34.0 |
1999 |
48945 |
🔧 技術細節
文檔未提供足夠詳細的技術實現細節,此處跳過。
📄 許可證
本模型使用的許可證為 cc - by - 4.0。
致謝
這項工作得到了以下項目的支持:
我們也感謝 芬蘭科學信息技術中心(CSC) 提供的慷慨計算資源和 IT 基礎設施。
模型轉換信息
- transformers 版本:4.16.2
- OPUS - MT git 哈希值:3405783
- 轉換時間:2022 年 4 月 13 日星期三 17:55:46 EEST
- 轉換機器:LM0 - 400 - 22516.local