Downloads · 30 days
45
1% of all-time downloads
somosnlp-hackathon-2022/t5-small-finetuned-spanish-to-quechua
t5-small-finetuned-spanish-to-quechua is a translation model from somosnlp-hackathon-2022. Use it when you need text moved from one language to another. It is set up for transformers. The card lists the license as apache-2.0.
This model is a finetuned version of the t5-small.
Downloads · 30 days
45
1% of all-time downloads
All-time downloads
5.4K
Public
Parameters
60.5M
485 MB on disk
Likes
9
Public
Click a slice to open those files.
.bin242 MB · 50%
From the Hugging Face model README
This model is a finetuned version of the t5-small.
t5-small-finetuned-spanish-to-quechua has trained for 46 epochs with 102 747 sentences, the validation was performed with 12 844 sentences and 12 843 sentences were used for the test.
A large part of the dataset has been extracted from biblical texts, which makes the model perform better with certain types of sentences.
You can import this model as follows:
>>> from transformers import AutoModelForSeq2SeqLM, AutoTokenizer
>>> model_name = 'hackathon-pln-es/t5-small-finetuned-spanish-to-quechua'
>>> model = AutoModelForSeq2SeqLM.from_pretrained(model_name)
>>> tokenizer = AutoTokenizer.from_pretrained(model_name)
To translate you can do:
>>> sentence = "Entonces dijo"
>>> input = tokenizer(sentence, return_tensors="pt")
>>> output = model.generate(input["input_ids"], max_length=40, num_beams=4, early_stopping=True)
>>> print('Original Sentence: {} \nTranslated sentence: {}'.format(sentence, tokenizer.decode(output[0])))
Actually this model only can translate to Quechua of Ayacucho.
For train this model we use Spanish to Quechua dataset
We obtained the following metrics during the training process: