File size: 1,271 Bytes
6ffd898
 
 
 
 
 
 
 
 
 
 
 
 
 
 
68324aa
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
---
license: mit
language:
- en
metrics:
- accuracy
base_model:
- google-bert/bert-base-uncased
pipeline_tag: text-classification
tags:
- sentiment-analysis
- bert
- imdb
- fine-tuned
- text-classification
---

# ๐Ÿ“Š Sentiment Analysis with Fine-Tuned BERT (IMDB)

This repository contains a fine-tuned BERT model for binary sentiment classification using the IMDB movie reviews dataset. The model classifies reviews as **positive** or **negative**, and is built using Hugging Face Transformers and PyTorch.

## ๐Ÿš€ Model Performance

| Metric           | Value       |
|------------------|-------------|
| Accuracy         | 89.4%       |
| Validation Loss  | 0.375       |
| Epochs Trained   | 3           |
| Inference Speed  | ~434 samples/sec |

## ๐Ÿง  Model Details

- **Base Model**: `bert-base-uncased`
- **Dataset**: IMDB (binary sentiment)
- **Framework**: Hugging Face Transformers
- **Fine-Tuning Setup**:
  - Learning rate: 2e-5
  - Batch size: 32
  - Mixed-precision: โœ… (`fp16`)
  - Early stopping: โŒ (trained for full 3 epochs)

## ๐Ÿ› ๏ธ How to Use

```python
from transformers import pipeline

classifier = pipeline("text-classification", model="Harsha901/tinybert-imdb-sentiment-analysis-model")
classifier("This movie was absolutely amazing!")