DistilBERT Fine-Tuned on SST-2

Model Description

This model is a Full Fine-Tuning version of distilbert/distilbert-base-uncased for binary sentiment classification (0: Negative, 1: Positive), trained on the SST-2 subset of the GLUE benchmark (nyu-mll/glue).

Model Details

  • Base Model: distilbert/distilbert-base-uncased
  • Architecture: DistilBERT
  • Task: Binary Sentiment Classification (num_labels=2)
  • Dataset: nyu-mll/glue (sst2)
  • Training Split: train
  • Evaluation Split: validation
  • Fine-Tuning Method: Full Fine-Tuning
  • Trainable Parameters: 66,955,010 (100% of model parameters)

Training Configuration

Parameter Value
Fine-Tuning Method Full Fine-Tuning
Epochs 3
Batch Size 16
Learning Rate 2e-5
Weight Decay 0.01
Max Sequence Length 128
Random Seed 42

Evaluation Results

Evaluated on the validation split of SST-2:

Metric Score
Accuracy 0.9197
Precision (Positive Class) 0.9137
Recall (Positive Class) 0.9302
Macro F1 0.9197

Confusion Matrix

Predicted Negative Predicted Positive
Actual Negative 389 39
Actual Positive 31 413

Note: Reported metrics are evaluated on the validation split, as SST-2 test labels are withheld on the GLUE benchmark.

Quick Usage

Option 1: Using pipeline

from transformers import pipeline

repo_id = "MohamedSayed112/sst2-distilbert-full-ft"
classifier = pipeline("text-classification", model=repo_id, tokenizer=repo_id)

result = classifier("The movie was surprisingly engaging and well-paced.")
print(result)

Related Experiment (LoRA Comparison)

For a parameter-efficient fine-tuning comparison on the same task and dataset, see MohamedSayed112/sst2-distilbert-LoRA.

Intended Use & Limitations

Intended Use: English short-text sentiment analysis, educational NLP benchmarks, and baseline comparison against PEFT/LoRA methods.

Limitations: Trained strictly on English movie review snippets (max_length=128); may underperform on sarcasm, domain-specific text, or longer documents.

Downloads last month
64
Safetensors
Model size
67M params
Tensor type
F32
ยท
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Model tree for MohamedSayed112/sst2-distilbert-full-ft

Finetuned
(12,944)
this model

Dataset used to train MohamedSayed112/sst2-distilbert-full-ft