srikarvar commited on
Commit
fe5b41a
1 Parent(s): b4fba7d

Add new SentenceTransformer model.

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,694 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: srikarvar/fine_tuned_model_5
3
+ library_name: sentence-transformers
4
+ metrics:
5
+ - cosine_accuracy@1
6
+ - cosine_accuracy@3
7
+ - cosine_accuracy@5
8
+ - cosine_accuracy@10
9
+ - cosine_precision@1
10
+ - cosine_precision@3
11
+ - cosine_precision@5
12
+ - cosine_precision@10
13
+ - cosine_recall@1
14
+ - cosine_recall@3
15
+ - cosine_recall@5
16
+ - cosine_recall@10
17
+ - cosine_ndcg@10
18
+ - cosine_mrr@10
19
+ - cosine_map@100
20
+ - dot_accuracy@1
21
+ - dot_accuracy@3
22
+ - dot_accuracy@5
23
+ - dot_accuracy@10
24
+ - dot_precision@1
25
+ - dot_precision@3
26
+ - dot_precision@5
27
+ - dot_precision@10
28
+ - dot_recall@1
29
+ - dot_recall@3
30
+ - dot_recall@5
31
+ - dot_recall@10
32
+ - dot_ndcg@10
33
+ - dot_mrr@10
34
+ - dot_map@100
35
+ pipeline_tag: sentence-similarity
36
+ tags:
37
+ - sentence-transformers
38
+ - sentence-similarity
39
+ - feature-extraction
40
+ - generated_from_trainer
41
+ - dataset_size:560
42
+ - loss:MultipleNegativesRankingLoss
43
+ widget:
44
+ - source_sentence: The main objective of the System Logs documentation is to demonstrate
45
+ how to utilize the 📋 Logs system to access and manipulate logs of any format or
46
+ type.
47
+ sentences:
48
+ - The purpose of the System Logs documentation is to provide information on how
49
+ to use the 📋 Logs system to store and work with logs of any format or type.
50
+ - The main difference between a ProductList and an InventoryList is that a ProductList
51
+ provides random access to the items, while an InventoryList updates progressively
52
+ as you browse the list.
53
+ - The most recommended way to clean kitchen surfaces is with a microfiber cloth.
54
+ - source_sentence: The main repository page can be accessed by clicking on the link.
55
+ sentences:
56
+ - The `to_absolute` function translates a `TaskInstruction` instance into a list
57
+ of absolute instructions, which are then combined together.
58
+ - No, ACTIVATE_X doesn't exist in version 3.0.
59
+ - It exists in the main repository. You can click on the provided link to redirect
60
+ to the main repository page.
61
+ - source_sentence: The documentation does not specify what type of value is returned
62
+ by the `fetch_data` function.
63
+ sentences:
64
+ - The purpose of this document is to provide documentation for the Plugin library.
65
+ - The return type of the `fetch_data` function is not specified in the current API
66
+ documentation.
67
+ - 'The `from_dictionary` function takes the following parameters:
68
+
69
+ - `data` (Union[dict, Mapping]): A mapping of keys to values or Python objects.
70
+
71
+ - `schema` (Schema, optional): If not passed, will be inferred from the Mapping
72
+ values.
73
+
74
+ - `metadata` (Union[dict, Mapping], optional): Optional metadata for the schema
75
+ (if inferred).'
76
+ - source_sentence: The aim of the Gardening.Fertilization class is to carry out the
77
+ application of fertilizers in the garden.
78
+ sentences:
79
+ - The `iterate_folder` function iterates over files within a folder.
80
+ - The purpose of the Gardening.Fertilization class is to apply fertilizers in the
81
+ garden.
82
+ - It may be more convenient for the reader to not specify a section when browsing
83
+ a collection because a suitable default may be an aggregated section that displays
84
+ all genres if the reader doesn’t request a particular one.
85
+ - source_sentence: Two kinds of cooking methods exist, baking and frying.
86
+ sentences:
87
+ - There are two types of cooking methods, baking and frying.
88
+ - The purpose of the given recipe is to provide instructions for making lasagna.
89
+ - To get the full path to the locally extracted file, we need to join the path of
90
+ the directory where the archive is extracted to and the relative image file path.
91
+ model-index:
92
+ - name: SentenceTransformer based on srikarvar/fine_tuned_model_5
93
+ results:
94
+ - task:
95
+ type: information-retrieval
96
+ name: Information Retrieval
97
+ dataset:
98
+ name: e5 cogcache small refined
99
+ type: e5-cogcache-small-refined
100
+ metrics:
101
+ - type: cosine_accuracy@1
102
+ value: 0.9642857142857143
103
+ name: Cosine Accuracy@1
104
+ - type: cosine_accuracy@3
105
+ value: 1.0
106
+ name: Cosine Accuracy@3
107
+ - type: cosine_accuracy@5
108
+ value: 1.0
109
+ name: Cosine Accuracy@5
110
+ - type: cosine_accuracy@10
111
+ value: 1.0
112
+ name: Cosine Accuracy@10
113
+ - type: cosine_precision@1
114
+ value: 0.9642857142857143
115
+ name: Cosine Precision@1
116
+ - type: cosine_precision@3
117
+ value: 0.3333333333333333
118
+ name: Cosine Precision@3
119
+ - type: cosine_precision@5
120
+ value: 0.19999999999999998
121
+ name: Cosine Precision@5
122
+ - type: cosine_precision@10
123
+ value: 0.09999999999999999
124
+ name: Cosine Precision@10
125
+ - type: cosine_recall@1
126
+ value: 0.9642857142857143
127
+ name: Cosine Recall@1
128
+ - type: cosine_recall@3
129
+ value: 1.0
130
+ name: Cosine Recall@3
131
+ - type: cosine_recall@5
132
+ value: 1.0
133
+ name: Cosine Recall@5
134
+ - type: cosine_recall@10
135
+ value: 1.0
136
+ name: Cosine Recall@10
137
+ - type: cosine_ndcg@10
138
+ value: 0.9844808884566332
139
+ name: Cosine Ndcg@10
140
+ - type: cosine_mrr@10
141
+ value: 0.9791666666666666
142
+ name: Cosine Mrr@10
143
+ - type: cosine_map@100
144
+ value: 0.9791666666666667
145
+ name: Cosine Map@100
146
+ - type: dot_accuracy@1
147
+ value: 0.9642857142857143
148
+ name: Dot Accuracy@1
149
+ - type: dot_accuracy@3
150
+ value: 1.0
151
+ name: Dot Accuracy@3
152
+ - type: dot_accuracy@5
153
+ value: 1.0
154
+ name: Dot Accuracy@5
155
+ - type: dot_accuracy@10
156
+ value: 1.0
157
+ name: Dot Accuracy@10
158
+ - type: dot_precision@1
159
+ value: 0.9642857142857143
160
+ name: Dot Precision@1
161
+ - type: dot_precision@3
162
+ value: 0.3333333333333333
163
+ name: Dot Precision@3
164
+ - type: dot_precision@5
165
+ value: 0.19999999999999998
166
+ name: Dot Precision@5
167
+ - type: dot_precision@10
168
+ value: 0.09999999999999999
169
+ name: Dot Precision@10
170
+ - type: dot_recall@1
171
+ value: 0.9642857142857143
172
+ name: Dot Recall@1
173
+ - type: dot_recall@3
174
+ value: 1.0
175
+ name: Dot Recall@3
176
+ - type: dot_recall@5
177
+ value: 1.0
178
+ name: Dot Recall@5
179
+ - type: dot_recall@10
180
+ value: 1.0
181
+ name: Dot Recall@10
182
+ - type: dot_ndcg@10
183
+ value: 0.9844808884566332
184
+ name: Dot Ndcg@10
185
+ - type: dot_mrr@10
186
+ value: 0.9791666666666666
187
+ name: Dot Mrr@10
188
+ - type: dot_map@100
189
+ value: 0.9791666666666667
190
+ name: Dot Map@100
191
+ - type: cosine_accuracy@1
192
+ value: 0.9642857142857143
193
+ name: Cosine Accuracy@1
194
+ - type: cosine_accuracy@3
195
+ value: 1.0
196
+ name: Cosine Accuracy@3
197
+ - type: cosine_accuracy@5
198
+ value: 1.0
199
+ name: Cosine Accuracy@5
200
+ - type: cosine_accuracy@10
201
+ value: 1.0
202
+ name: Cosine Accuracy@10
203
+ - type: cosine_precision@1
204
+ value: 0.9642857142857143
205
+ name: Cosine Precision@1
206
+ - type: cosine_precision@3
207
+ value: 0.3333333333333333
208
+ name: Cosine Precision@3
209
+ - type: cosine_precision@5
210
+ value: 0.19999999999999998
211
+ name: Cosine Precision@5
212
+ - type: cosine_precision@10
213
+ value: 0.09999999999999999
214
+ name: Cosine Precision@10
215
+ - type: cosine_recall@1
216
+ value: 0.9642857142857143
217
+ name: Cosine Recall@1
218
+ - type: cosine_recall@3
219
+ value: 1.0
220
+ name: Cosine Recall@3
221
+ - type: cosine_recall@5
222
+ value: 1.0
223
+ name: Cosine Recall@5
224
+ - type: cosine_recall@10
225
+ value: 1.0
226
+ name: Cosine Recall@10
227
+ - type: cosine_ndcg@10
228
+ value: 0.9844808884566332
229
+ name: Cosine Ndcg@10
230
+ - type: cosine_mrr@10
231
+ value: 0.9791666666666666
232
+ name: Cosine Mrr@10
233
+ - type: cosine_map@100
234
+ value: 0.9791666666666667
235
+ name: Cosine Map@100
236
+ - type: dot_accuracy@1
237
+ value: 0.9642857142857143
238
+ name: Dot Accuracy@1
239
+ - type: dot_accuracy@3
240
+ value: 1.0
241
+ name: Dot Accuracy@3
242
+ - type: dot_accuracy@5
243
+ value: 1.0
244
+ name: Dot Accuracy@5
245
+ - type: dot_accuracy@10
246
+ value: 1.0
247
+ name: Dot Accuracy@10
248
+ - type: dot_precision@1
249
+ value: 0.9642857142857143
250
+ name: Dot Precision@1
251
+ - type: dot_precision@3
252
+ value: 0.3333333333333333
253
+ name: Dot Precision@3
254
+ - type: dot_precision@5
255
+ value: 0.19999999999999998
256
+ name: Dot Precision@5
257
+ - type: dot_precision@10
258
+ value: 0.09999999999999999
259
+ name: Dot Precision@10
260
+ - type: dot_recall@1
261
+ value: 0.9642857142857143
262
+ name: Dot Recall@1
263
+ - type: dot_recall@3
264
+ value: 1.0
265
+ name: Dot Recall@3
266
+ - type: dot_recall@5
267
+ value: 1.0
268
+ name: Dot Recall@5
269
+ - type: dot_recall@10
270
+ value: 1.0
271
+ name: Dot Recall@10
272
+ - type: dot_ndcg@10
273
+ value: 0.9844808884566332
274
+ name: Dot Ndcg@10
275
+ - type: dot_mrr@10
276
+ value: 0.9791666666666666
277
+ name: Dot Mrr@10
278
+ - type: dot_map@100
279
+ value: 0.9791666666666667
280
+ name: Dot Map@100
281
+ ---
282
+
283
+ # SentenceTransformer based on srikarvar/fine_tuned_model_5
284
+
285
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [srikarvar/fine_tuned_model_5](https://huggingface.co/srikarvar/fine_tuned_model_5) 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.
286
+
287
+ ## Model Details
288
+
289
+ ### Model Description
290
+ - **Model Type:** Sentence Transformer
291
+ - **Base model:** [srikarvar/fine_tuned_model_5](https://huggingface.co/srikarvar/fine_tuned_model_5) <!-- at revision 4e4dc22ad09f760a0a35c55d14d2f89ebe2d2ff2 -->
292
+ - **Maximum Sequence Length:** 512 tokens
293
+ - **Output Dimensionality:** 384 tokens
294
+ - **Similarity Function:** Cosine Similarity
295
+ - **Training Dataset:**
296
+ - json
297
+ <!-- - **Language:** Unknown -->
298
+ <!-- - **License:** Unknown -->
299
+
300
+ ### Model Sources
301
+
302
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
303
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
304
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
305
+
306
+ ### Full Model Architecture
307
+
308
+ ```
309
+ SentenceTransformer(
310
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: BertModel
311
+ (1): Pooling({'word_embedding_dimension': 384, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
312
+ (2): Normalize()
313
+ )
314
+ ```
315
+
316
+ ## Usage
317
+
318
+ ### Direct Usage (Sentence Transformers)
319
+
320
+ First install the Sentence Transformers library:
321
+
322
+ ```bash
323
+ pip install -U sentence-transformers
324
+ ```
325
+
326
+ Then you can load this model and run inference.
327
+ ```python
328
+ from sentence_transformers import SentenceTransformer
329
+
330
+ # Download from the 🤗 Hub
331
+ model = SentenceTransformer("srikarvar/fine_tuned_model_16")
332
+ # Run inference
333
+ sentences = [
334
+ 'Two kinds of cooking methods exist, baking and frying.',
335
+ 'There are two types of cooking methods, baking and frying.',
336
+ 'The purpose of the given recipe is to provide instructions for making lasagna.',
337
+ ]
338
+ embeddings = model.encode(sentences)
339
+ print(embeddings.shape)
340
+ # [3, 384]
341
+
342
+ # Get the similarity scores for the embeddings
343
+ similarities = model.similarity(embeddings, embeddings)
344
+ print(similarities.shape)
345
+ # [3, 3]
346
+ ```
347
+
348
+ <!--
349
+ ### Direct Usage (Transformers)
350
+
351
+ <details><summary>Click to see the direct usage in Transformers</summary>
352
+
353
+ </details>
354
+ -->
355
+
356
+ <!--
357
+ ### Downstream Usage (Sentence Transformers)
358
+
359
+ You can finetune this model on your own dataset.
360
+
361
+ <details><summary>Click to expand</summary>
362
+
363
+ </details>
364
+ -->
365
+
366
+ <!--
367
+ ### Out-of-Scope Use
368
+
369
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
370
+ -->
371
+
372
+ ## Evaluation
373
+
374
+ ### Metrics
375
+
376
+ #### Information Retrieval
377
+ * Dataset: `e5-cogcache-small-refined`
378
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
379
+
380
+ | Metric | Value |
381
+ |:--------------------|:-----------|
382
+ | cosine_accuracy@1 | 0.9643 |
383
+ | cosine_accuracy@3 | 1.0 |
384
+ | cosine_accuracy@5 | 1.0 |
385
+ | cosine_accuracy@10 | 1.0 |
386
+ | cosine_precision@1 | 0.9643 |
387
+ | cosine_precision@3 | 0.3333 |
388
+ | cosine_precision@5 | 0.2 |
389
+ | cosine_precision@10 | 0.1 |
390
+ | cosine_recall@1 | 0.9643 |
391
+ | cosine_recall@3 | 1.0 |
392
+ | cosine_recall@5 | 1.0 |
393
+ | cosine_recall@10 | 1.0 |
394
+ | cosine_ndcg@10 | 0.9845 |
395
+ | cosine_mrr@10 | 0.9792 |
396
+ | **cosine_map@100** | **0.9792** |
397
+ | dot_accuracy@1 | 0.9643 |
398
+ | dot_accuracy@3 | 1.0 |
399
+ | dot_accuracy@5 | 1.0 |
400
+ | dot_accuracy@10 | 1.0 |
401
+ | dot_precision@1 | 0.9643 |
402
+ | dot_precision@3 | 0.3333 |
403
+ | dot_precision@5 | 0.2 |
404
+ | dot_precision@10 | 0.1 |
405
+ | dot_recall@1 | 0.9643 |
406
+ | dot_recall@3 | 1.0 |
407
+ | dot_recall@5 | 1.0 |
408
+ | dot_recall@10 | 1.0 |
409
+ | dot_ndcg@10 | 0.9845 |
410
+ | dot_mrr@10 | 0.9792 |
411
+ | dot_map@100 | 0.9792 |
412
+
413
+ #### Information Retrieval
414
+ * Dataset: `e5-cogcache-small-refined`
415
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
416
+
417
+ | Metric | Value |
418
+ |:--------------------|:-----------|
419
+ | cosine_accuracy@1 | 0.9643 |
420
+ | cosine_accuracy@3 | 1.0 |
421
+ | cosine_accuracy@5 | 1.0 |
422
+ | cosine_accuracy@10 | 1.0 |
423
+ | cosine_precision@1 | 0.9643 |
424
+ | cosine_precision@3 | 0.3333 |
425
+ | cosine_precision@5 | 0.2 |
426
+ | cosine_precision@10 | 0.1 |
427
+ | cosine_recall@1 | 0.9643 |
428
+ | cosine_recall@3 | 1.0 |
429
+ | cosine_recall@5 | 1.0 |
430
+ | cosine_recall@10 | 1.0 |
431
+ | cosine_ndcg@10 | 0.9845 |
432
+ | cosine_mrr@10 | 0.9792 |
433
+ | **cosine_map@100** | **0.9792** |
434
+ | dot_accuracy@1 | 0.9643 |
435
+ | dot_accuracy@3 | 1.0 |
436
+ | dot_accuracy@5 | 1.0 |
437
+ | dot_accuracy@10 | 1.0 |
438
+ | dot_precision@1 | 0.9643 |
439
+ | dot_precision@3 | 0.3333 |
440
+ | dot_precision@5 | 0.2 |
441
+ | dot_precision@10 | 0.1 |
442
+ | dot_recall@1 | 0.9643 |
443
+ | dot_recall@3 | 1.0 |
444
+ | dot_recall@5 | 1.0 |
445
+ | dot_recall@10 | 1.0 |
446
+ | dot_ndcg@10 | 0.9845 |
447
+ | dot_mrr@10 | 0.9792 |
448
+ | dot_map@100 | 0.9792 |
449
+
450
+ <!--
451
+ ## Bias, Risks and Limitations
452
+
453
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
454
+ -->
455
+
456
+ <!--
457
+ ### Recommendations
458
+
459
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
460
+ -->
461
+
462
+ ## Training Details
463
+
464
+ ### Training Dataset
465
+
466
+ #### json
467
+
468
+ * Dataset: json
469
+ * Size: 560 training samples
470
+ * Columns: <code>anchor</code> and <code>positive</code>
471
+ * Approximate statistics based on the first 560 samples:
472
+ | | anchor | positive |
473
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
474
+ | type | string | string |
475
+ | details | <ul><li>min: 9 tokens</li><li>mean: 30.72 tokens</li><li>max: 98 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 30.52 tokens</li><li>max: 98 tokens</li></ul> |
476
+ * Samples:
477
+ | anchor | positive |
478
+ |:-----------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------|
479
+ | <code>The function assists in the preprocessing of the whole module in one go.</code> | <code>The function helps preprocess your entire module at once.</code> |
480
+ | <code>The `num_threads` parameter determines the quantity of threads used when downloading and processing the data locally.</code> | <code>The `num_threads` parameter specifies the number of threads when downloading and processing the data locally.</code> |
481
+ | <code>The `map()` function can be used to apply transformations to all elements of a model.</code> | <code>The `map()` function can apply transforms over an entire model.</code> |
482
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
483
+ ```json
484
+ {
485
+ "scale": 20.0,
486
+ "similarity_fct": "cos_sim"
487
+ }
488
+ ```
489
+
490
+ ### Training Hyperparameters
491
+ #### Non-Default Hyperparameters
492
+
493
+ - `eval_strategy`: epoch
494
+ - `per_device_train_batch_size`: 16
495
+ - `per_device_eval_batch_size`: 16
496
+ - `num_train_epochs`: 5
497
+ - `warmup_ratio`: 0.1
498
+ - `batch_sampler`: no_duplicates
499
+
500
+ #### All Hyperparameters
501
+ <details><summary>Click to expand</summary>
502
+
503
+ - `overwrite_output_dir`: False
504
+ - `do_predict`: False
505
+ - `eval_strategy`: epoch
506
+ - `prediction_loss_only`: True
507
+ - `per_device_train_batch_size`: 16
508
+ - `per_device_eval_batch_size`: 16
509
+ - `per_gpu_train_batch_size`: None
510
+ - `per_gpu_eval_batch_size`: None
511
+ - `gradient_accumulation_steps`: 1
512
+ - `eval_accumulation_steps`: None
513
+ - `learning_rate`: 5e-05
514
+ - `weight_decay`: 0.0
515
+ - `adam_beta1`: 0.9
516
+ - `adam_beta2`: 0.999
517
+ - `adam_epsilon`: 1e-08
518
+ - `max_grad_norm`: 1.0
519
+ - `num_train_epochs`: 5
520
+ - `max_steps`: -1
521
+ - `lr_scheduler_type`: linear
522
+ - `lr_scheduler_kwargs`: {}
523
+ - `warmup_ratio`: 0.1
524
+ - `warmup_steps`: 0
525
+ - `log_level`: passive
526
+ - `log_level_replica`: warning
527
+ - `log_on_each_node`: True
528
+ - `logging_nan_inf_filter`: True
529
+ - `save_safetensors`: True
530
+ - `save_on_each_node`: False
531
+ - `save_only_model`: False
532
+ - `restore_callback_states_from_checkpoint`: False
533
+ - `no_cuda`: False
534
+ - `use_cpu`: False
535
+ - `use_mps_device`: False
536
+ - `seed`: 42
537
+ - `data_seed`: None
538
+ - `jit_mode_eval`: False
539
+ - `use_ipex`: False
540
+ - `bf16`: False
541
+ - `fp16`: False
542
+ - `fp16_opt_level`: O1
543
+ - `half_precision_backend`: auto
544
+ - `bf16_full_eval`: False
545
+ - `fp16_full_eval`: False
546
+ - `tf32`: None
547
+ - `local_rank`: 0
548
+ - `ddp_backend`: None
549
+ - `tpu_num_cores`: None
550
+ - `tpu_metrics_debug`: False
551
+ - `debug`: []
552
+ - `dataloader_drop_last`: False
553
+ - `dataloader_num_workers`: 0
554
+ - `dataloader_prefetch_factor`: None
555
+ - `past_index`: -1
556
+ - `disable_tqdm`: False
557
+ - `remove_unused_columns`: True
558
+ - `label_names`: None
559
+ - `load_best_model_at_end`: False
560
+ - `ignore_data_skip`: False
561
+ - `fsdp`: []
562
+ - `fsdp_min_num_params`: 0
563
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
564
+ - `fsdp_transformer_layer_cls_to_wrap`: None
565
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
566
+ - `deepspeed`: None
567
+ - `label_smoothing_factor`: 0.0
568
+ - `optim`: adamw_torch
569
+ - `optim_args`: None
570
+ - `adafactor`: False
571
+ - `group_by_length`: False
572
+ - `length_column_name`: length
573
+ - `ddp_find_unused_parameters`: None
574
+ - `ddp_bucket_cap_mb`: None
575
+ - `ddp_broadcast_buffers`: False
576
+ - `dataloader_pin_memory`: True
577
+ - `dataloader_persistent_workers`: False
578
+ - `skip_memory_metrics`: True
579
+ - `use_legacy_prediction_loop`: False
580
+ - `push_to_hub`: False
581
+ - `resume_from_checkpoint`: None
582
+ - `hub_model_id`: None
583
+ - `hub_strategy`: every_save
584
+ - `hub_private_repo`: False
585
+ - `hub_always_push`: False
586
+ - `gradient_checkpointing`: False
587
+ - `gradient_checkpointing_kwargs`: None
588
+ - `include_inputs_for_metrics`: False
589
+ - `eval_do_concat_batches`: True
590
+ - `fp16_backend`: auto
591
+ - `push_to_hub_model_id`: None
592
+ - `push_to_hub_organization`: None
593
+ - `mp_parameters`:
594
+ - `auto_find_batch_size`: False
595
+ - `full_determinism`: False
596
+ - `torchdynamo`: None
597
+ - `ray_scope`: last
598
+ - `ddp_timeout`: 1800
599
+ - `torch_compile`: False
600
+ - `torch_compile_backend`: None
601
+ - `torch_compile_mode`: None
602
+ - `dispatch_batches`: None
603
+ - `split_batches`: None
604
+ - `include_tokens_per_second`: False
605
+ - `include_num_input_tokens_seen`: False
606
+ - `neftune_noise_alpha`: None
607
+ - `optim_target_modules`: None
608
+ - `batch_eval_metrics`: False
609
+ - `batch_sampler`: no_duplicates
610
+ - `multi_dataset_batch_sampler`: proportional
611
+
612
+ </details>
613
+
614
+ ### Training Logs
615
+ | Epoch | Step | Training Loss | e5-cogcache-small-refined_cosine_map@100 |
616
+ |:------:|:----:|:-------------:|:----------------------------------------:|
617
+ | 0 | 0 | - | 0.9702 |
618
+ | 0.3125 | 10 | 0.0171 | - |
619
+ | 0.625 | 20 | 0.0042 | - |
620
+ | 0.9375 | 30 | 0.0011 | - |
621
+ | 1.0 | 32 | - | 0.9792 |
622
+ | 1.25 | 40 | 0.0062 | - |
623
+ | 1.5625 | 50 | 0.0001 | - |
624
+ | 1.875 | 60 | 0.0002 | - |
625
+ | 2.0 | 64 | - | 0.9792 |
626
+ | 2.1875 | 70 | 0.0001 | - |
627
+ | 2.5 | 80 | 0.0005 | - |
628
+ | 2.8125 | 90 | 0.0001 | - |
629
+ | 3.0 | 96 | - | 0.9792 |
630
+ | 3.125 | 100 | 0.0001 | - |
631
+ | 3.4375 | 110 | 0.0002 | - |
632
+ | 3.75 | 120 | 0.0001 | - |
633
+ | 4.0 | 128 | - | 0.9792 |
634
+ | 4.0625 | 130 | 0.0001 | - |
635
+ | 4.375 | 140 | 0.0 | - |
636
+ | 4.6875 | 150 | 0.0001 | - |
637
+ | 5.0 | 160 | 0.0001 | 0.9792 |
638
+
639
+
640
+ ### Framework Versions
641
+ - Python: 3.10.12
642
+ - Sentence Transformers: 3.1.0
643
+ - Transformers: 4.41.2
644
+ - PyTorch: 2.1.2+cu121
645
+ - Accelerate: 0.34.2
646
+ - Datasets: 2.19.1
647
+ - Tokenizers: 0.19.1
648
+
649
+ ## Citation
650
+
651
+ ### BibTeX
652
+
653
+ #### Sentence Transformers
654
+ ```bibtex
655
+ @inproceedings{reimers-2019-sentence-bert,
656
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
657
+ author = "Reimers, Nils and Gurevych, Iryna",
658
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
659
+ month = "11",
660
+ year = "2019",
661
+ publisher = "Association for Computational Linguistics",
662
+ url = "https://arxiv.org/abs/1908.10084",
663
+ }
664
+ ```
665
+
666
+ #### MultipleNegativesRankingLoss
667
+ ```bibtex
668
+ @misc{henderson2017efficient,
669
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
670
+ 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},
671
+ year={2017},
672
+ eprint={1705.00652},
673
+ archivePrefix={arXiv},
674
+ primaryClass={cs.CL}
675
+ }
676
+ ```
677
+
678
+ <!--
679
+ ## Glossary
680
+
681
+ *Clearly define terms in order to be accessible across audiences.*
682
+ -->
683
+
684
+ <!--
685
+ ## Model Card Authors
686
+
687
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
688
+ -->
689
+
690
+ <!--
691
+ ## Model Card Contact
692
+
693
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
694
+ -->
config.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "srikarvar/fine_tuned_model_5",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 384,
11
+ "initializer_range": 0.02,
12
+ "intermediate_size": 1536,
13
+ "layer_norm_eps": 1e-12,
14
+ "max_position_embeddings": 512,
15
+ "model_type": "bert",
16
+ "num_attention_heads": 12,
17
+ "num_hidden_layers": 12,
18
+ "pad_token_id": 0,
19
+ "position_embedding_type": "absolute",
20
+ "tokenizer_class": "XLMRobertaTokenizer",
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.2",
23
+ "type_vocab_size": 2,
24
+ "use_cache": true,
25
+ "vocab_size": 250037
26
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.1.0",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.1.2+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": null
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:7b06c0c48a33986fd072e06c69a3c8f56a1018fdba12101d3f63dec417ab03d2
3
+ size 470637416
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": false
4
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:cfc8146abe2a0488e9e2a0c56de7952f7c11ab059eca145a0a727afce0db2865
3
+ size 5069051
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:ef04f2b385d1514f500e779207ace0f53e30895ce37563179e29f4022d28ca38
3
+ size 17083053
tokenizer_config.json ADDED
@@ -0,0 +1,62 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
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": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "250001": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "max_length": 512,
50
+ "model_max_length": 512,
51
+ "pad_to_multiple_of": null,
52
+ "pad_token": "<pad>",
53
+ "pad_token_type_id": 0,
54
+ "padding_side": "right",
55
+ "sep_token": "</s>",
56
+ "sp_model_kwargs": {},
57
+ "stride": 0,
58
+ "tokenizer_class": "XLMRobertaTokenizer",
59
+ "truncation_side": "right",
60
+ "truncation_strategy": "longest_first",
61
+ "unk_token": "<unk>"
62
+ }