File size: 1,024 Bytes
95a8de1
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# TinySentimentClassifier

## Overview

TinySentimentClassifier is a compact BERT-based model fine-tuned for sentiment analysis on English text. It classifies input text into three categories: **positive**, **neutral**, or **negative**. Designed for efficiency, it is suitable for deployment on resource-constrained environments while maintaining strong performance on standard sentiment datasets.

## Model Architecture

- **Base model**: DistilBERT (distilled version of BERT-base-uncased)
- **Task head**: Sequence classification head with 3 output labels
- **Hidden size**: 768
- **Number of layers**: 6
- **Parameters**: ~66M

The model follows the standard `BertForSequenceClassification` architecture from the Transformers library.

## Usage

```python
from transformers import pipeline

classifier = pipeline(
    "sentiment-analysis",
    model="your-username/TinySentimentClassifier",
    return_all_scores=False
)

result = classifier("I love this product!")
print(result)
# [{'label': 'positive', 'score': 0.99}]