cornell-movie-review-data/rotten_tomatoes
Viewer • Updated • 10.7k • 73.6k • 112
How to use gokarn09/my_distilbert_model with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="gokarn09/my_distilbert_model") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("gokarn09/my_distilbert_model")
model = AutoModelForSequenceClassification.from_pretrained("gokarn09/my_distilbert_model")This model is a fine-tuned version of distilbert-base-uncased on an cornell-movie-review-data/rotten_tomatoes dataset. It achieves the following results on the evaluation set:
!pip install -q transformers
from huggingface_hub import notebook_login
notebook_login()#after running this line enter the access token generated on your hugging face account
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("gokarn09/my_distilbert_model")
model = AutoModelForSequenceClassification.from_pretrained("gokarn09/my_distilbert_model")
from transformers import pipeline
text=["This is wonderful movie!", "The movie was really bad; I didn't like it."]
classifier = pipeline("sentiment-analysis", model="gokarn09/my_distilbert_model")
classifier(text)
More information needed
The following hyperparameters were used during training:
| Training Loss | Epoch | Step | Validation Loss | Accuracy | F1 | Precision | Recall |
|---|---|---|---|---|---|---|---|
| 0.4193 | 1.0 | 534 | 0.4263 | 0.8180 | 0.8162 | 0.8311 | 0.8180 |
| 0.2548 | 2.0 | 1068 | 0.4289 | 0.8377 | 0.8376 | 0.8383 | 0.8377 |
| 0.1582 | 3.0 | 1602 | 0.5379 | 0.8424 | 0.8424 | 0.8424 | 0.8424 |
Base model
distilbert/distilbert-base-uncased