Back to all models
text-classification mask_token: <mask>
Query this model
πŸ”₯ This model is currently loaded and running on the Inference API. ⚠️ This model could not be loaded by the inference API. ⚠️ This model can be loaded on the Inference API on-demand.
JSON Output
API endpoint
								$
								curl -X POST \
-H "Authorization: Bearer YOUR_ORG_OR_USER_API_TOKEN" \
-H "Content-Type: application/json" \
-d '"json encoded string"' \
https://api-inference.huggingface.co/models/VictorSanh/roberta-base-finetuned-yelp-polarity
Share Copied link to clipboard

Monthly model downloads

VictorSanh/roberta-base-finetuned-yelp-polarity VictorSanh/roberta-base-finetuned-yelp-polarity
34 downloads
last 30 days

pytorch

tf

Contributed by

VictorSanh Victor Sanh
1 model

How to use this model directly from the πŸ€—/transformers library:

			
Copy to clipboard
from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("VictorSanh/roberta-base-finetuned-yelp-polarity") model = AutoModelForSequenceClassification.from_pretrained("VictorSanh/roberta-base-finetuned-yelp-polarity")

RoBERTa-base-finetuned-yelp-polarity

This is a RoBERTa-base checkpoint fine-tuned on binary sentiment classifcation from Yelp polarity. It gets 98.08% accuracy on the test set.

Hyper-parameters

We used the following hyper-parameters to train the model on one GPU:

num_train_epochs            = 2.0
learning_rate               = 1e-05
weight_decay                = 0.0
adam_epsilon                = 1e-08
max_grad_norm               = 1.0
per_device_train_batch_size = 32
gradient_accumulation_steps = 1
warmup_steps                = 3500
seed                        = 42