dair-ai/emotion
Viewer • Updated • 437k • 33.2k • 440
How to use Jorgeutd/sagemaker-roberta-base-emotion with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Jorgeutd/sagemaker-roberta-base-emotion") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Jorgeutd/sagemaker-roberta-base-emotion")
model = AutoModelForSequenceClassification.from_pretrained("Jorgeutd/sagemaker-roberta-base-emotion")This model is a fine-tuned model that was trained using Amazon SageMaker and the new Hugging Face Deep Learning container.
It achieves the following results on the evaluation set:
{
"epochs": 10,
"train_batch_size": 16,
"learning_rate": 3e-5,
"weight_decay":0.01,
"load_best_model_at_end": true,
"model_name":"roberta-base",
"do_eval": True,
"load_best_model_at_end":True
}
| key | value |
|---|---|
| eval_accuracy | 0.941 |
| eval_f1 | 0.9413321705151999 |
| eval_loss | 0.1613253802061081 |
| eval_recall | 0.941 |
| eval_precision | 0.9419519436781406 |