Views
No views yet
quickmt-en-pt Neural Machine Translation Modelquickmt-en-pt is a reasonably fast and reasonably accurate neural machine translation model for translation from en into pt.eoleeole model configuration in this repository for further details and the eole-model for the raw eole (pytorch) model.quickmtquickmt python library.1git clone https://github.com/quickmt/quickmt.git
2pip install ./quickmt/1from quickmt import Translator
2from huggingface_hub import snapshot_download
3
4# Download Model (if not downloaded already) and return path to local model
5# Device is either 'auto', 'cpu' or 'cuda'
6t = Translator(
7 snapshot_download("quickmt/quickmt-en-pt", ignore_patterns="eole-model/*"),
8 device="cpu"
9)
10
11# Translate - set beam size to 5 for higher quality (but slower speed)
12sample_text = 'Dr. Ehud Ur, professor of medicine at Dalhousie University in Halifax, Nova Scotia and chair of the clinical and scientific division of the Canadian Diabetes Association cautioned that the research is still in its early days.'
13t(sample_text, beam_size=5)bleu and chrf2 are calculated with sacrebleu on the Flores200 devtest test set ("eng_Latn"->"por_Latn"). comet22 with the comet library and the default model. "Time (s)" is the time in seconds to translate (using ctranslate2) the flores-devtest dataset (1012 sentences) on an RTX 4070s GPU with batch size 32 (faster speed is possible with a larger batch size).| bleu | chrfs | comet | time | |
|---|---|---|---|---|
| quickmt-en-pt | 50.62 | 71.79 | 89.27 | 0.97 |
| facebook/nllb-200-distilled-600M | 47.68 | 70.28 | 89.05 | 23.75 |
| facebook/nllb-200-distilled-1.3B | 48.92 | 70.96 | 89.77 | 41.13 |
| facebook/m2m100_418M | 41.14 | 65.85 | 85.49 | 19.08 |
| facebook/m2m100_1.2B | 46.56 | 69.41 | 88.53 | 37.42 |