etweedy commited on
Commit
f0b1b4d
1 Parent(s): 51cf9fa

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +69 -0
README.md CHANGED
@@ -11,3 +11,72 @@ license: apache-2.0
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
11
  ---
12
 
13
  Check out the configuration reference at https://huggingface.co/docs/hub/spaces-config-reference
14
+
15
+ This app asks the user to input a movie review as a text string, and predicts whether the sentiment of the review is 'Positive' or 'Negative'.
16
+
17
+ The prediction is made using a Bidirectional Encoder Representations from Transformers (BERT) model, namely a fine-tuned version of DistilBERT (https://arxiv.org/abs/1910.01108)
18
+
19
+ We started with the DistilBertForSequenceClassification pre-trained model in the Hugging Face transformers library (https://huggingface.co/docs/transformers/v4.25.1/en/model_doc/distilbert#transformers.DistilBertForSequenceClassification) and DistilBertTokenizerFast (https://huggingface.co/docs/transformers/v4.25.1/en/model_doc/distilbert#transformers.DistilBertTokenizerFast)
20
+
21
+ We fine-tuned the model using the IMDb Large Movie Review Dataset (https://ai.stanford.edu/~amaas/data/sentiment/) for 3 epochs using batch sizes of 16 samples and a learning rate of 1e-5. The loss and accuracy progressed as follows:
22
+
23
+ Epoch 0001 of 0003, batch 0000 of 2188 === Loss: 0.6800
24
+
25
+ Epoch 0001 of 0003, batch 0250 of 2188 === Loss: 0.2488
26
+
27
+ Epoch 0001 of 0003, batch 0500 of 2188 === Loss: 0.4501
28
+
29
+ Epoch 0001 of 0003, batch 0750 of 2188 === Loss: 0.1309
30
+
31
+ Epoch 0001 of 0003, batch 1000 of 2188 === Loss: 0.4273
32
+
33
+ Epoch 0001 of 0003, batch 1250 of 2188 === Loss: 0.3193
34
+
35
+ Epoch 0001 of 0003, batch 1500 of 2188 === Loss: 0.5093
36
+
37
+ Epoch 0001 of 0003, batch 1750 of 2188 === Loss: 0.4583
38
+
39
+ Epoch 0001 of 0003, batch 2000 of 2188 === Loss: 0.3154
40
+
41
+ Training accuracy: 96.62 === Valid accuracy: 92.54
42
+
43
+ Epoch 0002 of 0003, batch 0000 of 2188 === Loss: 0.1179
44
+
45
+ Epoch 0002 of 0003, batch 0250 of 2188 === Loss: 0.0136
46
+
47
+ Epoch 0002 of 0003, batch 0500 of 2188 === Loss: 0.1435
48
+
49
+ Epoch 0002 of 0003, batch 0750 of 2188 === Loss: 0.0454
50
+
51
+ Epoch 0002 of 0003, batch 1000 of 2188 === Loss: 0.0768
52
+
53
+ Epoch 0002 of 0003, batch 1250 of 2188 === Loss: 0.2802
54
+
55
+ Epoch 0002 of 0003, batch 1500 of 2188 === Loss: 0.0200
56
+
57
+ Epoch 0002 of 0003, batch 1750 of 2188 === Loss: 0.1257
58
+
59
+ Epoch 0002 of 0003, batch 2000 of 2188 === Loss: 0.1308
60
+
61
+ Training accuracy: 98.76 === Valid accuracy: 92.46
62
+
63
+ Epoch 0003 of 0003, batch 0000 of 2188 === Loss: 0.0074
64
+
65
+ Epoch 0003 of 0003, batch 0250 of 2188 === Loss: 0.0039
66
+
67
+ Epoch 0003 of 0003, batch 0500 of 2188 === Loss: 0.0611
68
+
69
+ Epoch 0003 of 0003, batch 0750 of 2188 === Loss: 0.0306
70
+
71
+ Epoch 0003 of 0003, batch 1000 of 2188 === Loss: 0.1513
72
+
73
+ Epoch 0003 of 0003, batch 1250 of 2188 === Loss: 0.0014
74
+
75
+ Epoch 0003 of 0003, batch 1500 of 2188 === Loss: 0.0020
76
+
77
+ Epoch 0003 of 0003, batch 1750 of 2188 === Loss: 0.1905
78
+
79
+ Epoch 0003 of 0003, batch 2000 of 2188 === Loss: 0.1545
80
+
81
+ Training accuracy: 99.43 === Valid accuracy: 92.38
82
+