Harsha901 commited on
Commit
0cd5d1a
ยท
verified ยท
1 Parent(s): 057a224

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +41 -1
README.md CHANGED
@@ -14,4 +14,44 @@ tags:
14
 
15
  ---
16
 
17
- #
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
14
 
15
  ---
16
 
17
+ #
18
+
19
+ # ๐Ÿ“ฆ TinyBERT IMDB Sentiment Analysis Model
20
+
21
+ This is a fine-tuned [TinyBERT](https://huggingface.co/huawei-noah/TinyBERT_General_4L_312D) model for binary **sentiment classification** on a 5,000-sample subset of the [IMDB dataset](https://huggingface.co/datasets/imdb).
22
+ It predicts whether a movie review is **positive** or **negative**.
23
+
24
+ ## ๐Ÿง  Model Details
25
+
26
+ - **Base model:** [`huawei-noah/TinyBERT_General_4L_312D`](https://huggingface.co/huawei-noah/TinyBERT_General_4L_312D)
27
+ - **Task:** Sentiment Classification (Binary)
28
+ - **Dataset:** 4,000 training + 1,000 test samples from IMDB
29
+ - **Tokenizer:** `AutoTokenizer.from_pretrained('huawei-noah/TinyBERT_General_4L_312D')`
30
+ - **Max length:** 300 tokens
31
+ - **Batch size:** 64
32
+ - **Training framework:** Hugging Face `Trainer`
33
+ - **Device:** A100 GPU
34
+
35
+ ## ๐Ÿ“Š Evaluation Metrics
36
+ ## ๐Ÿ“Š Evaluation Metrics (on 1,000-sample test set)
37
+
38
+ | Metric | Value |
39
+ |-----------------------|----------|
40
+ | Accuracy | **88.02%** |
41
+ | Evaluation Loss | 0.2962 |
42
+ | Runtime | 30.9 sec |
43
+ | Samples per Second | 485 |
44
+
45
+
46
+ ## ๐Ÿš€ How to Use
47
+
48
+ ```python
49
+ from transformers import pipeline
50
+
51
+ classifier = pipeline(
52
+ "text-classification",
53
+ model="Harsha901/tinybert-imdb-sentiment-analysis-model"
54
+ )
55
+
56
+ result = classifier("This movie was absolutely amazing!")
57
+ print(result) # [{'label': 'LABEL_1', 'score': 0.98}]