Hgkang00 commited on
Commit
a14e296
1 Parent(s): 7910251

Add new SentenceTransformer model.

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,474 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: []
3
+ library_name: sentence-transformers
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - dataset_size:100K<n<1M
9
+ - loss:CoSENTLoss
10
+ base_model: sentence-transformers/all-MiniLM-L6-v2
11
+ metrics:
12
+ - pearson_cosine
13
+ - spearman_cosine
14
+ - pearson_manhattan
15
+ - spearman_manhattan
16
+ - pearson_euclidean
17
+ - spearman_euclidean
18
+ - pearson_dot
19
+ - spearman_dot
20
+ - pearson_max
21
+ - spearman_max
22
+ widget:
23
+ - source_sentence: Frequent headaches and muscle soreness are a result of my insomnia.
24
+ sentences:
25
+ - My frequent headaches and muscle soreness are a direct result of my insomnia.
26
+ - A manic episode often prevents me from sitting still or relaxing as I constantly
27
+ need to be on the move.
28
+ - The fear of being away from familiar places during a panic attack is why I have
29
+ refused job opportunities with travel obligations.
30
+ - source_sentence: My insomnia results in frequent headaches and muscle soreness for
31
+ me.
32
+ sentences:
33
+ - Due to my insomnia, I have frequent headaches and muscle soreness.
34
+ - Thoughts of life not being worth living and feelings of hopelessness create a
35
+ difficult challenge for me.
36
+ - The fear of being away from familiar places during a panic attack is why I have
37
+ refused job opportunities with travel obligations.
38
+ - source_sentence: Faced with a snake, fear takes over and I stay frozen until it
39
+ passes.
40
+ sentences:
41
+ - Whenever I encounter a snake, I freeze in fear and cannot move until it is gone.
42
+ - Due to a sense of unworthiness of happiness, I struggle to enjoy activities that
43
+ were once my favorites.
44
+ - The fear of being away from familiar places during a panic attack is why I have
45
+ refused job opportunities with travel obligations.
46
+ - source_sentence: The idea of overdosing on medication crosses my mind when overwhelmed.
47
+ sentences:
48
+ - Thoughts of overdosing on medication often occur to me when I'm overwhelmed.
49
+ - I, almost like being stuck in a loop, repeat certain actions or words without
50
+ any clear purpose at times.
51
+ - The fear of being away from familiar places during a panic attack is why I have
52
+ refused job opportunities with travel obligations.
53
+ - source_sentence: Insomnia has led me to experience frequent headaches and muscle
54
+ soreness.
55
+ sentences:
56
+ - My insomnia has caused me to experience frequent headaches and muscle soreness.
57
+ - I struggle with distinguishing between reality and illusions when I feel detached
58
+ from reality at times.
59
+ - The fear of being away from familiar places during a panic attack is why I have
60
+ refused job opportunities with travel obligations.
61
+ pipeline_tag: sentence-similarity
62
+ model-index:
63
+ - name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
64
+ results:
65
+ - task:
66
+ type: semantic-similarity
67
+ name: Semantic Similarity
68
+ dataset:
69
+ name: FT label aug
70
+ type: FT_label_aug
71
+ metrics:
72
+ - type: pearson_cosine
73
+ value: 0.42561450628852554
74
+ name: Pearson Cosine
75
+ - type: spearman_cosine
76
+ value: 0.23253817395631948
77
+ name: Spearman Cosine
78
+ - type: pearson_manhattan
79
+ value: 0.5095430319125491
80
+ name: Pearson Manhattan
81
+ - type: spearman_manhattan
82
+ value: 0.23187290173483613
83
+ name: Spearman Manhattan
84
+ - type: pearson_euclidean
85
+ value: 0.5153981915417447
86
+ name: Pearson Euclidean
87
+ - type: spearman_euclidean
88
+ value: 0.232538168642362
89
+ name: Spearman Euclidean
90
+ - type: pearson_dot
91
+ value: 0.4256145064012167
92
+ name: Pearson Dot
93
+ - type: spearman_dot
94
+ value: 0.23253817993475548
95
+ name: Spearman Dot
96
+ - type: pearson_max
97
+ value: 0.5153981915417447
98
+ name: Pearson Max
99
+ - type: spearman_max
100
+ value: 0.23253817993475548
101
+ name: Spearman Max
102
+ ---
103
+
104
+ # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
105
+
106
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
107
+
108
+ ## Model Details
109
+
110
+ ### Model Description
111
+ - **Model Type:** Sentence Transformer
112
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
113
+ - **Maximum Sequence Length:** 256 tokens
114
+ - **Output Dimensionality:** 384 tokens
115
+ - **Similarity Function:** Cosine Similarity
116
+ <!-- - **Training Dataset:** Unknown -->
117
+ <!-- - **Language:** Unknown -->
118
+ <!-- - **License:** Unknown -->
119
+
120
+ ### Model Sources
121
+
122
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
123
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
124
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
125
+
126
+ ### Full Model Architecture
127
+
128
+ ```
129
+ SentenceTransformer(
130
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
131
+ (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})
132
+ (2): Normalize()
133
+ )
134
+ ```
135
+
136
+ ## Usage
137
+
138
+ ### Direct Usage (Sentence Transformers)
139
+
140
+ First install the Sentence Transformers library:
141
+
142
+ ```bash
143
+ pip install -U sentence-transformers
144
+ ```
145
+
146
+ Then you can load this model and run inference.
147
+ ```python
148
+ from sentence_transformers import SentenceTransformer
149
+
150
+ # Download from the 🤗 Hub
151
+ model = SentenceTransformer("Hgkang00/FT-label-aug-consent-10")
152
+ # Run inference
153
+ sentences = [
154
+ 'Insomnia has led me to experience frequent headaches and muscle soreness.',
155
+ 'My insomnia has caused me to experience frequent headaches and muscle soreness.',
156
+ 'I struggle with distinguishing between reality and illusions when I feel detached from reality at times.',
157
+ ]
158
+ embeddings = model.encode(sentences)
159
+ print(embeddings.shape)
160
+ # [3, 384]
161
+
162
+ # Get the similarity scores for the embeddings
163
+ similarities = model.similarity(embeddings, embeddings)
164
+ print(similarities.shape)
165
+ # [3, 3]
166
+ ```
167
+
168
+ <!--
169
+ ### Direct Usage (Transformers)
170
+
171
+ <details><summary>Click to see the direct usage in Transformers</summary>
172
+
173
+ </details>
174
+ -->
175
+
176
+ <!--
177
+ ### Downstream Usage (Sentence Transformers)
178
+
179
+ You can finetune this model on your own dataset.
180
+
181
+ <details><summary>Click to expand</summary>
182
+
183
+ </details>
184
+ -->
185
+
186
+ <!--
187
+ ### Out-of-Scope Use
188
+
189
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
190
+ -->
191
+
192
+ ## Evaluation
193
+
194
+ ### Metrics
195
+
196
+ #### Semantic Similarity
197
+ * Dataset: `FT_label_aug`
198
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
199
+
200
+ | Metric | Value |
201
+ |:--------------------|:-----------|
202
+ | pearson_cosine | 0.4256 |
203
+ | **spearman_cosine** | **0.2325** |
204
+ | pearson_manhattan | 0.5095 |
205
+ | spearman_manhattan | 0.2319 |
206
+ | pearson_euclidean | 0.5154 |
207
+ | spearman_euclidean | 0.2325 |
208
+ | pearson_dot | 0.4256 |
209
+ | spearman_dot | 0.2325 |
210
+ | pearson_max | 0.5154 |
211
+ | spearman_max | 0.2325 |
212
+
213
+ <!--
214
+ ## Bias, Risks and Limitations
215
+
216
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
217
+ -->
218
+
219
+ <!--
220
+ ### Recommendations
221
+
222
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
223
+ -->
224
+
225
+ ## Training Details
226
+
227
+ ### Training Dataset
228
+
229
+ #### Unnamed Dataset
230
+
231
+
232
+ * Size: 133,800 training samples
233
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
234
+ * Approximate statistics based on the first 1000 samples:
235
+ | | sentence1 | sentence2 | score |
236
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------|
237
+ | type | string | string | float |
238
+ | details | <ul><li>min: 11 tokens</li><li>mean: 31.63 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 25.22 tokens</li><li>max: 41 tokens</li></ul> | <ul><li>min: -1.0</li><li>mean: -0.92</li><li>max: 1.0</li></ul> |
239
+ * Samples:
240
+ | sentence1 | sentence2 | score |
241
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------|
242
+ | <code>Presence of one or more of the following intrusion symptoms associated with the traumatic event: recurrent distressing memories, dreams, flashbacks, psychological distress, or physiological reactions to cues of the traumatic event.</code> | <code>I avoid making phone calls, even to close friends or family, because I'm afraid of saying something wrong or sounding awkward.</code> | <code>0.0</code> |
243
+ | <code>The phobic object or situation almost always provokes immediate fear or anxiety.</code> | <code>I find it hard to stick to a consistent eating schedule, sometimes going days without feeling the need to eat at all.</code> | <code>-1.0</code> |
244
+ | <code>The fear or anxiety is out of proportion to the actual danger posed by the specific object or situation and to the sociocultural context.</code> | <code>I have difficulty going to places where I feel there are no immediate exits, such as cinemas or auditoriums, as the fear of being stuck or unable to escape escalates my anxiety.</code> | <code>-1.0</code> |
245
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
246
+ ```json
247
+ {
248
+ "scale": 20.0,
249
+ "similarity_fct": "pairwise_cos_sim"
250
+ }
251
+ ```
252
+
253
+ ### Evaluation Dataset
254
+
255
+ #### Unnamed Dataset
256
+
257
+
258
+ * Size: 104,225 evaluation samples
259
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
260
+ * Approximate statistics based on the first 1000 samples:
261
+ | | sentence1 | sentence2 | score |
262
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------|
263
+ | type | string | string | float |
264
+ | details | <ul><li>min: 11 tokens</li><li>mean: 31.24 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 24.86 tokens</li><li>max: 41 tokens</li></ul> | <ul><li>min: -1.0</li><li>mean: -0.93</li><li>max: 1.0</li></ul> |
265
+ * Samples:
266
+ | sentence1 | sentence2 | score |
267
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------------------------|:------------------|
268
+ | <code>Excessive anxiety and worry occurring more days than not for at least 6 months, about a number of events or activities such as work or school performance.</code> | <code>Simple activities like going for a walk or doing household chores feel like daunting tasks due to my low energy levels.</code> | <code>-1.0</code> |
269
+ | <code>The individual fears acting in a way or showing anxiety symptoms that will be negatively evaluated, leading to humiliation, embarrassment, rejection, or offense to others.</code> | <code>I often find myself mindlessly snacking throughout the day due to changes in my appetite.</code> | <code>-1.0</code> |
270
+ | <code>Persistent avoidance of stimuli associated with the trauma, evidenced by avoiding distressing memories, thoughts, or feelings, or external reminders of the event.</code> | <code>Simple activities like going for a walk or doing household chores feel like daunting tasks due to my low energy levels.</code> | <code>-1.0</code> |
271
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
272
+ ```json
273
+ {
274
+ "scale": 20.0,
275
+ "similarity_fct": "pairwise_cos_sim"
276
+ }
277
+ ```
278
+
279
+ ### Training Hyperparameters
280
+ #### Non-Default Hyperparameters
281
+
282
+ - `eval_strategy`: epoch
283
+ - `per_device_train_batch_size`: 256
284
+ - `per_device_eval_batch_size`: 128
285
+ - `num_train_epochs`: 10
286
+ - `warmup_ratio`: 0.1
287
+ - `batch_sampler`: no_duplicates
288
+
289
+ #### All Hyperparameters
290
+ <details><summary>Click to expand</summary>
291
+
292
+ - `overwrite_output_dir`: False
293
+ - `do_predict`: False
294
+ - `eval_strategy`: epoch
295
+ - `prediction_loss_only`: True
296
+ - `per_device_train_batch_size`: 256
297
+ - `per_device_eval_batch_size`: 128
298
+ - `per_gpu_train_batch_size`: None
299
+ - `per_gpu_eval_batch_size`: None
300
+ - `gradient_accumulation_steps`: 1
301
+ - `eval_accumulation_steps`: None
302
+ - `learning_rate`: 5e-05
303
+ - `weight_decay`: 0.0
304
+ - `adam_beta1`: 0.9
305
+ - `adam_beta2`: 0.999
306
+ - `adam_epsilon`: 1e-08
307
+ - `max_grad_norm`: 1.0
308
+ - `num_train_epochs`: 10
309
+ - `max_steps`: -1
310
+ - `lr_scheduler_type`: linear
311
+ - `lr_scheduler_kwargs`: {}
312
+ - `warmup_ratio`: 0.1
313
+ - `warmup_steps`: 0
314
+ - `log_level`: passive
315
+ - `log_level_replica`: warning
316
+ - `log_on_each_node`: True
317
+ - `logging_nan_inf_filter`: True
318
+ - `save_safetensors`: True
319
+ - `save_on_each_node`: False
320
+ - `save_only_model`: False
321
+ - `restore_callback_states_from_checkpoint`: False
322
+ - `no_cuda`: False
323
+ - `use_cpu`: False
324
+ - `use_mps_device`: False
325
+ - `seed`: 42
326
+ - `data_seed`: None
327
+ - `jit_mode_eval`: False
328
+ - `use_ipex`: False
329
+ - `bf16`: False
330
+ - `fp16`: False
331
+ - `fp16_opt_level`: O1
332
+ - `half_precision_backend`: auto
333
+ - `bf16_full_eval`: False
334
+ - `fp16_full_eval`: False
335
+ - `tf32`: None
336
+ - `local_rank`: 0
337
+ - `ddp_backend`: None
338
+ - `tpu_num_cores`: None
339
+ - `tpu_metrics_debug`: False
340
+ - `debug`: []
341
+ - `dataloader_drop_last`: False
342
+ - `dataloader_num_workers`: 0
343
+ - `dataloader_prefetch_factor`: None
344
+ - `past_index`: -1
345
+ - `disable_tqdm`: False
346
+ - `remove_unused_columns`: True
347
+ - `label_names`: None
348
+ - `load_best_model_at_end`: False
349
+ - `ignore_data_skip`: False
350
+ - `fsdp`: []
351
+ - `fsdp_min_num_params`: 0
352
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
353
+ - `fsdp_transformer_layer_cls_to_wrap`: None
354
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
355
+ - `deepspeed`: None
356
+ - `label_smoothing_factor`: 0.0
357
+ - `optim`: adamw_torch
358
+ - `optim_args`: None
359
+ - `adafactor`: False
360
+ - `group_by_length`: False
361
+ - `length_column_name`: length
362
+ - `ddp_find_unused_parameters`: None
363
+ - `ddp_bucket_cap_mb`: None
364
+ - `ddp_broadcast_buffers`: False
365
+ - `dataloader_pin_memory`: True
366
+ - `dataloader_persistent_workers`: False
367
+ - `skip_memory_metrics`: True
368
+ - `use_legacy_prediction_loop`: False
369
+ - `push_to_hub`: False
370
+ - `resume_from_checkpoint`: None
371
+ - `hub_model_id`: None
372
+ - `hub_strategy`: every_save
373
+ - `hub_private_repo`: False
374
+ - `hub_always_push`: False
375
+ - `gradient_checkpointing`: False
376
+ - `gradient_checkpointing_kwargs`: None
377
+ - `include_inputs_for_metrics`: False
378
+ - `eval_do_concat_batches`: True
379
+ - `fp16_backend`: auto
380
+ - `push_to_hub_model_id`: None
381
+ - `push_to_hub_organization`: None
382
+ - `mp_parameters`:
383
+ - `auto_find_batch_size`: False
384
+ - `full_determinism`: False
385
+ - `torchdynamo`: None
386
+ - `ray_scope`: last
387
+ - `ddp_timeout`: 1800
388
+ - `torch_compile`: False
389
+ - `torch_compile_backend`: None
390
+ - `torch_compile_mode`: None
391
+ - `dispatch_batches`: None
392
+ - `split_batches`: None
393
+ - `include_tokens_per_second`: False
394
+ - `include_num_input_tokens_seen`: False
395
+ - `neftune_noise_alpha`: None
396
+ - `optim_target_modules`: None
397
+ - `batch_eval_metrics`: False
398
+ - `batch_sampler`: no_duplicates
399
+ - `multi_dataset_batch_sampler`: proportional
400
+
401
+ </details>
402
+
403
+ ### Training Logs
404
+ | Epoch | Step | Training Loss | loss | FT_label_aug_spearman_cosine |
405
+ |:------:|:----:|:-------------:|:-------:|:----------------------------:|
406
+ | 1.0 | 523 | 7.773 | - | - |
407
+ | 2.0 | 1046 | 0.0004 | - | - |
408
+ | 2.9828 | 1560 | - | 11.8818 | 0.2184 |
409
+ | 1.0172 | 1569 | 0.1169 | - | - |
410
+ | 2.0172 | 2092 | 5.4076 | - | - |
411
+ | 3.0172 | 2615 | 0.0002 | - | - |
412
+ | 3.9828 | 3120 | - | 11.8669 | 0.2054 |
413
+ | 2.0344 | 3138 | 0.1571 | - | - |
414
+ | 3.0344 | 3661 | 4.0179 | - | - |
415
+ | 4.0344 | 4184 | 0.0001 | - | - |
416
+ | 4.9828 | 4680 | - | 12.8814 | 0.2291 |
417
+ | 3.0516 | 4707 | 0.1592 | - | - |
418
+ | 4.0516 | 5230 | 2.835 | 13.5336 | 0.2325 |
419
+
420
+
421
+ ### Framework Versions
422
+ - Python: 3.10.12
423
+ - Sentence Transformers: 3.0.0
424
+ - Transformers: 4.41.1
425
+ - PyTorch: 2.3.0+cu121
426
+ - Accelerate: 0.30.1
427
+ - Datasets: 2.19.1
428
+ - Tokenizers: 0.19.1
429
+
430
+ ## Citation
431
+
432
+ ### BibTeX
433
+
434
+ #### Sentence Transformers
435
+ ```bibtex
436
+ @inproceedings{reimers-2019-sentence-bert,
437
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
438
+ author = "Reimers, Nils and Gurevych, Iryna",
439
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
440
+ month = "11",
441
+ year = "2019",
442
+ publisher = "Association for Computational Linguistics",
443
+ url = "https://arxiv.org/abs/1908.10084",
444
+ }
445
+ ```
446
+
447
+ #### CoSENTLoss
448
+ ```bibtex
449
+ @online{kexuefm-8847,
450
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
451
+ author={Su Jianlin},
452
+ year={2022},
453
+ month={Jan},
454
+ url={https://kexue.fm/archives/8847},
455
+ }
456
+ ```
457
+
458
+ <!--
459
+ ## Glossary
460
+
461
+ *Clearly define terms in order to be accessible across audiences.*
462
+ -->
463
+
464
+ <!--
465
+ ## Model Card Authors
466
+
467
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
468
+ -->
469
+
470
+ <!--
471
+ ## Model Card Contact
472
+
473
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
474
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
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": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.1",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 30522
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "2.0.0",
4
+ "transformers": "4.6.1",
5
+ "pytorch": "1.8.1"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:30ff3cde32bc3877b83e975c44ca5437c01d0cf286f1b0c800e82183ecc58e9f
3
+ size 90864192
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": 256,
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": 256,
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