Downloads · 30 days
28
16% of all-time downloads
Fatoumataa/embedding_billingue_francais_bambara1
embedding_billingue_francais_bambara1 is a sentence similarity model from Fatoumataa. Use it when you need a score for how close two texts are. It is set up for sentence-transformers.
This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-mpnet-base-v2. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic tex…
Downloads · 30 days
28
16% of all-time downloads
All-time downloads
179
Public
Parameters
278M
1.1 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors1.1 GB · 98%
From the Hugging Face model README
This is a sentence-transformers model finetuned from sentence-transformers/paraphrase-multilingual-mpnet-base-v2. 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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(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})
)
First install the Sentence Transformers library:
pip install -U sentence-transformers
Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the 🤗 Hub
model = SentenceTransformer("Fatoumataa/embedding_billingue_francais_bambara1")
# Run inference
sentences = [
'expliquez le rôle du contrat social selon john locke.',
"pour locke, le contrat social est un accord par lequel les individus sortent de l'état de nature pour protéger leurs droits naturels et établir un gouvernement limité. il fonde la société civile.",
'protection des droits naturels,le contrat social sert à rendre le peuple entièrement soumis à un souverain absolu. (locke défend un gouvernement limité, pas une soumission absolue comme hobbes).',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
bambara_eval| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.875 |
| cosine_accuracy@3 | 0.965 |
| cosine_accuracy@5 | 0.98 |
| cosine_accuracy@10 | 0.985 |
| cosine_precision@3 | 0.3217 |
| cosine_precision@5 | 0.196 |
| cosine_precision@10 | 0.0985 |
| cosine_recall@3 | 0.965 |
| cosine_recall@5 | 0.98 |
| cosine_recall@10 | 0.985 |
| cosine_ndcg@10 | 0.937 |
| cosine_mrr@10 | 0.9208 |
| cosine_map@100 | 0.9218 |
bambara_eval| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.755 |
| cosine_accuracy@3 | 0.95 |
| cosine_accuracy@5 | 0.965 |
| cosine_accuracy@10 | 0.98 |
| cosine_precision@3 | 0.3167 |
| cosine_precision@5 | 0.193 |
| cosine_precision@10 | 0.098 |
| cosine_recall@3 | 0.95 |
| cosine_recall@5 | 0.965 |
| cosine_recall@10 | 0.98 |
| cosine_ndcg@10 | 0.8822 |
| cosine_mrr@10 | 0.8492 |
| cosine_map@100 | 0.8503 |
| anchor | positive | negative | label | |
|---|---|---|---|---|
| type | string | string | string | float |
| details | <ul><li>min: 6 tokens</li><li>mean: 20.85 tokens</li><li>max: 77 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 59.01 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 51.72 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
| anchor | positive | negative | label |
|---|---|---|---|
| <code>quel instrument de musique traditionnel malien est une sorte de harpe-luth à 21 cordes, emblématique des griots ?</code> | <code>kora ye mali laadala fɔlifɛn ye min bɛ fɔ ni juru 21 ye, griotw bɛ baara kɛ ni a ye kosɛbɛ walasa ka fara u ka maanaw ni dɔnkiliw kan.</code> | <code>le balafon est la harpe-luth à 21 cordes. (confusion avec un xylophone africain).</code> | <code>1.0</code> |
| <code>fɛn jumɛnw tun bɛ mali mansamara ka jago siratigɛ la?</code> | <code>les principaux produits échangés dans l'mansaya du mali étaient l'or, le sel, et les esclaves, complétés par des produits locaux comme le kola, le tissu et les céréales.</code> | <code>victor hugo tun ye faransi kanuya sɛbɛnnikɛla ŋana ye. 'les misérables' ye a ka baara tɔgɔba dɔ ye, gafe min bɛ sigida ka tɔɔrɔ jira.</code> | <code>1.0</code> |
| <code>calcule le double de 9.</code> | <code>18. sabula 9 siɲɛ fila ye 18 ye.</code> | <code>24. erreur fréquente dans le calcul de double.</code> | <code>1.0</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
| anchor | positive | negative | label | |
|---|---|---|---|---|
| type | string | string | string | float |
| details | <ul><li>min: 5 tokens</li><li>mean: 20.91 tokens</li><li>max: 55 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 58.13 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 51.09 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
| anchor | positive | negative | label |
|---|---|---|---|
| <code>kɔrɔfɔli bɛ dɛmɛ jumɛn don seko ni dɔnko faamuyali la ?</code> | <code>la critique d'art offre des perspectives d'analyse, éclaire le contexte, et propose des interprétations, aidant ainsi le public à approfondir sa compréhension et son appréciation des œuvres.</code> | <code>tifoyidi bɛ sɔrɔ kosɛbɛ ji walima dumuni dunni fɛ min nɔgɔlen don banakisɛ bɛ mɔgɔ min na, o ka banakɔtaa fɛ. banakunbɛnni ye ji minta, bolo saniya ani dumuni tobili ye.</code> | <code>1.0</code> |
| <code>polifoni ye mun ye fɔli la?</code> | <code>la polyphonie est une technique de composition où plusieurs mélodies indépendantes sont jouées simultanément. elle crée une richesse harmonique.</code> | <code>mali la, waati jiginni bɛ kɛ sababu ye ka ja waati janw ni sanjiw kɛ minnu tɛ kɛ tuma bɛɛ. o bɛ suman tigɛ dɔgɔya ani ka sɛnɛ bila farati la. a ka gɛlɛn sɛnɛkɛlaw ma.</code> | <code>1.0</code> |
| <code>quelles sont les habitudes à adopter pour améliorer la qualité de son sommeil ?</code> | <code>walasa ka sunɔgɔ ɲuman sɔrɔ, aw ka kan ka sunɔgɔcogo dɔ sigi sen kan tuma bɛɛ, ka aw yɛrɛ tanga ɛkranw ma sani aw ka sunɔgɔ, ka dibi ni lafiya sigida dilan, ani ka farikoloɲɛnajɛ kɛ tile fɛ. aw bɛ aw yɛrɛ tanga kafeyin ma wula fɛ, o fana nafa ka bon.</code> | <code>manger une grande quantité de nourriture juste avant de dormir. (cela peut perturber la digestion et le sommeil, c'est une mauvaise habitude, erreur conceptuelle).</code> | <code>1.0</code> |
{
"scale": 20.0,
"similarity_fct": "cos_sim"
}
eval_strategy: stepsper_device_train_batch_size: 16per_device_eval_batch_size: 32learning_rate: 1e-05weight_decay: 0.01num_train_epochs: 8warmup_ratio: 0.1fp16: Trueload_best_model_at_end: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: stepsprediction_loss_only: Trueper_device_train_batch_size: 16per_device_eval_batch_size: 32per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 1e-05weight_decay: 0.01adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 8max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.1warmup_steps: 0log_level: passivelog_level_replica: warninglog_on_each_node: Truelogging_nan_inf_filter: Truesave_safetensors: Truesave_on_each_node: Falsesave_only_model: Falserestore_callback_states_from_checkpoint: Falseno_cuda: Falseuse_cpu: Falseuse_mps_device: Falseseed: 42data_seed: Nonejit_mode_eval: Falseuse_ipex: Falsebf16: Falsefp16: Truefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonelocal_rank: 0ddp_backend: Nonetpu_num_cores: Nonetpu_metrics_debug: Falsedebug: []dataloader_drop_last: Falsedataloader_num_workers: 0dataloader_prefetch_factor: Nonepast_index: -1disable_tqdm: Falseremove_unused_columns: Truelabel_names: Noneload_best_model_at_end: Trueignore_data_skip: Falsefsdp: []fsdp_min_num_params: 0fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}fsdp_transformer_layer_cls_to_wrap: Noneaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}deepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torchoptim_args: Noneadafactor: Falsegroup_by_length: Falselength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falsedataloader_pin_memory: Truedataloader_persistent_workers: Falseskip_memory_metrics: Trueuse_legacy_prediction_loop: Falsepush_to_hub: Falseresume_from_checkpoint: Nonehub_model_id: Nonehub_strategy: every_savehub_private_repo: Nonehub_always_push: Falsehub_revision: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Noneinclude_inputs_for_metrics: Falseinclude_for_metrics: []eval_do_concat_batches: Truefp16_backend: autopush_to_hub_model_id: Nonepush_to_hub_organization: Nonemp_parameters:auto_find_batch_size: Falsefull_determinism: Falsetorchdynamo: Noneray_scope: lastddp_timeout: 1800torch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseliger_kernel_config: Noneeval_use_gather_object: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | Validation Loss | bambara_eval_cosine_ndcg@10 |
|---|---|---|---|---|
| 0.2475 | 50 | 1.0849 | - | - |
| 0.4950 | 100 | 0.5428 | 0.5113 | 0.8522 |
| 0.7426 | 150 | 0.2423 | - | - |
| 0.9901 | 200 | 0.2538 | 0.2678 | 0.8872 |
| 1.2376 | 250 | 0.1232 | - | - |
| 1.4851 | 300 | 0.103 | 0.2104 | 0.9165 |
| 1.7327 | 350 | 0.0991 | - | - |
| 1.9802 | 400 | 0.1284 | 0.1878 | 0.9181 |
| 2.2277 | 450 | 0.0427 | - | - |
| 2.4752 | 500 | 0.0311 | 0.1282 | 0.9205 |
| 2.7228 | 550 | 0.0514 | - | - |
| 2.9703 | 600 | 0.0778 | 0.1101 | 0.9370 |
| 3.2178 | 650 | 0.0233 | - | - |
| 3.4653 | 700 | 0.0298 | 0.1158 | 0.9408 |
| 3.7129 | 750 | 0.0298 | - | - |
| 3.9604 | 800 | 0.0163 | 0.1134 | 0.9366 |
| 4.2079 | 850 | 0.0238 | - | - |
| 4.4554 | 900 | 0.0155 | 0.1225 | 0.9387 |
| 4.7030 | 950 | 0.0219 | - | - |
| 4.9505 | 1000 | 0.0095 | 0.1049 | 0.9376 |
| -1 | -1 | - | - | 0.9370 |
| 0.2475 | 50 | 3.2372 | - | - |
| 0.4950 | 100 | 2.0213 | 2.1683 | 0.4056 |
| 0.7426 | 150 | 1.3029 | - | - |
| 0.9901 | 200 | 0.844 | 0.9643 | 0.5978 |
| 1.2376 | 250 | 0.5074 | - | - |
| 1.4851 | 300 | 0.3533 | 0.5925 | 0.7219 |
| 1.7327 | 350 | 0.3124 | - | - |
| 1.9802 | 400 | 0.243 | 0.4317 | 0.8044 |
| 2.2277 | 450 | 0.143 | - | - |
| 2.4752 | 500 | 0.1499 | 0.3547 | 0.8294 |
| 2.7228 | 550 | 0.1366 | - | - |
| 2.9703 | 600 | 0.1302 | 0.2870 | 0.8478 |
| 3.2178 | 650 | 0.0999 | - | - |
| 3.4653 | 700 | 0.0805 | 0.2736 | 0.8403 |
| 3.7129 | 750 | 0.0606 | - | - |
| 3.9604 | 800 | 0.073 | 0.2396 | 0.8666 |
| 4.2079 | 850 | 0.0515 | - | - |
| 4.4554 | 900 | 0.0451 | 0.2285 | 0.8709 |
| 4.7030 | 950 | 0.0591 | - | - |
| 4.9505 | 1000 | 0.05 | 0.2258 | 0.8707 |
| 5.1980 | 1050 | 0.0435 | - | - |
| 5.4455 | 1100 | 0.059 | 0.2192 | 0.8722 |
| 5.6931 | 1150 | 0.0496 | - | - |
| 5.9406 | 1200 | 0.0408 | 0.2132 | 0.8724 |
| 6.1881 | 1250 | 0.0491 | - | - |
| 6.4356 | 1300 | 0.038 | 0.2060 | 0.8783 |
| 6.6832 | 1350 | 0.032 | - | - |
| 6.9307 | 1400 | 0.0385 | 0.1998 | 0.8822 |
| 7.1782 | 1450 | 0.0363 | - | - |
| 7.4257 | 1500 | 0.0349 | 0.1982 | 0.8750 |
| 7.6733 | 1550 | 0.038 | - | - |
| 7.9208 | 1600 | 0.0523 | 0.1944 | 0.8753 |
| -1 | -1 | - | - | 0.8822 |
@inproceedings{reimers-2019-sentence-bert,
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
author = "Reimers, Nils and Gurevych, Iryna",
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
month = "11",
year = "2019",
publisher = "Association for Computational Linguistics",
url = "https://arxiv.org/abs/1908.10084",
}
@misc{henderson2017efficient,
title={Efficient Natural Language Response Suggestion for Smart Reply},
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},
year={2017},
eprint={1705.00652},
archivePrefix={arXiv},
primaryClass={cs.CL}
}
<!--
## Glossary
*Clearly define terms in order to be accessible across audiences.*
-->
<!--
## Model Card Authors
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
-->
<!--
## Model Card Contact
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
-->