File size: 1,481 Bytes
a7497fe
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
---
language:
- es
base_model: google/mt5-small
tags:
- text-generation
- grammatical-error-detection
- mt5
- GED
datasets:
- Ro551/WikiCorrupted_spanish_to_GEC-GED
pipeline_tag: text-generation
---
                            
# mt5-small_ForConditionalGenerationto_GED-es
Este modelo está basado en [mT5](https://huggingface.co/models?search=mt5) y ha sido ajustado para realizar la deteccion de errores gramaticales en español.
                          
## Uso
```python
from transformers import AutoTokenizer, AutoModelForSeq2SeqLM

model = AutoModelForSeq2SeqLM.from_pretrained("mt5-small_ForConditionalGenerationto_GED-es")
tokenizer = AutoTokenizer.from_pretrained("mt5-small_ForConditionalGenerationto_GED-es")

inputs = tokenizer("Texto con errores gramatical", return_tensors="pt")
outputs = model.generate(**inputs)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))
```                        
 ## 🧪Metricas por epoca

|   epoch |   loss |    wer |
|---------|--------|--------|
|       1 | 0.2663 | 0.0648 |
|       2 | 0.0473 | 0.0416 |
|       3 | 0.0265 | 0.0349 |
## Evaluacion
La metrica utilizada es WER (Word Error Rate) sobre las secuencias generadas.
![Loss & WER](training_history.png)

                            
## Entrenamiento
 Este modelo fue entrenado utilizando Hugging Face Transformers, Datasets y Accelerate. El dataset fue generado sinteticamente para la tarea de correccion/deteccion de errores gramaticales (GEC) en español.