Hgkang00 commited on
Commit
696be8c
1 Parent(s): ea88ca6

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,494 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language: []
3
+ library_name: sentence-transformers
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - dataset_size:10K<n<100K
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: Driving or commuting to work feels draining, even if it's a short
24
+ distance.
25
+ sentences:
26
+ - Symptoms during a manic episode include decreased need for sleep, more talkative
27
+ than usual, flight of ideas, distractibility
28
+ - I feel like I have lost a part of myself since the traumatic event, and I struggle
29
+ to connect with others on a deeper level.
30
+ - For at least 2 years, or 1 year in children and adolescents, numerous periods
31
+ with hypomanic symptoms and depressive symptoms occur, neither meeting full criteria
32
+ for hypomanic or major depressive episodes.
33
+ - source_sentence: I felt like my thoughts were disconnected and chaotic during a
34
+ manic episode.
35
+ sentences:
36
+ - Diagnosis requires one or more manic episodes, which may be preceded or followed
37
+ by hypomanic or major depressive episodes.
38
+ - I feel like I have lost a part of myself since the traumatic event, and I struggle
39
+ to connect with others on a deeper level.
40
+ - Depressed mood for most of the day, for more days than not, as indicated by subjective
41
+ account or observation, for at least 2 years.
42
+ - source_sentence: My insomnia has caused me to experience frequent headaches and
43
+ muscle soreness.
44
+ sentences:
45
+ - Insomnia or hypersomnia nearly every day.
46
+ - I have difficulty standing in long lines at the grocery store or the bank due
47
+ to the fear of feeling trapped or overwhelmed.
48
+ - For at least 2 years, or 1 year in children and adolescents, numerous periods
49
+ with hypomanic symptoms and depressive symptoms occur, neither meeting full criteria
50
+ for hypomanic or major depressive episodes.
51
+ - source_sentence: The phobic object or situation almost always provokes immediate
52
+ fear or anxiety.
53
+ sentences:
54
+ - The agoraphobic situations almost always provoke fear or anxiety.
55
+ - I have difficulty standing in long lines at the grocery store or the bank due
56
+ to the fear of feeling trapped or overwhelmed.
57
+ - For at least 2 years, or 1 year in children and adolescents, numerous periods
58
+ with hypomanic symptoms and depressive symptoms occur, neither meeting full criteria
59
+ for hypomanic or major depressive episodes.
60
+ - source_sentence: I engage in risky behaviors like reckless driving or reckless sexual
61
+ encounters.
62
+ sentences:
63
+ - Symptoms during a manic episode include inflated self-esteem or grandiosity,increased
64
+ goal-directed activity, or excessive involvement in risky activities.
65
+ - Marked decrease in functioning in areas like work, interpersonal relations, or
66
+ self-care since the onset of the disturbance.
67
+ - The agoraphobic situations are actively avoided, require the presence of a companion,
68
+ or are endured with intense fear or anxiety.
69
+ pipeline_tag: sentence-similarity
70
+ model-index:
71
+ - name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
72
+ results:
73
+ - task:
74
+ type: semantic-similarity
75
+ name: Semantic Similarity
76
+ dataset:
77
+ name: FT label
78
+ type: FT_label
79
+ metrics:
80
+ - type: pearson_cosine
81
+ value: 0.40571243927086686
82
+ name: Pearson Cosine
83
+ - type: spearman_cosine
84
+ value: 0.4157655660967662
85
+ name: Spearman Cosine
86
+ - type: pearson_manhattan
87
+ value: 0.4294377953337607
88
+ name: Pearson Manhattan
89
+ - type: spearman_manhattan
90
+ value: 0.41636474785618866
91
+ name: Spearman Manhattan
92
+ - type: pearson_euclidean
93
+ value: 0.4293067637823527
94
+ name: Pearson Euclidean
95
+ - type: spearman_euclidean
96
+ value: 0.41576593946890283
97
+ name: Spearman Euclidean
98
+ - type: pearson_dot
99
+ value: 0.4057124337715868
100
+ name: Pearson Dot
101
+ - type: spearman_dot
102
+ value: 0.4157663124606592
103
+ name: Spearman Dot
104
+ - type: pearson_max
105
+ value: 0.4294377953337607
106
+ name: Pearson Max
107
+ - type: spearman_max
108
+ value: 0.41636474785618866
109
+ name: Spearman Max
110
+ ---
111
+
112
+ # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
113
+
114
+ 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.
115
+
116
+ ## Model Details
117
+
118
+ ### Model Description
119
+ - **Model Type:** Sentence Transformer
120
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision e4ce9877abf3edfe10b0d82785e83bdcb973e22e -->
121
+ - **Maximum Sequence Length:** 256 tokens
122
+ - **Output Dimensionality:** 384 tokens
123
+ - **Similarity Function:** Cosine Similarity
124
+ <!-- - **Training Dataset:** Unknown -->
125
+ <!-- - **Language:** Unknown -->
126
+ <!-- - **License:** Unknown -->
127
+
128
+ ### Model Sources
129
+
130
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
131
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
132
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
133
+
134
+ ### Full Model Architecture
135
+
136
+ ```
137
+ SentenceTransformer(
138
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
139
+ (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})
140
+ (2): Normalize()
141
+ )
142
+ ```
143
+
144
+ ## Usage
145
+
146
+ ### Direct Usage (Sentence Transformers)
147
+
148
+ First install the Sentence Transformers library:
149
+
150
+ ```bash
151
+ pip install -U sentence-transformers
152
+ ```
153
+
154
+ Then you can load this model and run inference.
155
+ ```python
156
+ from sentence_transformers import SentenceTransformer
157
+
158
+ # Download from the 🤗 Hub
159
+ model = SentenceTransformer("Hgkang00/FT-label-consent-10")
160
+ # Run inference
161
+ sentences = [
162
+ 'I engage in risky behaviors like reckless driving or reckless sexual encounters.',
163
+ 'Symptoms during a manic episode include inflated self-esteem or grandiosity,increased goal-directed activity, or excessive involvement in risky activities.',
164
+ 'Marked decrease in functioning in areas like work, interpersonal relations, or self-care since the onset of the disturbance.',
165
+ ]
166
+ embeddings = model.encode(sentences)
167
+ print(embeddings.shape)
168
+ # [3, 384]
169
+
170
+ # Get the similarity scores for the embeddings
171
+ similarities = model.similarity(embeddings, embeddings)
172
+ print(similarities.shape)
173
+ # [3, 3]
174
+ ```
175
+
176
+ <!--
177
+ ### Direct Usage (Transformers)
178
+
179
+ <details><summary>Click to see the direct usage in Transformers</summary>
180
+
181
+ </details>
182
+ -->
183
+
184
+ <!--
185
+ ### Downstream Usage (Sentence Transformers)
186
+
187
+ You can finetune this model on your own dataset.
188
+
189
+ <details><summary>Click to expand</summary>
190
+
191
+ </details>
192
+ -->
193
+
194
+ <!--
195
+ ### Out-of-Scope Use
196
+
197
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
198
+ -->
199
+
200
+ ## Evaluation
201
+
202
+ ### Metrics
203
+
204
+ #### Semantic Similarity
205
+ * Dataset: `FT_label`
206
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
207
+
208
+ | Metric | Value |
209
+ |:--------------------|:-----------|
210
+ | pearson_cosine | 0.4057 |
211
+ | **spearman_cosine** | **0.4158** |
212
+ | pearson_manhattan | 0.4294 |
213
+ | spearman_manhattan | 0.4164 |
214
+ | pearson_euclidean | 0.4293 |
215
+ | spearman_euclidean | 0.4158 |
216
+ | pearson_dot | 0.4057 |
217
+ | spearman_dot | 0.4158 |
218
+ | pearson_max | 0.4294 |
219
+ | spearman_max | 0.4164 |
220
+
221
+ <!--
222
+ ## Bias, Risks and Limitations
223
+
224
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
225
+ -->
226
+
227
+ <!--
228
+ ### Recommendations
229
+
230
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
231
+ -->
232
+
233
+ ## Training Details
234
+
235
+ ### Training Dataset
236
+
237
+ #### Unnamed Dataset
238
+
239
+
240
+ * Size: 33,800 training samples
241
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
242
+ * Approximate statistics based on the first 1000 samples:
243
+ | | sentence1 | sentence2 | score |
244
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
245
+ | type | string | string | float |
246
+ | details | <ul><li>min: 29 tokens</li><li>mean: 29.0 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 14 tokens</li><li>mean: 25.15 tokens</li><li>max: 43 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.06</li><li>max: 1.0</li></ul> |
247
+ * Samples:
248
+ | sentence1 | sentence2 | score |
249
+ |:-------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
250
+ | <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>I often hear voices telling me things that are not real, even when I'm alone in my room.</code> | <code>1.0</code> |
251
+ | <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>I have strong beliefs that people are plotting against me and trying to harm me, which makes it hard for me to trust anyone.</code> | <code>1.0</code> |
252
+ | <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>Sometimes, I see things that others around me don't see, like strange figures or objects.</code> | <code>1.0</code> |
253
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
254
+ ```json
255
+ {
256
+ "scale": 20.0,
257
+ "similarity_fct": "pairwise_cos_sim"
258
+ }
259
+ ```
260
+
261
+ ### Evaluation Dataset
262
+
263
+ #### Unnamed Dataset
264
+
265
+
266
+ * Size: 4,225 evaluation samples
267
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
268
+ * Approximate statistics based on the first 1000 samples:
269
+ | | sentence1 | sentence2 | score |
270
+ |:--------|:----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
271
+ | type | string | string | float |
272
+ | details | <ul><li>min: 18 tokens</li><li>mean: 31.8 tokens</li><li>max: 60 tokens</li></ul> | <ul><li>min: 15 tokens</li><li>mean: 24.59 tokens</li><li>max: 41 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.06</li><li>max: 1.0</li></ul> |
273
+ * Samples:
274
+ | sentence1 | sentence2 | score |
275
+ |:-------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------|:-----------------|
276
+ | <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>People around me have noticed that my behavior is becoming more erratic and unpredictable.</code> | <code>1.0</code> |
277
+ | <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>There are times when I repeat certain actions or words without any clear purpose, almost like being stuck in a loop.</code> | <code>0.0</code> |
278
+ | <code>Presence of delusions, hallucinations or disorganized speech, for a significant portion of time within a 1-month period</code> | <code>I feel detached from reality at times and have trouble distinguishing between what is real and what is not.</code> | <code>0.0</code> |
279
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
280
+ ```json
281
+ {
282
+ "scale": 20.0,
283
+ "similarity_fct": "pairwise_cos_sim"
284
+ }
285
+ ```
286
+
287
+ ### Training Hyperparameters
288
+ #### Non-Default Hyperparameters
289
+
290
+ - `eval_strategy`: epoch
291
+ - `per_device_train_batch_size`: 256
292
+ - `per_device_eval_batch_size`: 128
293
+ - `num_train_epochs`: 10
294
+ - `warmup_ratio`: 0.1
295
+
296
+ #### All Hyperparameters
297
+ <details><summary>Click to expand</summary>
298
+
299
+ - `overwrite_output_dir`: False
300
+ - `do_predict`: False
301
+ - `eval_strategy`: epoch
302
+ - `prediction_loss_only`: True
303
+ - `per_device_train_batch_size`: 256
304
+ - `per_device_eval_batch_size`: 128
305
+ - `per_gpu_train_batch_size`: None
306
+ - `per_gpu_eval_batch_size`: None
307
+ - `gradient_accumulation_steps`: 1
308
+ - `eval_accumulation_steps`: None
309
+ - `learning_rate`: 5e-05
310
+ - `weight_decay`: 0.0
311
+ - `adam_beta1`: 0.9
312
+ - `adam_beta2`: 0.999
313
+ - `adam_epsilon`: 1e-08
314
+ - `max_grad_norm`: 1.0
315
+ - `num_train_epochs`: 10
316
+ - `max_steps`: -1
317
+ - `lr_scheduler_type`: linear
318
+ - `lr_scheduler_kwargs`: {}
319
+ - `warmup_ratio`: 0.1
320
+ - `warmup_steps`: 0
321
+ - `log_level`: passive
322
+ - `log_level_replica`: warning
323
+ - `log_on_each_node`: True
324
+ - `logging_nan_inf_filter`: True
325
+ - `save_safetensors`: True
326
+ - `save_on_each_node`: False
327
+ - `save_only_model`: False
328
+ - `restore_callback_states_from_checkpoint`: False
329
+ - `no_cuda`: False
330
+ - `use_cpu`: False
331
+ - `use_mps_device`: False
332
+ - `seed`: 42
333
+ - `data_seed`: None
334
+ - `jit_mode_eval`: False
335
+ - `use_ipex`: False
336
+ - `bf16`: False
337
+ - `fp16`: False
338
+ - `fp16_opt_level`: O1
339
+ - `half_precision_backend`: auto
340
+ - `bf16_full_eval`: False
341
+ - `fp16_full_eval`: False
342
+ - `tf32`: None
343
+ - `local_rank`: 0
344
+ - `ddp_backend`: None
345
+ - `tpu_num_cores`: None
346
+ - `tpu_metrics_debug`: False
347
+ - `debug`: []
348
+ - `dataloader_drop_last`: False
349
+ - `dataloader_num_workers`: 0
350
+ - `dataloader_prefetch_factor`: None
351
+ - `past_index`: -1
352
+ - `disable_tqdm`: False
353
+ - `remove_unused_columns`: True
354
+ - `label_names`: None
355
+ - `load_best_model_at_end`: False
356
+ - `ignore_data_skip`: False
357
+ - `fsdp`: []
358
+ - `fsdp_min_num_params`: 0
359
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
360
+ - `fsdp_transformer_layer_cls_to_wrap`: None
361
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
362
+ - `deepspeed`: None
363
+ - `label_smoothing_factor`: 0.0
364
+ - `optim`: adamw_torch
365
+ - `optim_args`: None
366
+ - `adafactor`: False
367
+ - `group_by_length`: False
368
+ - `length_column_name`: length
369
+ - `ddp_find_unused_parameters`: None
370
+ - `ddp_bucket_cap_mb`: None
371
+ - `ddp_broadcast_buffers`: False
372
+ - `dataloader_pin_memory`: True
373
+ - `dataloader_persistent_workers`: False
374
+ - `skip_memory_metrics`: True
375
+ - `use_legacy_prediction_loop`: False
376
+ - `push_to_hub`: False
377
+ - `resume_from_checkpoint`: None
378
+ - `hub_model_id`: None
379
+ - `hub_strategy`: every_save
380
+ - `hub_private_repo`: False
381
+ - `hub_always_push`: False
382
+ - `gradient_checkpointing`: False
383
+ - `gradient_checkpointing_kwargs`: None
384
+ - `include_inputs_for_metrics`: False
385
+ - `eval_do_concat_batches`: True
386
+ - `fp16_backend`: auto
387
+ - `push_to_hub_model_id`: None
388
+ - `push_to_hub_organization`: None
389
+ - `mp_parameters`:
390
+ - `auto_find_batch_size`: False
391
+ - `full_determinism`: False
392
+ - `torchdynamo`: None
393
+ - `ray_scope`: last
394
+ - `ddp_timeout`: 1800
395
+ - `torch_compile`: False
396
+ - `torch_compile_backend`: None
397
+ - `torch_compile_mode`: None
398
+ - `dispatch_batches`: None
399
+ - `split_batches`: None
400
+ - `include_tokens_per_second`: False
401
+ - `include_num_input_tokens_seen`: False
402
+ - `neftune_noise_alpha`: None
403
+ - `optim_target_modules`: None
404
+ - `batch_eval_metrics`: False
405
+ - `batch_sampler`: batch_sampler
406
+ - `multi_dataset_batch_sampler`: proportional
407
+
408
+ </details>
409
+
410
+ ### Training Logs
411
+ | Epoch | Step | Training Loss | loss | FT_label_spearman_cosine |
412
+ |:------:|:----:|:-------------:|:-------:|:------------------------:|
413
+ | 0.0377 | 10 | 11.8816 | - | - |
414
+ | 0.0755 | 20 | 12.0633 | - | - |
415
+ | 0.1132 | 30 | 11.2972 | - | - |
416
+ | 0.1509 | 40 | 11.4435 | - | - |
417
+ | 0.1887 | 50 | 10.9872 | - | - |
418
+ | 0.2264 | 60 | 10.3121 | - | - |
419
+ | 0.2642 | 70 | 10.0711 | - | - |
420
+ | 0.3019 | 80 | 9.6888 | - | - |
421
+ | 0.3396 | 90 | 9.2037 | - | - |
422
+ | 0.3774 | 100 | 8.6158 | - | - |
423
+ | 0.4151 | 110 | 8.4605 | - | - |
424
+ | 0.4528 | 120 | 8.202 | - | - |
425
+ | 0.4906 | 130 | 7.9642 | - | - |
426
+ | 0.5283 | 140 | 7.8384 | - | - |
427
+ | 0.5660 | 150 | 7.8803 | - | - |
428
+ | 0.6038 | 160 | 7.419 | - | - |
429
+ | 1.0 | 133 | 8.435 | 8.1138 | 0.3813 |
430
+ | 2.0 | 266 | 7.7886 | 8.2494 | 0.4003 |
431
+ | 3.0 | 399 | 7.164 | 8.7060 | 0.4048 |
432
+ | 4.0 | 532 | 6.5921 | 9.5854 | 0.3882 |
433
+ | 5.0 | 665 | 6.2349 | 10.5716 | 0.4042 |
434
+ | 6.0 | 798 | 5.7831 | 10.9500 | 0.4147 |
435
+ | 7.0 | 931 | 5.4894 | 11.6387 | 0.4120 |
436
+ | 8.0 | 1064 | 5.2348 | 12.2129 | 0.4113 |
437
+ | 9.0 | 1197 | 5.0118 | 12.4632 | 0.4099 |
438
+ | 10.0 | 1330 | 4.8566 | 12.7203 | 0.4158 |
439
+
440
+
441
+ ### Framework Versions
442
+ - Python: 3.10.12
443
+ - Sentence Transformers: 3.0.0
444
+ - Transformers: 4.41.1
445
+ - PyTorch: 2.3.0+cu121
446
+ - Accelerate: 0.30.1
447
+ - Datasets: 2.19.1
448
+ - Tokenizers: 0.19.1
449
+
450
+ ## Citation
451
+
452
+ ### BibTeX
453
+
454
+ #### Sentence Transformers
455
+ ```bibtex
456
+ @inproceedings{reimers-2019-sentence-bert,
457
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
458
+ author = "Reimers, Nils and Gurevych, Iryna",
459
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
460
+ month = "11",
461
+ year = "2019",
462
+ publisher = "Association for Computational Linguistics",
463
+ url = "https://arxiv.org/abs/1908.10084",
464
+ }
465
+ ```
466
+
467
+ #### CoSENTLoss
468
+ ```bibtex
469
+ @online{kexuefm-8847,
470
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
471
+ author={Su Jianlin},
472
+ year={2022},
473
+ month={Jan},
474
+ url={https://kexue.fm/archives/8847},
475
+ }
476
+ ```
477
+
478
+ <!--
479
+ ## Glossary
480
+
481
+ *Clearly define terms in order to be accessible across audiences.*
482
+ -->
483
+
484
+ <!--
485
+ ## Model Card Authors
486
+
487
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
488
+ -->
489
+
490
+ <!--
491
+ ## Model Card Contact
492
+
493
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
494
+ -->
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:f3a525b23b32a428d95f74868eeea2040b38627ba68a795e6cdc9a1fd81b329b
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