CoolFace
Modelpublic

SandeepVvigneshwar/sentiment-classification-albert-large-v2

sourceHugging Faceapache-2.0updated 2y agoView on Hugging Face
0likes9downloads
Model Card

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

MetricValue
Evaluation Loss0.08795
Evaluation Accuracy94.15%
Evaluation Precision94.90%
Evaluation Recall94.15%
Evaluation F1-Score94.25%

How to Get Started

Use the code below to get started with the model.

python
from transformers import pipeline

emotion_classifier = pipeline("text-classification", model="SandeepVvigneshwar/sentiment-classification-albert-large-v2")

text = "Hello! How are you?"
emotion = emotion_classifier(text)
print(emotion)

Requirements

  • Python 3.x
  • Hugging Face transformers library
  • PyTorch or TensorFlow

Training Data

dair-ai/emotion

Training Hyperparameters
  • learning_rate = 2e-5
  • perdevicetrainbatchsize = 8
  • perdeviceevalbatchsize = 8
  • gradientaccumulationsteps = 2
  • numtrainepochs = 8
  • weight_decay = 0.01
  • fp16 = True
  • metricforbest_model = "f1"
  • dataloadernumworkers = 4
  • maxgradnorm = 1.0
  • lrschedulertype = "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.