Downloads · 30 days
2
2% of all-time downloads
giovannibonisoli/sentiment-model
sentiment-model is a text classification model from giovannibonisoli. Use it when you need a label for a piece of text. It is set up for transformers.
libraryname: transformers tags: - sentiment-analysis - twitter - roberta - text-classification datasets: - tweeteval ---
Downloads · 30 days
2
2% of all-time downloads
All-time downloads
121
Public
Parameters
125M
499 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors499 MB · 99%
From the Hugging Face model README
library_name: transformers tags:
Fine-tuned RoBERTa model for sentiment analysis on tweets, trained on the TweetEval benchmark.
This model can be used for sentiment analysis on English tweets. It classifies text into three categories:
Users should be aware that this model is specifically trained on tweets and may not perform well on other types of text. For production use, consider fine-tuning on domain-specific data.
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="giovannibonisoli/sentiment-model")
result = classifier("I love this!")
# [{'label': 'positive', 'score': 0.98}]
TRAIN_SAMPLES env var)VALIDATION_SAMPLES env var)NUM_EPOCHS)TrainingArguments(
num_train_epochs=3,
per_device_train_batch_size=16,
per_device_eval_batch_size=16,
eval_strategy="epoch",
save_strategy="epoch",
load_best_model_at_end=True,
metric_for_best_model="macro_f1",
logging_steps=50
)
Final metrics after training: