Obayomi commited on
Commit
a24084c
1 Parent(s): 24106bf

initial commit

Browse files
README.md CHANGED
@@ -1,3 +1,35 @@
1
  ---
2
  license: apache-2.0
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: apache-2.0
3
  ---
4
+
5
+ ## Overview
6
+
7
+ This model was trained with data from https://registry.opendata.aws/helpful-sentences-from-reviews/ to predict how "helpful" a review is.
8
+
9
+ The model was fine-tuned from the `distilbert-base-uncased` model
10
+
11
+ ### Labels
12
+ LABEL_0 - Not helpful
13
+ LABEL_1 - Helpful
14
+
15
+ ### How to use
16
+
17
+ The following code shows how to make a prediction with this model
18
+
19
+ ```python
20
+ tokenizer = AutoTokenizer.from_pretrained("banjtheman/distilbert-base-uncased-helpful-amazon")
21
+
22
+ model = AutoModelForSequenceClassification.from_pretrained(
23
+ "banjtheman/distilbert-base-uncased-helpful-amazon"
24
+ )
25
+
26
+ pipe = TextClassificationPipeline(model=model, tokenizer=tokenizer)
27
+
28
+ result = pipe("This was a Christmas gift for my grandson.")
29
+
30
+ print(result)
31
+
32
+ #[{'label': 'LABEL_0', 'score': 0.998775064945221}]
33
+ # This is NOT A HELPFUL comment
34
+
35
+ ```
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "distilbert-base-uncased",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertForSequenceClassification"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "pad_token_id": 0,
17
+ "problem_type": "single_label_classification",
18
+ "qa_dropout": 0.1,
19
+ "seq_classif_dropout": 0.2,
20
+ "sinusoidal_pos_embds": false,
21
+ "tie_weights_": true,
22
+ "torch_dtype": "float32",
23
+ "transformers_version": "4.16.2",
24
+ "vocab_size": 30522
25
+ }
optimizer.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8080440c31bff658bc43e21bb670280f53e2ff99a8d02104d056acf234e9a853
3
+ size 535697121
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:240f3b4382ebc4b725cb8feabf56490d2331580deec62d7a538645022397ee92
3
+ size 267858673
rng_state.pth ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4d472be743e81e2c44df6fef58280983b27985a661ff1a0ea5e46b7c6ecf48c4
3
+ size 13547
scheduler.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:70f3b6898b3736c88c4753f24553626a755034f7c39b91298e6bf1d0b4c4372f
3
+ size 623
special_tokens_map.json ADDED
@@ -0,0 +1 @@
 
1
+ {"unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]"}
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
tokenizer_config.json ADDED
@@ -0,0 +1 @@
 
1
+ {"do_lower_case": true, "unk_token": "[UNK]", "sep_token": "[SEP]", "pad_token": "[PAD]", "cls_token": "[CLS]", "mask_token": "[MASK]", "tokenize_chinese_chars": true, "strip_accents": null, "model_max_length": 512, "special_tokens_map_file": null, "name_or_path": "distilbert-base-uncased", "tokenizer_class": "DistilBertTokenizer"}
trainer_state.json ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "best_metric": null,
3
+ "best_model_checkpoint": null,
4
+ "epoch": 4.8,
5
+ "global_step": 6000,
6
+ "is_hyper_param_search": false,
7
+ "is_local_process_zero": true,
8
+ "is_world_process_zero": true,
9
+ "log_history": [
10
+ {
11
+ "epoch": 0.4,
12
+ "learning_rate": 1.8400000000000003e-05,
13
+ "loss": 0.4452,
14
+ "step": 500
15
+ },
16
+ {
17
+ "epoch": 0.8,
18
+ "learning_rate": 1.6800000000000002e-05,
19
+ "loss": 0.4168,
20
+ "step": 1000
21
+ },
22
+ {
23
+ "epoch": 1.2,
24
+ "learning_rate": 1.5200000000000002e-05,
25
+ "loss": 0.3512,
26
+ "step": 1500
27
+ },
28
+ {
29
+ "epoch": 1.6,
30
+ "learning_rate": 1.3600000000000002e-05,
31
+ "loss": 0.306,
32
+ "step": 2000
33
+ },
34
+ {
35
+ "epoch": 2.0,
36
+ "learning_rate": 1.2e-05,
37
+ "loss": 0.3201,
38
+ "step": 2500
39
+ },
40
+ {
41
+ "epoch": 2.4,
42
+ "learning_rate": 1.04e-05,
43
+ "loss": 0.2128,
44
+ "step": 3000
45
+ },
46
+ {
47
+ "epoch": 2.8,
48
+ "learning_rate": 8.8e-06,
49
+ "loss": 0.2058,
50
+ "step": 3500
51
+ },
52
+ {
53
+ "epoch": 3.2,
54
+ "learning_rate": 7.2000000000000005e-06,
55
+ "loss": 0.1738,
56
+ "step": 4000
57
+ },
58
+ {
59
+ "epoch": 3.6,
60
+ "learning_rate": 5.600000000000001e-06,
61
+ "loss": 0.1371,
62
+ "step": 4500
63
+ },
64
+ {
65
+ "epoch": 4.0,
66
+ "learning_rate": 4.000000000000001e-06,
67
+ "loss": 0.1345,
68
+ "step": 5000
69
+ },
70
+ {
71
+ "epoch": 4.4,
72
+ "learning_rate": 2.4000000000000003e-06,
73
+ "loss": 0.0901,
74
+ "step": 5500
75
+ },
76
+ {
77
+ "epoch": 4.8,
78
+ "learning_rate": 8.000000000000001e-07,
79
+ "loss": 0.087,
80
+ "step": 6000
81
+ }
82
+ ],
83
+ "max_steps": 6250,
84
+ "num_train_epochs": 5,
85
+ "total_flos": 1047523211328192.0,
86
+ "trial_name": null,
87
+ "trial_params": null
88
+ }
training_args.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:3d664d1289c9fcdb7f8329debbb07e51e629d0317f6fa2a09b795b08e3429449
3
+ size 2991
vocab.txt ADDED
The diff for this file is too large to render. See raw diff