PhoBERT-Emotion: Emotion Recognition for Vietnamese Text

This model is a fine-tuned version of vinai/phobert-base on the VSMEC dataset for emotion recognition in Vietnamese text. It achieves competitive performance on this task.

Model Details

  • Base Model: vinai/phobert-base
  • Dataset: VSMEC (Vietnamese Social Media Emotion Corpus)
  • Fine-tuning Framework: HuggingFace Transformers
  • Hyperparameters:
    • Batch size: 32
    • Learning rate: 5e-5
    • Epochs: 100
    • Max sequence length: 256

Dataset

The model was trained on the VSMEC dataset, which contains Vietnamese social media text annotated with emotion labels. The dataset includes the following emotion categories: {"Anger": 0, "Disgust": 1, "Enjoyment": 2, "Fear": 3, "Other": 4, "Sadness": 5, "Surprise": 6}.

Results

The model was evaluated using the following metrics:

  • Accuracy: <INSERT_ACCURACY>
  • F1 Score: <INSERT_F1_SCORE>

Usage

You can use this model for emotion recognition in Vietnamese text. Below is an example of how to use it with the HuggingFace Transformers library:

from transformers import AutoTokenizer, AutoModelForSequenceClassification

tokenizer = AutoTokenizer.from_pretrained("visolex/phobert-emotion")
model = AutoModelForSequenceClassification.from_pretrained("visolex/phobert-emotion")

text = "Tôi rất vui vì hôm nay trời đẹp!"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
outputs = model(**inputs)
predicted_class = outputs.logits.argmax(dim=-1).item()

print(f"Predicted emotion: {predicted_class}")
Downloads last month
9
Safetensors
Model size
135M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for visolex/phobert-emotion

Base model

vinai/phobert-base
Finetuned
(111)
this model

Collection including visolex/phobert-emotion

Evaluation results