Singaraj commited on
Commit
bd84088
·
verified ·
1 Parent(s): 6c1469f

Replace auto-generated card with the full model card

Browse files
Files changed (1) hide show
  1. README.md +128 -498
README.md CHANGED
@@ -1,525 +1,155 @@
1
  ---
 
 
 
 
 
 
 
2
  tags:
3
- - sentence-transformers
4
- - sentence-similarity
5
- - feature-extraction
6
- - dense
7
- - generated_from_trainer
8
- - dataset_size:24100
9
- - loss:MatryoshkaLoss
10
- - loss:CachedMultipleNegativesRankingLoss
11
- - loss:MultipleNegativesRankingLoss
12
  base_model: intfloat/multilingual-e5-base
13
- widget:
14
- - source_sentence: 'Li reponn:'
15
- sentences:
16
- - 'Jesus answered, in the Scriptures, it is wriiten:'
17
- - 'Il met les deux mains l’une dans l’autre, puis il leur dit :'
18
- - 'Jesus also answered, the Scriptures also say:'
19
- - 'Mary said:'
20
- - 'Jésus lui répondit :'
21
- - 'They ran thus:'
22
- - source_sentence: Kouma li kapav fer tousa?
23
- sentences:
24
- - What do you do exactly?
25
- - Il croit qu’il pourra tout faire tout seul.
26
- - What can they do about it?
27
- - Comment peut-il faire tout cela?
28
- - How to explain all this?
29
- - How to make him understand?
30
- - source_sentence: Tape e laport pou ouver pou twa.
31
- sentences:
32
- - Choose times and places to collect when people are more likely to be able to remember.
33
- - Mettez un tablier avant de travailler dans la cuisine.
34
- - The parcel bursts open.
35
- - And the door will be opened for everyone who knocks.
36
- - Frappez et la porte sera ouverte pour vous.
37
- - Just turn right and go all the way to end of this terminal and you'll be in Terminal
38
- 3.
39
- - source_sentence: Zezi dir zot, komie manze ena?
40
- sentences:
41
- - Jésus a demandé, lorsque le propriétaire de cette vigne viendra, que croyez-vous
42
- qu'il va faire à ces vignerons?
43
- - 'Jesus answered:'
44
- - Jesus replied, surely you know that the Scriptures say,
45
- - Then Jesus asked them, but who do you say I am?
46
- - Jesus replied, do you see these buildings?
47
- - Jesus asked them how much food they had.
48
- - source_sentence: Pa bizin per.
49
- sentences:
50
- - N'ayez pas peur.
51
- - Don't be afraid of people.
52
- - They're not frightened of being wrong.
53
- - Don't trouble me.
54
- - Don't let anyone fool you.
55
- - It does not hurt much.
56
- pipeline_tag: sentence-similarity
57
- library_name: sentence-transformers
58
- metrics:
59
- - cosine_accuracy@1
60
- - cosine_accuracy@3
61
- - cosine_accuracy@5
62
- - cosine_accuracy@10
63
- - cosine_precision@1
64
- - cosine_precision@3
65
- - cosine_precision@5
66
- - cosine_precision@10
67
- - cosine_recall@1
68
- - cosine_recall@3
69
- - cosine_recall@5
70
- - cosine_recall@10
71
- - cosine_ndcg@10
72
- - cosine_mrr@10
73
- - cosine_map@100
74
- model-index:
75
- - name: SentenceTransformer based on intfloat/multilingual-e5-base
76
- results:
77
- - task:
78
- type: information-retrieval
79
- name: Information Retrieval
80
- dataset:
81
- name: morisienmt dev eng
82
- type: morisienmt-dev-eng
83
- metrics:
84
- - type: cosine_accuracy@1
85
- value: 0.96
86
- name: Cosine Accuracy@1
87
- - type: cosine_accuracy@3
88
- value: 0.98
89
- name: Cosine Accuracy@3
90
- - type: cosine_accuracy@5
91
- value: 0.98
92
- name: Cosine Accuracy@5
93
- - type: cosine_accuracy@10
94
- value: 0.982
95
- name: Cosine Accuracy@10
96
- - type: cosine_precision@1
97
- value: 0.96
98
- name: Cosine Precision@1
99
- - type: cosine_precision@3
100
- value: 0.3266666666666666
101
- name: Cosine Precision@3
102
- - type: cosine_precision@5
103
- value: 0.196
104
- name: Cosine Precision@5
105
- - type: cosine_precision@10
106
- value: 0.09820000000000001
107
- name: Cosine Precision@10
108
- - type: cosine_recall@1
109
- value: 0.96
110
- name: Cosine Recall@1
111
- - type: cosine_recall@3
112
- value: 0.98
113
- name: Cosine Recall@3
114
- - type: cosine_recall@5
115
- value: 0.98
116
- name: Cosine Recall@5
117
- - type: cosine_recall@10
118
- value: 0.982
119
- name: Cosine Recall@10
120
- - type: cosine_ndcg@10
121
- value: 0.9728072904313593
122
- name: Cosine Ndcg@10
123
- - type: cosine_mrr@10
124
- value: 0.9696666666666667
125
- name: Cosine Mrr@10
126
- - type: cosine_map@100
127
- value: 0.9699554965211892
128
- name: Cosine Map@100
129
  ---
130
 
131
- # SentenceTransformer based on intfloat/multilingual-e5-base
132
-
133
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base). It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.
134
-
135
- ## Model Details
136
-
137
- ### Model Description
138
- - **Model Type:** Sentence Transformer
139
- - **Base model:** [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) <!-- at revision d128750597153bb5987e10b1c3493a34e5a4502a -->
140
- - **Maximum Sequence Length:** 512 tokens
141
- - **Output Dimensionality:** 768 dimensions
142
- - **Similarity Function:** Cosine Similarity
143
- - **Supported Modality:** Text
144
- <!-- - **Training Dataset:** Unknown -->
145
- <!-- - **Language:** Unknown -->
146
- <!-- - **License:** Unknown -->
147
-
148
- ### Model Sources
149
 
150
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
151
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
152
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
153
 
154
- ### Full Model Architecture
 
 
 
 
155
 
156
- ```
157
- SentenceTransformer(
158
- (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'XLMRobertaModel'})
159
- (1): Pooling({'embedding_dimension': 768, 'pooling_mode': 'mean', 'include_prompt': True})
160
- (2): Normalize({})
161
- )
162
- ```
163
 
164
  ## Usage
165
 
166
- ### Direct Usage (Sentence Transformers)
167
-
168
- First install the Sentence Transformers library:
169
-
170
- ```bash
171
- pip install -U sentence-transformers
172
- ```
173
- Then you can load this model and run inference.
174
  ```python
175
  from sentence_transformers import SentenceTransformer
176
 
177
- # Download from the 🤗 Hub
178
  model = SentenceTransformer("Singaraj/morisien-embed")
179
- # Run inference
180
- queries = [
181
- 'Pa bizin per.',
182
- ]
183
- documents = [
184
- "N'ayez pas peur.",
185
- "Don't trouble me.",
186
- "Don't let anyone fool you.",
187
- ]
188
- query_embeddings = model.encode_query(queries)
189
- document_embeddings = model.encode_document(documents)
190
- print(query_embeddings.shape, document_embeddings.shape)
191
- # [1, 768] [3, 768]
192
-
193
- # Get the similarity scores for the embeddings
194
- similarities = model.similarity(query_embeddings, document_embeddings)
195
- print(similarities)
196
- # tensor([[0.7254, 0.5502, 0.4745]])
197
- ```
198
- <!--
199
- ### Direct Usage (Transformers)
200
-
201
- <details><summary>Click to see the direct usage in Transformers</summary>
202
-
203
- </details>
204
- -->
205
-
206
- <!--
207
- ### Downstream Usage (Sentence Transformers)
208
-
209
- You can finetune this model on your own dataset.
210
-
211
- <details><summary>Click to expand</summary>
212
-
213
- </details>
214
- -->
215
-
216
- <!--
217
- ### Out-of-Scope Use
218
-
219
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
220
- -->
221
-
222
- ## Evaluation
223
-
224
- ### Metrics
225
-
226
- #### Information Retrieval
227
-
228
- * Dataset: `morisienmt-dev-eng`
229
- * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.sentence_transformer.evaluation.InformationRetrievalEvaluator)
230
-
231
- | Metric | Value |
232
- |:--------------------|:-----------|
233
- | cosine_accuracy@1 | 0.96 |
234
- | cosine_accuracy@3 | 0.98 |
235
- | cosine_accuracy@5 | 0.98 |
236
- | cosine_accuracy@10 | 0.982 |
237
- | cosine_precision@1 | 0.96 |
238
- | cosine_precision@3 | 0.3267 |
239
- | cosine_precision@5 | 0.196 |
240
- | cosine_precision@10 | 0.0982 |
241
- | cosine_recall@1 | 0.96 |
242
- | cosine_recall@3 | 0.98 |
243
- | cosine_recall@5 | 0.98 |
244
- | cosine_recall@10 | 0.982 |
245
- | **cosine_ndcg@10** | **0.9728** |
246
- | cosine_mrr@10 | 0.9697 |
247
- | cosine_map@100 | 0.97 |
248
-
249
- <!--
250
- ## Bias, Risks and Limitations
251
-
252
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
253
- -->
254
-
255
- <!--
256
- ### Recommendations
257
-
258
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
259
- -->
260
 
261
- ## Training Details
 
262
 
263
- ### Training Dataset
264
-
265
- #### Unnamed Dataset
266
-
267
- * Size: 24,100 training samples
268
- * Columns: <code>anchor</code>, <code>positive</code>, <code>negative_1</code>, <code>negative_2</code>, <code>negative_3</code>, <code>negative_4</code>, and <code>negative_5</code>
269
- * Approximate statistics based on the first 100 samples:
270
- | | anchor | positive | negative_1 | negative_2 | negative_3 | negative_4 | negative_5 |
271
- |:---------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
272
- | type | string | string | string | string | string | string | string |
273
- | modality | text | text | text | text | text | text | text |
274
- | details | <ul><li>min: 5 tokens</li><li>mean: 14.52 tokens</li><li>max: 38 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.02 tokens</li><li>max: 34 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 15.32 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 14.96 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 14.99 tokens</li><li>max: 39 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.47 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 14.65 tokens</li><li>max: 38 tokens</li></ul> |
275
- * Samples:
276
- | anchor | positive | negative_1 | negative_2 | negative_3 | negative_4 | negative_5 |
277
- |:-----------------------------------------------------------------|:----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------|:-----------------------------------------------------|
278
- | <code>pou determinn lepeser ek mouvman so lakok glason e.</code> | <code>to determine the thickness and dynamics of the moon's ice shell and.</code> | <code>You can tell what a tree is like by the fruit it produces.</code> | <code>The crisis’ vigour and tempo can also be determined by the internal re-organization of the ruling block.</code> | <code>Find out from the storyteller or others what rules exist that determine performance.</code> | <code>Vous pouvez dire le temps qu'il fera en regardant le ciel.</code> | <code>How to Recognize and Collect Folktales.</code> |
279
- | <code>pou determinn lepeser ek mouvman so lakok glason e.</code> | <code>pour déterminer l'épaisseur et la dynamique de la couche de glace de la lune et.</code> | <code>You can tell what a tree is like by the fruit it produces.</code> | <code>The crisis’ vigour and tempo can also be determined by the internal re-organization of the ruling block.</code> | <code>Find out from the storyteller or others what rules exist that determine performance.</code> | <code>Vous pouvez dire le temps qu'il fera en regardant le ciel.</code> | <code>How to Recognize and Collect Folktales.</code> |
280
- | <code>karakteriz zeolozi Europa en detay.</code> | <code>characterize the surface geology of Europa in detail.</code> | <code>Folklore thus take in local and national history.</code> | <code>Give detailed description of the event.</code> | <code>The Irish book is the model for this book.</code> | <code>Prophecy of the downfall of the British colonizers.</code> | <code>It is called Beasts of England.</code> |
281
- * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
282
- ```json
283
- {
284
- "loss": "CachedMultipleNegativesRankingLoss",
285
- "matryoshka_dims": [
286
- 768,
287
- 512,
288
- 256,
289
- 128,
290
- 64
291
- ],
292
- "matryoshka_weights": [
293
- 1,
294
- 1,
295
- 1,
296
- 1,
297
- 1
298
- ],
299
- "n_dims_per_step": -1
300
- }
301
- ```
302
-
303
- ### Training Hyperparameters
304
- #### Non-Default Hyperparameters
305
-
306
- - `per_device_train_batch_size`: 128
307
- - `learning_rate`: 2e-05
308
- - `warmup_steps`: 0.1
309
- - `fp16`: True
310
- - `batch_sampler`: no_duplicates
311
-
312
- #### All Hyperparameters
313
- <details><summary>Click to expand</summary>
314
-
315
- - `do_predict`: False
316
- - `prediction_loss_only`: True
317
- - `per_device_train_batch_size`: 128
318
- - `per_device_eval_batch_size`: 8
319
- - `gradient_accumulation_steps`: 1
320
- - `eval_accumulation_steps`: None
321
- - `torch_empty_cache_steps`: None
322
- - `learning_rate`: 2e-05
323
- - `weight_decay`: 0.0
324
- - `adam_beta1`: 0.9
325
- - `adam_beta2`: 0.999
326
- - `adam_epsilon`: 1e-08
327
- - `max_grad_norm`: 1.0
328
- - `num_train_epochs`: 3.0
329
- - `max_steps`: -1
330
- - `lr_scheduler_type`: linear
331
- - `lr_scheduler_kwargs`: None
332
- - `warmup_ratio`: None
333
- - `warmup_steps`: 0.1
334
- - `log_level`: passive
335
- - `log_level_replica`: warning
336
- - `log_on_each_node`: True
337
- - `logging_nan_inf_filter`: True
338
- - `enable_jit_checkpoint`: False
339
- - `save_on_each_node`: False
340
- - `save_only_model`: False
341
- - `restore_callback_states_from_checkpoint`: False
342
- - `use_cpu`: False
343
- - `seed`: 42
344
- - `data_seed`: None
345
- - `bf16`: False
346
- - `fp16`: True
347
- - `bf16_full_eval`: False
348
- - `fp16_full_eval`: False
349
- - `tf32`: None
350
- - `local_rank`: -1
351
- - `ddp_backend`: None
352
- - `debug`: []
353
- - `dataloader_drop_last`: False
354
- - `dataloader_num_workers`: 0
355
- - `dataloader_prefetch_factor`: None
356
- - `disable_tqdm`: False
357
- - `remove_unused_columns`: True
358
- - `label_names`: None
359
- - `load_best_model_at_end`: False
360
- - `ignore_data_skip`: False
361
- - `fsdp`: []
362
- - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
363
- - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
364
- - `parallelism_config`: None
365
- - `deepspeed`: None
366
- - `label_smoothing_factor`: 0.0
367
- - `optim`: adamw_torch_fused
368
- - `optim_args`: None
369
- - `group_by_length`: False
370
- - `length_column_name`: length
371
- - `project`: huggingface
372
- - `trackio_space_id`: trackio
373
- - `ddp_find_unused_parameters`: None
374
- - `ddp_bucket_cap_mb`: None
375
- - `ddp_broadcast_buffers`: False
376
- - `dataloader_pin_memory`: True
377
- - `dataloader_persistent_workers`: False
378
- - `skip_memory_metrics`: True
379
- - `push_to_hub`: False
380
- - `resume_from_checkpoint`: None
381
- - `hub_model_id`: None
382
- - `hub_strategy`: every_save
383
- - `hub_private_repo`: None
384
- - `hub_always_push`: False
385
- - `hub_revision`: None
386
- - `gradient_checkpointing`: False
387
- - `gradient_checkpointing_kwargs`: None
388
- - `include_for_metrics`: []
389
- - `eval_do_concat_batches`: True
390
- - `auto_find_batch_size`: False
391
- - `full_determinism`: False
392
- - `ddp_timeout`: 1800
393
- - `torch_compile`: False
394
- - `torch_compile_backend`: None
395
- - `torch_compile_mode`: None
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
- - `use_cache`: False
406
- - `prompts`: None
407
- - `batch_sampler`: no_duplicates
408
- - `multi_dataset_batch_sampler`: proportional
409
- - `router_mapping`: {}
410
- - `learning_rate_mapping`: {}
411
-
412
- </details>
413
-
414
- ### Training Logs
415
- | Epoch | Step | Training Loss | morisienmt-dev-eng_cosine_ndcg@10 |
416
- |:------:|:----:|:-------------:|:---------------------------------:|
417
- | 0.2646 | 50 | 19.3371 | - |
418
- | 0.5291 | 100 | 7.6897 | - |
419
- | 0.7937 | 150 | 5.7943 | - |
420
- | 1.0 | 189 | - | 0.9698 |
421
- | 1.0582 | 200 | 5.0894 | - |
422
- | 1.3228 | 250 | 4.2876 | - |
423
- | 1.5873 | 300 | 3.9644 | - |
424
- | 1.8519 | 350 | 3.8261 | - |
425
- | 2.0 | 378 | - | 0.9724 |
426
- | 2.1164 | 400 | 3.4445 | - |
427
- | 2.3810 | 450 | 3.2138 | - |
428
- | 2.6455 | 500 | 3.0999 | - |
429
- | 2.9101 | 550 | 3.0612 | - |
430
- | 3.0 | 567 | - | 0.9728 |
431
-
432
-
433
- ### Training Time
434
- - **Training**: 30.6 minutes
435
- - **Evaluation**: 1.9 seconds
436
- - **Total**: 30.6 minutes
437
 
438
- ### Framework Versions
439
- - Python: 3.12.13
440
- - Sentence Transformers: 5.7.0
441
- - Transformers: 5.0.0
442
- - PyTorch: 2.10.0+cu128
443
- - Accelerate: 1.14.0
444
- - Datasets: 5.0.1
445
- - Tokenizers: 0.22.2
446
 
447
- ## Additional Resources
 
 
448
 
449
- - [Training and Finetuning Embedding Models with Sentence Transformers](https://huggingface.co/blog/train-sentence-transformers): the end-to-end guide for training or finetuning Sentence Transformer models.
450
- - [Introduction to Matryoshka Embedding Models](https://huggingface.co/blog/matryoshka): variable-size embeddings that can be truncated with minimal quality loss.
451
- - [Binary and Scalar Embedding Quantization for Significantly Faster & Cheaper Retrieval](https://huggingface.co/blog/embedding-quantization): post-training compression of embedding vectors.
452
- - [Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/multimodal-sentence-transformers): use text, image, audio, and video models through the same API.
453
- - [Training and Finetuning Multimodal Embedding & Reranker Models with Sentence Transformers](https://huggingface.co/blog/train-multimodal-sentence-transformers): train multimodal embedding models, with a Visual Document Retrieval walkthrough.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
454
 
455
  ## Citation
456
 
457
- ### BibTeX
 
 
458
 
459
- #### Sentence Transformers
460
  ```bibtex
461
- @inproceedings{reimers-2019-sentence-bert,
462
- title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
463
- author = "Reimers, Nils and Gurevych, Iryna",
464
- booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
465
- month = "11",
466
- year = "2019",
467
- publisher = "Association for Computational Linguistics",
468
- url = "https://arxiv.org/abs/1908.10084",
469
  }
470
  ```
471
-
472
- #### MatryoshkaLoss
473
- ```bibtex
474
- @misc{kusupati2024matryoshka,
475
- title={Matryoshka Representation Learning},
476
- 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},
477
- year={2024},
478
- eprint={2205.13147},
479
- archivePrefix={arXiv},
480
- primaryClass={cs.LG}
481
- }
482
- ```
483
-
484
- #### CachedMultipleNegativesRankingLoss
485
- ```bibtex
486
- @misc{gao2021scaling,
487
- title={Scaling Deep Contrastive Learning Batch Size under Memory Limited Setup},
488
- author={Luyu Gao and Yunyi Zhang and Jiawei Han and Jamie Callan},
489
- year={2021},
490
- eprint={2101.06983},
491
- archivePrefix={arXiv},
492
- primaryClass={cs.LG}
493
- }
494
- ```
495
-
496
- #### MultipleNegativesRankingLoss
497
- ```bibtex
498
- @misc{oord2019representationlearningcontrastivepredictive,
499
- title={Representation Learning with Contrastive Predictive Coding},
500
- author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
501
- year={2019},
502
- eprint={1807.03748},
503
- archivePrefix={arXiv},
504
- primaryClass={cs.LG},
505
- url={https://arxiv.org/abs/1807.03748},
506
- }
507
- ```
508
-
509
- <!--
510
- ## Glossary
511
-
512
- *Clearly define terms in order to be accessible across audiences.*
513
- -->
514
-
515
- <!--
516
- ## Model Card Authors
517
-
518
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
519
- -->
520
-
521
- <!--
522
- ## Model Card Contact
523
-
524
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
525
- -->
 
1
  ---
2
+ language:
3
+ - mfe
4
+ - en
5
+ - fr
6
+ license: mit
7
+ library_name: sentence-transformers
8
+ pipeline_tag: sentence-similarity
9
  tags:
10
+ - sentence-transformers
11
+ - sentence-similarity
12
+ - feature-extraction
13
+ - mauritian-creole
14
+ - kreol-morisien
15
+ - matryoshka
 
 
 
16
  base_model: intfloat/multilingual-e5-base
17
+ datasets:
18
+ - prajdabre/MorisienMT
19
+ - jhu-clsp/kreyol-mt
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
20
  ---
21
 
22
+ # morisien-embed
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
23
 
24
+ To our knowledge, the first dedicated text embedding model for **Mauritian Creole (Kreol Morisien,
25
+ `mfe`)** the home language of roughly 90% of Mauritius (2022 census).
 
26
 
27
+ Fine-tuned from [multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) on
28
+ effectively all publicly available Creole↔{English, French} parallel data, it outperforms every
29
+ general multilingual embedding model we evaluated — including
30
+ [LaBSE](https://huggingface.co/sentence-transformers/LaBSE), the strongest of them on this task — on
31
+ held-out Creole retrieval in both directions.
32
 
33
+ Use it for semantic search, retrieval, RAG, bitext mining, or clustering over Kreol Morisien text.
 
 
 
 
 
 
34
 
35
  ## Usage
36
 
 
 
 
 
 
 
 
 
37
  ```python
38
  from sentence_transformers import SentenceTransformer
39
 
 
40
  model = SentenceTransformer("Singaraj/morisien-embed")
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
41
 
42
+ creole = ["Mo pe al bazar aster.", "Bann zanfan pe zwe dan lakour."]
43
+ english = ["I am going to the market now.", "The children are playing in the yard."]
44
 
45
+ similarity = model.similarity(model.encode(creole), model.encode(english))
46
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
47
 
48
+ Trained with Matryoshka loss, so embeddings can be truncated for faster search at a small,
49
+ measured accuracy cost (ndcg@10 on the benchmark below: 0.9591 at 256 dims, 0.9531 at 128):
 
 
 
 
 
 
50
 
51
+ ```python
52
+ model = SentenceTransformer("Singaraj/morisien-embed", truncate_dim=256)
53
+ ```
54
 
55
+ No prompt/prefix is required.
56
+
57
+ ## Results
58
+
59
+ Creole→English retrieval on the held-out [MorisienMT](https://huggingface.co/datasets/prajdabre/MorisienMT)
60
+ test split (1,000 queries, leak-free against training data — enforced in the data pipeline by exact
61
+ matching and by a punctuation-, case- and accent-insensitive check):
62
+
63
+ | Model | Params | ndcg@10 | accuracy@1 |
64
+ |---|---|---|---|
65
+ | paraphrase-multilingual-MiniLM-L12-v2 | 118M | 0.16 | 0.10 |
66
+ | BAAI/bge-m3 | 568M | 0.46 | 0.36 |
67
+ | intfloat/multilingual-e5-small | 118M | 0.54 | 0.42 |
68
+ | intfloat/multilingual-e5-base | 278M | 0.64 | 0.53 |
69
+ | intfloat/multilingual-e5-large | 560M | 0.73 | 0.65 |
70
+ | sentence-transformers/LaBSE | 470M | 0.94 | 0.91 |
71
+ | **morisien-embed** | **278M** | **0.9655** | **0.9440** |
72
+
73
+ Creole→French, same protocol:
74
+
75
+ | Model | ndcg@10 | accuracy@1 |
76
+ |---|---|---|
77
+ | sentence-transformers/LaBSE | 0.9475 | 0.9130 |
78
+ | **morisien-embed** | **0.9751** | **0.9530** |
79
+
80
+ Generalization to an independent domain — [FLORES+](https://huggingface.co/datasets/openlanguagedata/flores_plus)
81
+ `mfe` devtest (1,012 professionally translated sentences from Wikinews, Wikijunior and Wikivoyage,
82
+ zero overlap with training data):
83
+
84
+ | Model | ndcg@10 | accuracy@1 |
85
+ |---|---|---|
86
+ | sentence-transformers/LaBSE | 0.9996 | 0.9990 |
87
+ | **morisien-embed** | **1.0000** | **1.0000** |
88
+
89
+ Both models sit at the ceiling of this benchmark — FLORES+ sentences are long and distinctive, so
90
+ 1,012-way retrieval saturates. Read this as evidence of zero out-of-domain degradation, not as a
91
+ margin over LaBSE.
92
+
93
+ Training was repeated with three random seeds; Creole→English test ndcg@10 across seeds:
94
+ **0.9653 ± 0.0002** (accuracy@1 **0.9433 ± 0.0006**). The released checkpoint is seed 42, designated
95
+ before results were seen.
96
+
97
+ Every number is reproducible from the [training repository](https://github.com/LK-maker-007/morisien-embed).
98
+
99
+ ## Training
100
+
101
+ - **Data:** 35,064 unique, leak-free Creole↔{English, French} pairs — effectively all publicly
102
+ available Mauritian Creole parallel text — merged from
103
+ [MorisienMT](https://huggingface.co/datasets/prajdabre/MorisienMT) (CC) and
104
+ [Kreyòl-MT](https://huggingface.co/datasets/jhu-clsp/kreyol-mt) (mixed licenses; used for training
105
+ only, not redistributed). Every MorisienMT dev/test sentence is removed from training by exact
106
+ matching and by a punctuation-, case- and accent-insensitive check.
107
+ - **Recipe:** hard-negative mining with positive-aware false-negative filtering
108
+ (`mine_hard_negatives`: 5 negatives/anchor, `range_min=10`, `relative_margin=0.05`). The margin
109
+ filter is strict: 24,100 of the 35,064 pairs survived with a full negative set, and the released
110
+ checkpoint's contrastive stage trained on those 24,100 tuples (the stage-1 mining model itself was
111
+ trained on all 35,064). Contrastive training uses `CachedMultipleNegativesRankingLoss` (batch 128,
112
+ 767 in-batch negatives per anchor) wrapped in `MatryoshkaLoss` (dims 768/512/256/128/64). 3 epochs,
113
+ lr 2e-5, warmup 10%, fp16, seed 42, single T4 GPU (~30 min).
114
+ - **Base model:** [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base)
115
+ (278M parameters, MIT).
116
+
117
+ ## Limitations
118
+
119
+ - **Not native-perfect.** Accuracy@1 around 0.944 means roughly one query in eighteen ranks
120
+ a wrong translation first. Strong, but below a human bilingual speaker.
121
+ - **Register skew.** The available Creole data over-represents religious text, politics, and
122
+ literature; highly informal or technical registers are less covered.
123
+ - **Small evaluation universe.** Retrieval is measured over ~1,000-passage corpora — standard for
124
+ bitext benchmarks, but absolute scores would be lower against web-scale corpora.
125
+ - **One distribution family.** MorisienMT and Kreyòl-MT overlap heavily, and the only fully
126
+ independent evaluation domain for `mfe` (FLORES+) is saturated at this corpus size — so the margin
127
+ over LaBSE is demonstrated in-domain only.
128
+ - **Haitian Creole proximity.** Like every multilingual embedder we tested, the model embeds Haitian
129
+ Creole close to Mauritian Creole: with same-meaning Haitian sentences injected into a FLORES-based
130
+ corpus, mfe→eng accuracy@1 drops from 1.00 to 0.71 (the Haitian twin outranks the English
131
+ translation). The fine-tune still discriminates the two creoles better than LaBSE does on the same
132
+ trap (306/400 correct vs LaBSE's 170/400), and wrong-meaning Haitian text is never confused — but
133
+ mixed mfe/hat corpora will degrade retrieval.
134
+ - **Case sensitivity.** ALL-CAPS text embeds measurably differently from its lower-case form
135
+ (cosine ≈ 0.81 to the same sentence); caps-heavy text retrieves worse.
136
+ - **Protocol note.** During recipe development the held-out test score was printed at the end of each
137
+ training run, so recipe selection had test visibility; an independent audit bounded the resulting
138
+ optimism at ≤ ~0.01 ndcg. The 3-seed replication was run after the recipe was frozen.
139
+ - **Orthographic variation.** Training data mixes pre- and post-2011 (Lortograf Kreol Morisien)
140
+ spellings; performance on older orthography is untested.
141
 
142
  ## Citation
143
 
144
+ If you use this model, please cite the data sources it builds on:
145
+ [MorisienMT](https://arxiv.org/abs/2206.02421) (Dabre & Sukhoo, 2022) and
146
+ [Kreyòl-MT](https://arxiv.org/abs/2405.05376) (Robinson et al., NAACL 2024).
147
 
 
148
  ```bibtex
149
+ @misc{morisien-embed,
150
+ author = {Singaraj B},
151
+ title = {morisien-embed: a dedicated text embedding model for Mauritian Creole},
152
+ year = {2026},
153
+ url = {https://huggingface.co/Singaraj/morisien-embed}
 
 
 
154
  }
155
  ```