Instructions to use cardiffnlp/twitter-xlm-roberta-base-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use cardiffnlp/twitter-xlm-roberta-base-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="cardiffnlp/twitter-xlm-roberta-base-sentiment")# Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment") model = AutoModelForSequenceClassification.from_pretrained("cardiffnlp/twitter-xlm-roberta-base-sentiment", device_map="auto") - Inference
- Notebooks
- Google Colab
- Kaggle
Model fails to load `ValueError: Converting from SentencePiece and Tiktoken failed`
#16
by MauroExtrac - opened
If you encounter this error, it seems that the culprit is protobuf>3.20.0. Is there any other way to fix this?