Instructions to use josmunpen/mt5-small-spanish-summarization with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use josmunpen/mt5-small-spanish-summarization with Transformers:
# Use a pipeline as a high-level helper # Warning: Pipeline type "summarization" is no longer supported in transformers v5. # You must load the model directly (see below) or downgrade to v4.x with: # 'pip install "transformers<5.0.0' from transformers import pipeline pipe = pipeline("summarization", model="josmunpen/mt5-small-spanish-summarization")# Load model directly from transformers import AutoTokenizer, AutoModelForSeq2SeqLM tokenizer = AutoTokenizer.from_pretrained("josmunpen/mt5-small-spanish-summarization") model = AutoModelForSeq2SeqLM.from_pretrained("josmunpen/mt5-small-spanish-summarization") - Notebooks
- Google Colab
- Kaggle
mt5-small-spanish-summarization
Model description
This is a mt5-small model finetuned for generating headlines from the body of the news in Spanish.
Training data
The model was trained with 58425 news extracted from the La Razón (31477) and Público (26948) newspapers. These news belong to the following categories: "España", "Cultura", "Economía", "Igualdad" and "Política".
Training procedure
It was trained with Google Colab's GPU Tesla P100-PCIE-16GB for 2 epochs.
Hyperparameters
{evaluation_strategy = "epoch", learning_rate = 2e-4, per_device_train_batch_size = 6, per_device_eval_batch_size = 6, weight_decay = 0.01, save_total_limi t= 3, num_train_epochs = 2, predict_with_generate = True, fp16 = False}
Eval results
| metric | score |
|---|---|
| rouge1 | 44.03 |
| rouge2 | 28.2900 |
| rougeL | 40.54 |
| rougeLsum | 40.5587 |
BibTeX entry and citation info
@inproceedings{ mt5lrpjosmunpen,
year={2020},
}
- Downloads last month
- 360