julep commited on
Commit
90b6af7
1 Parent(s): 090281d

feat: Checkpoint 13800

Browse files

Signed-off-by: Julep Developers <developers@julep.ai>

.ipynb_checkpoints/README-checkpoint.md ADDED
@@ -0,0 +1,100 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: mit
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
+ ---
10
+
11
+ # dfe-base-en
12
+
13
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1536 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('julep-ai/dfe-base-en')
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 1321 with parameters:
51
+ ```
52
+ {'batch_size': 1280, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
53
+ ```
54
+
55
+ **Loss**:
56
+
57
+ `sentence_transformers.losses.TripletLoss.TripletLoss` with parameters:
58
+ ```
59
+ {'distance_metric': 'TripletDistanceMetric.EUCLIDEAN', 'triplet_margin': 5}
60
+ ```
61
+
62
+ Parameters of the fit()-Method:
63
+ ```
64
+ {
65
+ "epochs": 12,
66
+ "evaluation_steps": 0,
67
+ "evaluator": "sentence_transformers.evaluation.TripletEvaluator.TripletEvaluator",
68
+ "max_grad_norm": 1,
69
+ "optimizer_class": "<class 'lion_pytorch.lion_pytorch.Lion'>",
70
+ "optimizer_params": {
71
+ "lr": 0.0001,
72
+ "weight_decay": 0.01
73
+ },
74
+ "scheduler": "WarmupCosine",
75
+ "steps_per_epoch": null,
76
+ "warmup_steps": 100,
77
+ "weight_decay": 0.01
78
+ }
79
+ ```
80
+
81
+
82
+ ## Full Model Architecture
83
+ ```
84
+ SentenceTransformer(
85
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
86
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
87
+ (2): Asym(
88
+ (dialog-0): Dense({'in_features': 768, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
89
+ (dialog-1): Dense({'in_features': 1536, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
90
+ (dialog-2): Dense({'in_features': 1536, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
91
+ (fact-0): Dense({'in_features': 768, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
92
+ (fact-1): Dense({'in_features': 1536, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
93
+ (fact-2): Dense({'in_features': 1536, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
94
+ )
95
+ )
96
+ ```
97
+
98
+ ## Citing & Authors
99
+
100
+ <!--- Describe where people can find more information -->
1_Pooling/config.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false
7
+ }
2_Asym/140654129191936_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 768, "out_features": 1536, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Asym/140654129191936_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:208eed2d63c776a137954ad8290e40ee91432754ec07b1fc70a4ddc890f66cb3
3
+ size 4726396
2_Asym/140654129198896_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 1536, "out_features": 1536, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Asym/140654129198896_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8487aeba9cac38fbca92f3bdb0da88819f2de264508a80ff71388c280551665d
3
+ size 9444988
2_Asym/140654129199328_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 1536, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Asym/140654129199328_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f4eb147f91d745c0a5602afaf50254a57b010021b0114aad9cfc4acdf8514122
3
+ size 4723324
2_Asym/140654129199376_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 1536, "out_features": 768, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Asym/140654129199376_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bfdacf5a19b33b11cd1877386edf20e13a0b1e818caf00ec864e19e2324bebfe
3
+ size 4723324
2_Asym/140654129388880_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 768, "out_features": 1536, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Asym/140654129388880_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e6983a97e93899db94b23a77a425790d7aadb48ba0fbaf9dbcda453854fbe38a
3
+ size 4726396
2_Asym/140663133264320_Dense/config.json ADDED
@@ -0,0 +1 @@
 
 
1
+ {"in_features": 1536, "out_features": 1536, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Asym/140663133264320_Dense/pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4afe1d4cb3d88f6b9492a17917199940594a99ba4571f0e530ce15858cc9bc16
3
+ size 9444988
2_Asym/config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "types": {
3
+ "140654129388880_Dense": "sentence_transformers.models.Dense",
4
+ "140663133264320_Dense": "sentence_transformers.models.Dense",
5
+ "140654129199328_Dense": "sentence_transformers.models.Dense",
6
+ "140654129191936_Dense": "sentence_transformers.models.Dense",
7
+ "140654129198896_Dense": "sentence_transformers.models.Dense",
8
+ "140654129199376_Dense": "sentence_transformers.models.Dense"
9
+ },
10
+ "structure": {
11
+ "dialog": [
12
+ "140654129388880_Dense",
13
+ "140663133264320_Dense",
14
+ "140654129199328_Dense"
15
+ ],
16
+ "fact": [
17
+ "140654129191936_Dense",
18
+ "140654129198896_Dense",
19
+ "140654129199376_Dense"
20
+ ]
21
+ },
22
+ "parameters": {
23
+ "allow_empty_key": false
24
+ }
25
+ }
README.md CHANGED
@@ -1,3 +1,100 @@
1
  ---
2
  license: mit
 
 
 
 
 
 
3
  ---
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
  ---
2
  license: mit
3
+ pipeline_tag: sentence-similarity
4
+ tags:
5
+ - sentence-transformers
6
+ - feature-extraction
7
+ - sentence-similarity
8
+
9
  ---
10
+
11
+ # dfe-base-en
12
+
13
+ This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 1536 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('julep-ai/dfe-base-en')
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 1321 with parameters:
51
+ ```
52
+ {'batch_size': 1280, 'sampler': 'torch.utils.data.sampler.RandomSampler', 'batch_sampler': 'torch.utils.data.sampler.BatchSampler'}
53
+ ```
54
+
55
+ **Loss**:
56
+
57
+ `sentence_transformers.losses.TripletLoss.TripletLoss` with parameters:
58
+ ```
59
+ {'distance_metric': 'TripletDistanceMetric.EUCLIDEAN', 'triplet_margin': 5}
60
+ ```
61
+
62
+ Parameters of the fit()-Method:
63
+ ```
64
+ {
65
+ "epochs": 12,
66
+ "evaluation_steps": 0,
67
+ "evaluator": "sentence_transformers.evaluation.TripletEvaluator.TripletEvaluator",
68
+ "max_grad_norm": 1,
69
+ "optimizer_class": "<class 'lion_pytorch.lion_pytorch.Lion'>",
70
+ "optimizer_params": {
71
+ "lr": 0.0001,
72
+ "weight_decay": 0.01
73
+ },
74
+ "scheduler": "WarmupCosine",
75
+ "steps_per_epoch": null,
76
+ "warmup_steps": 100,
77
+ "weight_decay": 0.01
78
+ }
79
+ ```
80
+
81
+
82
+ ## Full Model Architecture
83
+ ```
84
+ SentenceTransformer(
85
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
86
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False})
87
+ (2): Asym(
88
+ (dialog-0): Dense({'in_features': 768, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
89
+ (dialog-1): Dense({'in_features': 1536, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
90
+ (dialog-2): Dense({'in_features': 1536, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
91
+ (fact-0): Dense({'in_features': 768, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
92
+ (fact-1): Dense({'in_features': 1536, 'out_features': 1536, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
93
+ (fact-2): Dense({'in_features': 1536, 'out_features': 768, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
94
+ )
95
+ )
96
+ ```
97
+
98
+ ## Citing & Authors
99
+
100
+ <!--- Describe where people can find more information -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "/root/.cache/torch/sentence_transformers/BAAI_bge-base-en-v1.5/",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "id2label": {
13
+ "0": "LABEL_0"
14
+ },
15
+ "initializer_range": 0.02,
16
+ "intermediate_size": 3072,
17
+ "label2id": {
18
+ "LABEL_0": 0
19
+ },
20
+ "layer_norm_eps": 1e-12,
21
+ "max_position_embeddings": 512,
22
+ "model_type": "bert",
23
+ "num_attention_heads": 12,
24
+ "num_hidden_layers": 12,
25
+ "pad_token_id": 0,
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.33.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 30522
32
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.2.2",
4
+ "transformers": "4.28.1",
5
+ "pytorch": "1.13.0+cu117"
6
+ }
7
+ }
eval/.ipynb_checkpoints/triplet_evaluation_results-checkpoint.csv ADDED
@@ -0,0 +1,2 @@
 
 
 
1
+ epoch,steps,accuracy_cosinus,accuracy_manhattan,accuracy_euclidean
2
+ 0,-1,0.8347865504093006,0.835933125349972,0.8326267231954777
eval/triplet_evaluation_results.csv ADDED
@@ -0,0 +1,11 @@
 
 
 
 
 
 
 
 
 
 
 
 
1
+ epoch,steps,accuracy_cosinus,accuracy_manhattan,accuracy_euclidean
2
+ 0,-1,0.8347865504093006,0.835933125349972,0.8326267231954777
3
+ 1,-1,0.9147801509212596,0.9147534863877557,0.9126469882409407
4
+ 2,-1,0.9442177959096606,0.943391195371037,0.9422179558968616
5
+ 3,-1,0.9552035837133029,0.954990267445271,0.9536837053035757
6
+ 4,-1,0.9626429885609151,0.9630696210969789,0.9617097298882756
7
+ 5,-1,0.9655494227128496,0.9658960616484015,0.964962802975762
8
+ 6,-1,0.9678425725941925,0.9678159080606885,0.9675225981921446
9
+ 7,-1,0.9697890835399835,0.9693624510039197,0.9691757992693918
10
+ 8,-1,0.9714422846172306,0.9709889875476628,0.9706423486121111
11
+ 9,-1,0.9715756072847506,0.9718155880862864,0.9720022398208144
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_Asym",
18
+ "type": "sentence_transformers.models.Asym"
19
+ }
20
+ ]
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:0902de760f1af733e3064489c15700f0658c2d955fcf9784b40069791cfef97a
3
+ size 437996134
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
4
+ }
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
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
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": 512,
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
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff