Translation
LiteRT
Safetensors
Spanish
Catalan
marian
odegiber commited on
Commit
c9df7d2
·
verified ·
1 Parent(s): 44b4f93

Create README.md

Browse files
Files changed (1) hide show
  1. README.md +48 -0
README.md ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ datasets:
4
+ - Helsinki-NLP/tatoeba
5
+ - openlanguagedata/flores_plus
6
+ - facebook/bouquet
7
+ language:
8
+ - es
9
+ - ca
10
+ metrics:
11
+ - bleu
12
+ - comet
13
+ - chrf
14
+ pipeline_tag: translation
15
+ ---
16
+
17
+ # OPUS-MT-tiny-cat-spa
18
+
19
+ Distilled model from a Tatoeba-MT Teacher: [Tatoeba-MT-models/itc-deu+eng+fra+por+spa/opusTCv20230926max50+bt+jhubc_transformer-big_2024-05-30](https://object.pouta.csc.fi/Tatoeba-MT-models/itc-deu+eng+fra+por+spa/opusTCv20230926max50+bt+jhubc_transformer-big_2024-05-30.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.ca-es.yml).
24
+
25
+ ## How to run
26
+ ```python
27
+ from transformers import MarianMTModel, MarianTokenizer
28
+ model_name = "Helsinki-NLP/opus-mt_tiny_cat-spa"
29
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
30
+ model = MarianMTModel.from_pretrained(model_name)
31
+ tok = tokenizer("El concepte prové de la Xina, on la flor del cirerer era la més apreciada.", 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+ | 24.7 | 53.4 | 0.8264 |
41
+
42
+ ### Student
43
+
44
+ | testset | BLEU | chr-F | COMET |
45
+ |-----------------------|-------|-------|-------|
46
+ | Flores+ | 24.2 | 53.2 | 0.8484 |
47
+
48
+