Downloads · 30 days
7
5% of all-time downloads
AhilanPonnusamy/distilled-smollm-sentiment-analyzer
distilled-smollm-sentiment-analyzer is a machine learning model from AhilanPonnusamy. Use it for the machine learning task on the model card, and read the license before you ship it in a product. The card lists the license as apache-2.0.
This model is a distilled version of a larger sentiment analysis model, fine-tuned on custom datasets using the Hugging Face Transformers library. It is designed for efficient, lightweight sentiment analysis tasks in…
Downloads · 30 days
7
5% of all-time downloads
All-time downloads
153
Public
Parameters
135M
1.6 GB on disk
Likes
0
Public
Click a slice to open those files.
.pt1.1 GB · 67%
From the Hugging Face model README
This model is a distilled version of a larger sentiment analysis model, fine-tuned on custom datasets using the Hugging Face Transformers library. It is designed for efficient, lightweight sentiment analysis tasks in resource-constrained environments.
✅ Key Features:
SmolLM)negative, neutral, positive| Model | Distilled SmolLM Sentiment Analyzer |
|---|---|
| Base Model | SmollM |
| Task | Sentiment Analysis (3-class: negative, neutral, positive) |
| Dataset | Custom Yelp Review + Distilled Dataset |
| Framework | Hugging Face Transformers |
| Distillation Method | Knowledge Distillation |
| Accuracy | ~75% (Relative Accuracy - compared with Teacher model gemma3:12b) |
from transformers import AutoTokenizer, AutoModelForSequenceClassification
import torch
tokenizer = AutoTokenizer.from_pretrained("AhilanPonnusamy/distilled-smollm-sentiment-analyzer")
model = AutoModelForSequenceClassification.from_pretrained("AhilanPonnusamy/distilled-smollm-sentiment-analyzer")
inputs = tokenizer("The movie was amazing!", return_tensors="pt")
with torch.no_grad():
outputs = model(**inputs)
logits = outputs.logits
predicted_class_id = logits.argmax().item()
label_map = {0: "negative", 1: "neutral", 2: "positive"}
print("Predicted sentiment:", label_map[predicted_class_id])