omega5505 commited on
Commit
ac5e2e9
·
verified ·
1 Parent(s): a05864b

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
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
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,576 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ tags:
5
+ - sentence-transformers
6
+ - sentence-similarity
7
+ - feature-extraction
8
+ - generated_from_trainer
9
+ - dataset_size:404290
10
+ - loss:OnlineContrastiveLoss
11
+ base_model: sentence-transformers/stsb-distilbert-base
12
+ widget:
13
+ - source_sentence: Why Modi is putting a ban on 500 and 1000 notes?
14
+ sentences:
15
+ - Why making multiple fake accounts on Quora is illegal?
16
+ - What are the advantages of the decision taken by the Government of India to scrap
17
+ out 500 and 1000 rupees notes?
18
+ - Why should I go for internships?
19
+ - source_sentence: Where can I buy cheap t-shirts?
20
+ sentences:
21
+ - Where can I buy cheap wholesale t-shirts?
22
+ - How can I make money from a blog?
23
+ - What are the best places to shop in Charleston, SC?
24
+ - source_sentence: What are the most important mobile applications?
25
+ sentences:
26
+ - How can I tell if my wife's vagina had a bigger penis inside?
27
+ - What is the most important apps in your phone?
28
+ - What do you think Ned Stark would have done or said to Jon Snow if he was able
29
+ to join the Night’s Watch or escaped his beheading?
30
+ - source_sentence: What is the whole process for making Android games with high graphics?
31
+ sentences:
32
+ - What lf I don't accept Jesus as God?
33
+ - I have to masturbate3 times to feel an orgasm sometimes only2 times what is wrong
34
+ with me I went to the doctor and they do not believe meWhat's wrong?
35
+ - What does a healthy diet consist of?
36
+ - source_sentence: Why do so many religious people believe in healing miracles?
37
+ sentences:
38
+ - Is Warframe better than Destiny?
39
+ - What do you like about China?
40
+ - Is believing in God a bad thing?
41
+ datasets:
42
+ - sentence-transformers/quora-duplicates
43
+ pipeline_tag: sentence-similarity
44
+ library_name: sentence-transformers
45
+ metrics:
46
+ - cosine_accuracy
47
+ - cosine_accuracy_threshold
48
+ - cosine_f1
49
+ - cosine_f1_threshold
50
+ - cosine_precision
51
+ - cosine_recall
52
+ - cosine_ap
53
+ - cosine_mcc
54
+ - average_precision
55
+ - f1
56
+ - precision
57
+ - recall
58
+ - threshold
59
+ - cosine_accuracy@1
60
+ - cosine_accuracy@3
61
+ - cosine_accuracy@5
62
+ - cosine_accuracy@10
63
+ - cosine_precision@1
64
+ - cosine_precision@3
65
+ - cosine_precision@5
66
+ - cosine_precision@10
67
+ - cosine_recall@1
68
+ - cosine_recall@3
69
+ - cosine_recall@5
70
+ - cosine_recall@10
71
+ - cosine_ndcg@10
72
+ - cosine_mrr@10
73
+ - cosine_map@100
74
+ model-index:
75
+ - name: SentenceTransformer based on sentence-transformers/stsb-distilbert-base
76
+ results:
77
+ - task:
78
+ type: binary-classification
79
+ name: Binary Classification
80
+ dataset:
81
+ name: quora duplicates
82
+ type: quora-duplicates
83
+ metrics:
84
+ - type: cosine_accuracy
85
+ value: 0.877
86
+ name: Cosine Accuracy
87
+ - type: cosine_accuracy_threshold
88
+ value: 0.7857047319412231
89
+ name: Cosine Accuracy Threshold
90
+ - type: cosine_f1
91
+ value: 0.8516284680337757
92
+ name: Cosine F1
93
+ - type: cosine_f1_threshold
94
+ value: 0.774639368057251
95
+ name: Cosine F1 Threshold
96
+ - type: cosine_precision
97
+ value: 0.8209302325581396
98
+ name: Cosine Precision
99
+ - type: cosine_recall
100
+ value: 0.8847117794486216
101
+ name: Cosine Recall
102
+ - type: cosine_ap
103
+ value: 0.8988328505183655
104
+ name: Cosine Ap
105
+ - type: cosine_mcc
106
+ value: 0.7483655051498526
107
+ name: Cosine Mcc
108
+ - task:
109
+ type: paraphrase-mining
110
+ name: Paraphrase Mining
111
+ dataset:
112
+ name: quora duplicates dev
113
+ type: quora-duplicates-dev
114
+ metrics:
115
+ - type: average_precision
116
+ value: 0.5483042026376685
117
+ name: Average Precision
118
+ - type: f1
119
+ value: 0.5606415792720543
120
+ name: F1
121
+ - type: precision
122
+ value: 0.5539301735907939
123
+ name: Precision
124
+ - type: recall
125
+ value: 0.5675176100314733
126
+ name: Recall
127
+ - type: threshold
128
+ value: 0.8631762564182281
129
+ name: Threshold
130
+ - task:
131
+ type: information-retrieval
132
+ name: Information Retrieval
133
+ dataset:
134
+ name: Unknown
135
+ type: unknown
136
+ metrics:
137
+ - type: cosine_accuracy@1
138
+ value: 0.9308
139
+ name: Cosine Accuracy@1
140
+ - type: cosine_accuracy@3
141
+ value: 0.969
142
+ name: Cosine Accuracy@3
143
+ - type: cosine_accuracy@5
144
+ value: 0.9778
145
+ name: Cosine Accuracy@5
146
+ - type: cosine_accuracy@10
147
+ value: 0.9854
148
+ name: Cosine Accuracy@10
149
+ - type: cosine_precision@1
150
+ value: 0.9308
151
+ name: Cosine Precision@1
152
+ - type: cosine_precision@3
153
+ value: 0.4145333333333333
154
+ name: Cosine Precision@3
155
+ - type: cosine_precision@5
156
+ value: 0.26696000000000003
157
+ name: Cosine Precision@5
158
+ - type: cosine_precision@10
159
+ value: 0.14144
160
+ name: Cosine Precision@10
161
+ - type: cosine_recall@1
162
+ value: 0.8008592901379665
163
+ name: Cosine Recall@1
164
+ - type: cosine_recall@3
165
+ value: 0.9314231047351341
166
+ name: Cosine Recall@3
167
+ - type: cosine_recall@5
168
+ value: 0.9558165998609235
169
+ name: Cosine Recall@5
170
+ - type: cosine_recall@10
171
+ value: 0.9743579383296442
172
+ name: Cosine Recall@10
173
+ - type: cosine_ndcg@10
174
+ value: 0.9511384841680516
175
+ name: Cosine Ndcg@10
176
+ - type: cosine_mrr@10
177
+ value: 0.9511976190476192
178
+ name: Cosine Mrr@10
179
+ - type: cosine_map@100
180
+ value: 0.939071878001028
181
+ name: Cosine Map@100
182
+ ---
183
+
184
+ # SentenceTransformer based on sentence-transformers/stsb-distilbert-base
185
+
186
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/stsb-distilbert-base](https://huggingface.co/sentence-transformers/stsb-distilbert-base) on the [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
187
+
188
+ ## Model Details
189
+
190
+ ### Model Description
191
+ - **Model Type:** Sentence Transformer
192
+ - **Base model:** [sentence-transformers/stsb-distilbert-base](https://huggingface.co/sentence-transformers/stsb-distilbert-base) <!-- at revision 8ea752b88e5f7239f96bdde0bc62e265c3999eec -->
193
+ - **Maximum Sequence Length:** 128 tokens
194
+ - **Output Dimensionality:** 768 dimensions
195
+ - **Similarity Function:** Cosine Similarity
196
+ - **Training Dataset:**
197
+ - [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates)
198
+ - **Language:** en
199
+ <!-- - **License:** Unknown -->
200
+
201
+ ### Model Sources
202
+
203
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
204
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
205
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
206
+
207
+ ### Full Model Architecture
208
+
209
+ ```
210
+ SentenceTransformer(
211
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: DistilBertModel
212
+ (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, 'include_prompt': True})
213
+ )
214
+ ```
215
+
216
+ ## Usage
217
+
218
+ ### Direct Usage (Sentence Transformers)
219
+
220
+ First install the Sentence Transformers library:
221
+
222
+ ```bash
223
+ pip install -U sentence-transformers
224
+ ```
225
+
226
+ Then you can load this model and run inference.
227
+ ```python
228
+ from sentence_transformers import SentenceTransformer
229
+
230
+ # Download from the 🤗 Hub
231
+ model = SentenceTransformer("omega5505/stsb-distilbert-base-ocl")
232
+ # Run inference
233
+ sentences = [
234
+ 'Why do so many religious people believe in healing miracles?',
235
+ 'Is believing in God a bad thing?',
236
+ 'What do you like about China?',
237
+ ]
238
+ embeddings = model.encode(sentences)
239
+ print(embeddings.shape)
240
+ # [3, 768]
241
+
242
+ # Get the similarity scores for the embeddings
243
+ similarities = model.similarity(embeddings, embeddings)
244
+ print(similarities.shape)
245
+ # [3, 3]
246
+ ```
247
+
248
+ <!--
249
+ ### Direct Usage (Transformers)
250
+
251
+ <details><summary>Click to see the direct usage in Transformers</summary>
252
+
253
+ </details>
254
+ -->
255
+
256
+ <!--
257
+ ### Downstream Usage (Sentence Transformers)
258
+
259
+ You can finetune this model on your own dataset.
260
+
261
+ <details><summary>Click to expand</summary>
262
+
263
+ </details>
264
+ -->
265
+
266
+ <!--
267
+ ### Out-of-Scope Use
268
+
269
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
270
+ -->
271
+
272
+ ## Evaluation
273
+
274
+ ### Metrics
275
+
276
+ #### Binary Classification
277
+
278
+ * Dataset: `quora-duplicates`
279
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
280
+
281
+ | Metric | Value |
282
+ |:--------------------------|:-----------|
283
+ | cosine_accuracy | 0.877 |
284
+ | cosine_accuracy_threshold | 0.7857 |
285
+ | cosine_f1 | 0.8516 |
286
+ | cosine_f1_threshold | 0.7746 |
287
+ | cosine_precision | 0.8209 |
288
+ | cosine_recall | 0.8847 |
289
+ | **cosine_ap** | **0.8988** |
290
+ | cosine_mcc | 0.7484 |
291
+
292
+ #### Paraphrase Mining
293
+
294
+ * Dataset: `quora-duplicates-dev`
295
+ * Evaluated with [<code>ParaphraseMiningEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.ParaphraseMiningEvaluator)
296
+
297
+ | Metric | Value |
298
+ |:----------------------|:-----------|
299
+ | **average_precision** | **0.5483** |
300
+ | f1 | 0.5606 |
301
+ | precision | 0.5539 |
302
+ | recall | 0.5675 |
303
+ | threshold | 0.8632 |
304
+
305
+ #### Information Retrieval
306
+
307
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
308
+
309
+ | Metric | Value |
310
+ |:--------------------|:-----------|
311
+ | cosine_accuracy@1 | 0.9308 |
312
+ | cosine_accuracy@3 | 0.969 |
313
+ | cosine_accuracy@5 | 0.9778 |
314
+ | cosine_accuracy@10 | 0.9854 |
315
+ | cosine_precision@1 | 0.9308 |
316
+ | cosine_precision@3 | 0.4145 |
317
+ | cosine_precision@5 | 0.267 |
318
+ | cosine_precision@10 | 0.1414 |
319
+ | cosine_recall@1 | 0.8009 |
320
+ | cosine_recall@3 | 0.9314 |
321
+ | cosine_recall@5 | 0.9558 |
322
+ | cosine_recall@10 | 0.9744 |
323
+ | **cosine_ndcg@10** | **0.9511** |
324
+ | cosine_mrr@10 | 0.9512 |
325
+ | cosine_map@100 | 0.9391 |
326
+
327
+ <!--
328
+ ## Bias, Risks and Limitations
329
+
330
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
331
+ -->
332
+
333
+ <!--
334
+ ### Recommendations
335
+
336
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
337
+ -->
338
+
339
+ ## Training Details
340
+
341
+ ### Training Dataset
342
+
343
+ #### quora-duplicates
344
+
345
+ * Dataset: [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) at [451a485](https://huggingface.co/datasets/sentence-transformers/quora-duplicates/tree/451a4850bd141edb44ade1b5828c259abd762cdb)
346
+ * Size: 404,290 training samples
347
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
348
+ * Approximate statistics based on the first 1000 samples:
349
+ | | sentence1 | sentence2 | label |
350
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------|
351
+ | type | string | string | int |
352
+ | details | <ul><li>min: 6 tokens</li><li>mean: 15.73 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.93 tokens</li><li>max: 85 tokens</li></ul> | <ul><li>0: ~61.60%</li><li>1: ~38.40%</li></ul> |
353
+ * Samples:
354
+ | sentence1 | sentence2 | label |
355
+ |:----------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------|:---------------|
356
+ | <code>How can Trump supporters claim he didn't mock a disabled reporter when there is live footage of him mocking a disabled reporter?</code> | <code>Why don't people actually watch the Trump video of him allegedly mocking a disabled reporter?</code> | <code>0</code> |
357
+ | <code>Where can I get the best digital marketing course (online & offline) in India?</code> | <code>Which is the best digital marketing institute for professionals in India?</code> | <code>1</code> |
358
+ | <code>What best two liner shayri?</code> | <code>What does "senile dementia, uncomplicated" mean in medical terms?</code> | <code>0</code> |
359
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
360
+
361
+ ### Evaluation Dataset
362
+
363
+ #### quora-duplicates
364
+
365
+ * Dataset: [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) at [451a485](https://huggingface.co/datasets/sentence-transformers/quora-duplicates/tree/451a4850bd141edb44ade1b5828c259abd762cdb)
366
+ * Size: 404,290 evaluation samples
367
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
368
+ * Approximate statistics based on the first 1000 samples:
369
+ | | sentence1 | sentence2 | label |
370
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------|
371
+ | type | string | string | int |
372
+ | details | <ul><li>min: 6 tokens</li><li>mean: 16.14 tokens</li><li>max: 70 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.92 tokens</li><li>max: 74 tokens</li></ul> | <ul><li>0: ~60.10%</li><li>1: ~39.90%</li></ul> |
373
+ * Samples:
374
+ | sentence1 | sentence2 | label |
375
+ |:--------------------------------------------------------|:-----------------------------------------------------------|:---------------|
376
+ | <code>What are some must subscribe RSS feeds?</code> | <code>What are RSS feeds?</code> | <code>0</code> |
377
+ | <code>How close are Madonna and Hillary Clinton?</code> | <code>Why do people say Hillary Clinton is a crook?</code> | <code>0</code> |
378
+ | <code>Can you share best day of your life?</code> | <code>What is the Best Day of your life till date?</code> | <code>1</code> |
379
+ * Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
380
+
381
+ ### Training Hyperparameters
382
+ #### Non-Default Hyperparameters
383
+
384
+ - `eval_strategy`: steps
385
+ - `per_device_train_batch_size`: 64
386
+ - `per_device_eval_batch_size`: 64
387
+ - `num_train_epochs`: 1
388
+ - `warmup_ratio`: 0.1
389
+ - `fp16`: True
390
+ - `batch_sampler`: no_duplicates
391
+
392
+ #### All Hyperparameters
393
+ <details><summary>Click to expand</summary>
394
+
395
+ - `overwrite_output_dir`: False
396
+ - `do_predict`: False
397
+ - `eval_strategy`: steps
398
+ - `prediction_loss_only`: True
399
+ - `per_device_train_batch_size`: 64
400
+ - `per_device_eval_batch_size`: 64
401
+ - `per_gpu_train_batch_size`: None
402
+ - `per_gpu_eval_batch_size`: None
403
+ - `gradient_accumulation_steps`: 1
404
+ - `eval_accumulation_steps`: None
405
+ - `torch_empty_cache_steps`: None
406
+ - `learning_rate`: 5e-05
407
+ - `weight_decay`: 0.0
408
+ - `adam_beta1`: 0.9
409
+ - `adam_beta2`: 0.999
410
+ - `adam_epsilon`: 1e-08
411
+ - `max_grad_norm`: 1.0
412
+ - `num_train_epochs`: 1
413
+ - `max_steps`: -1
414
+ - `lr_scheduler_type`: linear
415
+ - `lr_scheduler_kwargs`: {}
416
+ - `warmup_ratio`: 0.1
417
+ - `warmup_steps`: 0
418
+ - `log_level`: passive
419
+ - `log_level_replica`: warning
420
+ - `log_on_each_node`: True
421
+ - `logging_nan_inf_filter`: True
422
+ - `save_safetensors`: True
423
+ - `save_on_each_node`: False
424
+ - `save_only_model`: False
425
+ - `restore_callback_states_from_checkpoint`: False
426
+ - `no_cuda`: False
427
+ - `use_cpu`: False
428
+ - `use_mps_device`: False
429
+ - `seed`: 42
430
+ - `data_seed`: None
431
+ - `jit_mode_eval`: False
432
+ - `use_ipex`: False
433
+ - `bf16`: False
434
+ - `fp16`: True
435
+ - `fp16_opt_level`: O1
436
+ - `half_precision_backend`: auto
437
+ - `bf16_full_eval`: False
438
+ - `fp16_full_eval`: False
439
+ - `tf32`: None
440
+ - `local_rank`: 0
441
+ - `ddp_backend`: None
442
+ - `tpu_num_cores`: None
443
+ - `tpu_metrics_debug`: False
444
+ - `debug`: []
445
+ - `dataloader_drop_last`: False
446
+ - `dataloader_num_workers`: 0
447
+ - `dataloader_prefetch_factor`: None
448
+ - `past_index`: -1
449
+ - `disable_tqdm`: False
450
+ - `remove_unused_columns`: True
451
+ - `label_names`: None
452
+ - `load_best_model_at_end`: False
453
+ - `ignore_data_skip`: False
454
+ - `fsdp`: []
455
+ - `fsdp_min_num_params`: 0
456
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
457
+ - `fsdp_transformer_layer_cls_to_wrap`: None
458
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
459
+ - `deepspeed`: None
460
+ - `label_smoothing_factor`: 0.0
461
+ - `optim`: adamw_torch
462
+ - `optim_args`: None
463
+ - `adafactor`: False
464
+ - `group_by_length`: False
465
+ - `length_column_name`: length
466
+ - `ddp_find_unused_parameters`: None
467
+ - `ddp_bucket_cap_mb`: None
468
+ - `ddp_broadcast_buffers`: False
469
+ - `dataloader_pin_memory`: True
470
+ - `dataloader_persistent_workers`: False
471
+ - `skip_memory_metrics`: True
472
+ - `use_legacy_prediction_loop`: False
473
+ - `push_to_hub`: False
474
+ - `resume_from_checkpoint`: None
475
+ - `hub_model_id`: None
476
+ - `hub_strategy`: every_save
477
+ - `hub_private_repo`: False
478
+ - `hub_always_push`: False
479
+ - `gradient_checkpointing`: False
480
+ - `gradient_checkpointing_kwargs`: None
481
+ - `include_inputs_for_metrics`: False
482
+ - `eval_do_concat_batches`: True
483
+ - `fp16_backend`: auto
484
+ - `push_to_hub_model_id`: None
485
+ - `push_to_hub_organization`: None
486
+ - `mp_parameters`:
487
+ - `auto_find_batch_size`: False
488
+ - `full_determinism`: False
489
+ - `torchdynamo`: None
490
+ - `ray_scope`: last
491
+ - `ddp_timeout`: 1800
492
+ - `torch_compile`: False
493
+ - `torch_compile_backend`: None
494
+ - `torch_compile_mode`: None
495
+ - `dispatch_batches`: None
496
+ - `split_batches`: None
497
+ - `include_tokens_per_second`: False
498
+ - `include_num_input_tokens_seen`: False
499
+ - `neftune_noise_alpha`: None
500
+ - `optim_target_modules`: None
501
+ - `batch_eval_metrics`: False
502
+ - `eval_on_start`: False
503
+ - `eval_use_gather_object`: False
504
+ - `prompts`: None
505
+ - `batch_sampler`: no_duplicates
506
+ - `multi_dataset_batch_sampler`: proportional
507
+
508
+ </details>
509
+
510
+ ### Training Logs
511
+ | Epoch | Step | Training Loss | Validation Loss | quora-duplicates_cosine_ap | quora-duplicates-dev_average_precision | cosine_ndcg@10 |
512
+ |:------:|:----:|:-------------:|:---------------:|:--------------------------:|:--------------------------------------:|:--------------:|
513
+ | 0 | 0 | - | - | 0.7458 | 0.4200 | 0.9390 |
514
+ | 0.0640 | 100 | 2.5263 | - | - | - | - |
515
+ | 0.1280 | 200 | 2.1489 | - | - | - | - |
516
+ | 0.1599 | 250 | - | 1.8621 | 0.8433 | 0.3907 | 0.9329 |
517
+ | 0.1919 | 300 | 2.0353 | - | - | - | - |
518
+ | 0.2559 | 400 | 1.7831 | - | - | - | - |
519
+ | 0.3199 | 500 | 1.8887 | 1.7744 | 0.8662 | 0.4924 | 0.9379 |
520
+ | 0.3839 | 600 | 1.7814 | - | - | - | - |
521
+ | 0.4479 | 700 | 1.7775 | - | - | - | - |
522
+ | 0.4798 | 750 | - | 1.6468 | 0.8766 | 0.4945 | 0.9399 |
523
+ | 0.5118 | 800 | 1.6835 | - | - | - | - |
524
+ | 0.5758 | 900 | 1.6974 | - | - | - | - |
525
+ | 0.6398 | 1000 | 1.5704 | 1.4925 | 0.8895 | 0.5283 | 0.9460 |
526
+ | 0.7038 | 1100 | 1.6771 | - | - | - | - |
527
+ | 0.7678 | 1200 | 1.619 | - | - | - | - |
528
+ | 0.7997 | 1250 | - | 1.4311 | 0.8982 | 0.5252 | 0.9466 |
529
+ | 0.8317 | 1300 | 1.6119 | - | - | - | - |
530
+ | 0.8957 | 1400 | 1.6043 | - | - | - | - |
531
+ | 0.9597 | 1500 | 1.6848 | 1.4070 | 0.8988 | 0.5483 | 0.9511 |
532
+
533
+
534
+ ### Framework Versions
535
+ - Python: 3.9.18
536
+ - Sentence Transformers: 3.4.1
537
+ - Transformers: 4.44.2
538
+ - PyTorch: 2.2.1+cu121
539
+ - Accelerate: 1.3.0
540
+ - Datasets: 2.19.0
541
+ - Tokenizers: 0.19.1
542
+
543
+ ## Citation
544
+
545
+ ### BibTeX
546
+
547
+ #### Sentence Transformers
548
+ ```bibtex
549
+ @inproceedings{reimers-2019-sentence-bert,
550
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
551
+ author = "Reimers, Nils and Gurevych, Iryna",
552
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
553
+ month = "11",
554
+ year = "2019",
555
+ publisher = "Association for Computational Linguistics",
556
+ url = "https://arxiv.org/abs/1908.10084",
557
+ }
558
+ ```
559
+
560
+ <!--
561
+ ## Glossary
562
+
563
+ *Clearly define terms in order to be accessible across audiences.*
564
+ -->
565
+
566
+ <!--
567
+ ## Model Card Authors
568
+
569
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
570
+ -->
571
+
572
+ <!--
573
+ ## Model Card Contact
574
+
575
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
576
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "sentence-transformers/stsb-distilbert-base",
3
+ "activation": "gelu",
4
+ "architectures": [
5
+ "DistilBertModel"
6
+ ],
7
+ "attention_dropout": 0.1,
8
+ "dim": 768,
9
+ "dropout": 0.1,
10
+ "hidden_dim": 3072,
11
+ "initializer_range": 0.02,
12
+ "max_position_embeddings": 512,
13
+ "model_type": "distilbert",
14
+ "n_heads": 12,
15
+ "n_layers": 6,
16
+ "pad_token_id": 0,
17
+ "qa_dropout": 0.1,
18
+ "seq_classif_dropout": 0.2,
19
+ "sinusoidal_pos_embds": false,
20
+ "tie_weights_": true,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.44.2",
23
+ "vocab_size": 30522
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.44.2",
5
+ "pytorch": "2.2.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:a371751d04ac0eed530b1805d1f4e91a98f64f5d08992e5533eff73184e687e6
3
+ size 265462608
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 128,
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "full_tokenizer_file": null,
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 128,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "DistilBertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff