Ghani-25 commited on
Commit
5ede865
·
verified ·
1 Parent(s): f377cc0

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": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
5
+ "pooling_mode_max_tokens": false,
6
+ "pooling_mode_mean_sqrt_len_tokens": false,
7
+ "pooling_mode_weightedmean_tokens": false,
8
+ "pooling_mode_lasttoken": false,
9
+ "include_prompt": true
10
+ }
README.md ADDED
@@ -0,0 +1,490 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - multilingual
4
+ license: apache-2.0
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - generated_from_trainer
10
+ - dataset_size:31500
11
+ - loss:MatryoshkaLoss
12
+ - loss:CosineSimilarityLoss
13
+ base_model: Ghani-25/LF_enrich_sim
14
+ widget:
15
+ - source_sentence: CTO and co-Founder
16
+ sentences:
17
+ - Responsable surpervision des départements
18
+ - Senior sales executive
19
+ - Injection Operations Supervisor - Industrial Efficiency - Systems & Equipment
20
+ - source_sentence: Commercial Account Executive
21
+ sentences:
22
+ - Automation Electrician
23
+ - Love Coach Extra
24
+ - Psychologue Clinicienne (Croix Rouge Française) Hébergements et ESAT
25
+ - source_sentence: Chargée d'etudes actuarielles IFRS17
26
+ sentences:
27
+ - Visuel Merchandiser Shop In Shop
28
+ - VIP Lounge Hostess
29
+ - Directeur Adjoint des opérations
30
+ - source_sentence: Cheffe de projet emailing
31
+ sentences:
32
+ - Experte Territoriale
33
+ - Responsable Clientele / Commerciale et Communication /
34
+ - STRATEGIC CONSULTANT - LIVE BUSINESS CASE
35
+ - source_sentence: 'Summer Job: Export Manager'
36
+ sentences:
37
+ - Clinical Project Leader
38
+ - Member and Maghreb Representative
39
+ - Responsable Export Afrique Amériques
40
+ pipeline_tag: sentence-similarity
41
+ library_name: sentence-transformers
42
+ metrics:
43
+ - pearson_cosine
44
+ - spearman_cosine
45
+ model-index:
46
+ - name: Our original base similarity Matryoshka
47
+ results:
48
+ - task:
49
+ type: semantic-similarity
50
+ name: Semantic Similarity
51
+ dataset:
52
+ name: dim 768
53
+ type: dim_768
54
+ metrics:
55
+ - type: pearson_cosine
56
+ value: 0.9696182810336916
57
+ name: Pearson Cosine
58
+ - type: spearman_cosine
59
+ value: 0.9472439476744547
60
+ name: Spearman Cosine
61
+ - task:
62
+ type: semantic-similarity
63
+ name: Semantic Similarity
64
+ dataset:
65
+ name: dim 512
66
+ type: dim_512
67
+ metrics:
68
+ - type: pearson_cosine
69
+ value: 0.9692898932305203
70
+ name: Pearson Cosine
71
+ - type: spearman_cosine
72
+ value: 0.9466297549051846
73
+ name: Spearman Cosine
74
+ - task:
75
+ type: semantic-similarity
76
+ name: Semantic Similarity
77
+ dataset:
78
+ name: dim 256
79
+ type: dim_256
80
+ metrics:
81
+ - type: pearson_cosine
82
+ value: 0.9662306280132803
83
+ name: Pearson Cosine
84
+ - type: spearman_cosine
85
+ value: 0.9407689506959847
86
+ name: Spearman Cosine
87
+ - task:
88
+ type: semantic-similarity
89
+ name: Semantic Similarity
90
+ dataset:
91
+ name: dim 128
92
+ type: dim_128
93
+ metrics:
94
+ - type: pearson_cosine
95
+ value: 0.960638838395904
96
+ name: Pearson Cosine
97
+ - type: spearman_cosine
98
+ value: 0.9314825034513964
99
+ name: Spearman Cosine
100
+ - task:
101
+ type: semantic-similarity
102
+ name: Semantic Similarity
103
+ dataset:
104
+ name: dim 64
105
+ type: dim_64
106
+ metrics:
107
+ - type: pearson_cosine
108
+ value: 0.9463950305830967
109
+ name: Pearson Cosine
110
+ - type: spearman_cosine
111
+ value: 0.9100801085031441
112
+ name: Spearman Cosine
113
+ ---
114
+
115
+ # Our original base similarity Matryoshka
116
+
117
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Ghani-25/LF_enrich_sim](https://huggingface.co/Ghani-25/LF_enrich_sim) on the json dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
118
+
119
+ ## Model Details
120
+
121
+ ### Model Description
122
+ - **Model Type:** Sentence Transformer
123
+ - **Base model:** [Ghani-25/LF_enrich_sim](https://huggingface.co/Ghani-25/LF_enrich_sim) <!-- at revision fb09bbe3ab4baafa2101c33989bf2ed8ffddf5cc -->
124
+ - **Maximum Sequence Length:** 128 tokens
125
+ - **Output Dimensionality:** 768 dimensions
126
+ - **Similarity Function:** Cosine Similarity
127
+ - **Training Dataset:**
128
+ - json
129
+ - **Language:** multilingual
130
+ - **License:** apache-2.0
131
+
132
+ ### Model Sources
133
+
134
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
135
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
136
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
137
+
138
+ ### Full Model Architecture
139
+
140
+ ```
141
+ SentenceTransformer(
142
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
143
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
144
+ )
145
+ ```
146
+
147
+ ## Usage
148
+
149
+ ### Direct Usage (Sentence Transformers)
150
+
151
+ First install the Sentence Transformers library:
152
+
153
+ ```bash
154
+ pip install -U sentence-transformers
155
+ ```
156
+
157
+ Then you can load this model and run inference.
158
+ ```python
159
+ from sentence_transformers import SentenceTransformer
160
+
161
+ # Download from the 🤗 Hub
162
+ model = SentenceTransformer("Ghani-25/LF-enrich-sim-matryoshka-64")
163
+ # Run inference
164
+ sentences = [
165
+ 'Summer Job: Export Manager',
166
+ 'Responsable Export Afrique Amériques',
167
+ 'Clinical Project Leader',
168
+ ]
169
+ embeddings = model.encode(sentences)
170
+ print(embeddings.shape)
171
+ # [3, 768]
172
+
173
+ # Get the similarity scores for the embeddings
174
+ similarities = model.similarity(embeddings, embeddings)
175
+ print(similarities.shape)
176
+ # [3, 3]
177
+ ```
178
+
179
+ <!--
180
+ ### Direct Usage (Transformers)
181
+
182
+ <details><summary>Click to see the direct usage in Transformers</summary>
183
+
184
+ </details>
185
+ -->
186
+
187
+ <!--
188
+ ### Downstream Usage (Sentence Transformers)
189
+
190
+ You can finetune this model on your own dataset.
191
+
192
+ <details><summary>Click to expand</summary>
193
+
194
+ </details>
195
+ -->
196
+
197
+ <!--
198
+ ### Out-of-Scope Use
199
+
200
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
201
+ -->
202
+
203
+ ## Evaluation
204
+
205
+ ### Metrics
206
+
207
+ #### Semantic Similarity
208
+
209
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
210
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
211
+
212
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
213
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
214
+ | pearson_cosine | 0.9696 | 0.9693 | 0.9662 | 0.9606 | 0.9464 |
215
+ | **spearman_cosine** | **0.9472** | **0.9466** | **0.9408** | **0.9315** | **0.9101** |
216
+
217
+ <!--
218
+ ## Bias, Risks and Limitations
219
+
220
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
221
+ -->
222
+
223
+ <!--
224
+ ### Recommendations
225
+
226
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
227
+ -->
228
+
229
+ ## Training Details
230
+
231
+ ### Training Dataset
232
+
233
+ #### json
234
+
235
+ * Dataset: json
236
+ * Size: 31,500 training samples
237
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
238
+ * Approximate statistics based on the first 1000 samples:
239
+ | | sentence1 | sentence2 | label |
240
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------|
241
+ | type | string | string | float |
242
+ | details | <ul><li>min: 3 tokens</li><li>mean: 10.22 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 9.98 tokens</li><li>max: 67 tokens</li></ul> | <ul><li>min: -0.05</li><li>mean: 0.37</li><li>max: 0.98</li></ul> |
243
+ * Samples:
244
+ | sentence1 | sentence2 | label |
245
+ |:--------------------------------------------------------|:-----------------------------------------------|:------------------------|
246
+ | <code>Contributive filmer</code> | <code>Doctorant contractuel (2016-2019)</code> | <code>0.20986526</code> |
247
+ | <code>Responsable Développement et Communication</code> | <code>Bilingual Business Assistant</code> | <code>0.3238712</code> |
248
+ | <code>Law Trainee</code> | <code>Sales Director contract manager</code> | <code>0.24983984</code> |
249
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
250
+ ```json
251
+ {
252
+ "loss": "CosineSimilarityLoss",
253
+ "matryoshka_dims": [
254
+ 768,
255
+ 512,
256
+ 256,
257
+ 128,
258
+ 64
259
+ ],
260
+ "matryoshka_weights": [
261
+ 1,
262
+ 1,
263
+ 1,
264
+ 1,
265
+ 1
266
+ ],
267
+ "n_dims_per_step": -1
268
+ }
269
+ ```
270
+
271
+ ### Training Hyperparameters
272
+ #### Non-Default Hyperparameters
273
+
274
+ - `eval_strategy`: epoch
275
+ - `per_device_train_batch_size`: 32
276
+ - `per_device_eval_batch_size`: 16
277
+ - `gradient_accumulation_steps`: 16
278
+ - `learning_rate`: 2e-05
279
+ - `num_train_epochs`: 4
280
+ - `lr_scheduler_type`: cosine
281
+ - `warmup_ratio`: 0.1
282
+ - `bf16`: True
283
+ - `tf32`: True
284
+ - `load_best_model_at_end`: True
285
+ - `optim`: adamw_torch_fused
286
+
287
+ #### All Hyperparameters
288
+ <details><summary>Click to expand</summary>
289
+
290
+ - `overwrite_output_dir`: False
291
+ - `do_predict`: False
292
+ - `eval_strategy`: epoch
293
+ - `prediction_loss_only`: True
294
+ - `per_device_train_batch_size`: 32
295
+ - `per_device_eval_batch_size`: 16
296
+ - `per_gpu_train_batch_size`: None
297
+ - `per_gpu_eval_batch_size`: None
298
+ - `gradient_accumulation_steps`: 16
299
+ - `eval_accumulation_steps`: None
300
+ - `learning_rate`: 2e-05
301
+ - `weight_decay`: 0.0
302
+ - `adam_beta1`: 0.9
303
+ - `adam_beta2`: 0.999
304
+ - `adam_epsilon`: 1e-08
305
+ - `max_grad_norm`: 1.0
306
+ - `num_train_epochs`: 4
307
+ - `max_steps`: -1
308
+ - `lr_scheduler_type`: cosine
309
+ - `lr_scheduler_kwargs`: {}
310
+ - `warmup_ratio`: 0.1
311
+ - `warmup_steps`: 0
312
+ - `log_level`: passive
313
+ - `log_level_replica`: warning
314
+ - `log_on_each_node`: True
315
+ - `logging_nan_inf_filter`: True
316
+ - `save_safetensors`: True
317
+ - `save_on_each_node`: False
318
+ - `save_only_model`: False
319
+ - `restore_callback_states_from_checkpoint`: False
320
+ - `no_cuda`: False
321
+ - `use_cpu`: False
322
+ - `use_mps_device`: False
323
+ - `seed`: 42
324
+ - `data_seed`: None
325
+ - `jit_mode_eval`: False
326
+ - `use_ipex`: False
327
+ - `bf16`: True
328
+ - `fp16`: False
329
+ - `fp16_opt_level`: O1
330
+ - `half_precision_backend`: auto
331
+ - `bf16_full_eval`: False
332
+ - `fp16_full_eval`: False
333
+ - `tf32`: True
334
+ - `local_rank`: 0
335
+ - `ddp_backend`: None
336
+ - `tpu_num_cores`: None
337
+ - `tpu_metrics_debug`: False
338
+ - `debug`: []
339
+ - `dataloader_drop_last`: False
340
+ - `dataloader_num_workers`: 0
341
+ - `dataloader_prefetch_factor`: None
342
+ - `past_index`: -1
343
+ - `disable_tqdm`: False
344
+ - `remove_unused_columns`: True
345
+ - `label_names`: None
346
+ - `load_best_model_at_end`: True
347
+ - `ignore_data_skip`: False
348
+ - `fsdp`: []
349
+ - `fsdp_min_num_params`: 0
350
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
351
+ - `fsdp_transformer_layer_cls_to_wrap`: None
352
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
353
+ - `deepspeed`: None
354
+ - `label_smoothing_factor`: 0.0
355
+ - `optim`: adamw_torch_fused
356
+ - `optim_args`: None
357
+ - `adafactor`: False
358
+ - `group_by_length`: False
359
+ - `length_column_name`: length
360
+ - `ddp_find_unused_parameters`: None
361
+ - `ddp_bucket_cap_mb`: None
362
+ - `ddp_broadcast_buffers`: False
363
+ - `dataloader_pin_memory`: True
364
+ - `dataloader_persistent_workers`: False
365
+ - `skip_memory_metrics`: True
366
+ - `use_legacy_prediction_loop`: False
367
+ - `push_to_hub`: False
368
+ - `resume_from_checkpoint`: None
369
+ - `hub_model_id`: None
370
+ - `hub_strategy`: every_save
371
+ - `hub_private_repo`: False
372
+ - `hub_always_push`: False
373
+ - `gradient_checkpointing`: False
374
+ - `gradient_checkpointing_kwargs`: None
375
+ - `include_inputs_for_metrics`: False
376
+ - `eval_do_concat_batches`: True
377
+ - `fp16_backend`: auto
378
+ - `push_to_hub_model_id`: None
379
+ - `push_to_hub_organization`: None
380
+ - `mp_parameters`:
381
+ - `auto_find_batch_size`: False
382
+ - `full_determinism`: False
383
+ - `torchdynamo`: None
384
+ - `ray_scope`: last
385
+ - `ddp_timeout`: 1800
386
+ - `torch_compile`: False
387
+ - `torch_compile_backend`: None
388
+ - `torch_compile_mode`: None
389
+ - `dispatch_batches`: None
390
+ - `split_batches`: None
391
+ - `include_tokens_per_second`: False
392
+ - `include_num_input_tokens_seen`: False
393
+ - `neftune_noise_alpha`: None
394
+ - `optim_target_modules`: None
395
+ - `batch_eval_metrics`: False
396
+ - `prompts`: None
397
+ - `batch_sampler`: batch_sampler
398
+ - `multi_dataset_batch_sampler`: proportional
399
+
400
+ </details>
401
+
402
+ ### Training Logs
403
+ | Epoch | Step | Training Loss | dim_768_spearman_cosine | dim_512_spearman_cosine | dim_256_spearman_cosine | dim_128_spearman_cosine | dim_64_spearman_cosine |
404
+ |:----------:|:-------:|:-------------:|:-----------------------:|:-----------------------:|:-----------------------:|:-----------------------:|:----------------------:|
405
+ | 0.1624 | 10 | 0.0669 | - | - | - | - | - |
406
+ | 0.3249 | 20 | 0.0563 | - | - | - | - | - |
407
+ | 0.4873 | 30 | 0.0496 | - | - | - | - | - |
408
+ | 0.6497 | 40 | 0.0456 | - | - | - | - | - |
409
+ | 0.8122 | 50 | 0.0418 | - | - | - | - | - |
410
+ | 0.9746 | 60 | 0.0407 | - | - | - | - | - |
411
+ | 0.9909 | 61 | - | 0.9223 | 0.9199 | 0.9087 | 0.8920 | 0.8586 |
412
+ | 1.1371 | 70 | 0.0326 | - | - | - | - | - |
413
+ | 1.2995 | 80 | 0.0312 | - | - | - | - | - |
414
+ | 1.4619 | 90 | 0.0303 | - | - | - | - | - |
415
+ | 1.6244 | 100 | 0.03 | - | - | - | - | - |
416
+ | 1.7868 | 110 | 0.0291 | - | - | - | - | - |
417
+ | 1.9492 | 120 | 0.0301 | - | - | - | - | - |
418
+ | 1.9980 | 123 | - | 0.9393 | 0.9382 | 0.9304 | 0.9191 | 0.8946 |
419
+ | 2.1117 | 130 | 0.0257 | - | - | - | - | - |
420
+ | 2.2741 | 140 | 0.0243 | - | - | - | - | - |
421
+ | 2.4365 | 150 | 0.0246 | - | - | - | - | - |
422
+ | 2.5990 | 160 | 0.0235 | - | - | - | - | - |
423
+ | 2.7614 | 170 | 0.024 | - | - | - | - | - |
424
+ | 2.9239 | 180 | 0.023 | - | - | - | - | - |
425
+ | 2.9888 | 184 | - | 0.9464 | 0.9457 | 0.9396 | 0.9301 | 0.9083 |
426
+ | 3.0863 | 190 | 0.0222 | - | - | - | - | - |
427
+ | 3.2487 | 200 | 0.022 | - | - | - | - | - |
428
+ | 3.4112 | 210 | 0.022 | - | - | - | - | - |
429
+ | 3.5736 | 220 | 0.0226 | - | - | - | - | - |
430
+ | 3.7360 | 230 | 0.021 | - | - | - | - | - |
431
+ | 3.8985 | 240 | 0.0224 | - | - | - | - | - |
432
+ | **3.9635** | **244** | **-** | **0.9472** | **0.9466** | **0.9408** | **0.9315** | **0.9101** |
433
+
434
+ * The bold row denotes the saved checkpoint.
435
+
436
+ ### Framework Versions
437
+ - Python: 3.10.12
438
+ - Sentence Transformers: 3.3.1
439
+ - Transformers: 4.41.2
440
+ - PyTorch: 2.5.1+cu121
441
+ - Accelerate: 1.1.1
442
+ - Datasets: 2.19.1
443
+ - Tokenizers: 0.19.1
444
+
445
+ ## Citation
446
+
447
+ ### BibTeX
448
+
449
+ #### Sentence Transformers
450
+ ```bibtex
451
+ @inproceedings{reimers-2019-sentence-bert,
452
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
453
+ author = "Reimers, Nils and Gurevych, Iryna",
454
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
455
+ month = "11",
456
+ year = "2019",
457
+ publisher = "Association for Computational Linguistics",
458
+ url = "https://arxiv.org/abs/1908.10084",
459
+ }
460
+ ```
461
+
462
+ #### MatryoshkaLoss
463
+ ```bibtex
464
+ @misc{kusupati2024matryoshka,
465
+ title={Matryoshka Representation Learning},
466
+ 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},
467
+ year={2024},
468
+ eprint={2205.13147},
469
+ archivePrefix={arXiv},
470
+ primaryClass={cs.LG}
471
+ }
472
+ ```
473
+
474
+ <!--
475
+ ## Glossary
476
+
477
+ *Clearly define terms in order to be accessible across audiences.*
478
+ -->
479
+
480
+ <!--
481
+ ## Model Card Authors
482
+
483
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
484
+ -->
485
+
486
+ <!--
487
+ ## Model Card Contact
488
+
489
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
490
+ -->
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "Ghani-25/LF_enrich_sim",
3
+ "architectures": [
4
+ "XLMRobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "xlm-roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "output_past": true,
22
+ "pad_token_id": 1,
23
+ "position_embedding_type": "absolute",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.41.2",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 250002
29
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.5.1+cu121"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:e2b255a43a2416e95c28f2ef9af6ad322dc455ee55a325c609918081322a92af
3
+ size 1112197096
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 128,
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": true,
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:cad551d5600a84242d0973327029452a1e3672ba6313c2a3c3d69c4310e12719
3
+ size 17082987
tokenizer_config.json ADDED
@@ -0,0 +1,61 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
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": 128,
50
+ "model_max_length": 128,
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
+ "stride": 0,
57
+ "tokenizer_class": "XLMRobertaTokenizer",
58
+ "truncation_side": "right",
59
+ "truncation_strategy": "longest_first",
60
+ "unk_token": "<unk>"
61
+ }