Instructions to use armpln/finetuned_model_emotion_detection with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use armpln/finetuned_model_emotion_detection with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="armpln/finetuned_model_emotion_detection")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("armpln/finetuned_model_emotion_detection") model = AutoModelForSequenceClassification.from_pretrained("armpln/finetuned_model_emotion_detection") - Notebooks
- Google Colab
- Kaggle
finetuned_model_emotion_detection
This model is a fine-tuned version of jhu-clsp/mmBERT-base on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.3387
- F1 Macro: 0.5265
Model description
This model is a fine-tuned version of mmBERT for multi-label emotion classification in Spanish tweets.
The model was trained on the Spanish subset of the SemEval 2018 Task 1 Affect in Tweets dataset (Emotion Classification track). Given a tweet, the model predicts the presence or absence of eleven emotion categories:
anger anticipation disgust fear joy love optimism pessimism sadness surprise trust
The model is based on the multilingual transformer mmBERT and was fine-tuned using transfer learning with the Hugging Face Transformers library.
Intended uses & limitations
This model is intended for:
- Emotion detection in Spanish social media text.
- Sentiment and affect analysis experiments.
Limitations
- The model was trained exclusively on Twitter data and may not generalize well to other domains.
- Emotion labels are not exclusive; a tweet may express multiple emotions simultaneously.
- Performance may decrease on texts containing slang, spelling mistakes, code-switching, or cultural references not represented in the training data.
Training and evaluation data
More information needed
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 5e-05
- train_batch_size: 16
- eval_batch_size: 16
- seed: 42
- optimizer: Use OptimizerNames.ADAMW_TORCH_FUSED with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
- lr_scheduler_type: linear
- lr_scheduler_warmup_steps: 0.1
- num_epochs: 3
Training results
| Training Loss | Epoch | Step | Validation Loss | F1 Macro |
|---|---|---|---|---|
| No log | 1.0 | 223 | 0.2811 | 0.4049 |
| No log | 2.0 | 446 | 0.2685 | 0.4912 |
| 0.2496 | 3.0 | 669 | 0.3387 | 0.5265 |
Framework versions
- Transformers 5.12.1
- Pytorch 2.11.0+cu128
- Datasets 5.0.0
- Tokenizers 0.22.2
- Downloads last month
- 29
Model tree for armpln/finetuned_model_emotion_detection
Base model
jhu-clsp/mmBERT-base