Translation
Safetensors
English
Russian
marian
odegiber commited on
Commit
eb16bf6
·
verified ·
1 Parent(s): 8a3631f

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +50 -0
README.md ADDED
@@ -0,0 +1,50 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - Helsinki-NLP/tatoeba
5
+ - openlanguagedata/flores_plus
6
+ - facebook/bouquet
7
+ language:
8
+ - en
9
+ - ru
10
+ metrics:
11
+ - bleu
12
+ - comet
13
+ - chrf
14
+ pipeline_tag: translation
15
+ ---
16
+
17
+ # OPUS-MT-tiny-rus-eng
18
+
19
+ Distilled model from a Tatoeba-MT Teacher: [OPUS-MT-models/ru-en/opus-2020-02-26](https://object.pouta.csc.fi/OPUS-MT-models/ru-en/opus-2020-02-26.zip), which has been trained on the [Tatoeba](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/data) dataset.
20
+
21
+ We used the [OpusDistillery](https://github.com/Helsinki-NLP/OpusDistillery) to train new a new student with the tiny architecture, with a regular transformer decoder.
22
+ For training data, we used [Tatoeba](https://github.com/Helsinki-NLP/Tatoeba-Challenge/tree/master/data).
23
+ The configuration file fed into OpusDistillery can be found [here](https://github.com/Helsinki-NLP/OpusDistillery/blob/main/configs/opustranslate_hf/config.op.ru-en.yml).
24
+
25
+ ## How to run
26
+ ```python
27
+ from transformers import MarianMTModel, MarianTokenizer
28
+ model_name = "Helsinki-NLP/opus-mt_tiny_rus-eng"
29
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
30
+ model = MarianMTModel.from_pretrained(model_name)
31
+ tok = tokenizer("Это привело к тому, что два вида рыб вымерли, а два других, в том числе горбатый голавль, попали под угрозу исчезновения.", return_tensors="pt").input_ids
32
+ output = model.generate(tok)[0]
33
+ tokenizer.decode(output, skip_special_tokens=True)
34
+ ```
35
+
36
+ ## Benchmarks
37
+ ### Teacher
38
+ | testset | BLEU | chr-F | COMET|
39
+ |-----------------------|-------|-------|-------|
40
+ | Flores+ | 29.4 | 57.7| 0.8172 |
41
+ | Bouquet |33.4 | 56.6 |0.8235 |
42
+
43
+ ### Student
44
+
45
+ | testset | BLEU | chr-F | COMET |
46
+ |-----------------------|-------|-------|-------|
47
+ | Flores+ | 28.4 | 56.8 | 0.8220 |
48
+ | Bouquet |31.1|54.1| 0.8151 |
49
+
50
+