Update README.md
Browse files
README.md
CHANGED
|
@@ -1,39 +1,39 @@
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
-
-
|
| 5 |
tags:
|
| 6 |
- translation
|
| 7 |
license: cc-by-4.0
|
| 8 |
datasets:
|
| 9 |
-
- quickmt/quickmt-train.
|
| 10 |
model-index:
|
| 11 |
-
- name: quickmt-en-
|
| 12 |
results:
|
| 13 |
- task:
|
| 14 |
-
name: Translation eng-
|
| 15 |
type: translation
|
| 16 |
-
args: eng-
|
| 17 |
dataset:
|
| 18 |
name: flores101-devtest
|
| 19 |
type: flores_101
|
| 20 |
-
args: eng_Latn
|
| 21 |
metrics:
|
| 22 |
- name: BLEU
|
| 23 |
type: bleu
|
| 24 |
-
value:
|
| 25 |
- name: CHRF
|
| 26 |
type: chrf
|
| 27 |
-
value:
|
| 28 |
- name: COMET
|
| 29 |
type: comet
|
| 30 |
-
value:
|
| 31 |
---
|
| 32 |
|
| 33 |
|
| 34 |
-
# `quickmt-en-
|
| 35 |
|
| 36 |
-
`quickmt-en-
|
| 37 |
|
| 38 |
|
| 39 |
## Model Information
|
|
@@ -42,7 +42,7 @@ model-index:
|
|
| 42 |
* 185M parameter transformer 'big' with 8 encoder layers and 2 decoder layers
|
| 43 |
* 20k sentencepiece vocabularies
|
| 44 |
* Exported for fast inference to [CTranslate2](https://github.com/OpenNMT/CTranslate2) format
|
| 45 |
-
* Training data: https://huggingface.co/datasets/quickmt/quickmt-train.
|
| 46 |
|
| 47 |
See the `eole` model configuration in this repository for further details and the `eole-model` for the raw `eole` (pytorch) model.
|
| 48 |
|
|
@@ -57,7 +57,7 @@ Next, install the `quickmt` python library and download the model:
|
|
| 57 |
git clone https://github.com/quickmt/quickmt.git
|
| 58 |
pip install ./quickmt/
|
| 59 |
|
| 60 |
-
quickmt-model-download quickmt/quickmt-en-
|
| 61 |
```
|
| 62 |
|
| 63 |
Finally use the model in python:
|
|
@@ -73,29 +73,15 @@ sample_text = 'Dr. Ehud Ur, professor of medicine at Dalhousie University in Hal
|
|
| 73 |
t(sample_text, beam_size=5)
|
| 74 |
```
|
| 75 |
|
| 76 |
-
> 'Доктор Эхуд Ур, профессор медицины в Университете Далхаузи в Галифаксе, Новая Шотландия, и председатель клинического и научного отдела Канадской диабетической ассоциации предупредил, что исследование все еще находится на ранних этапах.'
|
| 77 |
-
|
| 78 |
-
```python
|
| 79 |
-
# Get alternative translations by sampling
|
| 80 |
-
# You can pass any cTranslate2 `translate_batch` arguments
|
| 81 |
-
t([sample_text], sampling_temperature=1.2, beam_size=1, sampling_topk=50, sampling_topp=0.9)
|
| 82 |
-
```
|
| 83 |
-
|
| 84 |
-
> 'Доктор Ehud Ур (Ehud Ur), профессор медицины в университете Далхаузи в Галифаксе, Новая Шотландия, а также профессор кафедры клинической и научной литературы Канадской диабетической ассоциации предупреждает, что исследование еще проводится в ранние годы работы.'
|
| 85 |
-
|
| 86 |
-
|
| 87 |
-
The model is in `ctranslate2` format, and the tokenizers are `sentencepiece`, so you can use `ctranslate2` directly instead of through `quickmt`. It is also possible to get this model to work with e.g. [LibreTranslate](https://libretranslate.com/) which also uses `ctranslate2` and `sentencepiece`.
|
| 88 |
-
|
| 89 |
-
|
| 90 |
## Metrics
|
| 91 |
|
| 92 |
-
`bleu` and `chrf2` are calculated with [sacrebleu](https://github.com/mjpost/sacrebleu) on the [Flores200 `devtest` test set](https://huggingface.co/datasets/facebook/flores) ("eng_Latn"->"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 93 |
|
| 94 |
-
| | bleu | chrf2 | comet22 | Time (s) |
|
| 95 |
-
|:---------------------------------|-------:|--------:|----------:|-----------:|
|
| 96 |
-
| quickmt/quickmt-en-ru | 32.29 | 59.12 | 87.77 | 1.43 |
|
| 97 |
-
| Helsink-NLP/opus-mt-en-ru | 26.59 | 54.91 | 85.26 | 4.37 |
|
| 98 |
-
| facebook/nllb-200-distilled-600M | 28.79 | 56.58 | 87.58 | 26.71 |
|
| 99 |
-
| facebook/nllb-200-distilled-1.3B | 31.5 | 58.63 | 89.26 | 46.57 |
|
| 100 |
-
| facebook/m2m100_418M | 23.16 | 51.73 | 82.12 | 20.51 |
|
| 101 |
-
| facebook/m2m100_1.2B | 28.88 | 56.61 | 87 | 41.15 |
|
|
|
|
| 1 |
---
|
| 2 |
language:
|
| 3 |
- en
|
| 4 |
+
- pt
|
| 5 |
tags:
|
| 6 |
- translation
|
| 7 |
license: cc-by-4.0
|
| 8 |
datasets:
|
| 9 |
+
- quickmt/quickmt-train.pt-en
|
| 10 |
model-index:
|
| 11 |
+
- name: quickmt-en-pt
|
| 12 |
results:
|
| 13 |
- task:
|
| 14 |
+
name: Translation eng-por
|
| 15 |
type: translation
|
| 16 |
+
args: eng-por
|
| 17 |
dataset:
|
| 18 |
name: flores101-devtest
|
| 19 |
type: flores_101
|
| 20 |
+
args: eng_Latn por_Latn devtest
|
| 21 |
metrics:
|
| 22 |
- name: BLEU
|
| 23 |
type: bleu
|
| 24 |
+
value: 50.62
|
| 25 |
- name: CHRF
|
| 26 |
type: chrf
|
| 27 |
+
value: 71.79
|
| 28 |
- name: COMET
|
| 29 |
type: comet
|
| 30 |
+
value: 89.27
|
| 31 |
---
|
| 32 |
|
| 33 |
|
| 34 |
+
# `quickmt-en-pt` Neural Machine Translation Model
|
| 35 |
|
| 36 |
+
`quickmt-en-pt` is a reasonably fast and reasonably accurate neural machine translation model for translation from `en` into `pt`.
|
| 37 |
|
| 38 |
|
| 39 |
## Model Information
|
|
|
|
| 42 |
* 185M parameter transformer 'big' with 8 encoder layers and 2 decoder layers
|
| 43 |
* 20k sentencepiece vocabularies
|
| 44 |
* Exported for fast inference to [CTranslate2](https://github.com/OpenNMT/CTranslate2) format
|
| 45 |
+
* Training data: https://huggingface.co/datasets/quickmt/quickmt-train.pt-en/tree/main
|
| 46 |
|
| 47 |
See the `eole` model configuration in this repository for further details and the `eole-model` for the raw `eole` (pytorch) model.
|
| 48 |
|
|
|
|
| 57 |
git clone https://github.com/quickmt/quickmt.git
|
| 58 |
pip install ./quickmt/
|
| 59 |
|
| 60 |
+
quickmt-model-download quickmt/quickmt-en-pt ./quickmt-en-pt
|
| 61 |
```
|
| 62 |
|
| 63 |
Finally use the model in python:
|
|
|
|
| 73 |
t(sample_text, beam_size=5)
|
| 74 |
```
|
| 75 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 76 |
## Metrics
|
| 77 |
|
| 78 |
+
`bleu` and `chrf2` are calculated with [sacrebleu](https://github.com/mjpost/sacrebleu) on the [Flores200 `devtest` test set](https://huggingface.co/datasets/facebook/flores) ("eng_Latn"->"por_Latn"). `comet22` with the [`comet`](https://github.com/Unbabel/COMET) library and the [default model](https://huggingface.co/Unbabel/wmt22-comet-da). "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).
|
| 79 |
+
|
| 80 |
+
| | bleu | chrfs | comet | time |
|
| 81 |
+
|:---------------------------------|-------:|--------:|--------:|-------:|
|
| 82 |
+
| quickmt-en-pt | 50.62 | 71.79 | 89.27 | 0.97 |
|
| 83 |
+
| facebook/nllb-200-distilled-600M | 47.68 | 70.28 | 89.05 | 23.75 |
|
| 84 |
+
| facebook/nllb-200-distilled-1.3B | 48.92 | 70.96 | 89.77 | 41.13 |
|
| 85 |
+
| facebook/m2m100_418M | 41.14 | 65.85 | 85.49 | 19.08 |
|
| 86 |
+
| facebook/m2m100_1.2B | 46.56 | 69.41 | 88.53 | 37.42 |
|
| 87 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|