Initial upload of st0 RoBERTa-large binary causal classifier
Browse files- classification_report.txt +16 -0
- config.json +28 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- special_tokens_map.json +15 -0
- tokenizer.json +0 -0
- tokenizer_config.json +57 -0
- training_log.txt +112 -0
- vocab.json +0 -0
classification_report.txt
ADDED
|
@@ -0,0 +1,16 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
precision recall f1-score support
|
| 2 |
+
|
| 3 |
+
0 0.90 0.80 0.85 100
|
| 4 |
+
1 0.96 0.98 0.97 532
|
| 5 |
+
|
| 6 |
+
accuracy 0.95 632
|
| 7 |
+
macro avg 0.93 0.89 0.91 632
|
| 8 |
+
weighted avg 0.95 0.95 0.95 632
|
| 9 |
+
|
| 10 |
+
# Notes
|
| 11 |
+
# Best Model - Test Accuracy: 0.9541
|
| 12 |
+
# Best epoch: 3 (val F1 0.9840)
|
| 13 |
+
# Model: roberta-large, 10 epochs, binary single-label classification
|
| 14 |
+
# Train/Dev/Test rows: 3396 / 627 / 632
|
| 15 |
+
# Label semantics: 0 = no_relation, 1 = causal (positive)
|
| 16 |
+
# Train label dist: 1=0.9167, 0=0.0833
|
config.json
ADDED
|
@@ -0,0 +1,28 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "roberta-large",
|
| 3 |
+
"architectures": [
|
| 4 |
+
"RobertaForSequenceClassification"
|
| 5 |
+
],
|
| 6 |
+
"attention_probs_dropout_prob": 0.1,
|
| 7 |
+
"bos_token_id": 0,
|
| 8 |
+
"classifier_dropout": null,
|
| 9 |
+
"eos_token_id": 2,
|
| 10 |
+
"hidden_act": "gelu",
|
| 11 |
+
"hidden_dropout_prob": 0.1,
|
| 12 |
+
"hidden_size": 1024,
|
| 13 |
+
"initializer_range": 0.02,
|
| 14 |
+
"intermediate_size": 4096,
|
| 15 |
+
"layer_norm_eps": 1e-05,
|
| 16 |
+
"max_position_embeddings": 514,
|
| 17 |
+
"model_type": "roberta",
|
| 18 |
+
"num_attention_heads": 16,
|
| 19 |
+
"num_hidden_layers": 24,
|
| 20 |
+
"pad_token_id": 1,
|
| 21 |
+
"position_embedding_type": "absolute",
|
| 22 |
+
"problem_type": "single_label_classification",
|
| 23 |
+
"torch_dtype": "float32",
|
| 24 |
+
"transformers_version": "4.44.2",
|
| 25 |
+
"type_vocab_size": 1,
|
| 26 |
+
"use_cache": true,
|
| 27 |
+
"vocab_size": 50265
|
| 28 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:9e4e46b1f3c294f970f7e7f0290588fb0b54d017e7f84209749c32eabaeb92e4
|
| 3 |
+
size 1421495416
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": "<s>",
|
| 3 |
+
"cls_token": "<s>",
|
| 4 |
+
"eos_token": "</s>",
|
| 5 |
+
"mask_token": {
|
| 6 |
+
"content": "<mask>",
|
| 7 |
+
"lstrip": true,
|
| 8 |
+
"normalized": false,
|
| 9 |
+
"rstrip": false,
|
| 10 |
+
"single_word": false
|
| 11 |
+
},
|
| 12 |
+
"pad_token": "<pad>",
|
| 13 |
+
"sep_token": "</s>",
|
| 14 |
+
"unk_token": "<unk>"
|
| 15 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,57 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "<s>",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "<pad>",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": true,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "</s>",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": true,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "<unk>",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": true,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"50264": {
|
| 37 |
+
"content": "<mask>",
|
| 38 |
+
"lstrip": true,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
}
|
| 44 |
+
},
|
| 45 |
+
"bos_token": "<s>",
|
| 46 |
+
"clean_up_tokenization_spaces": true,
|
| 47 |
+
"cls_token": "<s>",
|
| 48 |
+
"eos_token": "</s>",
|
| 49 |
+
"errors": "replace",
|
| 50 |
+
"mask_token": "<mask>",
|
| 51 |
+
"model_max_length": 512,
|
| 52 |
+
"pad_token": "<pad>",
|
| 53 |
+
"sep_token": "</s>",
|
| 54 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 55 |
+
"trim_offsets": true,
|
| 56 |
+
"unk_token": "<unk>"
|
| 57 |
+
}
|
training_log.txt
ADDED
|
@@ -0,0 +1,112 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
st0 — Relation_detection.py (binary causal-or-not)
|
| 2 |
+
Model: roberta-large
|
| 3 |
+
Data: Combined_dataset_CommonSense+News_Data
|
| 4 |
+
Train/Dev/Test: 3396 / 627 / 632
|
| 5 |
+
|
| 6 |
+
Label distribution
|
| 7 |
+
train: 1=0.9167, 0=0.0833
|
| 8 |
+
dev: 1=0.7879, 0=0.2121
|
| 9 |
+
test: 1=0.8418, 0=0.1582
|
| 10 |
+
|
| 11 |
+
================================================================
|
| 12 |
+
Epoch 1/10, Train Loss: 0.0438, Validation Loss: 0.4460, Validation Accuracy: 0.9282
|
| 13 |
+
precision recall f1-score support
|
| 14 |
+
0 0.98 0.68 0.80 133
|
| 15 |
+
1 0.92 1.00 0.96 494
|
| 16 |
+
accuracy 0.93 627
|
| 17 |
+
macro avg 0.95 0.84 0.88 627
|
| 18 |
+
weighted avg 0.93 0.93 0.92 627
|
| 19 |
+
Validation F1-score: 0.9563
|
| 20 |
+
Saved best model to /content/drive/MyDrive/causalsense/checkpoints/st0_roberta_large (val F1=0.9563)
|
| 21 |
+
|
| 22 |
+
Epoch 2/10, Train Loss: 0.0246, Validation Loss: 0.9863, Validation Accuracy: 0.8788
|
| 23 |
+
precision recall f1-score support
|
| 24 |
+
0 1.00 0.43 0.60 133
|
| 25 |
+
1 0.87 1.00 0.93 494
|
| 26 |
+
accuracy 0.88 627
|
| 27 |
+
macro avg 0.93 0.71 0.76 627
|
| 28 |
+
weighted avg 0.89 0.88 0.86 627
|
| 29 |
+
Validation F1-score: 0.9286
|
| 30 |
+
|
| 31 |
+
Epoch 3/10, Train Loss: 0.0442, Validation Loss: 0.1793, Validation Accuracy: 0.9745
|
| 32 |
+
precision recall f1-score support
|
| 33 |
+
0 0.98 0.89 0.94 133
|
| 34 |
+
1 0.97 1.00 0.98 494
|
| 35 |
+
accuracy 0.97 627
|
| 36 |
+
macro avg 0.98 0.95 0.96 627
|
| 37 |
+
weighted avg 0.97 0.97 0.97 627
|
| 38 |
+
Validation F1-score: 0.9840
|
| 39 |
+
Saved best model to /content/drive/MyDrive/causalsense/checkpoints/st0_roberta_large (val F1=0.9840) *** BEST ***
|
| 40 |
+
|
| 41 |
+
Epoch 4/10, Train Loss: 0.0134, Validation Loss: 0.6935, Validation Accuracy: 0.9187
|
| 42 |
+
precision recall f1-score support
|
| 43 |
+
0 1.00 0.62 0.76 133
|
| 44 |
+
1 0.91 1.00 0.95 494
|
| 45 |
+
accuracy 0.92 627
|
| 46 |
+
macro avg 0.95 0.81 0.86 627
|
| 47 |
+
weighted avg 0.93 0.92 0.91 627
|
| 48 |
+
Validation F1-score: 0.9509
|
| 49 |
+
|
| 50 |
+
Epoch 5/10, Train Loss: 0.0058, Validation Loss: 0.7291, Validation Accuracy: 0.9123
|
| 51 |
+
precision recall f1-score support
|
| 52 |
+
0 1.00 0.59 0.74 133
|
| 53 |
+
1 0.90 1.00 0.95 494
|
| 54 |
+
accuracy 0.91 627
|
| 55 |
+
macro avg 0.95 0.79 0.84 627
|
| 56 |
+
weighted avg 0.92 0.91 0.90 627
|
| 57 |
+
Validation F1-score: 0.9473
|
| 58 |
+
|
| 59 |
+
Epoch 6/10, Train Loss: 0.0004, Validation Loss: 0.8895, Validation Accuracy: 0.9075
|
| 60 |
+
precision recall f1-score support
|
| 61 |
+
0 1.00 0.56 0.72 133
|
| 62 |
+
1 0.89 1.00 0.94 494
|
| 63 |
+
accuracy 0.91 627
|
| 64 |
+
macro avg 0.95 0.78 0.83 627
|
| 65 |
+
weighted avg 0.92 0.91 0.90 627
|
| 66 |
+
Validation F1-score: 0.9446
|
| 67 |
+
|
| 68 |
+
Epoch 7/10, Train Loss: 0.0031, Validation Loss: 0.6923, Validation Accuracy: 0.9155
|
| 69 |
+
precision recall f1-score support
|
| 70 |
+
0 1.00 0.60 0.75 133
|
| 71 |
+
1 0.90 1.00 0.95 494
|
| 72 |
+
accuracy 0.92 627
|
| 73 |
+
macro avg 0.95 0.80 0.85 627
|
| 74 |
+
weighted avg 0.92 0.92 0.91 627
|
| 75 |
+
Validation F1-score: 0.9491
|
| 76 |
+
|
| 77 |
+
Epoch 8/10, Train Loss: 0.0003, Validation Loss: 0.6224, Validation Accuracy: 0.9362
|
| 78 |
+
precision recall f1-score support
|
| 79 |
+
0 1.00 0.70 0.82 133
|
| 80 |
+
1 0.93 1.00 0.96 494
|
| 81 |
+
accuracy 0.94 627
|
| 82 |
+
macro avg 0.96 0.85 0.89 627
|
| 83 |
+
weighted avg 0.94 0.94 0.93 627
|
| 84 |
+
Validation F1-score: 0.9611
|
| 85 |
+
|
| 86 |
+
Epoch 9/10, Train Loss: 0.0001, Validation Loss: 0.6299, Validation Accuracy: 0.9362
|
| 87 |
+
precision recall f1-score support
|
| 88 |
+
0 1.00 0.70 0.82 133
|
| 89 |
+
1 0.93 1.00 0.96 494
|
| 90 |
+
accuracy 0.94 627
|
| 91 |
+
macro avg 0.96 0.85 0.89 627
|
| 92 |
+
weighted avg 0.94 0.94 0.93 627
|
| 93 |
+
Validation F1-score: 0.9611
|
| 94 |
+
|
| 95 |
+
Epoch 10/10, Train Loss: 0.0009, Validation Loss: 0.8330, Validation Accuracy: 0.9091
|
| 96 |
+
precision recall f1-score support
|
| 97 |
+
0 1.00 0.57 0.73 133
|
| 98 |
+
1 0.90 1.00 0.95 494
|
| 99 |
+
accuracy 0.91 627
|
| 100 |
+
macro avg 0.95 0.79 0.84 627
|
| 101 |
+
weighted avg 0.92 0.91 0.90 627
|
| 102 |
+
Validation F1-score: 0.9455
|
| 103 |
+
|
| 104 |
+
================================================================
|
| 105 |
+
Best Model - Test Accuracy: 0.9541
|
| 106 |
+
Best Model - Test Classification Report:
|
| 107 |
+
precision recall f1-score support
|
| 108 |
+
0 0.90 0.80 0.85 100
|
| 109 |
+
1 0.96 0.98 0.97 532
|
| 110 |
+
accuracy 0.95 632
|
| 111 |
+
macro avg 0.93 0.89 0.91 632
|
| 112 |
+
weighted avg 0.95 0.95 0.95 632
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|