bobox commited on
Commit
90d8ef6
1 Parent(s): 2bb2c68
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,703 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ library_name: sentence-transformers
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:314315
11
+ - loss:AdaptiveLayerLoss
12
+ - loss:MultipleNegativesRankingLoss
13
+ base_model: microsoft/deberta-v3-small
14
+ datasets:
15
+ - stanfordnlp/snli
16
+ - sentence-transformers/stsb
17
+ metrics:
18
+ - pearson_cosine
19
+ - spearman_cosine
20
+ - pearson_manhattan
21
+ - spearman_manhattan
22
+ - pearson_euclidean
23
+ - spearman_euclidean
24
+ - pearson_dot
25
+ - spearman_dot
26
+ - pearson_max
27
+ - spearman_max
28
+ - cosine_accuracy
29
+ - cosine_accuracy_threshold
30
+ - cosine_f1
31
+ - cosine_f1_threshold
32
+ - cosine_precision
33
+ - cosine_recall
34
+ - cosine_ap
35
+ - dot_accuracy
36
+ - dot_accuracy_threshold
37
+ - dot_f1
38
+ - dot_f1_threshold
39
+ - dot_precision
40
+ - dot_recall
41
+ - dot_ap
42
+ - manhattan_accuracy
43
+ - manhattan_accuracy_threshold
44
+ - manhattan_f1
45
+ - manhattan_f1_threshold
46
+ - manhattan_precision
47
+ - manhattan_recall
48
+ - manhattan_ap
49
+ - euclidean_accuracy
50
+ - euclidean_accuracy_threshold
51
+ - euclidean_f1
52
+ - euclidean_f1_threshold
53
+ - euclidean_precision
54
+ - euclidean_recall
55
+ - euclidean_ap
56
+ - max_accuracy
57
+ - max_accuracy_threshold
58
+ - max_f1
59
+ - max_f1_threshold
60
+ - max_precision
61
+ - max_recall
62
+ - max_ap
63
+ widget:
64
+ - source_sentence: The pitcher is pitching the ball in a game of baseball.
65
+ sentences:
66
+ - the lady digs into the ground
67
+ - A group of people are sitting at tables.
68
+ - The pitcher throws the ball.
69
+ - source_sentence: People are conversing at a dining table under a canopy.
70
+ sentences:
71
+ - A canine is using his legs.
72
+ - The people are creative.
73
+ - People at a party are seated for dinner on the lawn.
74
+ - source_sentence: Two teenage girls conversing next to lockers.
75
+ sentences:
76
+ - Girls talking about their problems next to lockers.
77
+ - A group of people play in the ocean.
78
+ - The man is testing the bike.
79
+ - source_sentence: A young boy in a hoodie climbs a red slide sitting on a red and
80
+ green checkered background.
81
+ sentences:
82
+ - People are buying food from a street vendor.
83
+ - A boy is playing.
84
+ - A dog outside digging.
85
+ - source_sentence: A professional swimmer spits water out after surfacing while grabbing
86
+ the hand of someone helping him back to land.
87
+ sentences:
88
+ - A group of people wait in a line.
89
+ - A tourist has his picture taken on Easter Island.
90
+ - The swimmer almost drowned after being sucked under a fast current.
91
+ pipeline_tag: sentence-similarity
92
+ model-index:
93
+ - name: SentenceTransformer based on microsoft/deberta-v3-small
94
+ results:
95
+ - task:
96
+ type: semantic-similarity
97
+ name: Semantic Similarity
98
+ dataset:
99
+ name: Unknown
100
+ type: unknown
101
+ metrics:
102
+ - type: pearson_cosine
103
+ value: 0.7641416788909702
104
+ name: Pearson Cosine
105
+ - type: spearman_cosine
106
+ value: 0.763668633314844
107
+ name: Spearman Cosine
108
+ - type: pearson_manhattan
109
+ value: 0.7808845626705342
110
+ name: Pearson Manhattan
111
+ - type: spearman_manhattan
112
+ value: 0.783960481366303
113
+ name: Spearman Manhattan
114
+ - type: pearson_euclidean
115
+ value: 0.7714319160162553
116
+ name: Pearson Euclidean
117
+ - type: spearman_euclidean
118
+ value: 0.7750607015673249
119
+ name: Spearman Euclidean
120
+ - type: pearson_dot
121
+ value: 0.587659176024498
122
+ name: Pearson Dot
123
+ - type: spearman_dot
124
+ value: 0.6010467058509925
125
+ name: Spearman Dot
126
+ - type: pearson_max
127
+ value: 0.7808845626705342
128
+ name: Pearson Max
129
+ - type: spearman_max
130
+ value: 0.783960481366303
131
+ name: Spearman Max
132
+ - task:
133
+ type: binary-classification
134
+ name: Binary Classification
135
+ dataset:
136
+ name: Unknown
137
+ type: unknown
138
+ metrics:
139
+ - type: cosine_accuracy
140
+ value: 0.6773826673743271
141
+ name: Cosine Accuracy
142
+ - type: cosine_accuracy_threshold
143
+ value: 0.5830236673355103
144
+ name: Cosine Accuracy Threshold
145
+ - type: cosine_f1
146
+ value: 0.7209834880077135
147
+ name: Cosine F1
148
+ - type: cosine_f1_threshold
149
+ value: 0.5085207223892212
150
+ name: Cosine F1 Threshold
151
+ - type: cosine_precision
152
+ value: 0.6137273007079102
153
+ name: Cosine Precision
154
+ - type: cosine_recall
155
+ value: 0.873667299547247
156
+ name: Cosine Recall
157
+ - type: cosine_ap
158
+ value: 0.7219177301725319
159
+ name: Cosine Ap
160
+ - type: dot_accuracy
161
+ value: 0.6389415421942528
162
+ name: Dot Accuracy
163
+ - type: dot_accuracy_threshold
164
+ value: 45.1016845703125
165
+ name: Dot Accuracy Threshold
166
+ - type: dot_f1
167
+ value: 0.7090406632451638
168
+ name: Dot F1
169
+ - type: dot_f1_threshold
170
+ value: 32.459449768066406
171
+ name: Dot F1 Threshold
172
+ - type: dot_precision
173
+ value: 0.5775450202131569
174
+ name: Dot Precision
175
+ - type: dot_recall
176
+ value: 0.9180663064115671
177
+ name: Dot Recall
178
+ - type: dot_ap
179
+ value: 0.6795197111227502
180
+ name: Dot Ap
181
+ - type: manhattan_accuracy
182
+ value: 0.6625217984684206
183
+ name: Manhattan Accuracy
184
+ - type: manhattan_accuracy_threshold
185
+ value: 158.29489135742188
186
+ name: Manhattan Accuracy Threshold
187
+ - type: manhattan_f1
188
+ value: 0.7041269465332466
189
+ name: Manhattan F1
190
+ - type: manhattan_f1_threshold
191
+ value: 178.5047607421875
192
+ name: Manhattan F1 Threshold
193
+ - type: manhattan_precision
194
+ value: 0.5921131248755228
195
+ name: Manhattan Precision
196
+ - type: manhattan_recall
197
+ value: 0.8684095224185775
198
+ name: Manhattan Recall
199
+ - type: manhattan_ap
200
+ value: 0.7054112942825768
201
+ name: Manhattan Ap
202
+ - type: euclidean_accuracy
203
+ value: 0.6578967321252559
204
+ name: Euclidean Accuracy
205
+ - type: euclidean_accuracy_threshold
206
+ value: 7.951424598693848
207
+ name: Euclidean Accuracy Threshold
208
+ - type: euclidean_f1
209
+ value: 0.7015471831817645
210
+ name: Euclidean F1
211
+ - type: euclidean_f1_threshold
212
+ value: 9.045232772827148
213
+ name: Euclidean F1 Threshold
214
+ - type: euclidean_precision
215
+ value: 0.5888767720828789
216
+ name: Euclidean Precision
217
+ - type: euclidean_recall
218
+ value: 0.8675332262304659
219
+ name: Euclidean Recall
220
+ - type: euclidean_ap
221
+ value: 0.7024193897121154
222
+ name: Euclidean Ap
223
+ - type: max_accuracy
224
+ value: 0.6773826673743271
225
+ name: Max Accuracy
226
+ - type: max_accuracy_threshold
227
+ value: 158.29489135742188
228
+ name: Max Accuracy Threshold
229
+ - type: max_f1
230
+ value: 0.7209834880077135
231
+ name: Max F1
232
+ - type: max_f1_threshold
233
+ value: 178.5047607421875
234
+ name: Max F1 Threshold
235
+ - type: max_precision
236
+ value: 0.6137273007079102
237
+ name: Max Precision
238
+ - type: max_recall
239
+ value: 0.9180663064115671
240
+ name: Max Recall
241
+ - type: max_ap
242
+ value: 0.7219177301725319
243
+ name: Max Ap
244
+ ---
245
+
246
+ # SentenceTransformer based on microsoft/deberta-v3-small
247
+
248
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/deberta-v3-small](https://huggingface.co/microsoft/deberta-v3-small) on the [stanfordnlp/snli](https://huggingface.co/datasets/stanfordnlp/snli) 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.
249
+
250
+ ## Model Details
251
+
252
+ ### Model Description
253
+ - **Model Type:** Sentence Transformer
254
+ - **Base model:** [microsoft/deberta-v3-small](https://huggingface.co/microsoft/deberta-v3-small) <!-- at revision a36c739020e01763fe789b4b85e2df55d6180012 -->
255
+ - **Maximum Sequence Length:** 512 tokens
256
+ - **Output Dimensionality:** 768 tokens
257
+ - **Similarity Function:** Cosine Similarity
258
+ - **Training Dataset:**
259
+ - [stanfordnlp/snli](https://huggingface.co/datasets/stanfordnlp/snli)
260
+ - **Language:** en
261
+ <!-- - **License:** Unknown -->
262
+
263
+ ### Model Sources
264
+
265
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
266
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
267
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
268
+
269
+ ### Full Model Architecture
270
+
271
+ ```
272
+ SentenceTransformer(
273
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DebertaV2Model
274
+ (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})
275
+ )
276
+ ```
277
+
278
+ ## Usage
279
+
280
+ ### Direct Usage (Sentence Transformers)
281
+
282
+ First install the Sentence Transformers library:
283
+
284
+ ```bash
285
+ pip install -U sentence-transformers
286
+ ```
287
+
288
+ Then you can load this model and run inference.
289
+ ```python
290
+ from sentence_transformers import SentenceTransformer
291
+
292
+ # Download from the 🤗 Hub
293
+ model = SentenceTransformer("bobox/DeBERTaV3-small-SentenceTransformer-AdaptiveLayerAll")
294
+ # Run inference
295
+ sentences = [
296
+ 'A professional swimmer spits water out after surfacing while grabbing the hand of someone helping him back to land.',
297
+ 'The swimmer almost drowned after being sucked under a fast current.',
298
+ 'A group of people wait in a line.',
299
+ ]
300
+ embeddings = model.encode(sentences)
301
+ print(embeddings.shape)
302
+ # [3, 768]
303
+
304
+ # Get the similarity scores for the embeddings
305
+ similarities = model.similarity(embeddings, embeddings)
306
+ print(similarities.shape)
307
+ # [3, 3]
308
+ ```
309
+
310
+ <!--
311
+ ### Direct Usage (Transformers)
312
+
313
+ <details><summary>Click to see the direct usage in Transformers</summary>
314
+
315
+ </details>
316
+ -->
317
+
318
+ <!--
319
+ ### Downstream Usage (Sentence Transformers)
320
+
321
+ You can finetune this model on your own dataset.
322
+
323
+ <details><summary>Click to expand</summary>
324
+
325
+ </details>
326
+ -->
327
+
328
+ <!--
329
+ ### Out-of-Scope Use
330
+
331
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
332
+ -->
333
+
334
+ ## Evaluation
335
+
336
+ ### Metrics
337
+
338
+ #### Semantic Similarity
339
+
340
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
341
+
342
+ | Metric | Value |
343
+ |:--------------------|:-----------|
344
+ | pearson_cosine | 0.7641 |
345
+ | **spearman_cosine** | **0.7637** |
346
+ | pearson_manhattan | 0.7809 |
347
+ | spearman_manhattan | 0.784 |
348
+ | pearson_euclidean | 0.7714 |
349
+ | spearman_euclidean | 0.7751 |
350
+ | pearson_dot | 0.5877 |
351
+ | spearman_dot | 0.601 |
352
+ | pearson_max | 0.7809 |
353
+ | spearman_max | 0.784 |
354
+
355
+ #### Binary Classification
356
+
357
+ * Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
358
+
359
+ | Metric | Value |
360
+ |:-----------------------------|:-----------|
361
+ | cosine_accuracy | 0.6774 |
362
+ | cosine_accuracy_threshold | 0.583 |
363
+ | cosine_f1 | 0.721 |
364
+ | cosine_f1_threshold | 0.5085 |
365
+ | cosine_precision | 0.6137 |
366
+ | cosine_recall | 0.8737 |
367
+ | cosine_ap | 0.7219 |
368
+ | dot_accuracy | 0.6389 |
369
+ | dot_accuracy_threshold | 45.1017 |
370
+ | dot_f1 | 0.709 |
371
+ | dot_f1_threshold | 32.4594 |
372
+ | dot_precision | 0.5775 |
373
+ | dot_recall | 0.9181 |
374
+ | dot_ap | 0.6795 |
375
+ | manhattan_accuracy | 0.6625 |
376
+ | manhattan_accuracy_threshold | 158.2949 |
377
+ | manhattan_f1 | 0.7041 |
378
+ | manhattan_f1_threshold | 178.5048 |
379
+ | manhattan_precision | 0.5921 |
380
+ | manhattan_recall | 0.8684 |
381
+ | manhattan_ap | 0.7054 |
382
+ | euclidean_accuracy | 0.6579 |
383
+ | euclidean_accuracy_threshold | 7.9514 |
384
+ | euclidean_f1 | 0.7015 |
385
+ | euclidean_f1_threshold | 9.0452 |
386
+ | euclidean_precision | 0.5889 |
387
+ | euclidean_recall | 0.8675 |
388
+ | euclidean_ap | 0.7024 |
389
+ | max_accuracy | 0.6774 |
390
+ | max_accuracy_threshold | 158.2949 |
391
+ | max_f1 | 0.721 |
392
+ | max_f1_threshold | 178.5048 |
393
+ | max_precision | 0.6137 |
394
+ | max_recall | 0.9181 |
395
+ | **max_ap** | **0.7219** |
396
+
397
+ <!--
398
+ ## Bias, Risks and Limitations
399
+
400
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
401
+ -->
402
+
403
+ <!--
404
+ ### Recommendations
405
+
406
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
407
+ -->
408
+
409
+ ## Training Details
410
+
411
+ ### Training Dataset
412
+
413
+ #### stanfordnlp/snli
414
+
415
+ * Dataset: [stanfordnlp/snli](https://huggingface.co/datasets/stanfordnlp/snli) at [cdb5c3d](https://huggingface.co/datasets/stanfordnlp/snli/tree/cdb5c3d5eed6ead6e5a341c8e56e669bb666725b)
416
+ * Size: 314,315 training samples
417
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
418
+ * Approximate statistics based on the first 1000 samples:
419
+ | | sentence1 | sentence2 | label |
420
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-----------------------------|
421
+ | type | string | string | int |
422
+ | details | <ul><li>min: 5 tokens</li><li>mean: 16.62 tokens</li><li>max: 62 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.46 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>0: 100.00%</li></ul> |
423
+ * Samples:
424
+ | sentence1 | sentence2 | label |
425
+ |:---------------------------------------------------------------------------|:-------------------------------------------------|:---------------|
426
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>0</code> |
427
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>0</code> |
428
+ | <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>0</code> |
429
+ * Loss: [<code>AdaptiveLayerLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#adaptivelayerloss) with these parameters:
430
+ ```json
431
+ {
432
+ "loss": "MultipleNegativesRankingLoss",
433
+ "n_layers_per_step": -1,
434
+ "last_layer_weight": 1,
435
+ "prior_layers_weight": 1,
436
+ "kl_div_weight": 1.2,
437
+ "kl_temperature": 1.2
438
+ }
439
+ ```
440
+
441
+ ### Evaluation Dataset
442
+
443
+ #### sentence-transformers/stsb
444
+
445
+ * Dataset: [sentence-transformers/stsb](https://huggingface.co/datasets/sentence-transformers/stsb) at [ab7a5ac](https://huggingface.co/datasets/sentence-transformers/stsb/tree/ab7a5ac0e35aa22088bdcf23e7fd99b220e53308)
446
+ * Size: 1,500 evaluation samples
447
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
448
+ * Approximate statistics based on the first 1000 samples:
449
+ | | sentence1 | sentence2 | score |
450
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
451
+ | type | string | string | float |
452
+ | details | <ul><li>min: 5 tokens</li><li>mean: 14.77 tokens</li><li>max: 45 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 14.74 tokens</li><li>max: 49 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 0.47</li><li>max: 1.0</li></ul> |
453
+ * Samples:
454
+ | sentence1 | sentence2 | score |
455
+ |:--------------------------------------------------|:------------------------------------------------------|:------------------|
456
+ | <code>A man with a hard hat is dancing.</code> | <code>A man wearing a hard hat is dancing.</code> | <code>1.0</code> |
457
+ | <code>A young child is riding a horse.</code> | <code>A child is riding a horse.</code> | <code>0.95</code> |
458
+ | <code>A man is feeding a mouse to a snake.</code> | <code>The man is feeding a mouse to the snake.</code> | <code>1.0</code> |
459
+ * Loss: [<code>AdaptiveLayerLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#adaptivelayerloss) with these parameters:
460
+ ```json
461
+ {
462
+ "loss": "MultipleNegativesRankingLoss",
463
+ "n_layers_per_step": -1,
464
+ "last_layer_weight": 1,
465
+ "prior_layers_weight": 1,
466
+ "kl_div_weight": 1.2,
467
+ "kl_temperature": 1.2
468
+ }
469
+ ```
470
+
471
+ ### Training Hyperparameters
472
+ #### Non-Default Hyperparameters
473
+
474
+ - `eval_strategy`: steps
475
+ - `per_device_train_batch_size`: 32
476
+ - `per_device_eval_batch_size`: 16
477
+ - `learning_rate`: 5e-06
478
+ - `weight_decay`: 1e-07
479
+ - `warmup_ratio`: 0.33
480
+ - `save_safetensors`: False
481
+ - `fp16`: True
482
+ - `push_to_hub`: True
483
+ - `hub_model_id`: bobox/DeBERTaV3-small-SentenceTransformer-AdaptiveLayerAlln
484
+ - `hub_strategy`: checkpoint
485
+ - `batch_sampler`: no_duplicates
486
+
487
+ #### All Hyperparameters
488
+ <details><summary>Click to expand</summary>
489
+
490
+ - `overwrite_output_dir`: False
491
+ - `do_predict`: False
492
+ - `eval_strategy`: steps
493
+ - `prediction_loss_only`: True
494
+ - `per_device_train_batch_size`: 32
495
+ - `per_device_eval_batch_size`: 16
496
+ - `per_gpu_train_batch_size`: None
497
+ - `per_gpu_eval_batch_size`: None
498
+ - `gradient_accumulation_steps`: 1
499
+ - `eval_accumulation_steps`: None
500
+ - `learning_rate`: 5e-06
501
+ - `weight_decay`: 1e-07
502
+ - `adam_beta1`: 0.9
503
+ - `adam_beta2`: 0.999
504
+ - `adam_epsilon`: 1e-08
505
+ - `max_grad_norm`: 1.0
506
+ - `num_train_epochs`: 3
507
+ - `max_steps`: -1
508
+ - `lr_scheduler_type`: linear
509
+ - `lr_scheduler_kwargs`: {}
510
+ - `warmup_ratio`: 0.33
511
+ - `warmup_steps`: 0
512
+ - `log_level`: passive
513
+ - `log_level_replica`: warning
514
+ - `log_on_each_node`: True
515
+ - `logging_nan_inf_filter`: True
516
+ - `save_safetensors`: False
517
+ - `save_on_each_node`: False
518
+ - `save_only_model`: False
519
+ - `restore_callback_states_from_checkpoint`: False
520
+ - `no_cuda`: False
521
+ - `use_cpu`: False
522
+ - `use_mps_device`: False
523
+ - `seed`: 42
524
+ - `data_seed`: None
525
+ - `jit_mode_eval`: False
526
+ - `use_ipex`: False
527
+ - `bf16`: False
528
+ - `fp16`: True
529
+ - `fp16_opt_level`: O1
530
+ - `half_precision_backend`: auto
531
+ - `bf16_full_eval`: False
532
+ - `fp16_full_eval`: False
533
+ - `tf32`: None
534
+ - `local_rank`: 0
535
+ - `ddp_backend`: None
536
+ - `tpu_num_cores`: None
537
+ - `tpu_metrics_debug`: False
538
+ - `debug`: []
539
+ - `dataloader_drop_last`: False
540
+ - `dataloader_num_workers`: 0
541
+ - `dataloader_prefetch_factor`: None
542
+ - `past_index`: -1
543
+ - `disable_tqdm`: False
544
+ - `remove_unused_columns`: True
545
+ - `label_names`: None
546
+ - `load_best_model_at_end`: False
547
+ - `ignore_data_skip`: False
548
+ - `fsdp`: []
549
+ - `fsdp_min_num_params`: 0
550
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
551
+ - `fsdp_transformer_layer_cls_to_wrap`: None
552
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
553
+ - `deepspeed`: None
554
+ - `label_smoothing_factor`: 0.0
555
+ - `optim`: adamw_torch
556
+ - `optim_args`: None
557
+ - `adafactor`: False
558
+ - `group_by_length`: False
559
+ - `length_column_name`: length
560
+ - `ddp_find_unused_parameters`: None
561
+ - `ddp_bucket_cap_mb`: None
562
+ - `ddp_broadcast_buffers`: False
563
+ - `dataloader_pin_memory`: True
564
+ - `dataloader_persistent_workers`: False
565
+ - `skip_memory_metrics`: True
566
+ - `use_legacy_prediction_loop`: False
567
+ - `push_to_hub`: True
568
+ - `resume_from_checkpoint`: None
569
+ - `hub_model_id`: bobox/DeBERTaV3-small-SentenceTransformer-AdaptiveLayerAlln
570
+ - `hub_strategy`: checkpoint
571
+ - `hub_private_repo`: False
572
+ - `hub_always_push`: False
573
+ - `gradient_checkpointing`: False
574
+ - `gradient_checkpointing_kwargs`: None
575
+ - `include_inputs_for_metrics`: False
576
+ - `eval_do_concat_batches`: True
577
+ - `fp16_backend`: auto
578
+ - `push_to_hub_model_id`: None
579
+ - `push_to_hub_organization`: None
580
+ - `mp_parameters`:
581
+ - `auto_find_batch_size`: False
582
+ - `full_determinism`: False
583
+ - `torchdynamo`: None
584
+ - `ray_scope`: last
585
+ - `ddp_timeout`: 1800
586
+ - `torch_compile`: False
587
+ - `torch_compile_backend`: None
588
+ - `torch_compile_mode`: None
589
+ - `dispatch_batches`: None
590
+ - `split_batches`: None
591
+ - `include_tokens_per_second`: False
592
+ - `include_num_input_tokens_seen`: False
593
+ - `neftune_noise_alpha`: None
594
+ - `optim_target_modules`: None
595
+ - `batch_eval_metrics`: False
596
+ - `batch_sampler`: no_duplicates
597
+ - `multi_dataset_batch_sampler`: proportional
598
+
599
+ </details>
600
+
601
+ ### Training Logs
602
+ | Epoch | Step | Training Loss | loss | max_ap | spearman_cosine |
603
+ |:------:|:-----:|:-------------:|:------:|:------:|:---------------:|
604
+ | None | 0 | - | 5.4171 | - | 0.4276 |
605
+ | 0.1501 | 1474 | 4.9879 | - | - | - |
606
+ | 0.3000 | 2947 | - | 2.6463 | 0.6840 | - |
607
+ | 0.3001 | 2948 | 3.2669 | - | - | - |
608
+ | 0.4502 | 4422 | 2.6363 | - | - | - |
609
+ | 0.6000 | 5894 | - | 1.8436 | 0.7014 | - |
610
+ | 0.6002 | 5896 | 2.192 | - | - | - |
611
+ | 0.7503 | 7370 | 0.8208 | - | - | - |
612
+ | 0.9000 | 8841 | - | 1.5551 | 0.7065 | - |
613
+ | 0.9003 | 8844 | 0.6161 | - | - | - |
614
+ | 1.0504 | 10318 | 1.0301 | - | - | - |
615
+ | 1.2000 | 11788 | - | 1.1883 | 0.7131 | - |
616
+ | 1.2004 | 11792 | 1.8209 | - | - | - |
617
+ | 1.3505 | 13266 | 1.6887 | - | - | - |
618
+ | 1.5001 | 14735 | - | 1.1067 | 0.7119 | - |
619
+ | 1.5006 | 14740 | 1.6114 | - | - | - |
620
+ | 1.6506 | 16214 | 1.0691 | - | - | - |
621
+ | 1.8001 | 17682 | - | 1.0872 | 0.7183 | - |
622
+ | 1.8007 | 17688 | 0.3982 | - | - | - |
623
+ | 1.9507 | 19162 | 0.3659 | - | - | - |
624
+ | 2.1001 | 20629 | - | 0.9642 | 0.7221 | - |
625
+ | 2.1008 | 20636 | 1.1702 | - | - | - |
626
+ | 2.2508 | 22110 | 1.4984 | - | - | - |
627
+ | 2.4001 | 23576 | - | 0.9437 | 0.7200 | - |
628
+ | 2.4009 | 23584 | 1.4609 | - | - | - |
629
+ | 2.5510 | 25058 | 1.4477 | - | - | - |
630
+ | 2.7001 | 26523 | - | 0.9428 | 0.7216 | - |
631
+ | 2.7010 | 26532 | 0.5802 | - | - | - |
632
+ | 2.8511 | 28006 | 0.3297 | - | - | - |
633
+ | 3.0 | 29469 | - | 0.9532 | 0.7219 | - |
634
+ | None | 0 | - | 2.4079 | 0.7219 | 0.7637 |
635
+
636
+
637
+ ### Framework Versions
638
+ - Python: 3.10.13
639
+ - Sentence Transformers: 3.0.1
640
+ - Transformers: 4.41.2
641
+ - PyTorch: 2.1.2
642
+ - Accelerate: 0.30.1
643
+ - Datasets: 2.19.2
644
+ - Tokenizers: 0.19.1
645
+
646
+ ## Citation
647
+
648
+ ### BibTeX
649
+
650
+ #### Sentence Transformers
651
+ ```bibtex
652
+ @inproceedings{reimers-2019-sentence-bert,
653
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
654
+ author = "Reimers, Nils and Gurevych, Iryna",
655
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
656
+ month = "11",
657
+ year = "2019",
658
+ publisher = "Association for Computational Linguistics",
659
+ url = "https://arxiv.org/abs/1908.10084",
660
+ }
661
+ ```
662
+
663
+ #### AdaptiveLayerLoss
664
+ ```bibtex
665
+ @misc{li20242d,
666
+ title={2D Matryoshka Sentence Embeddings},
667
+ author={Xianming Li and Zongxi Li and Jing Li and Haoran Xie and Qing Li},
668
+ year={2024},
669
+ eprint={2402.14776},
670
+ archivePrefix={arXiv},
671
+ primaryClass={cs.CL}
672
+ }
673
+ ```
674
+
675
+ #### MultipleNegativesRankingLoss
676
+ ```bibtex
677
+ @misc{henderson2017efficient,
678
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
679
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
680
+ year={2017},
681
+ eprint={1705.00652},
682
+ archivePrefix={arXiv},
683
+ primaryClass={cs.CL}
684
+ }
685
+ ```
686
+
687
+ <!--
688
+ ## Glossary
689
+
690
+ *Clearly define terms in order to be accessible across audiences.*
691
+ -->
692
+
693
+ <!--
694
+ ## Model Card Authors
695
+
696
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
697
+ -->
698
+
699
+ <!--
700
+ ## Model Card Contact
701
+
702
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
703
+ -->
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "[MASK]": 128000
3
+ }
config.json ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/deberta-v3-small",
3
+ "architectures": [
4
+ "DebertaV2Model"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "hidden_act": "gelu",
8
+ "hidden_dropout_prob": 0.1,
9
+ "hidden_size": 768,
10
+ "initializer_range": 0.02,
11
+ "intermediate_size": 3072,
12
+ "layer_norm_eps": 1e-07,
13
+ "max_position_embeddings": 512,
14
+ "max_relative_positions": -1,
15
+ "model_type": "deberta-v2",
16
+ "norm_rel_ebd": "layer_norm",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "pooler_dropout": 0,
21
+ "pooler_hidden_act": "gelu",
22
+ "pooler_hidden_size": 768,
23
+ "pos_att_type": [
24
+ "p2c",
25
+ "c2p"
26
+ ],
27
+ "position_biased_input": false,
28
+ "position_buckets": 256,
29
+ "relative_attention": true,
30
+ "share_att_key": true,
31
+ "torch_dtype": "float32",
32
+ "transformers_version": "4.41.2",
33
+ "type_vocab_size": 0,
34
+ "vocab_size": 128100
35
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
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
+ ]
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f0df58a0d7697e8a633fce066e5186979ef9cca2b35e6c6a3ef1f37c2b1b55d7
3
+ size 565251810
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "[CLS]",
3
+ "cls_token": "[CLS]",
4
+ "eos_token": "[SEP]",
5
+ "mask_token": "[MASK]",
6
+ "pad_token": "[PAD]",
7
+ "sep_token": "[SEP]",
8
+ "unk_token": {
9
+ "content": "[UNK]",
10
+ "lstrip": false,
11
+ "normalized": true,
12
+ "rstrip": false,
13
+ "single_word": false
14
+ }
15
+ }
spm.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
3
+ size 2464616
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
+ "1": {
12
+ "content": "[CLS]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[SEP]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[UNK]",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "128000": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "[CLS]",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "[CLS]",
47
+ "do_lower_case": false,
48
+ "eos_token": "[SEP]",
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "pad_token": "[PAD]",
52
+ "sep_token": "[SEP]",
53
+ "sp_model_kwargs": {},
54
+ "split_by_punct": false,
55
+ "tokenizer_class": "DebertaV2Tokenizer",
56
+ "unk_token": "[UNK]",
57
+ "vocab_type": "spm"
58
+ }