Model card
The twitter-xlm-roberta-base-sentiment model is a multilingual transformer designed specifically for sentiment analysis on short-form social media text. Built on the XLM-RoBERTa architecture, it excels at detecting polarity (positive, negative, neutral) across multiple languages, making it an ideal choice for global brand monitoring or real-time community feedback loops. Unlike standard BERT models, this version is fine-tuned on noisy Twitter data, meaning it handles emojis, slang, and irregular syntax more effectively. For developers, it integrates seamlessly via the Hugging Face ecosystem, offering a lightweight footprint that balances inference speed with cross-lingual accuracy without requiring language-specific preprocessing pipelines.
Model files and versions
Download this model
We recommend using the ModelScope CLI or SDK. Install ModelScope first, then choose a full snapshot, single file, SDK or Git LFS workflow.
cardiffnlp/twitter-xlm-roberta-base-sentimentInstall the CLI and SDK dependency before downloading.
pip install modelscopeDownload the complete weights, configuration and model card.
modelscope download --model cardiffnlp/twitter-xlm-roberta-base-sentimentREADME.md is used as an example; replace it with another repository file when needed.
modelscope download --model cardiffnlp/twitter-xlm-roberta-base-sentiment README.md --local_dir ./dirUseful in Python projects and automation scripts.
from modelscope import snapshot_download
model_dir = snapshot_download('cardiffnlp/twitter-xlm-roberta-base-sentiment')Make sure Git LFS is installed correctly.
git lfs install
git clone https://www.modelscope.cn/cardiffnlp/twitter-xlm-roberta-base-sentiment.gitFetch the repository structure first, then pull large files when needed.
GIT_LFS_SKIP_SMUDGE=1 git clone https://www.modelscope.cn/cardiffnlp/twitter-xlm-roberta-base-sentiment.gitHow to use
- 01Step 1
Read the model card and source information.
- 02Step 2
Start with a small, non-sensitive evaluation.
- 03Step 3
Review quality, licensing and usage limits.
- 04Step 4
Adopt it only after validation.
Discussions
Use this space to keep checking source information, usage experience and maintenance status.
Open source page