Upload latest checkpoint with model card
Browse files- README.md +42 -0
- config.json +27 -0
- special_tokens_map.json +7 -0
- tokenizer.json +0 -0
- tokenizer_config.json +55 -0
- vocab.txt +0 -0
README.md
ADDED
@@ -0,0 +1,42 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
|
2 |
+
# Model Card for BERT-base Sentiment Analysis Model
|
3 |
+
|
4 |
+
## Model Details
|
5 |
+
This model is a fine-tuned version of BERT-base for sentiment analysis tasks.
|
6 |
+
|
7 |
+
## Training Data
|
8 |
+
The model was trained on the Rotten Tomatoes dataset.
|
9 |
+
|
10 |
+
## Training Procedure
|
11 |
+
- **Learning Rate**: 2e-5
|
12 |
+
- **Epochs**: 3
|
13 |
+
- **Batch Size**: 16
|
14 |
+
๊ฐ๋ฅํ๋ฉด ๋ค๋ฅธ ์ฌ๋๋ค๋ ๋๊ฐ์ ๋ฒํธ๋ชจ๋ธ, ๋กํผ ํ ๋ฉํ ๋ฅผ ์ด์ฉํ์ ๋ ์ฌํ๊ฐ๋ฅํ๋๋ก ํ๋ ๋ชจ๋ ํ์ดํผ ํ๋ผ๋ฏธํฐ๋ค์ ๋ค ์ ์ด๋ผ
|
15 |
+
|
16 |
+
## How to Use ํ๊น
ํ์ด์ค ์ธ ๋ ์ด๋ค ๊ฒ์ ์ฐ๋ฉด ๋๋ค๋ ๊ฑธ ์๋ ค์ฃผ๋ ๊ฒ
|
17 |
+
```python
|
18 |
+
from transformers import AutoTokenizer, AutoModelForSequenceClassification
|
19 |
+
|
20 |
+
tokenizer = AutoTokenizer.from_pretrained("bert-base-uncased")
|
21 |
+
model = AutoModelForSequenceClassification.from_pretrained("bert-base-uncased")
|
22 |
+
|
23 |
+
input_text = "The movie was fantastic with a gripping storyline!"
|
24 |
+
inputs = tokenizer.encode(input_text, return_tensors="pt")
|
25 |
+
outputs = model(inputs)
|
26 |
+
print(outputs.logits)
|
27 |
+
```
|
28 |
+
|
29 |
+
## Evaluation ํ๊ฐ ๊ฒฐ๊ณผ
|
30 |
+
- **Accuracy**: 81.97%
|
31 |
+
|
32 |
+
## Limitations ์ฝ์ ์ ๋ญ๊ฐ ์๋ค๋ ๊ฒ
|
33 |
+
The model may generate biased or inappropriate content
|
34 |
+
due to the nature of the training data.
|
35 |
+
It is recommended to use the model with caution and apply necessary filters.
|
36 |
+
|
37 |
+
## Ethical Considerations
|
38 |
+
- **Bias**: The model may inherit biases present in the training data.
|
39 |
+
- **Misuse**: The model can be misused to generate misleading or harmful content.
|
40 |
+
|
41 |
+
## Copyright and License
|
42 |
+
This model is licensed under the MIT License.
|
config.json
ADDED
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "bert-base-uncased",
|
3 |
+
"architectures": [
|
4 |
+
"BertForSequenceClassification"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 768,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 3072,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 12,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"problem_type": "single_label_classification",
|
22 |
+
"torch_dtype": "float32",
|
23 |
+
"transformers_version": "4.40.1",
|
24 |
+
"type_vocab_size": 2,
|
25 |
+
"use_cache": true,
|
26 |
+
"vocab_size": 30522
|
27 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,7 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"cls_token": "[CLS]",
|
3 |
+
"mask_token": "[MASK]",
|
4 |
+
"pad_token": "[PAD]",
|
5 |
+
"sep_token": "[SEP]",
|
6 |
+
"unk_token": "[UNK]"
|
7 |
+
}
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,55 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"100": {
|
12 |
+
"content": "[UNK]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"101": {
|
20 |
+
"content": "[CLS]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"102": {
|
28 |
+
"content": "[SEP]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": false,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"103": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"clean_up_tokenization_spaces": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_lower_case": true,
|
47 |
+
"mask_token": "[MASK]",
|
48 |
+
"model_max_length": 512,
|
49 |
+
"pad_token": "[PAD]",
|
50 |
+
"sep_token": "[SEP]",
|
51 |
+
"strip_accents": null,
|
52 |
+
"tokenize_chinese_chars": true,
|
53 |
+
"tokenizer_class": "BertTokenizer",
|
54 |
+
"unk_token": "[UNK]"
|
55 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|