Update README.md
Browse files
README.md
CHANGED
|
@@ -14,7 +14,7 @@ metrics:
|
|
| 14 |
pipeline_tag: translation
|
| 15 |
---
|
| 16 |
|
| 17 |
-
# OPUS-MT-tiny-
|
| 18 |
|
| 19 |
Distilled model from a Tatoeba-MT Teacher: [OPUS-MT-models/en-de/opus-2020-02-26](https://object.pouta.csc.fi/OPUS-MT-models/en-de/opus-2020-02-26.zip), which has been trained on the [Tatoeba](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/data) dataset.
|
| 20 |
|
|
@@ -25,7 +25,7 @@ The configuration file fed into OpusDistillery can be found [here](https://githu
|
|
| 25 |
## How to run
|
| 26 |
```python
|
| 27 |
from transformers import MarianMTModel, MarianTokenizer
|
| 28 |
-
model_name = "Helsinki-NLP/opus-
|
| 29 |
tokenizer = MarianTokenizer.from_pretrained(model_name)
|
| 30 |
model = MarianMTModel.from_pretrained(model_name)
|
| 31 |
tok = tokenizer("Hello, how are you?", return_tensors="pt").input_ids
|
|
@@ -48,3 +48,13 @@ tokenizer.decode(output, skip_special_tokens=True)
|
|
| 48 |
| Bouquet | 31.8 | 58.2 | 0.8260 |
|
| 49 |
|
| 50 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 14 |
pipeline_tag: translation
|
| 15 |
---
|
| 16 |
|
| 17 |
+
# OPUS-MT-tiny-eng-deu
|
| 18 |
|
| 19 |
Distilled model from a Tatoeba-MT Teacher: [OPUS-MT-models/en-de/opus-2020-02-26](https://object.pouta.csc.fi/OPUS-MT-models/en-de/opus-2020-02-26.zip), which has been trained on the [Tatoeba](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/data) dataset.
|
| 20 |
|
|
|
|
| 25 |
## How to run
|
| 26 |
```python
|
| 27 |
from transformers import MarianMTModel, MarianTokenizer
|
| 28 |
+
model_name = "Helsinki-NLP/opus-mt_tiny_eng-deu"
|
| 29 |
tokenizer = MarianTokenizer.from_pretrained(model_name)
|
| 30 |
model = MarianMTModel.from_pretrained(model_name)
|
| 31 |
tok = tokenizer("Hello, how are you?", return_tensors="pt").input_ids
|
|
|
|
| 48 |
| Bouquet | 31.8 | 58.2 | 0.8260 |
|
| 49 |
|
| 50 |
|
| 51 |
+
## Marian models
|
| 52 |
+
|
| 53 |
+
We also provide Marian-compatible versions of this model. To use them, compile [Marian](https://marian-nmt.github.io/quickstart/) and run decoding with `marian-decoder`, for example:
|
| 54 |
+
|
| 55 |
+
```bash
|
| 56 |
+
marian-decoder \
|
| 57 |
+
-i input.txt \
|
| 58 |
+
-c final.model.npz.best-perplexity.npz.decoder.yml \
|
| 59 |
+
-m final.model.npz.best-perplexity.npz \
|
| 60 |
+
-v vocab.spm vocab.spm
|