stanfordnlp/imdb
Viewer • Updated • 100k • 208k • 1.03k
How to use Wadden/sentiment-versioning-demo with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-classification", model="Wadden/sentiment-versioning-demo") # Load model directly
from transformers import AutoTokenizer, AutoModelForSequenceClassification
tokenizer = AutoTokenizer.from_pretrained("Wadden/sentiment-versioning-demo")
model = AutoModelForSequenceClassification.from_pretrained("Wadden/sentiment-versioning-demo", device_map="auto")Three traceable DistilBERT variants from the model-versioning lab.
Each variant is a Hub commit and tag; the best one is exposed through the
production branch for independent deployment and rollback.
| Tag | Training data | Max length |
|---|---|---|
| v1 | 2,000 Rotten Tomatoes reviews | 128 |
| v2 | 2,000 Rotten Tomatoes reviews | 256 |
| v3 | 2,000 IMDb reviews | 256 |
All variants were evaluated on the same Rotten Tomatoes test split.
| Version | Accuracy |
|---|---|
| v1 | 0.7955 |
| v2 | 0.8011 |
| v3 | 0.7955 |
Promoted version: v2 (branch production).
from transformers import pipeline
classifier = pipeline("sentiment-analysis", model="Wadden/sentiment-versioning-demo",
revision="production")
The quantized ONNX export of the promoted v2 revision is executed directly in the browser: