ThuyTran102
commited on
Update README.md
Browse files
README.md
CHANGED
@@ -1,63 +1,79 @@
|
|
1 |
-
---
|
2 |
-
license: apache-2.0
|
3 |
-
base_model: distilbert-base-uncased-finetuned-sst-2-english
|
4 |
-
tags:
|
5 |
-
- generated_from_trainer
|
6 |
-
metrics:
|
7 |
-
- accuracy
|
8 |
-
model-index:
|
9 |
-
- name: LLM_project
|
10 |
-
results: []
|
11 |
-
---
|
12 |
-
|
13 |
-
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
-
should probably proofread and complete it, then remove this comment. -->
|
15 |
-
|
16 |
-
# LLM_project
|
17 |
-
|
18 |
-
This model is a fine-tuned version of [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english) on
|
19 |
-
It achieves the following results on the evaluation set:
|
20 |
-
- Loss: 0.0852
|
21 |
-
- Accuracy: 0.9804
|
22 |
-
|
23 |
-
## Model description
|
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 |
-
|
50 |
-
|
51 |
-
|
52 |
-
|
53 |
-
|
54 |
-
|
55 |
-
|
56 |
-
|
57 |
-
|
58 |
-
|
59 |
-
|
60 |
-
-
|
61 |
-
-
|
62 |
-
-
|
63 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
license: apache-2.0
|
3 |
+
base_model: distilbert-base-uncased-finetuned-sst-2-english
|
4 |
+
tags:
|
5 |
+
- generated_from_trainer
|
6 |
+
metrics:
|
7 |
+
- accuracy
|
8 |
+
model-index:
|
9 |
+
- name: LLM_project
|
10 |
+
results: []
|
11 |
+
---
|
12 |
+
|
13 |
+
<!-- This model card has been generated automatically according to the information the Trainer had access to. You
|
14 |
+
should probably proofread and complete it, then remove this comment. -->
|
15 |
+
|
16 |
+
# LLM_project
|
17 |
+
|
18 |
+
This model is a fine-tuned version of [distilbert-base-uncased-finetuned-sst-2-english](https://huggingface.co/distilbert-base-uncased-finetuned-sst-2-english) on IMDb reviews dataset.
|
19 |
+
It achieves the following results on the evaluation set:
|
20 |
+
- Loss: 0.0852
|
21 |
+
- Accuracy: 0.9804
|
22 |
+
|
23 |
+
## Model description
|
24 |
+
|
25 |
+
This model is a fine-tuned version of the DistilBERT model, which is a smaller, faster, and lighter version of BERT (Bidirectional Encoder Representations from Transformers). The base model has been pre-trained on a large corpus of English data in a self-supervised fashion, and fine-tuning was performed using a sentiment analysis dataset. The model is uncased, meaning it does not distinguish between uppercase and lowercase letters.
|
26 |
+
|
27 |
+
DistilBERT retains 97% of BERT's language understanding while being 60% faster and 40% smaller, making it highly efficient for various NLP tasks including sentiment analysis, which this model is specifically tuned for.
|
28 |
+
|
29 |
+
## Intended uses & limitations
|
30 |
+
|
31 |
+
**Intended Uses:**
|
32 |
+
|
33 |
+
> Sentiment analysis of English text, particularly for binary classification tasks such as identifying positive and negative sentiments.
|
34 |
+
Can be applied to product reviews, social media posts, customer feedback, etc.
|
35 |
+
|
36 |
+
**Limitations:**
|
37 |
+
|
38 |
+
> The model's performance is highly dependent on the quality and representativeness of the fine-tuning dataset.
|
39 |
+
May not perform well on text data that is very different from the fine-tuning dataset.
|
40 |
+
Limited by the scope of sentiment analysis and may not capture nuanced sentiments or complex emotions.
|
41 |
+
Not suitable for tasks outside binary sentiment classification without further fine-tuning.
|
42 |
+
|
43 |
+
## Training and evaluation data
|
44 |
+
|
45 |
+
The model was evaluated on a separate validation set that was not seen during training. This evaluation set is also designed for sentiment analysis and includes examples that reflect real-world use cases.
|
46 |
+
|
47 |
+
## Training procedure
|
48 |
+
### Procedure
|
49 |
+
1. Data Preprocessing: Text data was tokenized using the DistilBERT tokenizer, which converts text into a format suitable for the model.
|
50 |
+
2. Model Fine-Tuning: The pre-trained DistilBERT model was fine-tuned on the training dataset. Fine-tuning involves adjusting the weights of the model to better fit the sentiment analysis task.
|
51 |
+
3. Evaluation: After training, the model was evaluated on the validation set to measure its performance in terms of loss and accuracy.
|
52 |
+
|
53 |
+
### Training hyperparameters
|
54 |
+
|
55 |
+
The following hyperparameters were used during training:
|
56 |
+
- learning_rate: 2e-05
|
57 |
+
- train_batch_size: 16
|
58 |
+
- eval_batch_size: 16
|
59 |
+
- seed: 42
|
60 |
+
- optimizer: Adam with betas=(0.9,0.999) and epsilon=1e-08
|
61 |
+
- lr_scheduler_type: linear
|
62 |
+
- lr_scheduler_warmup_steps: 100
|
63 |
+
- num_epochs: 3
|
64 |
+
|
65 |
+
### Training results
|
66 |
+
|
67 |
+
| Training Loss | Epoch | Step | Validation Loss | Accuracy |
|
68 |
+
|:-------------:|:-----:|:----:|:---------------:|:--------:|
|
69 |
+
| 0.0743 | 1.0 | 1250 | 0.1208 | 0.9696 |
|
70 |
+
| 0.145 | 2.0 | 2500 | 0.0852 | 0.9804 |
|
71 |
+
| 0.0322 | 3.0 | 3750 | 0.1043 | 0.9822 |
|
72 |
+
|
73 |
+
|
74 |
+
### Framework versions
|
75 |
+
|
76 |
+
- Transformers 4.41.2
|
77 |
+
- Pytorch 2.3.1+cpu
|
78 |
+
- Datasets 2.20.0
|
79 |
+
- Tokenizers 0.19.1
|