mehularora commited on
Commit
a4bf89b
·
verified ·
1 Parent(s): dae7d78

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,522 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:222635
9
+ - loss:MatryoshkaLoss
10
+ - loss:MultipleNegativesRankingLoss
11
+ base_model: sentence-transformers/all-MiniLM-L6-v2
12
+ widget:
13
+ - source_sentence: OMBRELLAS
14
+ sentences:
15
+ - '''ALPHASORT, to sort into alphabetic order [v]'''
16
+ - '''OMBRELLA, an umbrella [n]'''
17
+ - '''PHYLLID, the leaf of a liverwort or moss [n]'''
18
+ - source_sentence: ROUNCE
19
+ sentences:
20
+ - '''LYMPHADENITIS, inflammation of the lymph nodes [n]'''
21
+ - '''one who advocates curialism, the system of government of curia [n -S]'''
22
+ - '''part of a hand printing press [n -S]'''
23
+ - source_sentence: SEROON
24
+ sentences:
25
+ - '''(Spanish) a crate or hamper; a bale wrapped in hide, also CEROON, SERON [n
26
+ -S]'''
27
+ - '''a white crystalline soluble phenol used as a photographic developer [n -S]'''
28
+ - '''serving to disseminate [adj]'''
29
+ - source_sentence: BLAFF
30
+ sentences:
31
+ - '''to bark [v -ED, -ING, -S]'''
32
+ - '''RAZORCLAM, a lamellibranch mollusc with a shell like an old-fashioned razor
33
+ handle, also RAZORFISH [n]'''
34
+ - '''HYPERCORRECT, refers to a linguistic construction or pronunciation produced
35
+ by mistaken analogy with standard usage out of a desire to be correct, such as
36
+ "open widely" or "on behalf of my wife and I" [adv]'''
37
+ - source_sentence: TRAUMATOLOGY
38
+ sentences:
39
+ - '''FELLATRIX, a female who fellates [n]'''
40
+ - '''pertaining to a grandparent [adj]'''
41
+ - '''the study of wounds and their effects [n TRAUMATOLOGIES]'''
42
+ pipeline_tag: sentence-similarity
43
+ library_name: sentence-transformers
44
+ metrics:
45
+ - cosine_accuracy@1
46
+ - cosine_accuracy@3
47
+ - cosine_accuracy@5
48
+ - cosine_accuracy@10
49
+ - cosine_precision@1
50
+ - cosine_precision@3
51
+ - cosine_precision@5
52
+ - cosine_precision@10
53
+ - cosine_recall@1
54
+ - cosine_recall@3
55
+ - cosine_recall@5
56
+ - cosine_recall@10
57
+ - cosine_ndcg@10
58
+ - cosine_mrr@10
59
+ - cosine_map@100
60
+ model-index:
61
+ - name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
62
+ results:
63
+ - task:
64
+ type: information-retrieval
65
+ name: Information Retrieval
66
+ dataset:
67
+ name: dictionary test
68
+ type: dictionary-test
69
+ metrics:
70
+ - type: cosine_accuracy@1
71
+ value: 0.6825254231197672
72
+ name: Cosine Accuracy@1
73
+ - type: cosine_accuracy@3
74
+ value: 0.8121384167594955
75
+ name: Cosine Accuracy@3
76
+ - type: cosine_accuracy@5
77
+ value: 0.831147364260304
78
+ name: Cosine Accuracy@5
79
+ - type: cosine_accuracy@10
80
+ value: 0.850587516619354
81
+ name: Cosine Accuracy@10
82
+ - type: cosine_precision@1
83
+ value: 0.6825254231197672
84
+ name: Cosine Precision@1
85
+ - type: cosine_precision@3
86
+ value: 0.27071280558649846
87
+ name: Cosine Precision@3
88
+ - type: cosine_precision@5
89
+ value: 0.1662294728520608
90
+ name: Cosine Precision@5
91
+ - type: cosine_precision@10
92
+ value: 0.08505875166193541
93
+ name: Cosine Precision@10
94
+ - type: cosine_recall@1
95
+ value: 0.6825254231197672
96
+ name: Cosine Recall@1
97
+ - type: cosine_recall@3
98
+ value: 0.8121384167594955
99
+ name: Cosine Recall@3
100
+ - type: cosine_recall@5
101
+ value: 0.831147364260304
102
+ name: Cosine Recall@5
103
+ - type: cosine_recall@10
104
+ value: 0.850587516619354
105
+ name: Cosine Recall@10
106
+ - type: cosine_ndcg@10
107
+ value: 0.7750717041193917
108
+ name: Cosine Ndcg@10
109
+ - type: cosine_mrr@10
110
+ value: 0.7499954655044675
111
+ name: Cosine Mrr@10
112
+ - type: cosine_map@100
113
+ value: 0.7522443165977887
114
+ name: Cosine Map@100
115
+ ---
116
+
117
+ # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
118
+
119
+ 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.
120
+
121
+ ## Model Details
122
+
123
+ ### Model Description
124
+ - **Model Type:** Sentence Transformer
125
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
126
+ - **Maximum Sequence Length:** 256 tokens
127
+ - **Output Dimensionality:** 384 dimensions
128
+ - **Similarity Function:** Cosine Similarity
129
+ - **Training Dataset:**
130
+ - csv
131
+ <!-- - **Language:** Unknown -->
132
+ <!-- - **License:** Unknown -->
133
+
134
+ ### Model Sources
135
+
136
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
137
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
138
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
139
+
140
+ ### Full Model Architecture
141
+
142
+ ```
143
+ SentenceTransformer(
144
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
145
+ (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})
146
+ (2): Normalize()
147
+ )
148
+ ```
149
+
150
+ ## Usage
151
+
152
+ ### Direct Usage (Sentence Transformers)
153
+
154
+ First install the Sentence Transformers library:
155
+
156
+ ```bash
157
+ pip install -U sentence-transformers
158
+ ```
159
+
160
+ Then you can load this model and run inference.
161
+ ```python
162
+ from sentence_transformers import SentenceTransformer
163
+
164
+ # Download from the 🤗 Hub
165
+ model = SentenceTransformer("mehularora/scrabble-embed-v2")
166
+ # Run inference
167
+ sentences = [
168
+ 'TRAUMATOLOGY',
169
+ "'the study of wounds and their effects [n TRAUMATOLOGIES]'",
170
+ "'FELLATRIX, a female who fellates [n]'",
171
+ ]
172
+ embeddings = model.encode(sentences)
173
+ print(embeddings.shape)
174
+ # [3, 384]
175
+
176
+ # Get the similarity scores for the embeddings
177
+ similarities = model.similarity(embeddings, embeddings)
178
+ print(similarities)
179
+ # tensor([[1.0000, 0.7472, 0.0801],
180
+ # [0.7472, 1.0000, 0.2525],
181
+ # [0.0801, 0.2525, 1.0000]])
182
+ ```
183
+
184
+ <!--
185
+ ### Direct Usage (Transformers)
186
+
187
+ <details><summary>Click to see the direct usage in Transformers</summary>
188
+
189
+ </details>
190
+ -->
191
+
192
+ <!--
193
+ ### Downstream Usage (Sentence Transformers)
194
+
195
+ You can finetune this model on your own dataset.
196
+
197
+ <details><summary>Click to expand</summary>
198
+
199
+ </details>
200
+ -->
201
+
202
+ <!--
203
+ ### Out-of-Scope Use
204
+
205
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
206
+ -->
207
+
208
+ ## Evaluation
209
+
210
+ ### Metrics
211
+
212
+ #### Information Retrieval
213
+
214
+ * Dataset: `dictionary-test`
215
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
216
+
217
+ | Metric | Value |
218
+ |:--------------------|:-----------|
219
+ | cosine_accuracy@1 | 0.6825 |
220
+ | cosine_accuracy@3 | 0.8121 |
221
+ | cosine_accuracy@5 | 0.8311 |
222
+ | cosine_accuracy@10 | 0.8506 |
223
+ | cosine_precision@1 | 0.6825 |
224
+ | cosine_precision@3 | 0.2707 |
225
+ | cosine_precision@5 | 0.1662 |
226
+ | cosine_precision@10 | 0.0851 |
227
+ | cosine_recall@1 | 0.6825 |
228
+ | cosine_recall@3 | 0.8121 |
229
+ | cosine_recall@5 | 0.8311 |
230
+ | cosine_recall@10 | 0.8506 |
231
+ | **cosine_ndcg@10** | **0.7751** |
232
+ | cosine_mrr@10 | 0.75 |
233
+ | cosine_map@100 | 0.7522 |
234
+
235
+ <!--
236
+ ## Bias, Risks and Limitations
237
+
238
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
239
+ -->
240
+
241
+ <!--
242
+ ### Recommendations
243
+
244
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
245
+ -->
246
+
247
+ ## Training Details
248
+
249
+ ### Training Dataset
250
+
251
+ #### csv
252
+
253
+ * Dataset: csv
254
+ * Size: 222,635 training samples
255
+ * Columns: <code>word</code> and <code>definition</code>
256
+ * Approximate statistics based on the first 1000 samples:
257
+ | | word | definition |
258
+ |:--------|:--------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|
259
+ | type | string | string |
260
+ | details | <ul><li>min: 3 tokens</li><li>mean: 4.87 tokens</li><li>max: 9 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 20.32 tokens</li><li>max: 98 tokens</li></ul> |
261
+ * Samples:
262
+ | word | definition |
263
+ |:-------------------------|:------------------------------------------------------------------------------------|
264
+ | <code>LICHGATES</code> | <code>'LICHGATE, the roofed gate of a churchyard, also LYCHGATE [n]'</code> |
265
+ | <code>MOULDING</code> | <code>'a long, narrow strip used to decorate a surface, also MOLDING [n -S]'</code> |
266
+ | <code>PARABAPTISM</code> | <code>'uncanonical baptism [n -S]'</code> |
267
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
268
+ ```json
269
+ {
270
+ "loss": "MultipleNegativesRankingLoss",
271
+ "matryoshka_dims": [
272
+ 384,
273
+ 256
274
+ ],
275
+ "matryoshka_weights": [
276
+ 1,
277
+ 1
278
+ ],
279
+ "n_dims_per_step": -1
280
+ }
281
+ ```
282
+
283
+ ### Training Hyperparameters
284
+ #### Non-Default Hyperparameters
285
+
286
+ - `eval_strategy`: steps
287
+ - `per_device_train_batch_size`: 64
288
+ - `learning_rate`: 2e-05
289
+ - `num_train_epochs`: 1
290
+ - `fp16`: True
291
+
292
+ #### All Hyperparameters
293
+ <details><summary>Click to expand</summary>
294
+
295
+ - `overwrite_output_dir`: False
296
+ - `do_predict`: False
297
+ - `eval_strategy`: steps
298
+ - `prediction_loss_only`: True
299
+ - `per_device_train_batch_size`: 64
300
+ - `per_device_eval_batch_size`: 8
301
+ - `per_gpu_train_batch_size`: None
302
+ - `per_gpu_eval_batch_size`: None
303
+ - `gradient_accumulation_steps`: 1
304
+ - `eval_accumulation_steps`: None
305
+ - `torch_empty_cache_steps`: None
306
+ - `learning_rate`: 2e-05
307
+ - `weight_decay`: 0.0
308
+ - `adam_beta1`: 0.9
309
+ - `adam_beta2`: 0.999
310
+ - `adam_epsilon`: 1e-08
311
+ - `max_grad_norm`: 1.0
312
+ - `num_train_epochs`: 1
313
+ - `max_steps`: -1
314
+ - `lr_scheduler_type`: linear
315
+ - `lr_scheduler_kwargs`: {}
316
+ - `warmup_ratio`: 0.0
317
+ - `warmup_steps`: 0
318
+ - `log_level`: passive
319
+ - `log_level_replica`: warning
320
+ - `log_on_each_node`: True
321
+ - `logging_nan_inf_filter`: True
322
+ - `save_safetensors`: True
323
+ - `save_on_each_node`: False
324
+ - `save_only_model`: False
325
+ - `restore_callback_states_from_checkpoint`: False
326
+ - `no_cuda`: False
327
+ - `use_cpu`: False
328
+ - `use_mps_device`: False
329
+ - `seed`: 42
330
+ - `data_seed`: None
331
+ - `jit_mode_eval`: False
332
+ - `bf16`: False
333
+ - `fp16`: True
334
+ - `fp16_opt_level`: O1
335
+ - `half_precision_backend`: auto
336
+ - `bf16_full_eval`: False
337
+ - `fp16_full_eval`: False
338
+ - `tf32`: None
339
+ - `local_rank`: 0
340
+ - `ddp_backend`: None
341
+ - `tpu_num_cores`: None
342
+ - `tpu_metrics_debug`: False
343
+ - `debug`: []
344
+ - `dataloader_drop_last`: False
345
+ - `dataloader_num_workers`: 0
346
+ - `dataloader_prefetch_factor`: None
347
+ - `past_index`: -1
348
+ - `disable_tqdm`: False
349
+ - `remove_unused_columns`: True
350
+ - `label_names`: None
351
+ - `load_best_model_at_end`: False
352
+ - `ignore_data_skip`: False
353
+ - `fsdp`: []
354
+ - `fsdp_min_num_params`: 0
355
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
356
+ - `fsdp_transformer_layer_cls_to_wrap`: None
357
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
358
+ - `parallelism_config`: None
359
+ - `deepspeed`: None
360
+ - `label_smoothing_factor`: 0.0
361
+ - `optim`: adamw_torch_fused
362
+ - `optim_args`: None
363
+ - `adafactor`: False
364
+ - `group_by_length`: False
365
+ - `length_column_name`: length
366
+ - `project`: huggingface
367
+ - `trackio_space_id`: trackio
368
+ - `ddp_find_unused_parameters`: None
369
+ - `ddp_bucket_cap_mb`: None
370
+ - `ddp_broadcast_buffers`: False
371
+ - `dataloader_pin_memory`: True
372
+ - `dataloader_persistent_workers`: False
373
+ - `skip_memory_metrics`: True
374
+ - `use_legacy_prediction_loop`: False
375
+ - `push_to_hub`: False
376
+ - `resume_from_checkpoint`: None
377
+ - `hub_model_id`: None
378
+ - `hub_strategy`: every_save
379
+ - `hub_private_repo`: None
380
+ - `hub_always_push`: False
381
+ - `hub_revision`: None
382
+ - `gradient_checkpointing`: False
383
+ - `gradient_checkpointing_kwargs`: None
384
+ - `include_inputs_for_metrics`: False
385
+ - `include_for_metrics`: []
386
+ - `eval_do_concat_batches`: True
387
+ - `fp16_backend`: auto
388
+ - `push_to_hub_model_id`: None
389
+ - `push_to_hub_organization`: None
390
+ - `mp_parameters`:
391
+ - `auto_find_batch_size`: False
392
+ - `full_determinism`: False
393
+ - `torchdynamo`: None
394
+ - `ray_scope`: last
395
+ - `ddp_timeout`: 1800
396
+ - `torch_compile`: False
397
+ - `torch_compile_backend`: None
398
+ - `torch_compile_mode`: None
399
+ - `include_tokens_per_second`: False
400
+ - `include_num_input_tokens_seen`: no
401
+ - `neftune_noise_alpha`: None
402
+ - `optim_target_modules`: None
403
+ - `batch_eval_metrics`: False
404
+ - `eval_on_start`: False
405
+ - `use_liger_kernel`: False
406
+ - `liger_kernel_config`: None
407
+ - `eval_use_gather_object`: False
408
+ - `average_tokens_across_devices`: True
409
+ - `prompts`: None
410
+ - `batch_sampler`: batch_sampler
411
+ - `multi_dataset_batch_sampler`: proportional
412
+ - `router_mapping`: {}
413
+ - `learning_rate_mapping`: {}
414
+
415
+ </details>
416
+
417
+ ### Training Logs
418
+ | Epoch | Step | Training Loss | dictionary-test_cosine_ndcg@10 |
419
+ |:------:|:----:|:-------------:|:------------------------------:|
420
+ | 0.0287 | 100 | 1.0186 | 0.7180 |
421
+ | 0.0575 | 200 | 0.7633 | 0.7274 |
422
+ | 0.0862 | 300 | 0.75 | 0.7398 |
423
+ | 0.1150 | 400 | 0.7503 | 0.7456 |
424
+ | 0.1437 | 500 | 0.7271 | 0.7496 |
425
+ | 0.1725 | 600 | 0.6531 | 0.7508 |
426
+ | 0.2012 | 700 | 0.6586 | 0.7560 |
427
+ | 0.2300 | 800 | 0.6559 | 0.7591 |
428
+ | 0.2587 | 900 | 0.6116 | 0.7572 |
429
+ | 0.2874 | 1000 | 0.615 | 0.7625 |
430
+ | 0.3162 | 1100 | 0.5926 | 0.7596 |
431
+ | 0.3449 | 1200 | 0.6414 | 0.7623 |
432
+ | 0.3737 | 1300 | 0.6143 | 0.7641 |
433
+ | 0.4024 | 1400 | 0.6464 | 0.7655 |
434
+ | 0.4312 | 1500 | 0.6039 | 0.7676 |
435
+ | 0.4599 | 1600 | 0.514 | 0.7643 |
436
+ | 0.4886 | 1700 | 0.5719 | 0.7675 |
437
+ | 0.5174 | 1800 | 0.612 | 0.7675 |
438
+ | 0.5461 | 1900 | 0.5639 | 0.7698 |
439
+ | 0.5749 | 2000 | 0.6025 | 0.7672 |
440
+ | 0.6036 | 2100 | 0.5623 | 0.7719 |
441
+ | 0.6324 | 2200 | 0.5484 | 0.7698 |
442
+ | 0.6611 | 2300 | 0.5799 | 0.7730 |
443
+ | 0.6899 | 2400 | 0.5253 | 0.7716 |
444
+ | 0.7186 | 2500 | 0.5134 | 0.7732 |
445
+ | 0.7473 | 2600 | 0.5543 | 0.7721 |
446
+ | 0.7761 | 2700 | 0.5342 | 0.7736 |
447
+ | 0.8048 | 2800 | 0.5507 | 0.7746 |
448
+ | 0.8336 | 2900 | 0.5176 | 0.7737 |
449
+ | 0.8623 | 3000 | 0.5067 | 0.7751 |
450
+ | 0.8911 | 3100 | 0.548 | 0.7749 |
451
+ | 0.9198 | 3200 | 0.5443 | 0.7751 |
452
+ | 0.9485 | 3300 | 0.5603 | 0.7751 |
453
+ | 0.9773 | 3400 | 0.5774 | 0.7751 |
454
+
455
+
456
+ ### Framework Versions
457
+ - Python: 3.11.4
458
+ - Sentence Transformers: 5.1.2
459
+ - Transformers: 4.57.3
460
+ - PyTorch: 2.9.1+cpu
461
+ - Accelerate: 1.12.0
462
+ - Datasets: 4.4.1
463
+ - Tokenizers: 0.22.1
464
+
465
+ ## Citation
466
+
467
+ ### BibTeX
468
+
469
+ #### Sentence Transformers
470
+ ```bibtex
471
+ @inproceedings{reimers-2019-sentence-bert,
472
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
473
+ author = "Reimers, Nils and Gurevych, Iryna",
474
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
475
+ month = "11",
476
+ year = "2019",
477
+ publisher = "Association for Computational Linguistics",
478
+ url = "https://arxiv.org/abs/1908.10084",
479
+ }
480
+ ```
481
+
482
+ #### MatryoshkaLoss
483
+ ```bibtex
484
+ @misc{kusupati2024matryoshka,
485
+ title={Matryoshka Representation Learning},
486
+ 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},
487
+ year={2024},
488
+ eprint={2205.13147},
489
+ archivePrefix={arXiv},
490
+ primaryClass={cs.LG}
491
+ }
492
+ ```
493
+
494
+ #### MultipleNegativesRankingLoss
495
+ ```bibtex
496
+ @misc{henderson2017efficient,
497
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
498
+ 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},
499
+ year={2017},
500
+ eprint={1705.00652},
501
+ archivePrefix={arXiv},
502
+ primaryClass={cs.CL}
503
+ }
504
+ ```
505
+
506
+ <!--
507
+ ## Glossary
508
+
509
+ *Clearly define terms in order to be accessible across audiences.*
510
+ -->
511
+
512
+ <!--
513
+ ## Model Card Authors
514
+
515
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
516
+ -->
517
+
518
+ <!--
519
+ ## Model Card Contact
520
+
521
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
522
+ -->
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:a23319cbfe868af612b3053b2768054cc01ba852d461d9fb9574e7781858ed4d
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