FAWAS97 commited on
Commit
de48773
·
verified ·
1 Parent(s): 8a81721

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": true,
4
+ "pooling_mode_mean_tokens": false,
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,821 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:360
9
+ - loss:MatryoshkaLoss
10
+ - loss:MultipleNegativesRankingLoss
11
+ widget:
12
+ - source_sentence: Details for hostname <hostname> please
13
+ sentences:
14
+ - Tell me about the entity/device <hostname>
15
+ - I need the MAC address for <ip>
16
+ - Tell me MAC address for IP <ip>
17
+ - source_sentence: List all anomalies for hostname <hostname>
18
+ sentences:
19
+ - What are the anomalies for the entity with <hostname>
20
+ - Say something about the device with MAC <mac>
21
+ - Provide MAC address of <ip>
22
+ - source_sentence: Fetch details of device <hostname>
23
+ sentences:
24
+ - Show anomalies detected for <hostname>
25
+ - Provide me details of entity <hostname>
26
+ - Provide MAC address of <ip>
27
+ - source_sentence: I want to know about IP <ip>
28
+ sentences:
29
+ - Details for IP <ip> please
30
+ - Say something about the device <hostname>
31
+ - Provide MAC address of <ip>
32
+ - source_sentence: Details for <hostname> please
33
+ sentences:
34
+ - Fetch details of device <mac>
35
+ - Say something about the device with <hostname>
36
+ - Fetch details of device <hostname>
37
+ pipeline_tag: sentence-similarity
38
+ library_name: sentence-transformers
39
+ metrics:
40
+ - cosine_accuracy@1
41
+ - cosine_accuracy@3
42
+ - cosine_accuracy@5
43
+ - cosine_accuracy@10
44
+ - cosine_precision@1
45
+ - cosine_precision@3
46
+ - cosine_precision@5
47
+ - cosine_precision@10
48
+ - cosine_recall@1
49
+ - cosine_recall@3
50
+ - cosine_recall@5
51
+ - cosine_recall@10
52
+ - cosine_ndcg@10
53
+ - cosine_mrr@10
54
+ - cosine_map@100
55
+ model-index:
56
+ - name: SentenceTransformer
57
+ results:
58
+ - task:
59
+ type: information-retrieval
60
+ name: Information Retrieval
61
+ dataset:
62
+ name: dim 768
63
+ type: dim_768
64
+ metrics:
65
+ - type: cosine_accuracy@1
66
+ value: 0.0
67
+ name: Cosine Accuracy@1
68
+ - type: cosine_accuracy@3
69
+ value: 0.05
70
+ name: Cosine Accuracy@3
71
+ - type: cosine_accuracy@5
72
+ value: 0.05
73
+ name: Cosine Accuracy@5
74
+ - type: cosine_accuracy@10
75
+ value: 0.075
76
+ name: Cosine Accuracy@10
77
+ - type: cosine_precision@1
78
+ value: 0.0
79
+ name: Cosine Precision@1
80
+ - type: cosine_precision@3
81
+ value: 0.016666666666666666
82
+ name: Cosine Precision@3
83
+ - type: cosine_precision@5
84
+ value: 0.01
85
+ name: Cosine Precision@5
86
+ - type: cosine_precision@10
87
+ value: 0.0075000000000000015
88
+ name: Cosine Precision@10
89
+ - type: cosine_recall@1
90
+ value: 0.0
91
+ name: Cosine Recall@1
92
+ - type: cosine_recall@3
93
+ value: 0.05
94
+ name: Cosine Recall@3
95
+ - type: cosine_recall@5
96
+ value: 0.05
97
+ name: Cosine Recall@5
98
+ - type: cosine_recall@10
99
+ value: 0.075
100
+ name: Cosine Recall@10
101
+ - type: cosine_ndcg@10
102
+ value: 0.03579899373088597
103
+ name: Cosine Ndcg@10
104
+ - type: cosine_mrr@10
105
+ value: 0.02361111111111111
106
+ name: Cosine Mrr@10
107
+ - type: cosine_map@100
108
+ value: 0.05892676282475917
109
+ name: Cosine Map@100
110
+ - task:
111
+ type: information-retrieval
112
+ name: Information Retrieval
113
+ dataset:
114
+ name: dim 512
115
+ type: dim_512
116
+ metrics:
117
+ - type: cosine_accuracy@1
118
+ value: 0.0
119
+ name: Cosine Accuracy@1
120
+ - type: cosine_accuracy@3
121
+ value: 0.05
122
+ name: Cosine Accuracy@3
123
+ - type: cosine_accuracy@5
124
+ value: 0.05
125
+ name: Cosine Accuracy@5
126
+ - type: cosine_accuracy@10
127
+ value: 0.075
128
+ name: Cosine Accuracy@10
129
+ - type: cosine_precision@1
130
+ value: 0.0
131
+ name: Cosine Precision@1
132
+ - type: cosine_precision@3
133
+ value: 0.016666666666666666
134
+ name: Cosine Precision@3
135
+ - type: cosine_precision@5
136
+ value: 0.01
137
+ name: Cosine Precision@5
138
+ - type: cosine_precision@10
139
+ value: 0.0075000000000000015
140
+ name: Cosine Precision@10
141
+ - type: cosine_recall@1
142
+ value: 0.0
143
+ name: Cosine Recall@1
144
+ - type: cosine_recall@3
145
+ value: 0.05
146
+ name: Cosine Recall@3
147
+ - type: cosine_recall@5
148
+ value: 0.05
149
+ name: Cosine Recall@5
150
+ - type: cosine_recall@10
151
+ value: 0.075
152
+ name: Cosine Recall@10
153
+ - type: cosine_ndcg@10
154
+ value: 0.03579899373088597
155
+ name: Cosine Ndcg@10
156
+ - type: cosine_mrr@10
157
+ value: 0.02361111111111111
158
+ name: Cosine Mrr@10
159
+ - type: cosine_map@100
160
+ value: 0.05892676282475917
161
+ name: Cosine Map@100
162
+ - task:
163
+ type: information-retrieval
164
+ name: Information Retrieval
165
+ dataset:
166
+ name: dim 256
167
+ type: dim_256
168
+ metrics:
169
+ - type: cosine_accuracy@1
170
+ value: 0.0
171
+ name: Cosine Accuracy@1
172
+ - type: cosine_accuracy@3
173
+ value: 0.05
174
+ name: Cosine Accuracy@3
175
+ - type: cosine_accuracy@5
176
+ value: 0.05
177
+ name: Cosine Accuracy@5
178
+ - type: cosine_accuracy@10
179
+ value: 0.1
180
+ name: Cosine Accuracy@10
181
+ - type: cosine_precision@1
182
+ value: 0.0
183
+ name: Cosine Precision@1
184
+ - type: cosine_precision@3
185
+ value: 0.016666666666666666
186
+ name: Cosine Precision@3
187
+ - type: cosine_precision@5
188
+ value: 0.01
189
+ name: Cosine Precision@5
190
+ - type: cosine_precision@10
191
+ value: 0.01
192
+ name: Cosine Precision@10
193
+ - type: cosine_recall@1
194
+ value: 0.0
195
+ name: Cosine Recall@1
196
+ - type: cosine_recall@3
197
+ value: 0.05
198
+ name: Cosine Recall@3
199
+ - type: cosine_recall@5
200
+ value: 0.05
201
+ name: Cosine Recall@5
202
+ - type: cosine_recall@10
203
+ value: 0.1
204
+ name: Cosine Recall@10
205
+ - type: cosine_ndcg@10
206
+ value: 0.043025614388833164
207
+ name: Cosine Ndcg@10
208
+ - type: cosine_mrr@10
209
+ value: 0.026111111111111106
210
+ name: Cosine Mrr@10
211
+ - type: cosine_map@100
212
+ value: 0.057867541303413296
213
+ name: Cosine Map@100
214
+ - task:
215
+ type: information-retrieval
216
+ name: Information Retrieval
217
+ dataset:
218
+ name: dim 128
219
+ type: dim_128
220
+ metrics:
221
+ - type: cosine_accuracy@1
222
+ value: 0.025
223
+ name: Cosine Accuracy@1
224
+ - type: cosine_accuracy@3
225
+ value: 0.05
226
+ name: Cosine Accuracy@3
227
+ - type: cosine_accuracy@5
228
+ value: 0.05
229
+ name: Cosine Accuracy@5
230
+ - type: cosine_accuracy@10
231
+ value: 0.075
232
+ name: Cosine Accuracy@10
233
+ - type: cosine_precision@1
234
+ value: 0.025
235
+ name: Cosine Precision@1
236
+ - type: cosine_precision@3
237
+ value: 0.016666666666666666
238
+ name: Cosine Precision@3
239
+ - type: cosine_precision@5
240
+ value: 0.01
241
+ name: Cosine Precision@5
242
+ - type: cosine_precision@10
243
+ value: 0.0075000000000000015
244
+ name: Cosine Precision@10
245
+ - type: cosine_recall@1
246
+ value: 0.025
247
+ name: Cosine Recall@1
248
+ - type: cosine_recall@3
249
+ value: 0.05
250
+ name: Cosine Recall@3
251
+ - type: cosine_recall@5
252
+ value: 0.05
253
+ name: Cosine Recall@5
254
+ - type: cosine_recall@10
255
+ value: 0.075
256
+ name: Cosine Recall@10
257
+ - type: cosine_ndcg@10
258
+ value: 0.045025749891599534
259
+ name: Cosine Ndcg@10
260
+ - type: cosine_mrr@10
261
+ value: 0.03611111111111111
262
+ name: Cosine Mrr@10
263
+ - type: cosine_map@100
264
+ value: 0.0700664255230172
265
+ name: Cosine Map@100
266
+ - task:
267
+ type: information-retrieval
268
+ name: Information Retrieval
269
+ dataset:
270
+ name: dim 64
271
+ type: dim_64
272
+ metrics:
273
+ - type: cosine_accuracy@1
274
+ value: 0.0
275
+ name: Cosine Accuracy@1
276
+ - type: cosine_accuracy@3
277
+ value: 0.025
278
+ name: Cosine Accuracy@3
279
+ - type: cosine_accuracy@5
280
+ value: 0.05
281
+ name: Cosine Accuracy@5
282
+ - type: cosine_accuracy@10
283
+ value: 0.125
284
+ name: Cosine Accuracy@10
285
+ - type: cosine_precision@1
286
+ value: 0.0
287
+ name: Cosine Precision@1
288
+ - type: cosine_precision@3
289
+ value: 0.008333333333333333
290
+ name: Cosine Precision@3
291
+ - type: cosine_precision@5
292
+ value: 0.01
293
+ name: Cosine Precision@5
294
+ - type: cosine_precision@10
295
+ value: 0.0125
296
+ name: Cosine Precision@10
297
+ - type: cosine_recall@1
298
+ value: 0.0
299
+ name: Cosine Recall@1
300
+ - type: cosine_recall@3
301
+ value: 0.025
302
+ name: Cosine Recall@3
303
+ - type: cosine_recall@5
304
+ value: 0.05
305
+ name: Cosine Recall@5
306
+ - type: cosine_recall@10
307
+ value: 0.125
308
+ name: Cosine Recall@10
309
+ - type: cosine_ndcg@10
310
+ value: 0.04554503439298109
311
+ name: Cosine Ndcg@10
312
+ - type: cosine_mrr@10
313
+ value: 0.022638888888888885
314
+ name: Cosine Mrr@10
315
+ - type: cosine_map@100
316
+ value: 0.05082432768780783
317
+ name: Cosine Map@100
318
+ ---
319
+
320
+ # SentenceTransformer
321
+
322
+ This is a [sentence-transformers](https://www.SBERT.net) model trained on the json dataset. 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.
323
+
324
+ ## Model Details
325
+
326
+ ### Model Description
327
+ - **Model Type:** Sentence Transformer
328
+ <!-- - **Base model:** [Unknown](https://huggingface.co/unknown) -->
329
+ - **Maximum Sequence Length:** 512 tokens
330
+ - **Output Dimensionality:** 384 dimensions
331
+ - **Similarity Function:** Cosine Similarity
332
+ - **Training Dataset:**
333
+ - json
334
+ <!-- - **Language:** Unknown -->
335
+ <!-- - **License:** Unknown -->
336
+
337
+ ### Model Sources
338
+
339
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
340
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
341
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
342
+
343
+ ### Full Model Architecture
344
+
345
+ ```
346
+ SentenceTransformer(
347
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True, 'architecture': 'BertModel'})
348
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
349
+ (2): Normalize()
350
+ )
351
+ ```
352
+
353
+ ## Usage
354
+
355
+ ### Direct Usage (Sentence Transformers)
356
+
357
+ First install the Sentence Transformers library:
358
+
359
+ ```bash
360
+ pip install -U sentence-transformers
361
+ ```
362
+
363
+ Then you can load this model and run inference.
364
+ ```python
365
+ from sentence_transformers import SentenceTransformer
366
+
367
+ # Download from the 🤗 Hub
368
+ model = SentenceTransformer("FAWAS97/bge-base-financial-matryoshka")
369
+ # Run inference
370
+ sentences = [
371
+ 'Details for <hostname> please',
372
+ 'Say something about the device with <hostname>',
373
+ 'Fetch details of device <mac>',
374
+ ]
375
+ embeddings = model.encode(sentences)
376
+ print(embeddings.shape)
377
+ # [3, 384]
378
+
379
+ # Get the similarity scores for the embeddings
380
+ similarities = model.similarity(embeddings, embeddings)
381
+ print(similarities)
382
+ # tensor([[1.0000, 0.8608, 0.6315],
383
+ # [0.8608, 1.0000, 0.6646],
384
+ # [0.6315, 0.6646, 1.0000]])
385
+ ```
386
+
387
+ <!--
388
+ ### Direct Usage (Transformers)
389
+
390
+ <details><summary>Click to see the direct usage in Transformers</summary>
391
+
392
+ </details>
393
+ -->
394
+
395
+ <!--
396
+ ### Downstream Usage (Sentence Transformers)
397
+
398
+ You can finetune this model on your own dataset.
399
+
400
+ <details><summary>Click to expand</summary>
401
+
402
+ </details>
403
+ -->
404
+
405
+ <!--
406
+ ### Out-of-Scope Use
407
+
408
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
409
+ -->
410
+
411
+ ## Evaluation
412
+
413
+ ### Metrics
414
+
415
+ #### Information Retrieval
416
+
417
+ * Dataset: `dim_768`
418
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
419
+ ```json
420
+ {
421
+ "truncate_dim": 768
422
+ }
423
+ ```
424
+
425
+ | Metric | Value |
426
+ |:--------------------|:-----------|
427
+ | cosine_accuracy@1 | 0.0 |
428
+ | cosine_accuracy@3 | 0.05 |
429
+ | cosine_accuracy@5 | 0.05 |
430
+ | cosine_accuracy@10 | 0.075 |
431
+ | cosine_precision@1 | 0.0 |
432
+ | cosine_precision@3 | 0.0167 |
433
+ | cosine_precision@5 | 0.01 |
434
+ | cosine_precision@10 | 0.0075 |
435
+ | cosine_recall@1 | 0.0 |
436
+ | cosine_recall@3 | 0.05 |
437
+ | cosine_recall@5 | 0.05 |
438
+ | cosine_recall@10 | 0.075 |
439
+ | **cosine_ndcg@10** | **0.0358** |
440
+ | cosine_mrr@10 | 0.0236 |
441
+ | cosine_map@100 | 0.0589 |
442
+
443
+ #### Information Retrieval
444
+
445
+ * Dataset: `dim_512`
446
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
447
+ ```json
448
+ {
449
+ "truncate_dim": 512
450
+ }
451
+ ```
452
+
453
+ | Metric | Value |
454
+ |:--------------------|:-----------|
455
+ | cosine_accuracy@1 | 0.0 |
456
+ | cosine_accuracy@3 | 0.05 |
457
+ | cosine_accuracy@5 | 0.05 |
458
+ | cosine_accuracy@10 | 0.075 |
459
+ | cosine_precision@1 | 0.0 |
460
+ | cosine_precision@3 | 0.0167 |
461
+ | cosine_precision@5 | 0.01 |
462
+ | cosine_precision@10 | 0.0075 |
463
+ | cosine_recall@1 | 0.0 |
464
+ | cosine_recall@3 | 0.05 |
465
+ | cosine_recall@5 | 0.05 |
466
+ | cosine_recall@10 | 0.075 |
467
+ | **cosine_ndcg@10** | **0.0358** |
468
+ | cosine_mrr@10 | 0.0236 |
469
+ | cosine_map@100 | 0.0589 |
470
+
471
+ #### Information Retrieval
472
+
473
+ * Dataset: `dim_256`
474
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
475
+ ```json
476
+ {
477
+ "truncate_dim": 256
478
+ }
479
+ ```
480
+
481
+ | Metric | Value |
482
+ |:--------------------|:----------|
483
+ | cosine_accuracy@1 | 0.0 |
484
+ | cosine_accuracy@3 | 0.05 |
485
+ | cosine_accuracy@5 | 0.05 |
486
+ | cosine_accuracy@10 | 0.1 |
487
+ | cosine_precision@1 | 0.0 |
488
+ | cosine_precision@3 | 0.0167 |
489
+ | cosine_precision@5 | 0.01 |
490
+ | cosine_precision@10 | 0.01 |
491
+ | cosine_recall@1 | 0.0 |
492
+ | cosine_recall@3 | 0.05 |
493
+ | cosine_recall@5 | 0.05 |
494
+ | cosine_recall@10 | 0.1 |
495
+ | **cosine_ndcg@10** | **0.043** |
496
+ | cosine_mrr@10 | 0.0261 |
497
+ | cosine_map@100 | 0.0579 |
498
+
499
+ #### Information Retrieval
500
+
501
+ * Dataset: `dim_128`
502
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
503
+ ```json
504
+ {
505
+ "truncate_dim": 128
506
+ }
507
+ ```
508
+
509
+ | Metric | Value |
510
+ |:--------------------|:----------|
511
+ | cosine_accuracy@1 | 0.025 |
512
+ | cosine_accuracy@3 | 0.05 |
513
+ | cosine_accuracy@5 | 0.05 |
514
+ | cosine_accuracy@10 | 0.075 |
515
+ | cosine_precision@1 | 0.025 |
516
+ | cosine_precision@3 | 0.0167 |
517
+ | cosine_precision@5 | 0.01 |
518
+ | cosine_precision@10 | 0.0075 |
519
+ | cosine_recall@1 | 0.025 |
520
+ | cosine_recall@3 | 0.05 |
521
+ | cosine_recall@5 | 0.05 |
522
+ | cosine_recall@10 | 0.075 |
523
+ | **cosine_ndcg@10** | **0.045** |
524
+ | cosine_mrr@10 | 0.0361 |
525
+ | cosine_map@100 | 0.0701 |
526
+
527
+ #### Information Retrieval
528
+
529
+ * Dataset: `dim_64`
530
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator) with these parameters:
531
+ ```json
532
+ {
533
+ "truncate_dim": 64
534
+ }
535
+ ```
536
+
537
+ | Metric | Value |
538
+ |:--------------------|:-----------|
539
+ | cosine_accuracy@1 | 0.0 |
540
+ | cosine_accuracy@3 | 0.025 |
541
+ | cosine_accuracy@5 | 0.05 |
542
+ | cosine_accuracy@10 | 0.125 |
543
+ | cosine_precision@1 | 0.0 |
544
+ | cosine_precision@3 | 0.0083 |
545
+ | cosine_precision@5 | 0.01 |
546
+ | cosine_precision@10 | 0.0125 |
547
+ | cosine_recall@1 | 0.0 |
548
+ | cosine_recall@3 | 0.025 |
549
+ | cosine_recall@5 | 0.05 |
550
+ | cosine_recall@10 | 0.125 |
551
+ | **cosine_ndcg@10** | **0.0455** |
552
+ | cosine_mrr@10 | 0.0226 |
553
+ | cosine_map@100 | 0.0508 |
554
+
555
+ <!--
556
+ ## Bias, Risks and Limitations
557
+
558
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
559
+ -->
560
+
561
+ <!--
562
+ ### Recommendations
563
+
564
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
565
+ -->
566
+
567
+ ## Training Details
568
+
569
+ ### Training Dataset
570
+
571
+ #### json
572
+
573
+ * Dataset: json
574
+ * Size: 360 training samples
575
+ * Columns: <code>positive</code> and <code>anchor</code>
576
+ * Approximate statistics based on the first 360 samples:
577
+ | | positive | anchor |
578
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
579
+ | type | string | string |
580
+ | details | <ul><li>min: 8 tokens</li><li>mean: 10.77 tokens</li><li>max: 15 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 10.91 tokens</li><li>max: 16 tokens</li></ul> |
581
+ * Samples:
582
+ | positive | anchor |
583
+ |:-------------------------------------------------|:-----------------------------------------------|
584
+ | <code>Show hardware address of <hostname></code> | <code>Fetch MAC for hostname <hostname></code> |
585
+ | <code>Show hardware address of <ip></code> | <code>Fetch MAC for <ip></code> |
586
+ | <code>Does <mac> have problems?</code> | <code>Show anomalies detected for <mac></code> |
587
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
588
+ ```json
589
+ {
590
+ "loss": "MultipleNegativesRankingLoss",
591
+ "matryoshka_dims": [
592
+ 384,
593
+ 128,
594
+ 64
595
+ ],
596
+ "matryoshka_weights": [
597
+ 1,
598
+ 1,
599
+ 1
600
+ ],
601
+ "n_dims_per_step": -1
602
+ }
603
+ ```
604
+
605
+ ### Training Hyperparameters
606
+ #### Non-Default Hyperparameters
607
+
608
+ - `eval_strategy`: epoch
609
+ - `per_device_train_batch_size`: 32
610
+ - `per_device_eval_batch_size`: 16
611
+ - `gradient_accumulation_steps`: 16
612
+ - `learning_rate`: 2e-05
613
+ - `num_train_epochs`: 4
614
+ - `lr_scheduler_type`: cosine
615
+ - `warmup_ratio`: 0.1
616
+ - `bf16`: True
617
+ - `tf32`: True
618
+ - `load_best_model_at_end`: True
619
+ - `batch_sampler`: no_duplicates
620
+
621
+ #### All Hyperparameters
622
+ <details><summary>Click to expand</summary>
623
+
624
+ - `overwrite_output_dir`: False
625
+ - `do_predict`: False
626
+ - `eval_strategy`: epoch
627
+ - `prediction_loss_only`: True
628
+ - `per_device_train_batch_size`: 32
629
+ - `per_device_eval_batch_size`: 16
630
+ - `per_gpu_train_batch_size`: None
631
+ - `per_gpu_eval_batch_size`: None
632
+ - `gradient_accumulation_steps`: 16
633
+ - `eval_accumulation_steps`: None
634
+ - `torch_empty_cache_steps`: None
635
+ - `learning_rate`: 2e-05
636
+ - `weight_decay`: 0.0
637
+ - `adam_beta1`: 0.9
638
+ - `adam_beta2`: 0.999
639
+ - `adam_epsilon`: 1e-08
640
+ - `max_grad_norm`: 1.0
641
+ - `num_train_epochs`: 4
642
+ - `max_steps`: -1
643
+ - `lr_scheduler_type`: cosine
644
+ - `lr_scheduler_kwargs`: {}
645
+ - `warmup_ratio`: 0.1
646
+ - `warmup_steps`: 0
647
+ - `log_level`: passive
648
+ - `log_level_replica`: warning
649
+ - `log_on_each_node`: True
650
+ - `logging_nan_inf_filter`: True
651
+ - `save_safetensors`: True
652
+ - `save_on_each_node`: False
653
+ - `save_only_model`: False
654
+ - `restore_callback_states_from_checkpoint`: False
655
+ - `no_cuda`: False
656
+ - `use_cpu`: False
657
+ - `use_mps_device`: False
658
+ - `seed`: 42
659
+ - `data_seed`: None
660
+ - `jit_mode_eval`: False
661
+ - `use_ipex`: False
662
+ - `bf16`: True
663
+ - `fp16`: False
664
+ - `fp16_opt_level`: O1
665
+ - `half_precision_backend`: auto
666
+ - `bf16_full_eval`: False
667
+ - `fp16_full_eval`: False
668
+ - `tf32`: True
669
+ - `local_rank`: 0
670
+ - `ddp_backend`: None
671
+ - `tpu_num_cores`: None
672
+ - `tpu_metrics_debug`: False
673
+ - `debug`: []
674
+ - `dataloader_drop_last`: False
675
+ - `dataloader_num_workers`: 0
676
+ - `dataloader_prefetch_factor`: None
677
+ - `past_index`: -1
678
+ - `disable_tqdm`: False
679
+ - `remove_unused_columns`: True
680
+ - `label_names`: None
681
+ - `load_best_model_at_end`: True
682
+ - `ignore_data_skip`: False
683
+ - `fsdp`: []
684
+ - `fsdp_min_num_params`: 0
685
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
686
+ - `fsdp_transformer_layer_cls_to_wrap`: None
687
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
688
+ - `parallelism_config`: None
689
+ - `deepspeed`: None
690
+ - `label_smoothing_factor`: 0.0
691
+ - `optim`: adamw_torch_fused
692
+ - `optim_args`: None
693
+ - `adafactor`: False
694
+ - `group_by_length`: False
695
+ - `length_column_name`: length
696
+ - `ddp_find_unused_parameters`: None
697
+ - `ddp_bucket_cap_mb`: None
698
+ - `ddp_broadcast_buffers`: False
699
+ - `dataloader_pin_memory`: True
700
+ - `dataloader_persistent_workers`: False
701
+ - `skip_memory_metrics`: True
702
+ - `use_legacy_prediction_loop`: False
703
+ - `push_to_hub`: False
704
+ - `resume_from_checkpoint`: None
705
+ - `hub_model_id`: None
706
+ - `hub_strategy`: every_save
707
+ - `hub_private_repo`: None
708
+ - `hub_always_push`: False
709
+ - `hub_revision`: None
710
+ - `gradient_checkpointing`: False
711
+ - `gradient_checkpointing_kwargs`: None
712
+ - `include_inputs_for_metrics`: False
713
+ - `include_for_metrics`: []
714
+ - `eval_do_concat_batches`: True
715
+ - `fp16_backend`: auto
716
+ - `push_to_hub_model_id`: None
717
+ - `push_to_hub_organization`: None
718
+ - `mp_parameters`:
719
+ - `auto_find_batch_size`: False
720
+ - `full_determinism`: False
721
+ - `torchdynamo`: None
722
+ - `ray_scope`: last
723
+ - `ddp_timeout`: 1800
724
+ - `torch_compile`: False
725
+ - `torch_compile_backend`: None
726
+ - `torch_compile_mode`: None
727
+ - `include_tokens_per_second`: False
728
+ - `include_num_input_tokens_seen`: False
729
+ - `neftune_noise_alpha`: None
730
+ - `optim_target_modules`: None
731
+ - `batch_eval_metrics`: False
732
+ - `eval_on_start`: False
733
+ - `use_liger_kernel`: False
734
+ - `liger_kernel_config`: None
735
+ - `eval_use_gather_object`: False
736
+ - `average_tokens_across_devices`: False
737
+ - `prompts`: None
738
+ - `batch_sampler`: no_duplicates
739
+ - `multi_dataset_batch_sampler`: proportional
740
+ - `router_mapping`: {}
741
+ - `learning_rate_mapping`: {}
742
+
743
+ </details>
744
+
745
+ ### Training Logs
746
+ | Epoch | Step | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
747
+ |:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
748
+ | **1.0** | **1** | **0.0358** | **0.0358** | **0.0358** | **0.0526** | **0.0308** |
749
+ | 2.0 | 2 | 0.0358 | 0.0358 | 0.0430 | 0.0454 | 0.0380 |
750
+ | 3.0 | 3 | 0.0358 | 0.0358 | 0.0430 | 0.0450 | 0.0455 |
751
+ | 4.0 | 4 | 0.0358 | 0.0358 | 0.0430 | 0.0450 | 0.0455 |
752
+
753
+ * The bold row denotes the saved checkpoint.
754
+
755
+ ### Framework Versions
756
+ - Python: 3.10.11
757
+ - Sentence Transformers: 5.1.0
758
+ - Transformers: 4.56.1
759
+ - PyTorch: 2.8.0+cu128
760
+ - Accelerate: 1.10.1
761
+ - Datasets: 4.0.0
762
+ - Tokenizers: 0.22.0
763
+
764
+ ## Citation
765
+
766
+ ### BibTeX
767
+
768
+ #### Sentence Transformers
769
+ ```bibtex
770
+ @inproceedings{reimers-2019-sentence-bert,
771
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
772
+ author = "Reimers, Nils and Gurevych, Iryna",
773
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
774
+ month = "11",
775
+ year = "2019",
776
+ publisher = "Association for Computational Linguistics",
777
+ url = "https://arxiv.org/abs/1908.10084",
778
+ }
779
+ ```
780
+
781
+ #### MatryoshkaLoss
782
+ ```bibtex
783
+ @misc{kusupati2024matryoshka,
784
+ title={Matryoshka Representation Learning},
785
+ author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
786
+ year={2024},
787
+ eprint={2205.13147},
788
+ archivePrefix={arXiv},
789
+ primaryClass={cs.LG}
790
+ }
791
+ ```
792
+
793
+ #### MultipleNegativesRankingLoss
794
+ ```bibtex
795
+ @misc{henderson2017efficient,
796
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
797
+ 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},
798
+ year={2017},
799
+ eprint={1705.00652},
800
+ archivePrefix={arXiv},
801
+ primaryClass={cs.CL}
802
+ }
803
+ ```
804
+
805
+ <!--
806
+ ## Glossary
807
+
808
+ *Clearly define terms in order to be accessible across audiences.*
809
+ -->
810
+
811
+ <!--
812
+ ## Model Card Authors
813
+
814
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
815
+ -->
816
+
817
+ <!--
818
+ ## Model Card Contact
819
+
820
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
821
+ -->
config.json ADDED
@@ -0,0 +1,30 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 1536,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "transformers_version": "4.56.1",
27
+ "type_vocab_size": 2,
28
+ "use_cache": true,
29
+ "vocab_size": 30522
30
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.0",
4
+ "transformers": "4.56.1",
5
+ "pytorch": "2.8.0+cu128"
6
+ },
7
+ "model_type": "SentenceTransformer",
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cb083fc2479c4704c9eae50f61c86eaca615005a87e2aabfa30f2eaed72831db
3
+ size 133462128
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": 512,
3
+ "do_lower_case": true
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,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "max_length": 512,
51
+ "model_max_length": 512,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff