mehularora commited on
Commit
6928d15
·
verified ·
1 Parent(s): 1c0c695

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,519 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:227518
9
+ - loss:MatryoshkaLoss
10
+ - loss:MultipleNegativesRankingLoss
11
+ base_model: sentence-transformers/all-MiniLM-L6-v2
12
+ widget:
13
+ - source_sentence: UTU
14
+ sentences:
15
+ - < HOSIER, person who sells stockings, etc [n]
16
+ - act of speaking foolishly [n]
17
+ - reward [n]
18
+ - source_sentence: PROEMS
19
+ sentences:
20
+ - < PROEM, introduction or preface [n]
21
+ - edge of a sea or lake [n] / prop or support [v]
22
+ - wad (black earthy ore of manganese) [n]
23
+ - source_sentence: INSTITUTORS
24
+ sentences:
25
+ - < INSTITUTOR, one who institutes [n]
26
+ - assembly of judges [n]
27
+ - < FATE, power supposed to predetermine events [n]
28
+ - source_sentence: HAEMAGOGUES
29
+ sentences:
30
+ - < VIVISECTORIUM, a place for vivisection [n]
31
+ - < GROTESQUE, strangely distorted [adj]
32
+ - < HAEMAGOGUE, a drug that promotes the flow of blood [n]
33
+ - source_sentence: BOLDING
34
+ sentences:
35
+ - < NAUCH, nautch (intricate traditional Indian dance) [n]
36
+ - < TABU, taboo (prohibition resulting from religious or social conventions) [n]
37
+ - < BOLD, confident and fearless [adj]
38
+ pipeline_tag: sentence-similarity
39
+ library_name: sentence-transformers
40
+ metrics:
41
+ - cosine_accuracy@1
42
+ - cosine_accuracy@3
43
+ - cosine_accuracy@5
44
+ - cosine_accuracy@10
45
+ - cosine_precision@1
46
+ - cosine_precision@3
47
+ - cosine_precision@5
48
+ - cosine_precision@10
49
+ - cosine_recall@1
50
+ - cosine_recall@3
51
+ - cosine_recall@5
52
+ - cosine_recall@10
53
+ - cosine_ndcg@10
54
+ - cosine_mrr@10
55
+ - cosine_map@100
56
+ model-index:
57
+ - name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
58
+ results:
59
+ - task:
60
+ type: information-retrieval
61
+ name: Information Retrieval
62
+ dataset:
63
+ name: dictionary test
64
+ type: dictionary-test
65
+ metrics:
66
+ - type: cosine_accuracy@1
67
+ value: 0.5970332278481013
68
+ name: Cosine Accuracy@1
69
+ - type: cosine_accuracy@3
70
+ value: 0.7252768987341772
71
+ name: Cosine Accuracy@3
72
+ - type: cosine_accuracy@5
73
+ value: 0.7495648734177215
74
+ name: Cosine Accuracy@5
75
+ - type: cosine_accuracy@10
76
+ value: 0.7743275316455697
77
+ name: Cosine Accuracy@10
78
+ - type: cosine_precision@1
79
+ value: 0.5970332278481013
80
+ name: Cosine Precision@1
81
+ - type: cosine_precision@3
82
+ value: 0.2417589662447257
83
+ name: Cosine Precision@3
84
+ - type: cosine_precision@5
85
+ value: 0.14991297468354428
86
+ name: Cosine Precision@5
87
+ - type: cosine_precision@10
88
+ value: 0.07743275316455696
89
+ name: Cosine Precision@10
90
+ - type: cosine_recall@1
91
+ value: 0.5970332278481013
92
+ name: Cosine Recall@1
93
+ - type: cosine_recall@3
94
+ value: 0.7252768987341772
95
+ name: Cosine Recall@3
96
+ - type: cosine_recall@5
97
+ value: 0.7495648734177215
98
+ name: Cosine Recall@5
99
+ - type: cosine_recall@10
100
+ value: 0.7743275316455697
101
+ name: Cosine Recall@10
102
+ - type: cosine_ndcg@10
103
+ value: 0.6919377177591847
104
+ name: Cosine Ndcg@10
105
+ - type: cosine_mrr@10
106
+ value: 0.6648749560478296
107
+ name: Cosine Mrr@10
108
+ - type: cosine_map@100
109
+ value: 0.6677242431561833
110
+ name: Cosine Map@100
111
+ ---
112
+
113
+ # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
114
+
115
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) on the csv 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.
116
+
117
+ ## Model Details
118
+
119
+ ### Model Description
120
+ - **Model Type:** Sentence Transformer
121
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
122
+ - **Maximum Sequence Length:** 256 tokens
123
+ - **Output Dimensionality:** 384 dimensions
124
+ - **Similarity Function:** Cosine Similarity
125
+ - **Training Dataset:**
126
+ - csv
127
+ <!-- - **Language:** Unknown -->
128
+ <!-- - **License:** Unknown -->
129
+
130
+ ### Model Sources
131
+
132
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
133
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
134
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
135
+
136
+ ### Full Model Architecture
137
+
138
+ ```
139
+ SentenceTransformer(
140
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
141
+ (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})
142
+ (2): Normalize()
143
+ )
144
+ ```
145
+
146
+ ## Usage
147
+
148
+ ### Direct Usage (Sentence Transformers)
149
+
150
+ First install the Sentence Transformers library:
151
+
152
+ ```bash
153
+ pip install -U sentence-transformers
154
+ ```
155
+
156
+ Then you can load this model and run inference.
157
+ ```python
158
+ from sentence_transformers import SentenceTransformer
159
+
160
+ # Download from the 🤗 Hub
161
+ model = SentenceTransformer("Mehularora/scrabble-embed-v1")
162
+ # Run inference
163
+ sentences = [
164
+ 'BOLDING',
165
+ '< BOLD, confident and fearless [adj]',
166
+ '< NAUCH, nautch (intricate traditional Indian dance) [n]',
167
+ ]
168
+ embeddings = model.encode(sentences)
169
+ print(embeddings.shape)
170
+ # [3, 384]
171
+
172
+ # Get the similarity scores for the embeddings
173
+ similarities = model.similarity(embeddings, embeddings)
174
+ print(similarities)
175
+ # tensor([[1.0000, 0.7391, 0.0112],
176
+ # [0.7391, 1.0000, 0.0722],
177
+ # [0.0112, 0.0722, 1.0000]])
178
+ ```
179
+
180
+ <!--
181
+ ### Direct Usage (Transformers)
182
+
183
+ <details><summary>Click to see the direct usage in Transformers</summary>
184
+
185
+ </details>
186
+ -->
187
+
188
+ <!--
189
+ ### Downstream Usage (Sentence Transformers)
190
+
191
+ You can finetune this model on your own dataset.
192
+
193
+ <details><summary>Click to expand</summary>
194
+
195
+ </details>
196
+ -->
197
+
198
+ <!--
199
+ ### Out-of-Scope Use
200
+
201
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
202
+ -->
203
+
204
+ ## Evaluation
205
+
206
+ ### Metrics
207
+
208
+ #### Information Retrieval
209
+
210
+ * Dataset: `dictionary-test`
211
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
212
+
213
+ | Metric | Value |
214
+ |:--------------------|:-----------|
215
+ | cosine_accuracy@1 | 0.597 |
216
+ | cosine_accuracy@3 | 0.7253 |
217
+ | cosine_accuracy@5 | 0.7496 |
218
+ | cosine_accuracy@10 | 0.7743 |
219
+ | cosine_precision@1 | 0.597 |
220
+ | cosine_precision@3 | 0.2418 |
221
+ | cosine_precision@5 | 0.1499 |
222
+ | cosine_precision@10 | 0.0774 |
223
+ | cosine_recall@1 | 0.597 |
224
+ | cosine_recall@3 | 0.7253 |
225
+ | cosine_recall@5 | 0.7496 |
226
+ | cosine_recall@10 | 0.7743 |
227
+ | **cosine_ndcg@10** | **0.6919** |
228
+ | cosine_mrr@10 | 0.6649 |
229
+ | cosine_map@100 | 0.6677 |
230
+
231
+ <!--
232
+ ## Bias, Risks and Limitations
233
+
234
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
235
+ -->
236
+
237
+ <!--
238
+ ### Recommendations
239
+
240
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
241
+ -->
242
+
243
+ ## Training Details
244
+
245
+ ### Training Dataset
246
+
247
+ #### csv
248
+
249
+ * Dataset: csv
250
+ * Size: 227,518 training samples
251
+ * Columns: <code>word</code> and <code>definition</code>
252
+ * Approximate statistics based on the first 1000 samples:
253
+ | | word | definition |
254
+ |:--------|:-------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
255
+ | type | string | string |
256
+ | details | <ul><li>min: 3 tokens</li><li>mean: 4.9 tokens</li><li>max: 9 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.82 tokens</li><li>max: 44 tokens</li></ul> |
257
+ * Samples:
258
+ | word | definition |
259
+ |:-------------------------|:--------------------------------------------------------|
260
+ | <code>SLURPIEST</code> | <code>< SLURPY, making a slurping noise [adj]</code> |
261
+ | <code>CRISPNESSES</code> | <code>< CRISPNESS, < CRISP, fresh and firm [adj]</code> |
262
+ | <code>CECUTIENCY</code> | <code>a tendency to blindness [n]</code> |
263
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
264
+ ```json
265
+ {
266
+ "loss": "MultipleNegativesRankingLoss",
267
+ "matryoshka_dims": [
268
+ 384,
269
+ 256
270
+ ],
271
+ "matryoshka_weights": [
272
+ 1,
273
+ 1
274
+ ],
275
+ "n_dims_per_step": -1
276
+ }
277
+ ```
278
+
279
+ ### Training Hyperparameters
280
+ #### Non-Default Hyperparameters
281
+
282
+ - `eval_strategy`: steps
283
+ - `per_device_train_batch_size`: 64
284
+ - `learning_rate`: 2e-05
285
+ - `num_train_epochs`: 1
286
+ - `fp16`: True
287
+
288
+ #### All Hyperparameters
289
+ <details><summary>Click to expand</summary>
290
+
291
+ - `overwrite_output_dir`: False
292
+ - `do_predict`: False
293
+ - `eval_strategy`: steps
294
+ - `prediction_loss_only`: True
295
+ - `per_device_train_batch_size`: 64
296
+ - `per_device_eval_batch_size`: 8
297
+ - `per_gpu_train_batch_size`: None
298
+ - `per_gpu_eval_batch_size`: None
299
+ - `gradient_accumulation_steps`: 1
300
+ - `eval_accumulation_steps`: None
301
+ - `torch_empty_cache_steps`: None
302
+ - `learning_rate`: 2e-05
303
+ - `weight_decay`: 0.0
304
+ - `adam_beta1`: 0.9
305
+ - `adam_beta2`: 0.999
306
+ - `adam_epsilon`: 1e-08
307
+ - `max_grad_norm`: 1.0
308
+ - `num_train_epochs`: 1
309
+ - `max_steps`: -1
310
+ - `lr_scheduler_type`: linear
311
+ - `lr_scheduler_kwargs`: {}
312
+ - `warmup_ratio`: 0.0
313
+ - `warmup_steps`: 0
314
+ - `log_level`: passive
315
+ - `log_level_replica`: warning
316
+ - `log_on_each_node`: True
317
+ - `logging_nan_inf_filter`: True
318
+ - `save_safetensors`: True
319
+ - `save_on_each_node`: False
320
+ - `save_only_model`: False
321
+ - `restore_callback_states_from_checkpoint`: False
322
+ - `no_cuda`: False
323
+ - `use_cpu`: False
324
+ - `use_mps_device`: False
325
+ - `seed`: 42
326
+ - `data_seed`: None
327
+ - `jit_mode_eval`: False
328
+ - `bf16`: False
329
+ - `fp16`: True
330
+ - `fp16_opt_level`: O1
331
+ - `half_precision_backend`: auto
332
+ - `bf16_full_eval`: False
333
+ - `fp16_full_eval`: False
334
+ - `tf32`: None
335
+ - `local_rank`: 0
336
+ - `ddp_backend`: None
337
+ - `tpu_num_cores`: None
338
+ - `tpu_metrics_debug`: False
339
+ - `debug`: []
340
+ - `dataloader_drop_last`: False
341
+ - `dataloader_num_workers`: 0
342
+ - `dataloader_prefetch_factor`: None
343
+ - `past_index`: -1
344
+ - `disable_tqdm`: False
345
+ - `remove_unused_columns`: True
346
+ - `label_names`: None
347
+ - `load_best_model_at_end`: False
348
+ - `ignore_data_skip`: False
349
+ - `fsdp`: []
350
+ - `fsdp_min_num_params`: 0
351
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
352
+ - `fsdp_transformer_layer_cls_to_wrap`: None
353
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
354
+ - `parallelism_config`: None
355
+ - `deepspeed`: None
356
+ - `label_smoothing_factor`: 0.0
357
+ - `optim`: adamw_torch_fused
358
+ - `optim_args`: None
359
+ - `adafactor`: False
360
+ - `group_by_length`: False
361
+ - `length_column_name`: length
362
+ - `project`: huggingface
363
+ - `trackio_space_id`: trackio
364
+ - `ddp_find_unused_parameters`: None
365
+ - `ddp_bucket_cap_mb`: None
366
+ - `ddp_broadcast_buffers`: False
367
+ - `dataloader_pin_memory`: True
368
+ - `dataloader_persistent_workers`: False
369
+ - `skip_memory_metrics`: True
370
+ - `use_legacy_prediction_loop`: False
371
+ - `push_to_hub`: False
372
+ - `resume_from_checkpoint`: None
373
+ - `hub_model_id`: None
374
+ - `hub_strategy`: every_save
375
+ - `hub_private_repo`: None
376
+ - `hub_always_push`: False
377
+ - `hub_revision`: None
378
+ - `gradient_checkpointing`: False
379
+ - `gradient_checkpointing_kwargs`: None
380
+ - `include_inputs_for_metrics`: False
381
+ - `include_for_metrics`: []
382
+ - `eval_do_concat_batches`: True
383
+ - `fp16_backend`: auto
384
+ - `push_to_hub_model_id`: None
385
+ - `push_to_hub_organization`: None
386
+ - `mp_parameters`:
387
+ - `auto_find_batch_size`: False
388
+ - `full_determinism`: False
389
+ - `torchdynamo`: None
390
+ - `ray_scope`: last
391
+ - `ddp_timeout`: 1800
392
+ - `torch_compile`: False
393
+ - `torch_compile_backend`: None
394
+ - `torch_compile_mode`: None
395
+ - `include_tokens_per_second`: False
396
+ - `include_num_input_tokens_seen`: no
397
+ - `neftune_noise_alpha`: None
398
+ - `optim_target_modules`: None
399
+ - `batch_eval_metrics`: False
400
+ - `eval_on_start`: False
401
+ - `use_liger_kernel`: False
402
+ - `liger_kernel_config`: None
403
+ - `eval_use_gather_object`: False
404
+ - `average_tokens_across_devices`: True
405
+ - `prompts`: None
406
+ - `batch_sampler`: batch_sampler
407
+ - `multi_dataset_batch_sampler`: proportional
408
+ - `router_mapping`: {}
409
+ - `learning_rate_mapping`: {}
410
+
411
+ </details>
412
+
413
+ ### Training Logs
414
+ | Epoch | Step | Training Loss | dictionary-test_cosine_ndcg@10 |
415
+ |:------:|:----:|:-------------:|:------------------------------:|
416
+ | 0.0281 | 100 | 1.5353 | 0.6306 |
417
+ | 0.0563 | 200 | 1.2836 | 0.6543 |
418
+ | 0.0844 | 300 | 1.2305 | 0.6637 |
419
+ | 0.1125 | 400 | 1.1669 | 0.6651 |
420
+ | 0.1406 | 500 | 1.1904 | 0.6714 |
421
+ | 0.1688 | 600 | 1.0998 | 0.6738 |
422
+ | 0.1969 | 700 | 1.0655 | 0.6751 |
423
+ | 0.2250 | 800 | 1.095 | 0.6781 |
424
+ | 0.2532 | 900 | 1.1535 | 0.6813 |
425
+ | 0.2813 | 1000 | 1.0047 | 0.6814 |
426
+ | 0.3094 | 1100 | 1.0749 | 0.6809 |
427
+ | 0.3376 | 1200 | 1.0642 | 0.6813 |
428
+ | 0.3657 | 1300 | 1.0718 | 0.6851 |
429
+ | 0.3938 | 1400 | 1.023 | 0.6854 |
430
+ | 0.4219 | 1500 | 1.0429 | 0.6850 |
431
+ | 0.4501 | 1600 | 1.0088 | 0.6849 |
432
+ | 0.4782 | 1700 | 1.0129 | 0.6873 |
433
+ | 0.5063 | 1800 | 0.988 | 0.6874 |
434
+ | 0.5345 | 1900 | 1.0413 | 0.6882 |
435
+ | 0.5626 | 2000 | 1.0043 | 0.6885 |
436
+ | 0.5907 | 2100 | 0.9929 | 0.6886 |
437
+ | 0.6188 | 2200 | 0.9403 | 0.6899 |
438
+ | 0.6470 | 2300 | 0.9789 | 0.6907 |
439
+ | 0.6751 | 2400 | 0.9595 | 0.6912 |
440
+ | 0.7032 | 2500 | 0.9786 | 0.6914 |
441
+ | 0.7314 | 2600 | 0.9647 | 0.6911 |
442
+ | 0.7595 | 2700 | 0.9245 | 0.6897 |
443
+ | 0.7876 | 2800 | 0.9685 | 0.6906 |
444
+ | 0.8158 | 2900 | 0.9778 | 0.6896 |
445
+ | 0.8439 | 3000 | 0.939 | 0.6906 |
446
+ | 0.8720 | 3100 | 0.9822 | 0.6904 |
447
+ | 0.9001 | 3200 | 1.0038 | 0.6913 |
448
+ | 0.9283 | 3300 | 0.9297 | 0.6910 |
449
+ | 0.9564 | 3400 | 0.9215 | 0.6915 |
450
+ | 0.9845 | 3500 | 0.948 | 0.6919 |
451
+
452
+
453
+ ### Framework Versions
454
+ - Python: 3.11.4
455
+ - Sentence Transformers: 5.1.2
456
+ - Transformers: 4.57.3
457
+ - PyTorch: 2.9.1+cpu
458
+ - Accelerate: 1.12.0
459
+ - Datasets: 4.4.1
460
+ - Tokenizers: 0.22.1
461
+
462
+ ## Citation
463
+
464
+ ### BibTeX
465
+
466
+ #### Sentence Transformers
467
+ ```bibtex
468
+ @inproceedings{reimers-2019-sentence-bert,
469
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
470
+ author = "Reimers, Nils and Gurevych, Iryna",
471
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
472
+ month = "11",
473
+ year = "2019",
474
+ publisher = "Association for Computational Linguistics",
475
+ url = "https://arxiv.org/abs/1908.10084",
476
+ }
477
+ ```
478
+
479
+ #### MatryoshkaLoss
480
+ ```bibtex
481
+ @misc{kusupati2024matryoshka,
482
+ title={Matryoshka Representation Learning},
483
+ 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},
484
+ year={2024},
485
+ eprint={2205.13147},
486
+ archivePrefix={arXiv},
487
+ primaryClass={cs.LG}
488
+ }
489
+ ```
490
+
491
+ #### MultipleNegativesRankingLoss
492
+ ```bibtex
493
+ @misc{henderson2017efficient,
494
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
495
+ 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},
496
+ year={2017},
497
+ eprint={1705.00652},
498
+ archivePrefix={arXiv},
499
+ primaryClass={cs.CL}
500
+ }
501
+ ```
502
+
503
+ <!--
504
+ ## Glossary
505
+
506
+ *Clearly define terms in order to be accessible across audiences.*
507
+ -->
508
+
509
+ <!--
510
+ ## Model Card Authors
511
+
512
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
513
+ -->
514
+
515
+ <!--
516
+ ## Model Card Contact
517
+
518
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
519
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "transformers_version": "4.57.3",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.2",
4
+ "transformers": "4.57.3",
5
+ "pytorch": "2.9.1+cpu"
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:ac27c59b752aa8836c0480bfea7e1cc0581637f0c0d00b60472ddbac68a253fc
3
+ size 90864192
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ },
14
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 256,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,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": false,
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": 128,
51
+ "model_max_length": 256,
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