Downloads · 30 days
206
3% of all-time downloads
vgaraujov/t5-base-spanish
t5-base-spanish is a machine learning model from vgaraujov. Use it for the machine learning task on the model card, and read the license before you ship it in a product. It is set up for transformers. The card lists the license as apache-2.0.
T5S model pre-trained on Spanish language. It was introduced in the paper Sequence-to-Sequence Spanish Pre-trained Language Models.
Downloads · 30 days
206
3% of all-time downloads
All-time downloads
8.2K
Public
Parameters
248M
3 GB on disk
Likes
6
Public
Click a slice to open those files.
.bin990 MB · 50%
From the Hugging Face model README
T5S model pre-trained on Spanish language. It was introduced in the paper Sequence-to-Sequence Spanish Pre-trained Language Models.
T5S is a T5 Version 1.1 model (transformer encoder-decoder) with a bidirectional (BERT-like) encoder and an autoregressive (GPT-like) decoder, which includes the following improvements compared to the original T5 model:
GEGLU activation in feed-forward hidden layer, rather than ReLU.
Dropout was turned off in pre-training (quality win). Dropout should be re-enabled during fine-tuning.
Pre-trained only on unlabeled corpus without mixing in the downstream tasks.
no parameter sharing between embedding and classifier layer
T5S is particularly effective when fine-tuned for text generation (e.g. summarization, translation) or comprehension tasks (e.g. text classification, question answering) using text-to-text format.
Here is how to use this model in PyTorch:
from transformers import T5Tokenizer, T5Model
tokenizer = T5Tokenizer.from_pretrained("vgaraujov/t5-base-spanish")
model = T5Model.from_pretrained("vgaraujov/t5-base-spanish")
input_ids = tokenizer(
"Estudios han demostrado que tener un perro es bueno para la salud", return_tensors="pt"
).input_ids # Batch size 1
decoder_input_ids = tokenizer("Estudios demuestran que", return_tensors="pt").input_ids # Batch size 1
# forward pass
outputs = model(input_ids=input_ids, decoder_input_ids=decoder_input_ids)
last_hidden_states = outputs.last_hidden_state
@misc{araujo2023sequencetosequence,
title={Sequence-to-Sequence Spanish Pre-trained Language Models},
author={Vladimir Araujo and Maria Mihaela Trusca and Rodrigo Tufiño and Marie-Francine Moens},
year={2023},
eprint={2309.11259},
archivePrefix={arXiv},
primaryClass={cs.CL}
}