Instructions to use amaan00z/emotion_xlmr3 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use amaan00z/emotion_xlmr3 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="amaan00z/emotion_xlmr3")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("amaan00z/emotion_xlmr3") model = AutoModelForSequenceClassification.from_pretrained("amaan00z/emotion_xlmr3", device_map="auto") - Notebooks
- Google Colab
- Kaggle
emotion_xlmr3
This model is a fine-tuned version of xlm-roberta-base on the None dataset. It achieves the following results on the evaluation set:
- Loss: 0.0471
- Accuracy: 0.9875
- F1: 0.9850
Model description
Hinglish Emotion Detection Model (XLM-RoBERTa Base — Fine-Tuned)
Version: 1.0 Author: Amaan Shaikh (amaan00z) Languages: Hinglish (Hindi–English code-mixed) Labels: anger (0), fear (1), disgust (2), sadness (3), disapproval (4), surprise (5), admiration (6), joy (7), love (8), neutral (9)
✨ Model Summary
This model is a Transformer-based Hinglish Emotion Classifier, fine-tuned on a high-quality 25,689-sample dataset designed specifically for real-world Indian social-media text.
It is built using XLM-RoBERTa Base, which performs strongly on multilingual and code-mixed text.
🎯 Labels
The model predicts 10 emotions:
ID Label
0 anger 1 fear 2 disgust 3 sadness 4 disapproval 5 surprise 6 admiration 7 joy 8 love 9 neutral
Training and evaluation data
This model was trained on a curated, cleaned, balanced Hinglish emotion dataset, including:
✅ 24,500 manually cleaned Hinglish emotion samples ✅ Additional 3,000 refined sarcastic emotion-enhanced Hinglish samples ✅ Removal of duplicates & noisy samples ✅ Emoji-heavy and Gen-Z slang patterns included
Dataset Source: (Add your Kaggle link)
🎯 Labels
The model predicts 10 emotions:
ID Label
0 anger 1 fear 2 disgust 3 sadness 4 disapproval 5 surprise 6 admiration 7 joy 8 love 9 neutral
citation
Shaikh, Amaan. (2025). Hinglish Emotion Detection Model (XLM-R). https://huggingface.co/amaan00z/emotion-hinglish-xlmr
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 2e-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
- num_epochs: 4
- mixed_precision_training: Native AMP
Training results
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 |
|---|---|---|---|---|---|
| 0.1204 | 1.0 | 1445 | 0.0718 | 0.9833 | 0.9801 |
| 0.0788 | 2.0 | 2890 | 0.0521 | 0.9840 | 0.9809 |
| 0.045 | 3.0 | 4335 | 0.0481 | 0.9875 | 0.9849 |
| 0.0205 | 4.0 | 5780 | 0.0471 | 0.9875 | 0.9850 |
Framework versions
- Transformers 4.57.1
- Pytorch 2.8.0+cu126
- Datasets 4.0.0
- Tokenizers 0.22.1
- Downloads last month
- 11
Model tree for amaan00z/emotion_xlmr3
Base model
FacebookAI/xlm-roberta-base