w11wo commited on
Commit
f3028a6
·
1 Parent(s): 295359e

Added Model

Browse files
0_Transformer/config.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "LazarusNLP/simcse-indobert-base",
3
+ "_num_labels": 5,
4
+ "architectures": [
5
+ "BertModel"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "directionality": "bidi",
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "id2label": {
14
+ "0": "LABEL_0",
15
+ "1": "LABEL_1",
16
+ "2": "LABEL_2",
17
+ "3": "LABEL_3",
18
+ "4": "LABEL_4"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 3072,
22
+ "label2id": {
23
+ "LABEL_0": 0,
24
+ "LABEL_1": 1,
25
+ "LABEL_2": 2,
26
+ "LABEL_3": 3,
27
+ "LABEL_4": 4
28
+ },
29
+ "layer_norm_eps": 1e-12,
30
+ "max_position_embeddings": 512,
31
+ "model_type": "bert",
32
+ "num_attention_heads": 12,
33
+ "num_hidden_layers": 12,
34
+ "output_past": true,
35
+ "pad_token_id": 0,
36
+ "pooler_fc_size": 768,
37
+ "pooler_num_attention_heads": 12,
38
+ "pooler_num_fc_layers": 3,
39
+ "pooler_size_per_head": 128,
40
+ "pooler_type": "first_token_transform",
41
+ "position_embedding_type": "absolute",
42
+ "torch_dtype": "float32",
43
+ "transformers_version": "4.29.2",
44
+ "type_vocab_size": 2,
45
+ "use_cache": true,
46
+ "vocab_size": 50000
47
+ }
0_Transformer/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:805c1b4b2b7fad9ee3a042ed6c32552bb01019d16477f88a3492f545446abe09
3
+ size 497836589
0_Transformer/sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 32,
3
+ "do_lower_case": false
4
+ }
0_Transformer/special_tokens_map.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": "[CLS]",
3
+ "mask_token": "[MASK]",
4
+ "pad_token": "[PAD]",
5
+ "sep_token": "[SEP]",
6
+ "unk_token": "[UNK]"
7
+ }
0_Transformer/tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
0_Transformer/tokenizer_config.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "clean_up_tokenization_spaces": true,
3
+ "cls_token": "[CLS]",
4
+ "do_basic_tokenize": true,
5
+ "do_lower_case": true,
6
+ "mask_token": "[MASK]",
7
+ "model_max_length": 1000000000000000019884624838656,
8
+ "never_split": null,
9
+ "pad_token": "[PAD]",
10
+ "sep_token": "[SEP]",
11
+ "strip_accents": null,
12
+ "tokenize_chinese_chars": true,
13
+ "tokenizer_class": "BertTokenizer",
14
+ "unk_token": "[UNK]"
15
+ }
0_Transformer/vocab.txt ADDED
The diff for this file is too large to render. See raw diff
 
1_Pooling/config.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
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
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false
9
+ }
2_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 768, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d5d221280b121b50477c1df240e37149c3f8d55bec281259bf927b40471e39df
3
+ size 2363583
README.md CHANGED
@@ -1,3 +1,89 @@
1
  ---
2
- license: apache-2.0
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
+ pipeline_tag: sentence-similarity
3
+ tags:
4
+ - sentence-transformers
5
+ - feature-extraction
6
+ - sentence-similarity
7
  ---
8
+
9
+ # {MODEL_NAME}
10
+
11
+ 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.
12
+
13
+ <!--- Describe your model here -->
14
+
15
+ ## Usage (Sentence-Transformers)
16
+
17
+ Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
18
+
19
+ ```
20
+ pip install -U sentence-transformers
21
+ ```
22
+
23
+ Then you can use the model like this:
24
+
25
+ ```python
26
+ from sentence_transformers import SentenceTransformer
27
+ sentences = ["This is an example sentence", "Each sentence is converted"]
28
+
29
+ model = SentenceTransformer('{MODEL_NAME}')
30
+ embeddings = model.encode(sentences)
31
+ print(embeddings)
32
+ ```
33
+
34
+
35
+
36
+ ## Evaluation Results
37
+
38
+ <!--- Describe how your model was evaluated -->
39
+
40
+ For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
41
+
42
+
43
+ ## Training
44
+ The model was trained with the parameters:
45
+
46
+ **DataLoader**:
47
+
48
+ `torch.utils.data.dataloader.DataLoader` of length 6524 with parameters:
49
+ ```
50
+ {'batch_size': 128, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
51
+ ```
52
+
53
+ **Loss**:
54
+
55
+ `sentence_transformers_congen.losses.ConGenLoss.ConGenLoss`
56
+
57
+ Parameters of the fit()-Method:
58
+ ```
59
+ {
60
+ "epochs": 20,
61
+ "evaluation_steps": 0,
62
+ "evaluator": "sentence_transformers.evaluation.EmbeddingSimilarityEvaluator.EmbeddingSimilarityEvaluator",
63
+ "max_grad_norm": 1,
64
+ "optimizer_class": "<class 'transformers.optimization.AdamW'>",
65
+ "optimizer_params": {
66
+ "correct_bias": false,
67
+ "eps": 1e-06,
68
+ "lr": 0.0001
69
+ },
70
+ "scheduler": "WarmupLinear",
71
+ "steps_per_epoch": null,
72
+ "warmup_steps": 13048,
73
+ "weight_decay": 0.01
74
+ }
75
+ ```
76
+
77
+
78
+ ## Full Model Architecture
79
+ ```
80
+ SentenceTransformer(
81
+ (0): Transformer({'max_seq_length': 32, 'do_lower_case': False}) with Transformer model: BertModel
82
+ (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, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False})
83
+ (2): Dense({'in_features': 768, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
84
+ )
85
+ ```
86
+
87
+ ## Citing & Authors
88
+
89
+ <!--- Describe where people can find more information -->
config_sentence_transformers.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "1.0.0",
4
+ "transformers": "4.29.2",
5
+ "pytorch": "2.0.1+cu117"
6
+ }
7
+ }
eval/similarity_evaluation_results.csv ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ epoch,steps,cosine_pearson,cosine_spearman,euclidean_pearson,euclidean_spearman,manhattan_pearson,manhattan_spearman,dot_pearson,dot_spearman
2
+ 0,-1,0.7549801652876834,0.7773568206020748,0.7866759041719932,0.7834028047551163,0.7852862401773307,0.7825944151995093,0.6896391094326394,0.6844280090892415
3
+ 1,-1,0.7847668828189469,0.8039669069020774,0.8121336526056565,0.808983844193213,0.8114571591692638,0.8087648351415765,0.7115387584412941,0.7016501686459619
4
+ 2,-1,0.7992853124188911,0.8166844406641893,0.824898638753694,0.8221694691738071,0.8237765461501285,0.821372625924178,0.7076383867518875,0.6963353375807293
5
+ 3,-1,0.8098387823447282,0.8269563432238602,0.834132171888215,0.8326572691437634,0.8331463214346222,0.8320829192431101,0.699207552213865,0.6882365105465501
6
+ 4,-1,0.8170999860695889,0.832943788774763,0.8391728928428005,0.8371489566326253,0.838036323687782,0.8364639650451339,0.7094635650131131,0.6986988481065094
7
+ 5,-1,0.8199692296461245,0.8351361108919974,0.842502309265778,0.8403654738885686,0.8415662371992431,0.8393730728301876,0.6877013204350539,0.6757211246853495
8
+ 6,-1,0.8216498381863574,0.8361694195849096,0.8435246055904845,0.841987890658732,0.8427364357808801,0.8413094781155371,0.6888481115614082,0.6767505115167366
9
+ 7,-1,0.8203275851403183,0.8348932482942423,0.8427799201690414,0.8409641006468491,0.8419299106218932,0.8403636927485176,0.6810481647062651,0.6698828324000539
10
+ 8,-1,0.8230823005257395,0.8368828212810016,0.8437538473757997,0.842065782172876,0.84297443008527,0.841438574292332,0.6844884191171795,0.6721888927103519
11
+ 9,-1,0.8248806896788521,0.8387562712472385,0.8442255412373584,0.8428542934065095,0.8436630032834103,0.8424743917515538,0.6674671156199542,0.6546952098192693
12
+ 10,-1,0.8258356117033007,0.8389840051357336,0.8431601980238087,0.8422182456627578,0.8426208270544481,0.8418695123198082,0.6626941850813575,0.6506253030959924
13
+ 11,-1,0.8284652475943988,0.841086496648774,0.8426511133266086,0.8422131602499052,0.841939859323034,0.8417027381803982,0.6599547048383673,0.6498603962965184
14
+ 12,-1,0.8282270475803677,0.8401680019659091,0.8407454303693322,0.8405057579382668,0.8402584983233138,0.8402383573933428,0.649248245099541,0.6397506514631653
15
+ 13,-1,0.8285424775064761,0.8406562817339212,0.8400079831187269,0.8404315700207666,0.8393971042568438,0.8398508090766418,0.6379017674627657,0.6284314657157315
16
+ 14,-1,0.8299030586659109,0.8414774720645537,0.8395022525025194,0.8401036374042852,0.838962731239484,0.8396137420397003,0.638690105535253,0.6296494493223689
17
+ 15,-1,0.8279209791074977,0.8401593392901441,0.8382420243095788,0.8393101937821174,0.8376061350028109,0.8387565279097566,0.62763507998445,0.6180745363107193
18
+ 16,-1,0.8293730946203294,0.8408973940353227,0.8371376970617006,0.8380426191861527,0.8365043857534152,0.8374649977813333,0.6292709383555336,0.6208646277535623
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "0_Transformer",
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_Dense",
18
+ "type": "sentence_transformers.models.Dense"
19
+ }
20
+ ]