Text Classification
Transformers
Safetensors
distilbert
sentiment-analysis
fine-tuned
education
text-embeddings-inference
Instructions to use pavithraams/distilbert-student-feedback-sentiment with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use pavithraams/distilbert-student-feedback-sentiment with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-classification", model="pavithraams/distilbert-student-feedback-sentiment")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForSequenceClassification tokenizer = AutoTokenizer.from_pretrained("pavithraams/distilbert-student-feedback-sentiment") model = AutoModelForSequenceClassification.from_pretrained("pavithraams/distilbert-student-feedback-sentiment", device_map="auto") - Notebooks
- Google Colab
- Kaggle
DistilBERT fine-tuned on student course feedback (Open Elective Project)
distilbert-base-uncased fine-tuned to classify student course feedback as negative / neutral / positive.
- Dataset: our own student feedback dataset (240 sentences; train 168 / validation 36 / test 36)
- Hyperparameter search: learning rate [5e-05] x batch size [16], 4 epochs, best epoch by validation macro F1
- Best hyperparameters: {'learning_rate': 5e-05, 'batch_size': 16}
Results (test set)
| Model | Accuracy | Macro F1 |
|---|---|---|
| A. DistilBERT, not fine-tuned | 22.22% | 0.166 |
| B. TF-IDF + LogReg (tuned) | 33.33% | 0.320 |
| C. Frozen DistilBERT + LogReg | 80.56% | 0.806 |
| D. Fine-tuned DistilBERT | 83.33% | 0.832 |
Usage
from transformers import pipeline
clf = pipeline("text-classification", model="pavithraams/distilbert-student-feedback-sentiment")
print(clf("The labs were really helpful and the teacher explained everything clearly."))
Limitations
Small dataset (240 sentences), so test scores have high variance. Trained on short, English, course-related feedback only.
- Downloads last month
- 23
Model tree for pavithraams/distilbert-student-feedback-sentiment
Base model
distilbert/distilbert-base-uncased