Add model card
Browse files
README.md
CHANGED
@@ -1,65 +1,104 @@
|
|
|
|
1 |
---
|
2 |
-
library_name: transformers
|
3 |
license: apache-2.0
|
4 |
base_model: distilbert-base-uncased
|
5 |
tags:
|
6 |
- generated_from_trainer
|
|
|
|
|
|
|
|
|
7 |
metrics:
|
8 |
- accuracy
|
9 |
model-index:
|
10 |
- name: malli_finetuned_model
|
11 |
-
results:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
---
|
13 |
|
14 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
15 |
-
should probably proofread and complete it, then remove this comment. -->
|
16 |
-
|
17 |
# malli_finetuned_model
|
18 |
|
19 |
-
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on
|
20 |
-
It achieves
|
21 |
-
|
22 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
23 |
|
24 |
-
|
25 |
|
26 |
-
|
|
|
|
|
|
|
27 |
|
28 |
-
|
29 |
|
30 |
-
|
|
|
|
|
|
|
|
|
|
|
31 |
|
32 |
-
|
33 |
|
34 |
-
|
|
|
|
|
35 |
|
36 |
-
##
|
37 |
|
38 |
-
|
|
|
39 |
|
40 |
-
|
41 |
-
|
42 |
-
- train_batch_size: 16
|
43 |
-
- eval_batch_size: 16
|
44 |
-
- seed: 42
|
45 |
-
- optimizer: Use OptimizerNames.ADAMW_TORCH with betas=(0.9,0.999) and epsilon=1e-08 and optimizer_args=No additional optimizer arguments
|
46 |
-
- lr_scheduler_type: linear
|
47 |
-
- lr_scheduler_warmup_steps: 100
|
48 |
-
- num_epochs: 3
|
49 |
-
- mixed_precision_training: Native AMP
|
50 |
|
51 |
-
|
|
|
|
|
|
|
|
|
|
|
52 |
|
53 |
-
|
54 |
-
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
55 |
-
| 0.0014 | 1.0 | 141 | 0.0011 | 1.0 |
|
56 |
-
| 0.0005 | 2.0 | 282 | 0.0004 | 1.0 |
|
57 |
-
| 0.0004 | 3.0 | 423 | 0.0003 | 1.0 |
|
58 |
|
|
|
|
|
|
|
|
|
59 |
|
60 |
-
|
61 |
|
62 |
-
|
63 |
-
|
64 |
-
|
65 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
---
|
|
|
3 |
license: apache-2.0
|
4 |
base_model: distilbert-base-uncased
|
5 |
tags:
|
6 |
- generated_from_trainer
|
7 |
+
- sentiment-analysis
|
8 |
+
- movie-reviews
|
9 |
+
datasets:
|
10 |
+
- imdb
|
11 |
metrics:
|
12 |
- accuracy
|
13 |
model-index:
|
14 |
- name: malli_finetuned_model
|
15 |
+
results:
|
16 |
+
- task:
|
17 |
+
type: text-classification
|
18 |
+
name: Text Classification
|
19 |
+
dataset:
|
20 |
+
name: imdb
|
21 |
+
type: imdb
|
22 |
+
metrics:
|
23 |
+
- type: accuracy
|
24 |
+
value: 1.0000
|
25 |
---
|
26 |
|
|
|
|
|
|
|
27 |
# malli_finetuned_model
|
28 |
|
29 |
+
This model is a fine-tuned version of [distilbert-base-uncased](https://huggingface.co/distilbert-base-uncased) on the IMDB movie reviews dataset.
|
30 |
+
It achieves an accuracy of **100.0%** on the test set.
|
31 |
+
|
32 |
+
## Model Description
|
33 |
+
|
34 |
+
This is a sentiment analysis model specifically trained on movie reviews. It can classify text as either positive or negative sentiment.
|
35 |
+
|
36 |
+
## Intended Uses & Limitations
|
37 |
+
|
38 |
+
**Intended Uses:**
|
39 |
+
- Sentiment analysis of movie reviews
|
40 |
+
- General sentiment classification of English text
|
41 |
+
- Educational purposes and research
|
42 |
+
|
43 |
+
**Limitations:**
|
44 |
+
- Trained specifically on movie reviews, may not generalize well to other domains
|
45 |
+
- English language only
|
46 |
+
- Binary classification (positive/negative) - no neutral sentiment
|
47 |
+
|
48 |
+
## Training Procedure
|
49 |
|
50 |
+
### Training Data
|
51 |
|
52 |
+
The model was fine-tuned on the IMDB movie reviews dataset:
|
53 |
+
- Training samples: 2250
|
54 |
+
- Validation samples: 250
|
55 |
+
- Test samples: 500
|
56 |
|
57 |
+
### Training Hyperparameters
|
58 |
|
59 |
+
- Learning rate: 2e-05
|
60 |
+
- Train batch size: 16
|
61 |
+
- Eval batch size: 16
|
62 |
+
- Number of epochs: 3
|
63 |
+
- Optimizer: AdamW
|
64 |
+
- Weight decay: 0.01
|
65 |
|
66 |
+
### Results
|
67 |
|
68 |
+
| Metric | Value |
|
69 |
+
|--------|-------|
|
70 |
+
| Accuracy | 1.0000 |
|
71 |
|
72 |
+
## Usage
|
73 |
|
74 |
+
```python
|
75 |
+
from transformers import pipeline
|
76 |
|
77 |
+
# Load the model
|
78 |
+
classifier = pipeline("text-classification", model="Mallikarjunareddy/malli_finetuned_model")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
|
80 |
+
# Classify text
|
81 |
+
result = classifier("This movie was absolutely amazing!")
|
82 |
+
print(result)
|
83 |
+
# Output: [{'label': 'LABEL_1', 'score': 0.9998}]
|
84 |
+
# LABEL_0 = Negative, LABEL_1 = Positive
|
85 |
+
```
|
86 |
|
87 |
+
## Model Performance
|
|
|
|
|
|
|
|
|
88 |
|
89 |
+
The model shows strong performance on movie review sentiment analysis:
|
90 |
+
- **Test Accuracy: 100.0%**
|
91 |
+
- Baseline (random guessing): 50.0%
|
92 |
+
- Improvement: +50.0 percentage points
|
93 |
|
94 |
+
## Citation
|
95 |
|
96 |
+
```
|
97 |
+
@misc{malli_finetuned_model_2024,
|
98 |
+
author = {Your Name},
|
99 |
+
title = {malli_finetuned_model: Fine-tuned IMDB Sentiment Analysis},
|
100 |
+
year = {2024},
|
101 |
+
publisher = {Hugging Face},
|
102 |
+
howpublished = {\url{https://huggingface.co/Mallikarjunareddy/malli_finetuned_model}}
|
103 |
+
}
|
104 |
+
```
|