Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: XLMRobertaModel
(1): Pooling({'word_embedding_dimension': 1024, '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()
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("mik3ml/multilingual-e5-large-ita")
5# Run inference
6sentences = [
7 "Precipitine sieriche contro i microbi nel fieno ammuffito rispetto all'età, al sesso, all'atopia e al fumo degli agricoltori.Questo studio si è basato su un campione di 3.065 agricoltori su una popolazione più ampia di 12.056 agricoltori finlandesi. I dati sono stati raccolti in un'indagine postale condotta dall'Istituto di previdenza sociale della Finlandia. Campioni di siero per la determinazione degli anticorpi precipitanti sono stati prelevati presso i centri sanitari locali. Le precipitazioni sono state determinate con il metodo della micropiastra diffusione immunitaria. Il pannello dell'antigene era costituito da antigeni miceliali di Micropolyspora faeni, Thermoactinomyces vulgaris, Aspergillus fumigatus e Aspergillus umbrosus. Precipitine a uno qualsiasi dei quattro microbi sono state rilevate nell'8,6% dei sieri. Le cause più comuni di test di precipitina positivi erano Aspergillus umbrosus e Thermoactinomyces vulgaris, che concorda con i risultati precedenti riportati dalla Finlandia In generale, le precipitine erano più prevalenti tra le donne, il che corrisponde alle tradizioni culturali locali e negli agricoltori più anziani. La prevalenza delle precipitine non differiva tra i soggetti non atopici e atopici (definiti come coesistenza passata o presente di dermatite atopica inclusi eczema infantile e/o febbre da fieno o altre riniti allergiche). Al contrario, la prevalenza delle precipitine era circa 1,5-2 volte maggiore tra i non fumatori rispetto ai fumatori, il che conferma i risultati dei rapporti precedenti. Negli studi futuri sulla presenza di precipitine, i dati dovrebbero essere controllati rispetto all'età, al sesso e al fumo. ",
8 'Quali sono i quattro microbi che sono stati utilizzati per la determinazione delle precipitine nel siero degli agricoltori?',
9 'Le strutture tricline delle proteine bovine a basso pH e ovine ad alto pH sono simili nonostante la transizione conformazionale pH-dipendente delle proteine bovina e suina?',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 1024]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]dim_1024, dim_768, dim_512, dim_256, dim_128 and dim_64InformationRetrievalEvaluator| Metric | dim_1024 | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
|---|---|---|---|---|---|---|
| cosine_accuracy@1 | 0.7948 | 0.7928 | 0.7922 | 0.7871 | 0.7779 | 0.7548 |
| cosine_accuracy@3 | 0.9205 | 0.9199 | 0.9188 | 0.9129 | 0.9046 | 0.8832 |
| cosine_accuracy@5 | 0.9347 | 0.9341 | 0.9316 | 0.9268 | 0.9178 | 0.8993 |
| cosine_accuracy@10 | 0.9474 | 0.9466 | 0.9447 | 0.9414 | 0.9329 | 0.918 |
| cosine_precision@1 | 0.7948 | 0.7928 | 0.7922 | 0.7871 | 0.7779 | 0.7548 |
| cosine_precision@3 | 0.3068 | 0.3066 | 0.3063 | 0.3043 | 0.3015 | 0.2944 |
| cosine_precision@5 | 0.1869 | 0.1868 | 0.1863 | 0.1854 | 0.1836 | 0.1799 |
| cosine_precision@10 | 0.0947 | 0.0947 | 0.0945 | 0.0941 | 0.0933 | 0.0918 |
| cosine_recall@1 | 0.7948 | 0.7928 | 0.7922 | 0.7871 | 0.7779 | 0.7548 |
| cosine_recall@3 | 0.9205 | 0.9199 | 0.9188 | 0.9129 | 0.9046 | 0.8832 |
| cosine_recall@5 | 0.9347 | 0.9341 | 0.9316 | 0.9268 | 0.9178 | 0.8993 |
| cosine_recall@10 | 0.9474 | 0.9466 | 0.9447 | 0.9414 | 0.9329 | 0.918 |
| cosine_ndcg@10 | 0.8818 | 0.8805 | 0.8793 | 0.8747 | 0.8658 | 0.8459 |
| cosine_mrr@10 | 0.8597 | 0.8582 | 0.8572 | 0.8522 | 0.8432 | 0.8219 |
| cosine_map@100 | 0.8611 | 0.8596 | 0.8586 | 0.8537 | 0.8449 | 0.8238 |
positive and anchor| positive | anchor | |
|---|---|---|
| type | string | string |
| details |
|
|
| positive | anchor |
|---|---|
Thomas Poulsen[object Object][object Object][object Object]Palmarès[object Object][object Object]Olimpiadi[object Object]1 medaglia:[object Object]1 oro ( nel 4 senza pesi leggeri)[object Object][object Object]Collegamenti esterni | In quale categoria ha vinto la sua unica medaglia olimpica? |
Porta di Saint Denis[object Object]La porta di Saint Denis (porte Saint-Denis in francese) è un arco di trionfo situato nel X arrondissement di Parigi, costruito nel 1672 su progetto dall'architetto François Blondel, in onore del re Luigi XIV. [object Object]È uno dei monumenti più rappresentativi dell'arte ufficiale della sua epoca, secondo tutte le antologie.[object Object][object Object]Storia[object Object][object Object]Con l'espansione urbanistica di Parigi, la cinta muraria di Carlo V del XIV secolo fu sostituita da una barriera affiancata da un viale alberato (boulevard): le porte trionfali prendono, quindi, il posto di quelle fortificate del Medioevo.[object Object][object Object]La porta di Saint-Denis fu eretta nel 1672, sulla base del progetto di François Blondel, direttore dell'Accademia reale dell'architettura, e dello scultore Michel Anguier su commissione del re Luigi XIV, per celebrare le sue vittorie lungo il Reno, in Franca Contea e nei dintorni della città.[object Object][object Object]La porta fu costruita al di sopra di un bastione del secolo precedente, in sostituzione di una porta medievale, e si tr... | Quali elementi architettonici e decorativi sono presenti nell'arco di trionfo di Saint Denis? |
Provincia di Venezia[object Object]La provincia di Venezia (provincia de Venesia in veneto, provincie di Vignesie in friulano) è stata una provincia italiana del Veneto, sostituita nel 2015 dall'omonima città metropolitana. Storia La provincia fu creata nel 1866, col passaggio all'Italia del Veneto in seguito alla Terza Guerra d'Indipendenza, sostituendo l'omonimo ente amministrativo austriaco. Quest'ultimo aveva a sua volta sostituito il Dipartimento dell'Adriatico napoleonico, che, a differenza delle successive suddivisioni amministrative, comprendeva anche i cantoni friulani (suddivisione amministrativa francese equivalente al mandamento) di Aquileia, Latisana e Portogruaro. Le prime elezioni provinciali si tennero il 23 dicembre 1866. Geografia fisica La provincia di Venezia era sostanzialmente una realtà eterogenea, che univa all'interno di un unico territorio più circondari: Venezia, Chioggia, Cavarzere e Cona, Riviera del Brenta, Miranese, Sandonatese, Portogruarese. La provincia confinava co... | Chi sostituì l'omonimo ente amministrativo austriaco? |
MatryoshkaLoss with these parameters:
1{
2 "loss": "MultipleNegativesRankingLoss",
3 "matryoshka_dims": [
4 1024,
5 768,
6 512,
7 256,
8 128,
9 64
10 ],
11 "matryoshka_weights": [
12 1,
13 1,
14 1,
15 1,
16 1,
17 1
18 ],
19 "n_dims_per_step": -1
20}eval_strategy: epochper_device_train_batch_size: 32per_device_eval_batch_size: 16gradient_accumulation_steps: 16learning_rate: 2e-05lr_scheduler_type: cosinewarmup_ratio: 0.1bf16: Truetf32: Trueload_best_model_at_end: Trueoptim: adamw_torch_fusedbatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 32per_device_eval_batch_size: 16per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 16eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08max_grad_norm: 1.0num_train_epochs: 3max_steps: -1lr_scheduler_type: cosinelr_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: Truefp16: Falsefp16_opt_level: O1half_precision_backend: autobf16_full_eval: Falsefp16_full_eval: Falsetf32: Truelocal_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_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: Falsehub_always_push: Falsegradient_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: Nonedispatch_batches: Nonesplit_batches: Noneinclude_tokens_per_second: Falseinclude_num_input_tokens_seen: Falseneftune_noise_alpha: Noneoptim_target_modules: Nonebatch_eval_metrics: Falseeval_on_start: Falseuse_liger_kernel: Falseeval_use_gather_object: Falseprompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | dim_1024_cosine_ndcg@10 | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
|---|---|---|---|---|---|---|---|---|
| 0.0281 | 10 | 136.2519 | - | - | - | - | - | - |
| 0.0562 | 20 | 93.5635 | - | - | - | - | - | - |
| 0.0843 | 30 | 39.1184 | - | - | - | - | - | - |
| 0.1124 | 40 | 19.4777 | - | - | - | - | - | - |
| 0.1405 | 50 | 10.0755 | - | - | - | - | - | - |
| 0.1686 | 60 | 7.4115 | - | - | - | - | - | - |
| 0.1967 | 70 | 5.8366 | - | - | - | - | - | - |
| 0.2248 | 80 | 5.6908 | - | - | - | - | - | - |
| 0.2529 | 90 | 5.6481 | - | - | - | - | - | - |
| 0.2809 | 100 | 4.8332 | - | - | - | - | - | - |
| 0.3090 | 110 | 5.2106 | - | - | - | - | - | - |
| 0.3371 | 120 | 5.2924 | - | - | - | - | - | - |
| 0.3652 | 130 | 4.2509 | - | - | - | - | - | - |
| 0.3933 | 140 | 4.0525 | - | - | - | - | - | - |
| 0.4214 | 150 | 3.7339 | - | - | - | - | - | - |
| 0.4495 | 160 | 3.4459 | - | - | - | - | - | - |
| 0.4776 | 170 | 3.4454 | - | - | - | - | - | - |
| 0.5057 | 180 | 3.5051 | - | - | - | - | - | - |
| 0.5338 | 190 | 3.1434 | - | - | - | - | - | - |
| 0.5619 | 200 | 3.4567 | - | - | - | - | - | - |
| 0.5900 | 210 | 3.7854 | - | - | - | - | - | - |
| 0.6181 | 220 | 3.7576 | - | - | - | - | - | - |
| 0.6462 | 230 | 3.2254 | - | - | - | - | - | - |
| 0.6743 | 240 | 3.5808 | - | - | - | - | - | - |
| 0.7024 | 250 | 3.7216 | - | - | - | - | - | - |
| 0.7305 | 260 | 2.9924 | - | - | - | - | - | - |
| 0.7586 | 270 | 3.4136 | - | - | - | - | - | - |
| 0.7867 | 280 | 3.4912 | - | - | - | - | - | - |
| 0.8147 | 290 | 3.1589 | - | - | - | - | - | - |
| 0.8428 | 300 | 3.1169 | - | - | - | - | - | - |
| 0.8709 | 310 | 3.2492 | - | - | - | - | - | - |
| 0.8990 | 320 | 3.0045 | - | - | - | - | - | - |
| 0.9271 | 330 | 3.424 | - | - | - | - | - | - |
| 0.9552 | 340 | 3.0119 | - | - | - | - | - | - |
| 0.9833 | 350 | 2.8333 | - | - | - | - | - | - |
| 0.9974 | 355 | - | 0.8821 | 0.8805 | 0.8795 | 0.8720 | 0.8617 | 0.8327 |
| 1.0114 | 360 | 3.1381 | - | - | - | - | - | - |
| 1.0395 | 370 | 2.7908 | - | - | - | - | - | - |
| 1.0676 | 380 | 2.5703 | - | - | - | - | - | - |
| 1.0957 | 390 | 2.5087 | - | - | - | - | - | - |
| 1.1238 | 400 | 2.3044 | - | - | - | - | - | - |
| 1.1519 | 410 | 2.0035 | - | - | - | - | - | - |
| 1.1800 | 420 | 1.8526 | - | - | - | - | - | - |
| 1.2081 | 430 | 1.8608 | - | - | - | - | - | - |
| 1.2362 | 440 | 1.6593 | - | - | - | - | - | - |
| 1.2643 | 450 | 1.8343 | - | - | - | - | - | - |
| 1.2924 | 460 | 1.4608 | - | - | - | - | - | - |
| 1.3205 | 470 | 1.4987 | - | - | - | - | - | - |
| 1.3486 | 480 | 1.4047 | - | - | - | - | - | - |
| 1.3766 | 490 | 1.449 | - | - | - | - | - | - |
| 1.4047 | 500 | 1.2679 | - | - | - | - | - | - |
| 1.4328 | 510 | 1.3128 | - | - | - | - | - | - |
| 1.4609 | 520 | 1.1416 | - | - | - | - | - | - |
| 1.4890 | 530 | 1.1702 | - | - | - | - | - | - |
| 1.5171 | 540 | 0.875 | - | - | - | - | - | - |
| 1.5452 | 550 | 1.1781 | - | - | - | - | - | - |
| 1.5733 | 560 | 1.2128 | - | - | - | - | - | - |
| 1.6014 | 570 | 1.407 | - | - | - | - | - | - |
| 1.6295 | 580 | 1.0243 | - | - | - | - | - | - |
| 1.6576 | 590 | 1.2503 | - | - | - | - | - | - |
| 1.6857 | 600 | 1.1823 | - | - | - | - | - | - |
| 1.7138 | 610 | 0.9505 | - | - | - | - | - | - |
| 1.7419 | 620 | 1.1575 | - | - | - | - | - | - |
| 1.7700 | 630 | 1.1425 | - | - | - | - | - | - |
| 1.7981 | 640 | 1.2302 | - | - | - | - | - | - |
| 1.8262 | 650 | 1.2546 | - | - | - | - | - | - |
| 1.8543 | 660 | 1.1812 | - | - | - | - | - | - |
| 1.8824 | 670 | 1.2926 | - | - | - | - | - | - |
| 1.9104 | 680 | 1.2066 | - | - | - | - | - | - |
| 1.9385 | 690 | 1.2115 | - | - | - | - | - | - |
| 1.9666 | 700 | 1.0249 | - | - | - | - | - | - |
| 1.9947 | 710 | 1.1983 | - | - | - | - | - | - |
| 1.9975 | 711 | - | 0.8836 | 0.8823 | 0.8805 | 0.8752 | 0.8661 | 0.8446 |
| 2.0228 | 720 | 0.9967 | - | - | - | - | - | - |
| 2.0509 | 730 | 1.0107 | - | - | - | - | - | - |
| 2.0790 | 740 | 0.9413 | - | - | - | - | - | - |
| 2.1071 | 750 | 0.925 | - | - | - | - | - | - |
| 2.1352 | 760 | 0.5456 | - | - | - | - | - | - |
| 2.1633 | 770 | 0.6579 | - | - | - | - | - | - |
| 2.1914 | 780 | 0.6707 | - | - | - | - | - | - |
| 2.2195 | 790 | 0.6353 | - | - | - | - | - | - |
| 2.2476 | 800 | 0.5963 | - | - | - | - | - | - |
| 2.2757 | 810 | 0.6415 | - | - | - | - | - | - |
| 2.3038 | 820 | 0.5406 | - | - | - | - | - | - |
| 2.3319 | 830 | 0.6237 | - | - | - | - | - | - |
| 2.3600 | 840 | 0.624 | - | - | - | - | - | - |
| 2.3881 | 850 | 0.6492 | - | - | - | - | - | - |
| 2.4162 | 860 | 0.5391 | - | - | - | - | - | - |
| 2.4442 | 870 | 0.5127 | - | - | - | - | - | - |
| 2.4723 | 880 | 0.4845 | - | - | - | - | - | - |
| 2.5004 | 890 | 0.4985 | - | - | - | - | - | - |
| 2.5285 | 900 | 0.3705 | - | - | - | - | - | - |
| 2.5566 | 910 | 0.6361 | - | - | - | - | - | - |
| 2.5847 | 920 | 0.5917 | - | - | - | - | - | - |
| 2.6128 | 930 | 0.7143 | - | - | - | - | - | - |
| 2.6409 | 940 | 0.4301 | - | - | - | - | - | - |
| 2.6690 | 950 | 0.596 | - | - | - | - | - | - |
| 2.6971 | 960 | 0.5491 | - | - | - | - | - | - |
| 2.7252 | 970 | 0.4395 | - | - | - | - | - | - |
| 2.7533 | 980 | 0.5665 | - | - | - | - | - | - |
| 2.7814 | 990 | 0.6238 | - | - | - | - | - | - |
| 2.8095 | 1000 | 0.673 | - | - | - | - | - | - |
| 2.8376 | 1010 | 0.6221 | - | - | - | - | - | - |
| 2.8657 | 1020 | 0.8164 | - | - | - | - | - | - |
| 2.8938 | 1030 | 0.6686 | - | - | - | - | - | - |
| 2.9219 | 1040 | 0.8187 | - | - | - | - | - | - |
| 2.9500 | 1050 | 0.5303 | - | - | - | - | - | - |
| 2.9781 | 1060 | 0.6483 | - | - | - | - | - | - |
| 2.9921 | 1065 | - | 0.8818 | 0.8805 | 0.8793 | 0.8747 | 0.8658 | 0.8459 |
1@inproceedings{reimers-2019-sentence-bert,
2 title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
3 author = "Reimers, Nils and Gurevych, Iryna",
4 booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
5 month = "11",
6 year = "2019",
7 publisher = "Association for Computational Linguistics",
8 url = "https://arxiv.org/abs/1908.10084",
9}1@misc{kusupati2024matryoshka,
2 title={Matryoshka Representation Learning},
3 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},
4 year={2024},
5 eprint={2205.13147},
6 archivePrefix={arXiv},
7 primaryClass={cs.LG}
8}1@misc{henderson2017efficient,
2 title={Efficient Natural Language Response Suggestion for Smart Reply},
3 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},
4 year={2017},
5 eprint={1705.00652},
6 archivePrefix={arXiv},
7 primaryClass={cs.CL}
8}