Instructions to use sangatbaloch/imdb-decoder-finetuned with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sangatbaloch/imdb-decoder-finetuned with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="sangatbaloch/imdb-decoder-finetuned")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("sangatbaloch/imdb-decoder-finetuned") model = AutoModelForSequenceClassification.from_pretrained("sangatbaloch/imdb-decoder-finetuned", device_map="auto") - Notebooks
- Google Colab
- Kaggle
IMDb decoder sentiment classifier
Base: distilbert/distilgpt2. Causal decoder with a fine-tuned classification head. Labels: negative=0, positive=1. Both models use the same stratified IMDb subsets: 4000 train, 1000 validation, 1000 official test. Seed 42, 2 epochs, learning rate 2e-5, weight decay .01, effective batch 16, max length 256. Best validation F1 selects checkpoint. Test data never selects checkpoints.
Measured held-out test results
{ "test_loss": 0.33836108446121216, "test_accuracy": 0.857, "test_precision": 0.8493150684931506, "test_recall": 0.868, "test_f1": 0.8585558852621167, "test_runtime": 3.9952, "test_samples_per_second": 250.302, "test_steps_per_second": 31.288, "confusion_matrix": [ [ 423, 77 ], [ 66, 434 ] ], "parameter_count": 81914112 } Confusion matrix rows=true, columns=predicted, label order negative then positive. Precision/recall/F1 use positive class.
Limitations
Educational subset experiment, not full IMDb benchmark. English movie reviews only. Sarcasm, domain shift and truncation can cause errors. Confidence is uncalibrated.
- Downloads last month
- 21
Model tree for sangatbaloch/imdb-decoder-finetuned
Base model
distilbert/distilgpt2