Downloads · 30 days
96
6% of all-time downloads
biblissima/all-MiniLM-L6-v2_bibliographie
all-MiniLM-L6-v2_bibliographie is a sentence similarity model from biblissima. 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/all-MiniLM-L6-v2 on the train and test datasets. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for se…
Downloads · 30 days
96
6% of all-time downloads
All-time downloads
1.7K
Public
Parameters
22.7M
1.2 GB on disk
Likes
1
Public
Click a slice to open those files.
.safetensors90.9 MB · 99%
From the Hugging Face model README
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2 on the train and test datasets. 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.
SentenceTransformer(
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
(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})
(2): Normalize()
)
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("Albertdebeauvais/all-MiniLM-L6-v2_bibliographie")
# Run inference
sentences = [
'RITZ-GUILBERT, Anne (2018), "Les modèles du \'Bréviaire de Marie de Savoie\' par le Maître des \'Vitae Imperatorum\'", dans BORLÉE, Denise (éd.), TERRIER ALIFERIS, Laurence (éd.), Les modèles dans l\'art du Moyen Âge (XIIe-XVe siècles), Turnhout, Brepols (Répertoire iconographique de la littérature du Moyen Âge. Les études du RILMA, 10), p. 109-120',
'GIL, Marc (2018), "Sources et circulation des modèles dans les arts figurés champenois, vers 1160-1180 : le cas de Notre-Dame-en-Vaux à Châlons-en-Champagne", dans BORLÉE, Denise (éd.), TERRIER ALIFERIS, Laurence (éd.), Les modèles dans l\'art du Moyen Âge (XIIe-XVe siècles), Turnhout, Brepols (Répertoire iconographique de la littérature du Moyen Âge. Les études du RILMA, 10), p. 179-192',
"LEMAÎTRE, Jean-Loup (éd.) (2005), Un calendrier retrouvé : le calendrier des Heures de Saint-Pierre-du-Queyroix, Ussel, Musée du pays d'Ussel",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.5206, 0.1709],
# [0.5206, 1.0000, 0.2801],
# [0.1709, 0.2801, 1.0000]])
<!--
### 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.*
-->
eval| Metric | Value |
|---|---|
| cosine_accuracy | 0.9517 |
| cosine_accuracy_threshold | 0.8323 |
| cosine_f1 | 0.9499 |
| cosine_f1_threshold | 0.8267 |
| cosine_precision | 0.9391 |
| cosine_recall | 0.961 |
| cosine_ap | 0.9647 |
| cosine_mcc | 0.9036 |
| text1 | text2 | label | |
|---|---|---|---|
| type | string | string | int |
| details | <ul><li>min: 5 tokens</li><li>mean: 66.2 tokens</li><li>max: 200 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 63.27 tokens</li><li>max: 199 tokens</li></ul> | <ul><li>0: ~53.50%</li><li>1: ~46.50%</li></ul> |
| text1 | text2 | label |
|---|---|---|
| <code>FORONDA, François (dir.), BARRALIS, Christine (dir.), SÈRE, Bénédicte (dir.) (2010), Violences souveraines au Moyen Âge. Travaux d'une école historique, Paris (Le nœud gordien)</code> | <code>FORONDA, François (2010), "Une image de la violence d'Etat française : la mort de Pierre Ier de Castille", dans FORONDA, François (dir.), BARRALIS, Christine (dir.), SÈRE, Bénédicte (dir.), Violences souveraines au Moyen Âge. Travaux d'une école historique, Paris (Le nœud gordien), p. 249-259</code> | <code>0</code> |
| <code>ORTOLEVA, Vincenzo (1994), "La cosiddetta tradizione "epitomata della Mulomedicina" di Vegezio. Recensio deterior o tradizionz indiretta ?", Revue d'histoire des textes, 24, p. 271-274</code> | <code>TOSCANO, Gennaro (1995), "Il Maestro di Isabella di Chiaromonte : note sulla miniatura a Napoli a metà Quattracento", Artes, 3, p. 34-45</code> | <code>0</code> |
| <code>pp. XIV, 259-262, 264-265 John LOWDEN, The Making of the Bibles moralisées. T. 2 : The Book of Ruth, University Park, The Pennsylvania State University, 2000 Mss. [ 4° Impr. 2422 (2)</code> | <code>LOWDEN, John (2000), The Making of the Bibles Moralisées : I. The manuscripts; II. The book of Ruth, University Park (PA), The Pennsylvania State University Press</code> | <code>1</code> |
| text1 | text2 | label | |
|---|---|---|---|
| type | string | string | int |
| details | <ul><li>min: 12 tokens</li><li>mean: 67.31 tokens</li><li>max: 195 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 63.32 tokens</li><li>max: 195 tokens</li></ul> | <ul><li>0: ~52.35%</li><li>1: ~47.65%</li></ul> |
| text1 | text2 | label |
|---|---|---|
| <code>Pfeffer, Wendy, The Oxford Companion to Chaucer, Oxford, Oxford University Press, 2003.</code> | <code>Eglal Doss-Quinby, Joan Tasker-Grimbert, Wendy Pfeffer et Elizabeth Aubrey, Song of the Women Trouvères, New Haven/London, Yale University Press, 2001.</code> | <code>0</code> |
| <code>Rêves et vie spirituelle d'après Evagre le Pontique, Jérusalem, Presses Universitaires de France, 1969.</code> | <code>(1969), « Les songes et la vie quotidienne dans l'Antiquité tardive », Jérusalem, éd. Presses Universitaires de France.</code> | <code>0</code> |
| <code>HUCHER, Eugène (éd.) (1875-1878), Le Saint Graal, ou Le Joseph d'Arimathie, première branche des romans de la Table ronde publié d'après des textes et des documents inédits, Le Mans, Ed. Monnoyer, 3 volumes</code> | <code>1875-1878, Le Saint Graal, Ou Le Joseph D'arimathie, Première Branche Des Romans De La Table Ronde Publié D'après Des Textes Et Des Documents Inédits</code> | <code>1</code> |
| text1 | text2 | label | |
|---|---|---|---|
| type | string | string | int |
| details | <ul><li>min: 12 tokens</li><li>mean: 67.31 tokens</li><li>max: 195 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 63.32 tokens</li><li>max: 195 tokens</li></ul> | <ul><li>0: ~52.35%</li><li>1: ~47.65%</li></ul> |
| text1 | text2 | label |
|---|---|---|
| <code>Pfeffer, Wendy, The Oxford Companion to Chaucer, Oxford, Oxford University Press, 2003.</code> | <code>Eglal Doss-Quinby, Joan Tasker-Grimbert, Wendy Pfeffer et Elizabeth Aubrey, Song of the Women Trouvères, New Haven/London, Yale University Press, 2001.</code> | <code>0</code> |
| <code>Rêves et vie spirituelle d'après Evagre le Pontique, Jérusalem, Presses Universitaires de France, 1969.</code> | <code>(1969), « Les songes et la vie quotidienne dans l'Antiquité tardive », Jérusalem, éd. Presses Universitaires de France.</code> | <code>0</code> |
| <code>HUCHER, Eugène (éd.) (1875-1878), Le Saint Graal, ou Le Joseph d'Arimathie, première branche des romans de la Table ronde publié d'après des textes et des documents inédits, Le Mans, Ed. Monnoyer, 3 volumes</code> | <code>1875-1878, Le Saint Graal, Ou Le Joseph D'arimathie, Première Branche Des Romans De La Table Ronde Publié D'après Des Textes Et Des Documents Inédits</code> | <code>1</code> |
eval_strategy: epochper_device_train_batch_size: 160per_device_eval_batch_size: 160learning_rate: 3e-05warmup_ratio: 0.03overwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 160per_device_eval_batch_size: 160per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 3e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 3max_steps: -1lr_scheduler_type: linearlr_scheduler_kwargs: {}warmup_ratio: 0.03warmup_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: Falsefp16_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: Falseignore_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}parallelism_config: Nonedeepspeed: Nonelabel_smoothing_factor: 0.0optim: adamw_torch_fusedoptim_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: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | Validation Loss | eval_cosine_ap |
|---|---|---|---|---|
| -1 | -1 | - | - | 0.5884 |
| 0.0353 | 6 | 7.9026 | - | - |
| 0.0706 | 12 | 7.7888 | - | - |
| 0.1059 | 18 | 7.0352 | - | - |
| 0.1412 | 24 | 6.3592 | - | - |
| 0.1765 | 30 | 5.8148 | - | - |
| 0.2118 | 36 | 4.9098 | - | - |
| 0.2471 | 42 | 5.1715 | - | - |
| 0.2824 | 48 | 4.0856 | - | - |
| 0.3176 | 54 | 4.3722 | - | - |
| 0.3529 | 60 | 4.0175 | - | - |
| 0.3882 | 66 | 3.9427 | - | - |
| 0.4235 | 72 | 3.4966 | - | - |
| 0.4588 | 78 | 3.5505 | - | - |
| 0.4941 | 84 | 3.2389 | - | - |
| 0.5294 | 90 | 3.5375 | - | - |
| 0.5647 | 96 | 3.0543 | - | - |
| 0.6 | 102 | 3.0486 | - | - |
| 0.6353 | 108 | 2.5424 | - | - |
| 0.6706 | 114 | 2.9492 | - | - |
| 0.7059 | 120 | 3.353 | - | - |
| 0.7412 | 126 | 2.7673 | - | - |
| 0.7765 | 132 | 2.9456 | - | - |
| 0.8118 | 138 | 2.3598 | - | - |
| 0.8471 | 144 | 2.5187 | - | - |
| 0.8824 | 150 | 2.2102 | - | - |
| 0.9176 | 156 | 2.675 | - | - |
| 0.9529 | 162 | 2.1735 | - | - |
| 0.9882 | 168 | 2.4117 | - | - |
| 1.0 | 170 | - | 2.0486 | 0.9545 |
| 1.0235 | 174 | 1.8135 | - | - |
| 1.0588 | 180 | 2.1022 | - | - |
| 1.0941 | 186 | 1.7459 | - | - |
| 1.1294 | 192 | 1.7129 | - | - |
| 1.1647 | 198 | 1.7023 | - | - |
| 1.2 | 204 | 1.8 | - | - |
| 1.2353 | 210 | 1.6906 | - | - |
| 1.2706 | 216 | 2.0856 | - | - |
| 1.3059 | 222 | 1.7216 | - | - |
| 1.3412 | 228 | 1.8287 | - | - |
| 1.3765 | 234 | 2.2071 | - | - |
| 1.4118 | 240 | 1.8617 | - | - |
| 1.4471 | 246 | 1.8148 | - | - |
| 1.4824 | 252 | 1.6976 | - | - |
| 1.5176 | 258 | 1.4774 | - | - |
| 1.5529 | 264 | 1.8896 | - | - |
| 1.5882 | 270 | 1.8389 | - | - |
| 1.6235 | 276 | 2.2744 | - | - |
| 1.6588 | 282 | 1.5614 | - | - |
| 1.6941 | 288 | 1.3118 | - | - |
| 1.7294 | 294 | 1.6211 | - | - |
| 1.7647 | 300 | 1.3294 | - | - |
| 1.8 | 306 | 2.2436 | - | - |
| 1.8353 | 312 | 1.6333 | - | - |
| 1.8706 | 318 | 1.6046 | - | - |
| 1.9059 | 324 | 1.5298 | - | - |
| 1.9412 | 330 | 1.7025 | - | - |
| 1.9765 | 336 | 1.4742 | - | - |
| 2.0 | 340 | - | 1.5898 | 0.9664 |
| 2.0118 | 342 | 1.5415 | - | - |
| 2.0471 | 348 | 1.1568 | - | - |
| 2.0824 | 354 | 1.3209 | - | - |
| 2.1176 | 360 | 1.2234 | - | - |
| 2.1529 | 366 | 1.7336 | - | - |
| 2.1882 | 372 | 1.382 | - | - |
| 2.2235 | 378 | 1.665 | - | - |
| 2.2588 | 384 | 1.2707 | - | - |
| 2.2941 | 390 | 1.1796 | - | - |
| 2.3294 | 396 | 1.6894 | - | - |
| 2.3647 | 402 | 1.06 | - | - |
| 2.4 | 408 | 1.0879 | - | - |
| 2.4353 | 414 | 1.2806 | - | - |
| 2.4706 | 420 | 1.6574 | - | - |
| 2.5059 | 426 | 1.5029 | - | - |
| 2.5412 | 432 | 1.3803 | - | - |
| 2.5765 | 438 | 1.2059 | - | - |
| 2.6118 | 444 | 1.7823 | - | - |
| 2.6471 | 450 | 1.2976 | - | - |
| 2.6824 | 456 | 1.6891 | - | - |
| 2.7176 | 462 | 0.9401 | - | - |
| 2.7529 | 468 | 1.1141 | - | - |
| 2.7882 | 474 | 1.1229 | - | - |
| 2.8235 | 480 | 1.137 | - | - |
| 2.8588 | 486 | 1.5186 | - | - |
| 2.8941 | 492 | 1.4301 | - | - |
| 2.9294 | 498 | 1.4644 | - | - |
| 2.9647 | 504 | 0.9985 | - | - |
| 3.0 | 510 | 0.6255 | 1.5778 | 0.9647 |
@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",
}
<!--
## 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.*
-->