Text Classification
Transformers
PyTorch
TensorBoard
roberta
Generated from Trainer
text-embeddings-inference
Instructions to use somosnlp-hackathon-2022/class-poems-es with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use somosnlp-hackathon-2022/class-poems-es with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="somosnlp-hackathon-2022/class-poems-es")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("somosnlp-hackathon-2022/class-poems-es") model = AutoModelForSequenceClassification.from_pretrained("somosnlp-hackathon-2022/class-poems-es") - Notebooks
- Google Colab
- Kaggle
classification-poems
This model is a fine-tuned version of BSC-TeMU/roberta-base-bne on the spanish Poems Dataset dataset. It achieves the following results on the evaluation set:
- Loss: 0.8228
- Accuracy: 0.7241
Model description
The model was trained to classify poems in Spanish, taking into account the content.
Training and evaluation data
The original dataset has the columns author, content, title, year and type of poem.
For each example, the type of poem it belongs to is identified. Then the model will recognize which type of poem the entered content belongs to.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-05
- train_batch_size: 2
- eval_batch_size: 2
- seed: 42
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
- lr_scheduler_type: linear
- num_epochs: 2
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|---|---|---|---|---|
| 0.9344 | 1.0 | 258 | 0.7505 | 0.7586 |
| 0.9239 | 2.0 | 516 | 0.8228 | 0.7241 |
Framework versions
- Transformers 4.17.0
- Pytorch 1.10.0+cu111
- Datasets 2.0.0
- Tokenizers 0.11.6
- Downloads last month
- 7
Model tree for somosnlp-hackathon-2022/class-poems-es
Base model
BSC-LT/roberta-base-bne