Views
No views yet
SentenceTransformer(
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': '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})
)pip install -U sentence-transformers1from sentence_transformers import SentenceTransformer
2
3# Download from the 🤗 Hub
4model = SentenceTransformer("BjarneNPO-28_08_2025_14_24_44")
5# Run inference
6queries = [
7 "Ein Vater taucht nicht auf bei den Eltern im Elternbeirat \r\n\r\nAu\u00dferdem auf die Kinder mit archivierten Angeh\u00f6rigen hingewiesen und ihr gezeigt",
8]
9documents = [
10 'Weil er keinen Zugang zur EAPP hat, Außerdem auf die Kinder mit archivierten Angehörigen hingewiesen und ihr gezeigt wie sie das lösen kann',
11 '1. Vorlage da. Userin auch gezeigt wie sie die verwanden kann\r\n2. Als Wunsch weitergegeben.',
12 'In der Kinderliste haben Kinder gefehlt. Userin muss die Daten in der Kinderliste hinterlegen.',
13]
14query_embeddings = model.encode_query(queries)
15document_embeddings = model.encode_document(documents)
16print(query_embeddings.shape, document_embeddings.shape)
17# [1, 768] [3, 768]
18
19# Get the similarity scores for the embeddings
20similarities = model.similarity(query_embeddings, document_embeddings)
21print(similarities)
22# tensor([[0.6628, 0.3829, 0.0100]])sentence-transformers/paraphrase-multilingual-mpnet-base-v2scripts.InformationRetrievalEvaluatorCustom.InformationRetrievalEvaluatorCustom with these parameters:
1{
2 "query_prompt_name": "query",
3 "corpus_prompt_name": "document"
4}| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.2754 |
| cosine_accuracy@3 | 0.5217 |
| cosine_accuracy@5 | 0.6667 |
| cosine_accuracy@10 | 0.7681 |
| cosine_precision@1 | 0.2754 |
| cosine_precision@3 | 0.2802 |
| cosine_precision@5 | 0.2783 |
| cosine_precision@10 | 0.1841 |
| cosine_recall@1 | 0.0194 |
| cosine_recall@3 | 0.069 |
| cosine_recall@5 | 0.1134 |
| cosine_recall@10 | 0.1489 |
| cosine_ndcg@10 | 0.2296 |
| cosine_mrr@10 | 0.4312 |
| cosine_map@100 | 0.1275 |
query and answer| query | answer | |
|---|---|---|
| type | string | string |
| details |
|
|
| query | answer |
|---|---|
Nun ist die Monatsmeldung erfolgt, aber rote Ausrufezeichen tauchen auf. | Userin an das JA verwiesen, diese müssten ihr die Schloss-Monate zur Überarbeitung im Kibiz.web zurückgeben. Userin dazu empfohlen, die Kinder die nicht in kitaplus sind, aber in Kibiz.web - im KiBiz.web zu entfernen, wenn diese nicht vorhanden sind. |
Die Feiertage in den Stammdaten stimmen nicht. | Es besteht bereits ein Ticket dafür. |
Abrechnung kann nicht final freigegeben werden, es wird aber keiner Fehlermeldung angeziegt | im Hintergrund ist eine Fehlermeldung zu sehen. An Entwickler weitergeleitet. |
Korrektur vorgenommen. |
MultipleNegativesRankingLoss with these parameters:
1{
2 "scale": 20.0,
3 "similarity_fct": "cos_sim",
4 "gather_across_devices": false
5}eval_strategy: epochper_device_train_batch_size: 64per_device_eval_batch_size: 64gradient_accumulation_steps: 4learning_rate: 4e-05weight_decay: 0.01lr_scheduler_type: cosinewarmup_ratio: 0.08bf16: Truetf32: Trueload_best_model_at_end: Truebatch_sampler: no_duplicatesoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 64per_device_eval_batch_size: 64per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 4eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 4e-05weight_decay: 0.01adam_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.08warmup_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: 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: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | sentence-transformers/paraphrase-multilingual-mpnet-base-v2_cosine_ndcg@10 |
|---|---|---|---|
| 0.0354 | 10 | 3.7146 | - |
| 0.0707 | 20 | 3.1473 | - |
| 0.1061 | 30 | 2.6743 | - |
| 0.1415 | 40 | 2.5164 | - |
| 0.1768 | 50 | 2.1779 | - |
| 0.2122 | 60 | 2.0534 | - |
| 0.2476 | 70 | 1.8658 | - |
| 0.2829 | 80 | 1.8049 | - |
| 0.3183 | 90 | 1.6684 | - |
| 0.3537 | 100 | 1.6242 | - |
| 0.3890 | 110 | 1.5781 | - |
| 0.4244 | 120 | 1.5528 | - |
| 0.4598 | 130 | 1.427 | - |
| 0.4951 | 140 | 1.4766 | - |
| 0.5305 | 150 | 1.3835 | - |
| 0.5659 | 160 | 1.3685 | - |
| 0.6012 | 170 | 1.3429 | - |
| 0.6366 | 180 | 1.2879 | - |
| 0.6720 | 190 | 1.2974 | - |
| 0.7073 | 200 | 1.2578 | - |
| 0.7427 | 210 | 1.2634 | - |
| 0.7781 | 220 | 1.3011 | - |
| 0.8134 | 230 | 1.2754 | - |
| 0.8488 | 240 | 1.2179 | - |
| 0.8842 | 250 | 1.2466 | - |
| 0.9195 | 260 | 1.1624 | - |
| 0.9549 | 270 | 1.1831 | - |
| 0.9903 | 280 | 1.1594 | - |
| 1.0 | 283 | - | 0.2322 |
| 1.0248 | 290 | 1.0459 | - |
| 1.0601 | 300 | 1.0137 | - |
| 1.0955 | 310 | 0.9962 | - |
| 1.1309 | 320 | 0.9826 | - |
| 1.1662 | 330 | 0.9434 | - |
| 1.2016 | 340 | 0.9672 | - |
| 1.2370 | 350 | 0.9137 | - |
| 1.2723 | 360 | 0.9586 | - |
| 1.3077 | 370 | 0.9408 | - |
| 1.3431 | 380 | 0.9815 | - |
| 1.3784 | 390 | 0.9025 | - |
| 1.4138 | 400 | 0.9023 | - |
| 1.4492 | 410 | 0.8808 | - |
| 1.4845 | 420 | 0.9326 | - |
| 1.5199 | 430 | 0.9163 | - |
| 1.5553 | 440 | 0.8807 | - |
| 1.5906 | 450 | 0.8349 | - |
| 1.6260 | 460 | 0.9604 | - |
| 1.6614 | 470 | 0.8915 | - |
| 1.6967 | 480 | 0.8873 | - |
| 1.7321 | 490 | 0.8874 | - |
| 1.7675 | 500 | 0.8932 | - |
| 1.8028 | 510 | 0.8566 | - |
| 1.8382 | 520 | 0.8694 | - |
| 1.8736 | 530 | 0.8197 | - |
| 1.9089 | 540 | 0.8025 | - |
| 1.9443 | 550 | 0.7864 | - |
| 1.9797 | 560 | 0.8794 | - |
| 2.0 | 566 | - | 0.2290 |
| 2.0141 | 570 | 0.7807 | - |
| 2.0495 | 580 | 0.6977 | - |
| 2.0849 | 590 | 0.7034 | - |
| 2.1202 | 600 | 0.7111 | - |
| 2.1556 | 610 | 0.692 | - |
| 2.1910 | 620 | 0.6843 | - |
| 2.2263 | 630 | 0.7028 | - |
| 2.2617 | 640 | 0.7518 | - |
| 2.2971 | 650 | 0.6656 | - |
| 2.3324 | 660 | 0.6624 | - |
| 2.3678 | 670 | 0.7195 | - |
| 2.4032 | 680 | 0.6761 | - |
| 2.4385 | 690 | 0.6856 | - |
| 2.4739 | 700 | 0.6699 | - |
| 2.5093 | 710 | 0.7118 | - |
| 2.5447 | 720 | 0.7109 | - |
| 2.5800 | 730 | 0.6991 | - |
| 2.6154 | 740 | 0.6647 | - |
| 2.6508 | 750 | 0.6858 | - |
| 2.6861 | 760 | 0.6901 | - |
| 2.7215 | 770 | 0.6853 | - |
| 2.7569 | 780 | 0.665 | - |
| 2.7922 | 790 | 0.6735 | - |
| 2.8276 | 800 | 0.693 | - |
| 2.8630 | 810 | 0.6761 | - |
| 2.8983 | 820 | 0.7327 | - |
| 2.9337 | 830 | 0.7124 | - |
| 2.9691 | 840 | 0.6774 | - |
| 3.0 | 849 | - | 0.2296 |
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{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}