SentenceTransformer(
(0): Transformer({'max_seq_length': 256, 'do_lower_case': True}) with Transformer model: BertModel
(1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, '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("kagikush/REmatch-BGE-Finetuned")
5# Run inference
6sentences = [
7 'With a modest investment budget below the usual medium range, I am open to using financing or borrowed money if it enhances my chances of quick access to funds and minimizing risks associated with longer lock-ups. Accepting moderate investment risk while aiming for regular income rather than long-term capital growth prioritizes immediate financial stability over potential high returns.',
8 'I have a modest investment budget that is below the usual medium range, making quick access to my funds crucial. I am open to using financing or borrowing money for investments but require strict liquidity to ensure easy withdrawal at any time without penalty. Despite this, I accept moderate risks while aiming to limit the possibility of significant losses. My primary goal is to secure regular income rather than achieve long-term capital growth.',
9 'With a modest investment budget under the medium range, I am open to borrowing funds but require quick access to my investments due to strict liquidity needs. Accepting moderate risks, I aim for long-term capital growth rather than immediate income.',
10]
11embeddings = model.encode(sentences)
12print(embeddings.shape)
13# [3, 768]
14
15# Get the similarity scores for the embeddings
16similarities = model.similarity(embeddings, embeddings)
17print(similarities.shape)
18# [3, 3]rematch-validationTripletEvaluator| Metric | Value |
|---|---|
| cosine_accuracy | 0.9068 |
anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
I currently have a medium-sized budget that allows me to make an informed decision about how to allocate it. I do not plan to borrow money for this investment as I believe I can manage the risks effectively without external assistance. While immediate access is not crucial, I anticipate having enough time to ensure the funds remain accessible when needed. My primary focus lies on achieving a balanced mix of income and potential long-term capital appreciation. | As an investor, I maintain a clear focus on managing my investments effectively. With a well-defined budget that allows me to allocate funds efficiently, I adhere strictly to investing solely with my own capital without resorting to external financing or borrowing. This decision prioritizes transparency and control over my financial decisions. To balance immediate needs with potential future gains, I seek out opportunities that offer both liquidity—access to part of my invested money—and commitment to longer-term objectives. Recognizing the need for prudent risk management, I choose investments that allow for moderate risk assessment while minimizing the likelihood of significant losses. My primary objective is to achieve a balanced approach, ensuring that my investments provide consistent income alongside steady capital appreciation, thus fulfilling my dual goals of generating regular income streams and securing long-term wealth accumulation. | I have a moderate budget and don't plan on using financing. I'm okay with waiting up to a few months before selling investments because liquidity isn't an immediate concern. I'm willing to take on some risk to potentially achieve higher returns, but I still prioritize growth overall. My main goal is to aim for both income and long-term growth. |
I currently have a medium-sized budget that allows me to make an informed decision about how to allocate it. I do not plan to borrow money for this investment as I believe I can manage the risks effectively without external assistance. While immediate access is not crucial, I anticipate having enough time to ensure the funds remain accessible when needed. My primary focus lies on achieving a balanced mix of income and potential long-term capital appreciation. | As an investor, I maintain a clear focus on managing my investments effectively. With a well-defined budget that allows me to allocate funds efficiently, I adhere strictly to investing solely with my own capital without resorting to external financing or borrowing. This decision prioritizes transparency and control over my financial decisions. To balance immediate needs with potential future gains, I seek out opportunities that offer both liquidity—access to part of my invested money—and commitment to longer-term objectives. Recognizing the need for prudent risk management, I choose investments that allow for moderate risk assessment while minimizing the likelihood of significant losses. My primary objective is to achieve a balanced approach, ensuring that my investments provide consistent income alongside steady capital appreciation, thus fulfilling my dual goals of generating regular income streams and securing long-term wealth accumulation. | As an investor, I firmly believe in allocating my resources judiciously. With a clear understanding of my financial situation, I have set a medium-range budget for my investments, ensuring that every dollar counts towards maximizing returns without compromising on quality. By adhering to strict guidelines, I am committed to investing solely with my own funds, avoiding any form of debt or leverage. This approach guarantees immediate liquidity, allowing me to withdraw funds as needed without waiting for extended periods. Recognizing the importance of managing risks, I choose investments that offer both steady income streams and potential for long-term capital appreciation. My primary objective is to balance these two aspects, aiming for consistent earnings alongside sustainable growth over time. |
I have a modest budget that allows me to invest cautiously. Although I'm open to borrowing, quick access to the funds is crucial. Despite this, I'm prepared to take on higher risks to potentially achieve significant returns. My top priority is generating steady income through predictable earnings. | With a modest investment budget below the medium range, I am open to leveraging financing or borrowing to secure quick access to my funds while maintaining strict liquidity requirements. Accepting high levels of investment risk, including substantial volatility and potential large losses, aligns with my primary goal of achieving regular ongoing income over the short term, prioritizing immediate financial stability and security. | With a large and substantial amount of capital at my disposal, I am open to borrowing part of the necessary funds for investments. This flexibility allows me to access the invested money quickly, even if it means waiting a few months before fully committing. My primary goal is to receive regular income rather than achieve long-term capital growth; therefore, I am willing to take on significant investment risks, including substantial volatility and the potential for large losses. |
TripletLoss with these parameters:
1{
2 "distance_metric": "TripletDistanceMetric.COSINE",
3 "triplet_margin": 0.15
4}anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
I have a small investment budget that I plan to manage conservatively. While I'm open to borrowing, I prioritize long-term capital preservation over short-term gains. My strategy focuses on steady returns through prudent investments, ensuring my capital remains secure without needing immediate access. | With a tight budget and limited financial resources, I am open to leveraging financing options to secure long-term investments. Despite this constraint, I prioritize maintaining full control over my funds, ensuring they remain inaccessible for extended periods. Accepting minimal risk, I focus on preserving my initial capital rather than seeking high returns or growth opportunities. This approach underscores my commitment to safeguarding my investments against potential losses while prioritizing the preservation of my original capital above all else. | I have a small, tightly limited investment budget, but I'm open to leveraging financing or borrowing money if necessary. To manage this, I prioritize accessing some of my investments while keeping others fully committed over time. Accepting minimal risks, I focus on preserving my original capital rather than seeking high returns or growth opportunities. |
As a seasoned investor with a medium-range investment budget, I prioritize stability over potential substantial losses. My primary goal is to generate ongoing income rather than pursue long-term growth. While I am willing to borrow funds for my investments, I require quick liquidity due to the need for easy access to capital when required. | As an investor, my available investment budget falls clearly within the medium range, allowing me to consider various opportunities without compromising financial stability. Open to borrowing part of the necessary funds, I prioritize flexibility over strict constraints, enabling quick access to the invested money while maintaining liquidity. Accepting only low investment risk and placing high importance on avoiding large losses, I ensure safety at all costs. My primary goal is to achieve regular ongoing income, recognizing its significance over potential long-term capital growth. | As an investor, I have meticulously allocated my resources within the medium-range budget, ensuring that all investments are made solely with my own funds without resorting to external financing or borrowing. This decision allows me to maintain full control over my financial decisions while also enabling me to manage liquidity effectively—being able to access my invested capital relatively quickly should I need to, yet not be constrained by the need to hold onto it indefinitely. My approach prioritizes minimizing risks, accepting only those that align with low potential for significant loss, thereby safeguarding against substantial setbacks. Additionally, I am committed to securing steady income streams rather than pursuing high-risk ventures aimed at long-term capital appreciation. This disciplined strategy reflects my focus on stability and reliability in my investment choices, aiming to provide consistent returns that meet my primary objective of generating ongoing income. |
As an individual investor who is willing to utilize financing options, I seek easy access to the invested funds for maximum liquidity. With a standard mid-range amount that suits my financial goals, I aim for regular income as my primary objective. Comfortable with balanced risks, I prefer investments that align with this principle while allowing me to manage my portfolio effectively. | I am comfortable with calculated risk while still protecting against major losses, open to borrowing money for the investment, my main objective is ongoing income rather than long-term growth, I may need the invested money back quickly and easy access is essential, and I have a typical medium-sized amount available to invest. | I have a large budget and am willing to use financing options. My primary goal is to earn regular income, and I prioritize having quick access to my funds. While I understand there's some risk involved, I'm comfortable with this because it allows me to take advantage of potential higher returns. |
TripletLoss with these parameters:
1{
2 "distance_metric": "TripletDistanceMetric.COSINE",
3 "triplet_margin": 0.15
4}eval_strategy: epochper_device_train_batch_size: 16per_device_eval_batch_size: 32gradient_accumulation_steps: 2learning_rate: 2e-05weight_decay: 0.01warmup_ratio: 0.1seed: 2026data_seed: 2026fp16: Trueload_best_model_at_end: Trueoverwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_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: 2eval_accumulation_steps: Nonetorch_empty_cache_steps: Nonelearning_rate: 2e-05weight_decay: 0.01adam_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.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: 2026data_seed: 2026jit_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: 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: Falseaverage_tokens_across_devices: Falseprompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportional| Epoch | Step | Training Loss | Validation Loss | rematch-validation_cosine_accuracy |
|---|---|---|---|---|
| 0.0901 | 25 | 0.2747 | - | - |
| 0.1802 | 50 | 0.2523 | - | - |
| 0.2703 | 75 | 0.1823 | - | - |
| 0.3604 | 100 | 0.1659 | - | - |
| 0.4505 | 125 | 0.1459 | - | - |
| 0.5405 | 150 | 0.1361 | - | - |
| 0.6306 | 175 | 0.1251 | - | - |
| 0.7207 | 200 | 0.1169 | - | - |
| 0.8108 | 225 | 0.1098 | - | - |
| 0.9009 | 250 | 0.0994 | - | - |
| 0.9910 | 275 | 0.0975 | - | - |
| 1.0 | 278 | - | 0.0512 | 0.8650 |
| 1.0793 | 300 | 0.0854 | - | - |
| 1.1694 | 325 | 0.0739 | - | - |
| 1.2595 | 350 | 0.0746 | - | - |
| 1.3495 | 375 | 0.0773 | - | - |
| 1.4396 | 400 | 0.0806 | - | - |
| 1.5297 | 425 | 0.0746 | - | - |
| 1.6198 | 450 | 0.0784 | - | - |
| 1.7099 | 475 | 0.0694 | - | - |
| 1.8 | 500 | 0.0669 | - | - |
| 1.8901 | 525 | 0.0629 | - | - |
| 1.9802 | 550 | 0.0708 | - | - |
| 2.0 | 556 | - | 0.0396 | 0.9035 |
| 2.0685 | 575 | 0.0488 | - | - |
| 2.1586 | 600 | 0.0506 | - | - |
| 2.2486 | 625 | 0.0514 | - | - |
| 2.3387 | 650 | 0.0588 | - | - |
| 2.4288 | 675 | 0.057 | - | - |
| 2.5189 | 700 | 0.0548 | - | - |
| 2.6090 | 725 | 0.0505 | - | - |
| 2.6991 | 750 | 0.0544 | - | - |
| 2.7892 | 775 | 0.0503 | - | - |
| 2.8793 | 800 | 0.0531 | - | - |
| 2.9694 | 825 | 0.053 | - | - |
| 2.991 | 831 | - | 0.0381 | 0.9068 |
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{hermans2017defense,
2 title={In Defense of the Triplet Loss for Person Re-Identification},
3 author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
4 year={2017},
5 eprint={1703.07737},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV}
8}