jhsmith commited on
Commit
f0a7f9d
1 Parent(s): 75af72d

Upload folder using huggingface_hub

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false
7
+ }
README.md ADDED
@@ -0,0 +1,88 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ pipeline_tag: sentence-similarity
3
+ tags:
4
+ - sentence-transformers
5
+ - feature-extraction
6
+ - sentence-similarity
7
+
8
+ ---
9
+
10
+ # {MODEL_NAME}
11
+
12
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
13
+
14
+ <!--- Describe your model here -->
15
+
16
+ ## Usage (Sentence-Transformers)
17
+
18
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
19
+
20
+ ```
21
+ pip install -U sentence-transformers
22
+ ```
23
+
24
+ Then you can use the model like this:
25
+
26
+ ```python
27
+ from sentence_transformers import SentenceTransformer
28
+ sentences = ["This is an example sentence", "Each sentence is converted"]
29
+
30
+ model = SentenceTransformer('{MODEL_NAME}')
31
+ embeddings = model.encode(sentences)
32
+ print(embeddings)
33
+ ```
34
+
35
+
36
+
37
+ ## Evaluation Results
38
+
39
+ <!--- Describe how your model was evaluated -->
40
+
41
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
42
+
43
+
44
+ ## Training
45
+ The model was trained with the parameters:
46
+
47
+ **DataLoader**:
48
+
49
+ `torch.utils.data.dataloader.DataLoader` of length 1432 with parameters:
50
+ ```
51
+ {'batch_size': 10, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
52
+ ```
53
+
54
+ **Loss**:
55
+
56
+ `sentence_transformers.losses.CosineSimilarityLoss.CosineSimilarityLoss`
57
+
58
+ Parameters of the fit()-Method:
59
+ ```
60
+ {
61
+ "epochs": 1,
62
+ "evaluation_steps": 200,
63
+ "evaluator": "sentence_transformers.evaluation.BinaryClassificationEvaluator.BinaryClassificationEvaluator",
64
+ "max_grad_norm": 1,
65
+ "optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
66
+ "optimizer_params": {
67
+ "lr": 0.0001
68
+ },
69
+ "scheduler": "warmuplinear",
70
+ "steps_per_epoch": null,
71
+ "warmup_steps": 143,
72
+ "weight_decay": 0.01
73
+ }
74
+ ```
75
+
76
+
77
+ ## Full Model Architecture
78
+ ```
79
+ SentenceTransformer(
80
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
81
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
82
+ (2): Normalize()
83
+ )
84
+ ```
85
+
86
+ ## Citing & Authors
87
+
88
+ <!--- Describe where people can find more information -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/root/.cache/torch/sentence_transformers/sentence-transformers_multi-qa-mpnet-base-cos-v1/",
3
+ "architectures": [
4
+ "MPNetModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
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-05,
15
+ "max_position_embeddings": 514,
16
+ "model_type": "mpnet",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "relative_attention_num_buckets": 32,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.35.2",
23
+ "vocab_size": 30527
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.0.0",
4
+ "transformers": "4.6.1",
5
+ "pytorch": "1.8.1"
6
+ }
7
+ }
eval/binary_classification_evaluation_results_results.csv ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ epoch,steps,cossim_accuracy,cossim_accuracy_threshold,cossim_f1,cossim_precision,cossim_recall,cossim_f1_threshold,cossim_ap,manhattan_accuracy,manhattan_accuracy_threshold,manhattan_f1,manhattan_precision,manhattan_recall,manhattan_f1_threshold,manhattan_ap,euclidean_accuracy,euclidean_accuracy_threshold,euclidean_f1,euclidean_precision,euclidean_recall,euclidean_f1_threshold,euclidean_ap,dot_accuracy,dot_accuracy_threshold,dot_f1,dot_precision,dot_recall,dot_f1_threshold,dot_ap
2
+ 0,200,0.7844441427989683,0.49500977993011475,0.5901417960837272,0.5559796437659033,0.6287769784172662,0.3809729516506195,0.6535653579973784,0.7848513641916656,21.50560760498047,0.5919670442842431,0.5187725631768954,0.6892086330935252,24.42305564880371,0.6540328132343743,0.7844441427989683,1.0049777030944824,0.5901417960837272,0.5559796437659033,0.6287769784172662,1.1126787662506104,0.6535653579973784,0.7844441427989683,0.4950098693370819,0.5901417960837272,0.5559796437659033,0.6287769784172662,0.3809729218482971,0.6535653031626607
3
+ 0,400,0.7172526130039365,1.0,0.4412231509893133,0.28305729025251153,1.0,0.9999727010726929,0.2783653417357731,0.7171168725397041,0.0031983614899218082,0.4412231509893133,0.28305729025251153,1.0,0.16016513109207153,0.27871519887446783,0.7171168725397041,0.00014417964848689735,0.4412231509893133,0.28305729025251153,1.0,0.007390656042844057,0.2787511121244277,0.7169811320754716,1.0,0.4412231509893133,0.28305729025251153,1.0,0.9999727010726929,0.2780625388018211
4
+ 0,600,0.7171168725397041,1.0,0.44131654143295584,0.2831341662140141,1.0,0.9999960660934448,0.2810871690272637,0.7169811320754716,0.0008220643503591418,0.44131654143295584,0.2831341662140141,1.0,0.05916962772607803,0.2834598548798023,0.7169811320754716,3.750418545678258e-05,0.44131654143295584,0.2831341662140141,1.0,0.002790421014651656,0.2833997018292086,0.7168453916112393,1.0000001192092896,0.44131654143295584,0.2831341662140141,1.0,0.9999961256980896,0.28430597296468607
5
+ 0,800,0.7171168725397041,1.0,0.44131654143295584,0.2831341662140141,1.0,0.9999932646751404,0.28445430876533107,0.7168453916112393,0.000544880866073072,0.4412698412698413,0.2830957230142566,1.0,0.08449363708496094,0.28436796168639017,0.7168453916112393,2.5259887479478493e-05,0.4412698412698413,0.2830957230142566,1.0,0.003975867293775082,0.28439490106410464,0.7168453916112393,1.0000001192092896,0.44131654143295584,0.2831341662140141,1.0,0.9999933242797852,0.2841713193742575
6
+ 0,1000,0.7171168725397041,1.0,0.4419197281800807,0.2837856266193918,0.9980815347721822,0.9999997615814209,0.2858759033673937,0.7168453916112393,0.0005671593244187534,0.44166047351098847,0.28361058085628577,0.9976019184652278,0.015263278968632221,0.28422959601321585,0.7168453916112393,2.5454743081354536e-05,0.44170736886812484,0.2836492567843993,0.9976019184652278,0.0006895815022289753,0.28441911678979653,0.7168453916112393,1.000000238418579,0.4416303075449612,0.2837800875273523,0.9952038369304557,0.9999997615814209,0.285439578702063
7
+ 0,1200,0.7171168725397041,1.0,0.44142902576062754,0.2833424060968971,0.9985611510791367,0.9999998211860657,0.28355915210198385,0.7168453916112393,0.0005712748970836401,0.44142902576062754,0.2833424060968971,0.9985611510791367,0.013972094282507896,0.28517121461111716,0.7168453916112393,2.564379246905446e-05,0.4415694591728526,0.2834581347855684,0.9985611510791367,0.0006229695864021778,0.285367014649916,0.7172526130039365,1.0000001192092896,0.44189261031366295,0.28387978142076503,0.996642685851319,0.9999997615814209,0.2784220621627503
8
+ 0,1400,0.7171168725397041,1.0,0.44166047351098847,0.28361058085628577,0.9976019184652278,0.9999998807907104,0.2850134610919487,0.7168453916112393,0.0006067490903660655,0.4427251235761874,0.28527904722337627,0.988009592326139,0.009999344125390053,0.2855478122259374,0.7168453916112393,2.7855783628183417e-05,0.443010752688172,0.2855162855162855,0.988009592326139,0.0004502631491050124,0.28572036692417946,0.7172526130039365,1.0000001192092896,0.44152263810836606,0.2834195480533624,0.9985611510791367,0.9999997615814209,0.28335390703610996
9
+ 0,-1,0.7171168725397041,1.0,0.44170736886812484,0.2836492567843993,0.9976019184652278,0.9999998807907104,0.2848590218776231,0.7168453916112393,0.0006069369846954942,0.4428694158075602,0.28531894285318943,0.988968824940048,0.010157727636396885,0.28558635178523945,0.7168453916112393,2.786061668302864e-05,0.44274973147153607,0.28525951557093426,0.9884892086330935,0.00045753229642286897,0.2857500239674161,0.7171168725397041,1.0000001192092896,0.44152263810836606,0.2834195480533624,0.9985611510791367,0.9999997615814209,0.284376251565123
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a7f914c5cd6f29b3f4749f8e7b7b729867bd992f6b1ff75d0fee4b3d19a20d94
3
+ size 437967672
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": true,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": true,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "104": {
36
+ "content": "[UNK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "30526": {
44
+ "content": "<mask>",
45
+ "lstrip": true,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ }
51
+ },
52
+ "bos_token": "<s>",
53
+ "clean_up_tokenization_spaces": true,
54
+ "cls_token": "<s>",
55
+ "do_lower_case": true,
56
+ "eos_token": "</s>",
57
+ "mask_token": "<mask>",
58
+ "max_length": 250,
59
+ "model_max_length": 512,
60
+ "pad_to_multiple_of": null,
61
+ "pad_token": "<pad>",
62
+ "pad_token_type_id": 0,
63
+ "padding_side": "right",
64
+ "sep_token": "</s>",
65
+ "stride": 0,
66
+ "strip_accents": null,
67
+ "tokenize_chinese_chars": true,
68
+ "tokenizer_class": "MPNetTokenizer",
69
+ "truncation_side": "right",
70
+ "truncation_strategy": "longest_first",
71
+ "unk_token": "[UNK]"
72
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff