Sentiment classification using Albert-large-v2
Model Description
This model is a fine-tuned version of the ALBERT-Large model designed for emotion sentiment classification, capable of detecting six different emotional categories in text: Anger, Disgust, Fear, Happiness, Sadness, and Surprise. It achieves high performance on sentiment classification tasks, making it suitable for a variety of real-world applications such as emotion detection, content moderation, and sentiment analysis.
Evaluation
Metric | Value |
---|---|
Evaluation Loss | 0.08795 |
Evaluation Accuracy | 94.15% |
Evaluation Precision | 94.90% |
Evaluation Recall | 94.15% |
Evaluation F1-Score | 94.25% |
How to Get Started
Use the code below to get started with the model.
from transformers import pipeline
emotion_classifier = pipeline("text-classification", model="SandeepVvigneshwar/sentiment-classification-albert-large-v2")
text = "I am so happy to be part of this project!"
emotion = emotion_classifier(text)
print(emotion)
Requirements
- Python 3.x
- Hugging Face
transformers
library - PyTorch or TensorFlow
Training Data
Training Hyperparameters
- learning_rate = 2e-5
- per_device_train_batch_size = 8
- per_device_eval_batch_size = 8
- gradient_accumulation_steps = 2
- num_train_epochs = 8
- weight_decay = 0.01
- fp16 = True
- metric_for_best_model = "f1"
- dataloader_num_workers = 4
- max_grad_norm = 1.0
- lr_scheduler_type = "linear"
Limits
- Domain-specific Text: The model may not perform well on specialized or highly technical texts.
- Languages: The model has been fine-tuned on English-language data and may not generalize well to other languages.
- Input Length: The model performs best with shorter text inputs. For longer, more complex texts, performance may vary.
- Downloads last month
- 8
Inference Providers
NEW
This model is not currently available via any of the supported Inference Providers.
The model cannot be deployed to the HF Inference API:
The model has no library tag.
Model tree for SandeepVvigneshwar/sentiment-classification-albert-large-v2
Base model
albert/albert-large-v2Dataset used to train SandeepVvigneshwar/sentiment-classification-albert-large-v2
Evaluation results
- Accuracy on emotiontest set self-reported0.942
- Precision on emotiontest set self-reported0.949
- Recall on emotiontest set self-reported0.942
- F1 on emotiontest set self-reported0.943