SentenceTransformer based on intfloat/multilingual-e5-large
This is a sentence-transformers model finetuned from intfloat/multilingual-e5-large on the q2q_data and q2p_data datasets. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
Model Details
Model Description
- Model Type: Sentence Transformer
- Base model: intfloat/multilingual-e5-large
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 1024 dimensions
- Similarity Function: Cosine Similarity
- Training Datasets:
Model Sources
Full Model Architecture
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()
)
Usage
Direct Usage (Sentence Transformers)
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
model = SentenceTransformer("George2002/sledopyt_embedder")
sentences = [
'query: Кто отвечает за подтверждение замены владельца номинального счета?',
'query: Кто должен дать согласие на смену владельца номинального счета?',
'query: Какой документ требуется для подтверждения личности клиента при смене владельца номинального счета?',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
Training Details
Training Datasets
q2q_data
q2p_data
Evaluation Datasets
q2q_data
q2p_data
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy: steps
per_device_train_batch_size: 36
learning_rate: 1e-05
weight_decay: 0.01
num_train_epochs: 2
warmup_ratio: 0.1
load_best_model_at_end: True
push_to_hub: True
hub_model_id: George2002/sledopyt_embedder
hub_strategy: end
All Hyperparameters
Click to expand
overwrite_output_dir: False
do_predict: False
eval_strategy: steps
prediction_loss_only: True
per_device_train_batch_size: 36
per_device_eval_batch_size: 8
per_gpu_train_batch_size: None
per_gpu_eval_batch_size: None
gradient_accumulation_steps: 1
eval_accumulation_steps: None
torch_empty_cache_steps: None
learning_rate: 1e-05
weight_decay: 0.01
adam_beta1: 0.9
adam_beta2: 0.999
adam_epsilon: 1e-08
max_grad_norm: 1.0
num_train_epochs: 2
max_steps: -1
lr_scheduler_type: linear
lr_scheduler_kwargs: {}
warmup_ratio: 0.1
warmup_steps: 0
log_level: passive
log_level_replica: warning
log_on_each_node: True
logging_nan_inf_filter: True
save_safetensors: True
save_on_each_node: False
save_only_model: False
restore_callback_states_from_checkpoint: False
no_cuda: False
use_cpu: False
use_mps_device: False
seed: 42
data_seed: None
jit_mode_eval: False
use_ipex: False
bf16: False
fp16: False
fp16_opt_level: O1
half_precision_backend: auto
bf16_full_eval: False
fp16_full_eval: False
tf32: None
local_rank: 0
ddp_backend: None
tpu_num_cores: None
tpu_metrics_debug: False
debug: []
dataloader_drop_last: True
dataloader_num_workers: 0
dataloader_prefetch_factor: None
past_index: -1
disable_tqdm: False
remove_unused_columns: True
label_names: None
load_best_model_at_end: True
ignore_data_skip: False
fsdp: []
fsdp_min_num_params: 0
fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
tp_size: 0
fsdp_transformer_layer_cls_to_wrap: None
accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
deepspeed: None
label_smoothing_factor: 0.0
optim: adamw_torch
optim_args: None
adafactor: False
group_by_length: False
length_column_name: length
ddp_find_unused_parameters: None
ddp_bucket_cap_mb: None
ddp_broadcast_buffers: False
dataloader_pin_memory: True
dataloader_persistent_workers: False
skip_memory_metrics: True
use_legacy_prediction_loop: False
push_to_hub: True
resume_from_checkpoint: None
hub_model_id: George2002/sledopyt_embedder
hub_strategy: end
hub_private_repo: None
hub_always_push: False
gradient_checkpointing: False
gradient_checkpointing_kwargs: None
include_inputs_for_metrics: False
include_for_metrics: []
eval_do_concat_batches: True
fp16_backend: auto
push_to_hub_model_id: None
push_to_hub_organization: None
mp_parameters:
auto_find_batch_size: False
full_determinism: False
torchdynamo: None
ray_scope: last
ddp_timeout: 1800
torch_compile: False
torch_compile_backend: None
torch_compile_mode: None
include_tokens_per_second: False
include_num_input_tokens_seen: False
neftune_noise_alpha: None
optim_target_modules: None
batch_eval_metrics: False
eval_on_start: False
use_liger_kernel: False
eval_use_gather_object: False
average_tokens_across_devices: False
prompts: None
batch_sampler: batch_sampler
multi_dataset_batch_sampler: proportional
Training Logs
Click to expand
| Epoch |
Step |
Training Loss |
q2q data loss |
q2p data loss |
| 0.0175 |
10 |
4.957 |
- |
- |
| 0.0351 |
20 |
4.9467 |
- |
- |
| 0.0526 |
30 |
4.9452 |
- |
- |
| 0.0702 |
40 |
4.9325 |
- |
- |
| 0.0877 |
50 |
4.9056 |
4.8804 |
4.9222 |
| 0.1053 |
60 |
4.9041 |
- |
- |
| 0.1228 |
70 |
4.8866 |
- |
- |
| 0.1404 |
80 |
4.844 |
- |
- |
| 0.1579 |
90 |
4.8064 |
- |
- |
| 0.1754 |
100 |
4.8182 |
4.7243 |
4.8660 |
| 0.1930 |
110 |
4.7791 |
- |
- |
| 0.2105 |
120 |
4.7659 |
- |
- |
| 0.2281 |
130 |
4.7572 |
- |
- |
| 0.2456 |
140 |
4.7234 |
- |
- |
| 0.2632 |
150 |
4.726 |
4.6268 |
4.8712 |
| 0.2807 |
160 |
4.6932 |
- |
- |
| 0.2982 |
170 |
4.6654 |
- |
- |
| 0.3158 |
180 |
4.6776 |
- |
- |
| 0.3333 |
190 |
4.6617 |
- |
- |
| 0.3509 |
200 |
4.6928 |
4.5581 |
4.8814 |
| 0.3684 |
210 |
4.6497 |
- |
- |
| 0.3860 |
220 |
4.677 |
- |
- |
| 0.4035 |
230 |
4.6344 |
- |
- |
| 0.4211 |
240 |
4.6612 |
- |
- |
| 0.4386 |
250 |
4.6274 |
4.5154 |
4.8396 |
| 0.4561 |
260 |
4.6556 |
- |
- |
| 0.4737 |
270 |
4.6382 |
- |
- |
| 0.4912 |
280 |
4.6053 |
- |
- |
| 0.5088 |
290 |
4.6131 |
- |
- |
| 0.5263 |
300 |
4.6453 |
4.4957 |
4.8314 |
| 0.5439 |
310 |
4.5819 |
- |
- |
| 0.5614 |
320 |
4.5948 |
- |
- |
| 0.5789 |
330 |
4.5288 |
- |
- |
| 0.5965 |
340 |
4.6152 |
- |
- |
| 0.6140 |
350 |
4.5831 |
4.4657 |
4.7953 |
| 0.6316 |
360 |
4.5507 |
- |
- |
| 0.6491 |
370 |
4.5718 |
- |
- |
| 0.6667 |
380 |
4.6269 |
- |
- |
| 0.6842 |
390 |
4.6017 |
- |
- |
| 0.7018 |
400 |
4.5155 |
4.4396 |
4.7694 |
| 0.7193 |
410 |
4.5055 |
- |
- |
| 0.7368 |
420 |
4.534 |
- |
- |
| 0.7544 |
430 |
4.5358 |
- |
- |
| 0.7719 |
440 |
4.5443 |
- |
- |
| 0.7895 |
450 |
4.5309 |
4.4183 |
4.7751 |
| 0.8070 |
460 |
4.5952 |
- |
- |
| 0.8246 |
470 |
4.5561 |
- |
- |
| 0.8421 |
480 |
4.5191 |
- |
- |
| 0.8596 |
490 |
4.5066 |
- |
- |
| 0.8772 |
500 |
4.4875 |
4.4138 |
4.8195 |
| 0.8947 |
510 |
4.5051 |
- |
- |
| 0.9123 |
520 |
4.4872 |
- |
- |
| 0.9298 |
530 |
4.4918 |
- |
- |
| 0.9474 |
540 |
4.5357 |
- |
- |
| 0.9649 |
550 |
4.4898 |
4.3754 |
4.7799 |
| 0.9825 |
560 |
4.5742 |
- |
- |
| 1.0 |
570 |
4.5461 |
- |
- |
| 1.0175 |
580 |
4.5505 |
- |
- |
| 1.0351 |
590 |
4.5027 |
- |
- |
| 1.0526 |
600 |
4.5747 |
4.4060 |
4.7915 |
| 1.0702 |
610 |
4.5296 |
- |
- |
| 1.0877 |
620 |
4.4262 |
- |
- |
| 1.1053 |
630 |
4.5415 |
- |
- |
| 1.1228 |
640 |
4.5386 |
- |
- |
| 1.1404 |
650 |
4.4552 |
4.3632 |
4.8105 |
| 1.1579 |
660 |
4.4473 |
- |
- |
| 1.1754 |
670 |
4.5069 |
- |
- |
| 1.1930 |
680 |
4.5129 |
- |
- |
| 1.2105 |
690 |
4.4611 |
- |
- |
| 1.2281 |
700 |
4.5104 |
4.3530 |
4.7875 |
| 1.2456 |
710 |
4.4742 |
- |
- |
| 1.2632 |
720 |
4.4887 |
- |
- |
| 1.2807 |
730 |
4.406 |
- |
- |
| 1.2982 |
740 |
4.4049 |
- |
- |
| 1.3158 |
750 |
4.4165 |
4.3484 |
4.7866 |
| 1.3333 |
760 |
4.4274 |
- |
- |
| 1.3509 |
770 |
4.4855 |
- |
- |
| 1.3684 |
780 |
4.4571 |
- |
- |
| 1.3860 |
790 |
4.4307 |
- |
- |
| 1.4035 |
800 |
4.4387 |
4.3450 |
4.7628 |
| 1.4211 |
810 |
4.4592 |
- |
- |
| 1.4386 |
820 |
4.4368 |
- |
- |
| 1.4561 |
830 |
4.4863 |
- |
- |
| 1.4737 |
840 |
4.463 |
- |
- |
| 1.4912 |
850 |
4.4113 |
4.3252 |
4.7610 |
| 1.5088 |
860 |
4.4368 |
- |
- |
| 1.5263 |
870 |
4.4738 |
- |
- |
| 1.5439 |
880 |
4.4195 |
- |
- |
| 1.5614 |
890 |
4.4478 |
- |
- |
| 1.5789 |
900 |
4.3849 |
4.3140 |
4.7519 |
| 1.5965 |
910 |
4.4896 |
- |
- |
| 1.6140 |
920 |
4.4301 |
- |
- |
| 1.6316 |
930 |
4.4142 |
- |
- |
| 1.6491 |
940 |
4.4582 |
- |
- |
| 1.6667 |
950 |
4.5075 |
4.3189 |
4.7259 |
| 1.6842 |
960 |
4.4454 |
- |
- |
| 1.7018 |
970 |
4.3547 |
- |
- |
| 1.7193 |
980 |
4.4016 |
- |
- |
| 1.7368 |
990 |
4.4064 |
- |
- |
| 1.7544 |
1000 |
4.4356 |
4.3151 |
4.7276 |
| 1.7719 |
1010 |
4.4105 |
- |
- |
| 1.7895 |
1020 |
4.4067 |
- |
- |
| 1.8070 |
1030 |
4.4296 |
- |
- |
| 1.8246 |
1040 |
4.4147 |
- |
- |
| 1.8421 |
1050 |
4.3743 |
4.3136 |
4.7182 |
| 1.8596 |
1060 |
4.4065 |
- |
- |
| 1.8772 |
1070 |
4.4025 |
- |
- |
| 1.8947 |
1080 |
4.3912 |
- |
- |
| 1.9123 |
1090 |
4.3731 |
- |
- |
| 1.9298 |
1100 |
4.3817 |
4.3120 |
4.7357 |
| 1.9474 |
1110 |
4.4305 |
- |
- |
| 1.9649 |
1120 |
4.3914 |
- |
- |
| 1.9825 |
1130 |
4.4753 |
- |
- |
| 2.0 |
1140 |
4.4536 |
- |
- |
Framework Versions
- Python: 3.10.12
- Sentence Transformers: 4.1.0
- Transformers: 4.51.3
- PyTorch: 2.6.0+cu124
- Accelerate: 1.6.0
- Datasets: 3.5.0
- Tokenizers: 0.21.1
Citation
BibTeX
Sentence Transformers
@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",
}
TripletLoss
@misc{hermans2017defense,
title={In Defense of the Triplet Loss for Person Re-Identification},
author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
year={2017},
eprint={1703.07737},
archivePrefix={arXiv},
primaryClass={cs.CV}
}