youssefkhalil320 commited on
Commit
8227239
·
verified ·
1 Parent(s): cdea1e4

Upload best checkpoint (Spearman=0.8112)

Browse files
README.md ADDED
@@ -0,0 +1,39 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: en
3
+ tags:
4
+ - clinical-nlp
5
+ - text-similarity
6
+ - regression
7
+ - bert
8
+ base_model: cross-encoder/monoelectra-large
9
+ ---
10
+
11
+ # Clinical STS Regression Model
12
+
13
+ Fine-tuned from `cross-encoder/monoelectra-large` on a clinical text-pair similarity dataset.
14
+
15
+ ## Training config
16
+ ```json
17
+ {
18
+ "train": "./med_sts/clinicalSTS.train.txt",
19
+ "test": "./med_sts/clinicalSTS.test.txt",
20
+ "model": [
21
+ "cross-encoder/monoelectra-large"
22
+ ],
23
+ "epochs": 20,
24
+ "batch_size": 16,
25
+ "lr": 2e-05,
26
+ "weight_decay": 0.01,
27
+ "warmup_ratio": 0.1,
28
+ "max_grad_norm": 1.0,
29
+ "dropout": 0.1,
30
+ "max_len": 256,
31
+ "seed": 42,
32
+ "patience": 5,
33
+ "output_dir": "./sts_val/monoelectra-large",
34
+ "wandb_project": "clinical-sts",
35
+ "hf_repo": "youssefkhalil320/monoelectra-large"
36
+ }
37
+ ```
38
+
39
+ ## Best test Spearman ρ: `0.8112`
config.json ADDED
@@ -0,0 +1,46 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ElectraModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "auto_map": {
7
+ "AutoModelForSequenceClassification": "modeling.WebisCrossEncoderForSequenceClassification"
8
+ },
9
+ "backbone_model_type": "electra",
10
+ "classifier_dropout": null,
11
+ "doc_length": 256,
12
+ "dtype": "float32",
13
+ "embedding_size": 1024,
14
+ "hidden_act": "gelu",
15
+ "hidden_dropout_prob": 0.1,
16
+ "hidden_size": 1024,
17
+ "id2label": {
18
+ "0": "LABEL_0"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 4096,
22
+ "label2id": {
23
+ "LABEL_0": 0
24
+ },
25
+ "layer_norm_eps": 1e-12,
26
+ "max_position_embeddings": 512,
27
+ "model_type": "electra",
28
+ "num_attention_heads": 16,
29
+ "num_hidden_layers": 24,
30
+ "pad_token_id": 0,
31
+ "pooling_strategy": "first",
32
+ "position_embedding_type": "absolute",
33
+ "query_length": 32,
34
+ "sentence_transformers": {
35
+ "activation_fn": "torch.nn.modules.linear.Identity",
36
+ "version": "4.0.1"
37
+ },
38
+ "summary_activation": "gelu",
39
+ "summary_last_dropout": 0.1,
40
+ "summary_type": "first",
41
+ "summary_use_proj": true,
42
+ "transformers_version": "4.57.6",
43
+ "type_vocab_size": 2,
44
+ "use_cache": true,
45
+ "vocab_size": 30522
46
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:68636c402191001c398957544898a7331b6e0e07570005a7de2cb01f7810328c
3
+ size 1336413848
regressor.pt ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:eec9de9c3b986c6dca1fe164c214467dcb2480dff3cb3033405af51b5cf183a8
3
+ size 6069
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "doc_length": 256,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "pad_token": "[PAD]",
52
+ "query_length": 32,
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "ElectraTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff