cornell-movie-review-data/rotten_tomatoes
Viewer • Updated • 10.7k • 55.4k • 117
How to use Wadden/distilbert-sentiment-demo with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Wadden/distilbert-sentiment-demo") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Wadden/distilbert-sentiment-demo")
model = AutoModelForSequenceClassification.from_pretrained("Wadden/distilbert-sentiment-demo", device_map="auto")Fine-tuned distilbert-base-uncased for 2 epochs on the official
rotten_tomatoes splits. Labels are NEGATIVE (0) and POSITIVE (1).
| Metric | Value |
|---|---|
| Accuracy | 0.8499 |
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="Wadden/distilbert-sentiment-demo")
classifier("This movie was fantastic!")
The quantized ONNX export is executed directly in the browser with Transformers.js: