Hemg commited on
Commit
bcddcde
1 Parent(s): 59d59af

Upload folder using huggingface_hub

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
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
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,92 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ library_name: sentence-transformers
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
+ ---
10
+
11
+ # {MODEL_NAME}
12
+
13
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 384 dimensional dense vector space and can be used for tasks like clustering or semantic search.
14
+
15
+ <!--- Describe your model here -->
16
+
17
+ ## Usage (Sentence-Transformers)
18
+
19
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
20
+
21
+ ```
22
+ pip install -U sentence-transformers
23
+ ```
24
+
25
+ Then you can use the model like this:
26
+
27
+ ```python
28
+ from sentence_transformers import SentenceTransformer
29
+ sentences = ["This is an example sentence", "Each sentence is converted"]
30
+
31
+ model = SentenceTransformer('{MODEL_NAME}')
32
+ embeddings = model.encode(sentences)
33
+ print(embeddings)
34
+ ```
35
+
36
+
37
+
38
+ ## Evaluation Results
39
+
40
+ <!--- Describe how your model was evaluated -->
41
+
42
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
43
+
44
+
45
+ ## Training
46
+ The model was trained with the parameters:
47
+
48
+ **DataLoader**:
49
+
50
+ `torch.utils.data.dataloader.DataLoader` of length 598 with parameters:
51
+ ```
52
+ {'batch_size': 10, 'sampler': 'torch.utils.data.sampler.SequentialSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
53
+ ```
54
+
55
+ **Loss**:
56
+
57
+ `sentence_transformers.losses.MultipleNegativesRankingLoss.MultipleNegativesRankingLoss` with parameters:
58
+ ```
59
+ {'scale': 20.0, 'similarity_fct': 'cos_sim'}
60
+ ```
61
+
62
+ Parameters of the fit()-Method:
63
+ ```
64
+ {
65
+ "epochs": 2,
66
+ "evaluation_steps": 50,
67
+ "evaluator": "sentence_transformers.evaluation.InformationRetrievalEvaluator.InformationRetrievalEvaluator",
68
+ "max_grad_norm": 1,
69
+ "optimizer_class": "<class 'torch.optim.adamw.AdamW'>",
70
+ "optimizer_params": {
71
+ "lr": 2e-05
72
+ },
73
+ "scheduler": "WarmupLinear",
74
+ "steps_per_epoch": null,
75
+ "warmup_steps": 119,
76
+ "weight_decay": 0.01
77
+ }
78
+ ```
79
+
80
+
81
+ ## Full Model Architecture
82
+ ```
83
+ SentenceTransformer(
84
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
85
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
86
+ (2): Normalize()
87
+ )
88
+ ```
89
+
90
+ ## Citing & Authors
91
+
92
+ <!--- Describe where people can find more information -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "thenlper/gte-small",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 1536,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "torch_dtype": "float32",
21
+ "transformers_version": "4.44.0",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.7.0",
4
+ "transformers": "4.44.0",
5
+ "pytorch": "2.4.0+cpu"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null
9
+ }
eval/Information-Retrieval_evaluation_results.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ epoch,steps,cos_sim-Accuracy@1,cos_sim-Accuracy@3,cos_sim-Accuracy@5,cos_sim-Accuracy@10,cos_sim-Precision@1,cos_sim-Recall@1,cos_sim-Precision@3,cos_sim-Recall@3,cos_sim-Precision@5,cos_sim-Recall@5,cos_sim-Precision@10,cos_sim-Recall@10,cos_sim-MRR@10,cos_sim-NDCG@10,cos_sim-MAP@100,dot_score-Accuracy@1,dot_score-Accuracy@3,dot_score-Accuracy@5,dot_score-Accuracy@10,dot_score-Precision@1,dot_score-Recall@1,dot_score-Precision@3,dot_score-Recall@3,dot_score-Precision@5,dot_score-Recall@5,dot_score-Precision@10,dot_score-Recall@10,dot_score-MRR@10,dot_score-NDCG@10,dot_score-MAP@100
2
+ 0,50,0.026258571667502926,0.04649606957685232,0.054524167921057035,0.06472654290015052,0.026258571667502926,0.026258571667502926,0.015498689858950771,0.04649606957685232,0.010904833584211408,0.054524167921057035,0.006472654290015053,0.06472654290015052,0.038833270945664314,0.04504177347982284,0.04061445905884576,0.025422311423314935,0.04716507777220271,0.054356915872219434,0.06539555109550092,0.025422311423314935,0.025422311423314935,0.015721692590734235,0.04716507777220271,0.010871383174443887,0.054356915872219434,0.006539555109550092,0.06539555109550092,0.038541044449223065,0.044976589285204524,0.04025833884955975
3
+ 0,100,0.023415286837263755,0.04917210235825389,0.05954172938618498,0.06991135641411607,0.023415286837263755,0.023415286837263755,0.01639070078608463,0.04917210235825389,0.011908345877236999,0.05954172938618498,0.006991135641411607,0.06991135641411607,0.039449979690822624,0.046832433168035224,0.041224340490682784,0.023415286837263755,0.04950660645592909,0.05970898143502258,0.07007860846295368,0.023415286837263755,0.023415286837263755,0.016502202151976363,0.04950660645592909,0.011941796287004517,0.05970898143502258,0.007007860846295368,0.07007860846295368,0.039519668044504956,0.04692765368014872,0.041277933447703696
4
+ 0,150,0.030607124937280482,0.05653119250710821,0.0665663154373641,0.07777220270948319,0.030607124937280482,0.030607124937280482,0.018843730835702736,0.05653119250710821,0.013313263087472823,0.0665663154373641,0.007777220270948319,0.07777220270948319,0.046443172797914364,0.05400117698425062,0.048057733438054674,0.030439872888442885,0.055862184311757816,0.0669008195350393,0.0772704465629704,0.030439872888442885,0.030439872888442885,0.01862072810391927,0.055862184311757816,0.013380163907007862,0.0669008195350393,0.00772704465629704,0.0772704465629704,0.046223886778327276,0.05372602247553259,0.04789012055105863
5
+ 0,200,0.03294865362100686,0.05954172938618498,0.06957685231644088,0.08262251212577354,0.03294865362100686,0.03294865362100686,0.019847243128728324,0.05954172938618498,0.013915370463288173,0.06957685231644088,0.008262251212577355,0.08262251212577354,0.04941627707558461,0.05741182025058456,0.051464800989675014,0.03328315771868205,0.05903997323967219,0.06957685231644088,0.08161899983274795,0.03328315771868205,0.03328315771868205,0.019679991079890727,0.05903997323967219,0.013915370463288175,0.06957685231644088,0.008161899983274795,0.08161899983274795,0.04936238474873694,0.05714255263085033,0.05143440926933393
6
+ 0,250,0.03311590566984446,0.06322127446061214,0.07409265763505603,0.08730556949322629,0.03311590566984446,0.03311590566984446,0.021073758153537382,0.06322127446061214,0.014818531527011207,0.07409265763505603,0.00873055694932263,0.08730556949322629,0.05125790796889641,0.05995033634611925,0.05321594692577556,0.032446897474494064,0.06271951831409935,0.07359090148854323,0.0868038133467135,0.032446897474494064,0.032446897474494064,0.020906506104699782,0.06271951831409935,0.014718180297708647,0.07359090148854323,0.008680381334671349,0.0868038133467135,0.05071944928944426,0.059422906307333476,0.052701401496641515
7
+ 0,300,0.032446897474494064,0.06071249372804817,0.07409265763505603,0.08830908178625188,0.032446897474494064,0.032446897474494064,0.02023749790934939,0.06071249372804817,0.014818531527011205,0.07409265763505603,0.008830908178625188,0.08830908178625188,0.050333043960740856,0.05943994312733791,0.05248285950342618,0.032446897474494064,0.06087974577688577,0.07492891787924402,0.08897808998160227,0.032446897474494064,0.032446897474494064,0.02029324859229525,0.06087974577688577,0.014985783575848805,0.07492891787924402,0.008897808998160228,0.08897808998160227,0.0505617545005402,0.05977467899249539,0.05269944941777284
8
+ 0,350,0.035290182304733235,0.06539555109550092,0.07559792607459441,0.08981435022579026,0.035290182304733235,0.035290182304733235,0.021798517031833636,0.06539555109550092,0.015119585214918884,0.07559792607459441,0.008981435022579027,0.08981435022579026,0.05324409241870357,0.06205666467473974,0.05552659704776595,0.03562468640240843,0.06539555109550092,0.07576517812343202,0.08947984612811508,0.03562468640240843,0.03562468640240843,0.021798517031833636,0.06539555109550092,0.015153035624686402,0.07576517812343202,0.008947984612811507,0.08947984612811508,0.053400393440533954,0.062098309381166485,0.055688620134265565
9
+ 0,400,0.03361766181635725,0.06205051011874895,0.07208563304900485,0.0859675531025255,0.03361766181635725,0.03361766181635725,0.02068350337291632,0.06205051011874895,0.01441712660980097,0.07208563304900485,0.008596755310252552,0.0859675531025255,0.05070365326260956,0.05917645439057062,0.05293814124024115,0.03328315771868205,0.06171600602107376,0.07175112895132965,0.08513129285833751,0.03328315771868205,0.03328315771868205,0.020572002007024585,0.06171600602107376,0.014350225790265932,0.07175112895132965,0.008513129285833752,0.08513129285833751,0.05028857615410546,0.05867093518545372,0.052545026906250215
10
+ 0,450,0.03361766181635725,0.05970898143502258,0.07091486870714166,0.08262251212577354,0.03361766181635725,0.03361766181635725,0.01990299381167419,0.05970898143502258,0.014182973741428335,0.07091486870714166,0.008262251212577355,0.08262251212577354,0.049422051253461156,0.05741031174309137,0.051788300042591225,0.03278140157216926,0.059876233483860175,0.07074761665830406,0.08212075597926075,0.03278140157216926,0.03278140157216926,0.019958744494620057,0.059876233483860175,0.014149523331660814,0.07074761665830406,0.008212075597926076,0.08212075597926075,0.048954276475601084,0.0569481303112754,0.05133169008966853
11
+ 0,500,0.035290182304733235,0.06506104699782572,0.07559792607459441,0.08914534203043988,0.035290182304733235,0.035290182304733235,0.021687015665941903,0.06506104699782572,0.015119585214918884,0.07559792607459441,0.008914534203043988,0.08914534203043988,0.053178452626520815,0.06183823905923685,0.05558342414857123,0.035122930255895635,0.06539555109550092,0.07559792607459441,0.08931259407927747,0.035122930255895635,0.035122930255895635,0.021798517031833636,0.06539555109550092,0.015119585214918884,0.07559792607459441,0.008931259407927748,0.08931259407927747,0.05316610783243995,0.06187401027221343,0.05555400047140864
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:6664823b17ffc9899cfba4ebb222658b19083fc097672caa58655112cb66313e
3
+ size 133462128
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,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,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "mask_token": "[MASK]",
49
+ "max_length": 128,
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff