anegda commited on
Commit
5f5b552
1 Parent(s): abe9e19

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +141 -3
README.md CHANGED
@@ -1,3 +1,141 @@
1
- ---
2
- license: apache-2.0
3
- ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - gl
5
+ - eu
6
+ metrics:
7
+ - BLEU
8
+ - TER
9
+ ---
10
+ ## Hitz Center’s Galician-Basque machine translation model
11
+
12
+ ## Model description
13
+
14
+ This model was trained from scratch using [Marian NMT](https://marian-nmt.github.io/) on a combination of Galician-Basque datasets totalling 13,125,745 sentence pairs. 413,057 sentence pairs were parallel data collected from the web while the remaining 12,712,688 sentence pairs were parallel synthetic data. The model was evaluated on the Flores, TaCon and NTREX evaluation datasets.
15
+
16
+ - **Developed by:** HiTZ Research Center & IXA Research group (University of the Basque Country UPV/EHU)
17
+ - **Model type:** traslation
18
+ - **Source Language:** Galician
19
+ - **Target Language:** Basque
20
+ - **License:** apache-2.0
21
+
22
+ ## Intended uses and limitations
23
+
24
+ You can use this model for machine translation from Galician to Basque.
25
+
26
+ At the time of submission, no measures have been taken to estimate the bias and toxicity embedded in the model. However, we are aware that our models may be biased since the corpora have been collected using crawling techniques on multiple web sources.
27
+
28
+ ## How to Get Started with the Model
29
+
30
+ Use the code below to get started with the model.
31
+
32
+ ```
33
+ from transformers import MarianMTModel, MarianTokenizer
34
+ from transformers import AutoTokenizer
35
+ from transformers import AutoModelForSeq2SeqLM
36
+
37
+ src_text = ["Esta é unha proba."]
38
+
39
+ model_name = "HiTZ/mt-hitz-gl-eu"
40
+ tokenizer = MarianTokenizer.from_pretrained(model_name)
41
+
42
+ model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
43
+ translated = model.generate(**tokenizer(src_text, return_tensors="pt", padding=T
44
+ rue))
45
+ print([tokenizer.decode(t, skip_special_tokens=True) for t in translated])`
46
+ ```
47
+ The recommended environments include the following transfomer versions: 4.12.3 , 4.15.0 , 4.26.1
48
+ ## Training Details
49
+
50
+ ### Training Data
51
+
52
+ The Galician-Basque data collected from the web was a combination of the following datasets:
53
+
54
+
55
+ | Dataset | Sentences before cleaning |
56
+ |-----------------------|--------------------------:|
57
+ | XLENT | 236,460 |
58
+ | KDE4 | 96,509 |
59
+ | WikiMatrix | 43,101 |
60
+ | GNOME | 12,759 |
61
+ | OpenSubtitles | 12,391 |
62
+ | QED | 5,524 |
63
+ | Ubuntu | 3,051 |
64
+ | TED2020 v1 | 2,433 |
65
+ | NeuLab-TedTalks | 804 |
66
+ | ELRC-wikipedia_health | 25 |
67
+ | **Total** | **413,057** |
68
+
69
+ The 12,712,688 sentence pairs of synthetic parallel data were created, on the one hand, by translating into Galician a compendium of ES-EU parallel corpora of 9,692,996 sentence pairs ([using the ES-GL translator of the Nos project](https://huggingface.co/proxectonos/Nos_MT-OpenNMT-es-gl)) and, on the other hand, by adapting into Galician 3,019,692 sentences in Portuguese from a PT-EU corpus (using the rule-base translator [Apertium](https://www.apertium.org/) with the support of the transliterator [Port2Gal](https://github.com/gamallo/port2g))
70
+
71
+
72
+ ### Training Procedure
73
+
74
+ #### Preprocessing
75
+
76
+ After concatenation, all datasets are cleaned and deduplicated using [bifixer](https://github.com/bitextor/bifixer) [(Ramírez-Sánchez et al., 2020)](https://aclanthology.org/2020.eamt-1.31/) for identifying repetions and cleaning encoding problems and LaBSE embeddings to filter missaligned sentences. Any sentence pairs with a LaBSE similarity score of less than 0.5 is removed. The filtered corpus is composed of 12,699,402 parallel sentences.
77
+
78
+ #### Tokenization
79
+ All data is tokenized using sentencepiece, with a 32,000 token sentencepiece model learned from the combination of all filtered training data. This model is included.
80
+
81
+ ## Evaluation
82
+ ### Variable and metrics
83
+ We use the BLEU and TER scores for evaluation on test sets: [Flores-200](https://github.com/facebookresearch/flores/tree/main/flores200), [TaCon](https://elrc-share.eu/repository/browse/tacon-spanish-constitution-mt-test-set/84a96138b98611ec9c1a00155d02670628f3e6857b0f422abd82abc3795ec8c2/) and [NTREX](https://github.com/MicrosoftTranslator/NTREX)
84
+
85
+ ### Evaluation results
86
+ Below are the evaluation results on the machine translation from Galician to Basque compared to [Google Translate](https://translate.google.com/), [NLLB 200 3.3B](https://huggingface.co/facebook/nllb-200-3.3B) and [ NLLB-200's distilled 1.3B variant](https://huggingface.co/facebook/nllb-200-distilled-1.3B):
87
+
88
+ ####BLEU scores
89
+
90
+
91
+
92
+ | Test set |Google Translate | NLLB 1.3B | NLLB 3.3 |mt-hitz-gl-eu|
93
+ |----------------------|-----------------|-----------|----------|-------------|
94
+ | Flores 200 devtest |**17.0** | 12.7 | 12.5 | 16.7 |
95
+ | TaCON | 13.7 | 10.8 | 10.7 | **14.1** |
96
+ | NTREX | **14.0** | 10.6 | 9.5 | 13.3 |
97
+ | Average | **14.9** | 11.4 | 10.9 | 14.7 |
98
+
99
+ ####TER scores
100
+
101
+ | Test set |Google Translate | NLLB 1.3B | NLLB 3.3 |mt-hitz-gl-eu|
102
+ |----------------------|-----------------|-----------|----------|-------------|
103
+ | Flores 200 devtest |**64.4** | 77.8 | 72.0 | 66.5 |
104
+ | TaCON |**64.2** | 81.7 | 73.2 | 65.4 |
105
+ | NTREX |**68.9** | 79.4 | 77.2 | 70.0 |
106
+ | Average |**65.8** | 79.6 | 74.1 | 67.3 |
107
+
108
+
109
+
110
+ <!-- Momentuz ez dugu artikulurik. ILENIAn zerbait egiten bada eguneratu beharko da -->
111
+
112
+ <!--
113
+ ## Citation [optional]
114
+
115
+ <!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. - ->
116
+
117
+ **BibTeX:**
118
+
119
+ [More Information Needed]
120
+
121
+ **APA:**
122
+
123
+ [More Information Needed]
124
+ -->
125
+
126
+ ## Additional information
127
+ ### Author
128
+ HiTZ Research Center & IXA Research group (University of the Basque Country UPV/EHU)
129
+ ### Contact information
130
+ For further information, send an email to <hitz@ehu.eus>
131
+ ### Licensing information
132
+ This work is licensed under a [Apache License, Version 2.0](https://www.apache.org/licenses/LICENSE-2.0)
133
+ ### Funding
134
+ This work is funded by the Ministerio para la Transformación Digital y de la Función Pública - Funded by EU – NextGenerationEU within the framework of the [project ILENIA](https://proyectoilenia.es/) with reference 2022/TL22/00215337, 2022/TL22/00215336, 2022/TL22/00215335 y 2022/TL22/00215334
135
+ ### Disclaimer
136
+ <details>
137
+ <summary>Click to expand</summary>
138
+ The models published in this repository are intended for a generalist purpose and are available to third parties. These models may have bias and/or any other undesirable distortions.
139
+ When third parties, deploy or provide systems and/or services to other parties using any of these models (or using systems based on these models) or become users of the models, they should note that it is their responsibility to mitigate the risks arising from their use and, in any event, to comply with applicable regulations, including regulations regarding the use of Artificial Intelligence.
140
+ In no event shall the owner and creator of the models (HiTZ Research Center) be liable for any results arising from the use made by third parties of these models.
141
+ </details>