xlm_emo_multi / README.md
msgfrom96's picture
Update README.md
5fa90c4 verified
---
license: mit
datasets:
- SemEvalWorkshop/sem_eval_2018_task_1
language:
- en
- ar
base_model:
- FacebookAI/xlm-roberta-base
pipeline_tag: text-classification
---
🌍 XLM-R Multi-Emotion Classifier 🎭
πŸš€ Mission Statement
The XLM-R Multi-Emotion Classifier is built to understand human emotions across multiple languages, helping researchers, developers, and businesses analyze sentiment in text at scale.
From social media monitoring to mental health insights, this model is designed to decode emotions with accuracy and fairness.
🎯 Vision
Our goal is to create an AI-powered emotion recognition model that:
β€’ 🌎 Understands emotions across cultures and languages
β€’ πŸ€– Bridges the gap between AI and human psychology
β€’ πŸ’‘ Empowers businesses, researchers, and developers to extract valuable insights from text
πŸ— Model Overview
Model Name: msgfrom96/xlm_emo_multi
Architecture: XLM-RoBERTa (Multi-Lingual Transformer)
Task: Multi-label Emotion Classification
Languages: English, Arabic
Dataset: SemEval-2018 Task 1: Affect in Tweets
The model predicts multiple emotions per text using multi-label classification. It can recognize emotions like:
β€’ 🎭 Anger, Anticipation, Disgust, Fear, Joy, Sadness, Surprise, Trust, Love, Optimism, Pessimism
πŸ“¦ How to Use
Load Model and Tokenizer
from transformers import AutoModelForSequenceClassification, AutoTokenizer
model_name = "msgfrom96/xlm_emo_multi"
# Load model and tokenizer
model = AutoModelForSequenceClassification.from_pretrained(model_name)
tokenizer = AutoTokenizer.from_pretrained(model_name)
# Example text
text = "I can't believe how amazing this is! So happy and excited!"
# Tokenize input
inputs = tokenizer(text, return_tensors="pt", padding=True, truncation=True)
# Get model predictions
outputs = model(**inputs)
print(outputs.logits) # Raw emotion scores
Interpreting Results
The model outputs logits (raw scores) for each emotion. Apply a sigmoid activation to convert these into probabilities:
import torch
probs = torch.sigmoid(outputs.logits)
print(probs)
Each score represents the probability of an emotion being present in the text.
⚑ Training & Fine-Tuning Details
β€’ Base Model: XLM-RoBERTa (xlm-roberta-base) πŸ“–
β€’ Dataset: SemEval-2018 (English & Arabic Tweets) πŸ—‚
β€’ Training Strategy: Multi-label classification πŸ”₯
β€’ Optimizer: AdamW βš™οΈ
β€’ Batch Size: 16 πŸ‹οΈβ€β™‚οΈ
β€’ Learning Rate: 2e-5 🎯
β€’ Hardware: Trained on AWS SageMaker with CUDA GPU support πŸš€
β€’ Evaluation Metric: Macro-F1 & Micro-F1 πŸ“Š
β€’ Best Model Selection: Auto-selected via load_best_model_at_end=True βœ…
πŸ“œ Citations & References
If you use this model, please cite the following sources:
πŸ“Œ SemEval-2018 Dataset
Mohammad, S., Bravo-Marquez, F., Salameh, M., & Kiritchenko, S. (2018). β€œSemEval-2018 Task 1: Affect in Tweets.” Proceedings of SemEval-2018.
πŸ“– Paper Link
πŸ“Œ XLM-RoBERTa
Conneau, A., Khandelwal, K., Goyal, N., Chaudhary, V., Wenzek, G., GuzmΓ‘n, F., Grave, E., Ott, M., Zettlemoyer, L., & Stoyanov, V. (2020). β€œUnsupervised Cross-lingual Representation Learning at Scale.” Proceedings of ACL 2020.
πŸ“– Paper Link
πŸ“Œ Transformers Library
Hugging Face (2020). β€œπŸ€— Transformers: State-of-the-art Natural Language Processing for Pytorch and TensorFlow 2.0.”
πŸ“– Library Docs
🀝 Contributing
Want to improve the model? Feel free to:
β€’ Train it on more languages 🌍
β€’ Optimize for low-resource devices πŸ”₯
β€’ Integrate it into real-world applications πŸ’‘
β€’ Submit pull requests or discussions πŸš€
πŸ† Acknowledgments
Special thanks to the Hugging Face team, SemEval organizers, and the NLP research community for providing the tools and datasets that made this model possible. πŸ™Œ
πŸ”— Connect & Feedback
πŸ’¬ Questions? Issues? Create a discussion on the Hugging Face Model Hub
πŸ“§ Email: [email protected]
---
license: mit
---