SentenceTransformer based on microsoft/mpnet-base
This is a sentence-transformers model finetuned from microsoft/mpnet-base on the cleaned_negatives dataset. It maps sentences & paragraphs to a 768-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: microsoft/mpnet-base
- Maximum Sequence Length: 512 tokens
- Output Dimensionality: 768 dimensions
- Similarity Function: Cosine Similarity
- Training Dataset:
Model Sources
- Documentation: Sentence Transformers Documentation
- Repository: Sentence Transformers on GitHub
- Hugging Face: Sentence Transformers on Hugging Face
Full Model Architecture
SentenceTransformer(
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'MPNetModel'})
(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})
)
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
# Download from the 🤗 Hub
model = SentenceTransformer("AL3110/mpnet-cleaned-finetuned-triplet")
# Run inference
queries = [
"Under what circumstances might a company choose to decline issuing a detailed job description letter?",
]
documents = [
"* A company might choose to decline issuing a detailed job description letter for several reasons. Firstly, the company may wish to maintain flexibility in defining roles and responsibilities, avoiding the constraints of a formalized document that could limit their ability to adapt job duties as needed. Secondly, they might be concerned about confidentiality, as a detailed job description could reveal sensitive information about the company's operations, strategies, or internal structure. Thirdly, the company may not have a finalized or standardized job description for certain positions, especially in dynamic or rapidly evolving industries where roles are fluid. Lastly, legal or policy considerations might influence the decision, as providing a detailed job description could potentially be used in disputes or claims regarding job expectations or employment contracts. Therefore, the company reserves the right to decline issuing such a letter to protect its interests and maintain operational discretion.",
'* The LifeSolutions Program is a free employee benefit provided by Oracle to assist employees in balancing their work, family, and personal responsibilities. It offers comprehensive resources, including information on topics like alcohol abuse and dependence, through videos, guides, and referrals. Employees can access these resources anonymously via the program’s website, www.liveandworkwell.com, by using Oracle’s specific access code, which is 228485. This anonymity ensures that employees can seek help and information without concerns about privacy.',
"* If you wish to continue working remotely even though your manager has asked you to report to the office, you have several potential options to explore, though the success of each will depend on your company's policies, your role, and your manager's flexibility. First, you can initiate an open and honest conversation with your manager. Explain your reasons for preferring remote work, such as increased productivity, better work-life balance, or personal circumstances. Provide evidence, if possible, like performance metrics or positive feedback from remote work periods, to support your case. Propose a trial period or a hybrid arrangement where you work remotely part-time and come to the office on certain days to demonstrate that remote work does not hinder your performance or team collaboration.\n\nSecond, check your company's policies on remote work. Some organizations have formal processes or guidelines for requesting remote work arrangements. If such a policy exists, follow the outlined steps to make a formal request, ensuring you meet any criteria or provide necessary documentation.\n\nThird, if direct negotiation with your manager or a formal request does not yield the desired outcome, you could explore whether other teams or roles within your organization offer more flexible or fully remote options. If you’re open to a change, discuss potential internal transfers with HR or relevant department heads.\n\nLastly, if none of the above options work and remote work is a non-negotiable priority for you, you might consider looking for remote job opportunities elsewhere. However, this should be a last resort after exhausting internal solutions. Throughout this process, maintain professionalism and focus on how remote work benefits both you and the company, as this approach is more likely to be received positively.",
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 768] [3, 768]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.7901, 0.7954, 0.7818]])
Training Details
Training Dataset
cleaned_negatives
- Dataset: cleaned_negatives at 8fd682f
- Size: 270 training samples
- Columns:
query,answer, andnegative_answer - Approximate statistics based on the first 270 samples:
query answer negative_answer type string string string details - min: 8 tokens
- mean: 20.85 tokens
- max: 57 tokens
- min: 9 tokens
- mean: 109.2 tokens
- max: 441 tokens
- min: 9 tokens
- mean: 113.35 tokens
- max: 512 tokens
- Samples:
query answer negative_answer What is the difference between a Remote and a Flex workspace category for Oracle employees, and how can one switch from Remote to Flex?* The difference between a Remote and a Flex workspace category for Oracle employees lies in the frequency of working in an Oracle office. Remote employees are not required to work in an Oracle office, or do so very rarely. In contrast, employees in the Flex category are expected to work in an Oracle office on average at least one day per week. If an employee wishes to change their workspace category from Remote to Flex, they should discuss this requirement with their manager to facilitate the transition.* After an applicant's application is approved, they should expect to receive a confirmation from the Human Resources (HR) department. This confirmation serves as an official notification that their application has been successfully processed and accepted.What should I do if I am unable to initiate or submit a transaction?* If you are unable to initiate or submit a transaction, you should first ensure that all the required information has been entered correctly, such as account details, transaction amount, and any necessary authentication codes. Check your internet connection to confirm it is stable, as a poor connection can prevent transactions from being processed. Additionally, verify that your account has sufficient funds or that there are no restrictions or holds on your account that might be blocking the transaction. If the issue persists, contact your bank or financial institution’s customer support team for assistance. They can help identify any technical issues, account-specific problems, or system errors that might be preventing the transaction from going through. It may also be helpful to clear your browser cache or try using a different device or application to rule out any local technical glitches.* No, you will not get a permanent desk if your workspace category is changed to Flex. A Flex workspace category typically implies a flexible or shared desk arrangement, where employees do not have a fixed, permanent desk assigned to them. Instead, they may use different desks or workstations on a rotational or as-needed basis, often in a hot-desking or shared office environment. If you are looking for a permanent desk, you might need to inquire about a different workspace category or discuss your specific needs with your workplace management or HR department.What should an employee do to get information about the Employee Assistance Program?* An employee should contact their local HR representative to obtain details about the Employee Assistance Program. This program likely offers support and resources for employees, and the HR representative will be able to provide specific information regarding its features, eligibility, and how to access the services offered. Reaching out to HR ensures that the employee receives accurate and personalized guidance tailored to their needs or location within the organization.* According to the policy mentioned in the text, for employees in Bangladesh, Pakistan, and Sri Lanka, leave days will be deducted from their casual leave accrual. This means that whenever an employee from these countries takes a leave, the number of days they are absent will be subtracted from their accumulated casual leave balance, which is a specific type of leave entitlement typically used for short, unplanned, or personal reasons. This policy ensures that casual leave is utilized for such absences, potentially affecting the total available casual leave days an employee can take in the future if not replenished or managed properly. - Loss:
TripletLosswith these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
Evaluation Dataset
cleaned_negatives
- Dataset: cleaned_negatives at 8fd682f
- Size: 68 evaluation samples
- Columns:
query,answer, andnegative_answer - Approximate statistics based on the first 68 samples:
query answer negative_answer type string string string details - min: 8 tokens
- mean: 20.22 tokens
- max: 36 tokens
- min: 9 tokens
- mean: 120.84 tokens
- max: 512 tokens
- min: 9 tokens
- mean: 104.35 tokens
- max: 354 tokens
- Samples:
query answer negative_answer Under what conditions will Oracle issue a detailed job description letter for an ex-employee for immigration purposes?* Oracle will issue a detailed job description letter for an ex-employee for immigration purposes under specific conditions. Firstly, the ex-employee must require the letter for immigration purposes. Secondly, the ex-employee’s manager must still be working with Oracle. Lastly, the manager must be able to validate the contents of the detailed job description for accuracy based on their recollection of the ex-employee’s role. If these conditions are met, Oracle may issue the detailed letter based on the input provided by the manager. However, if the manager is no longer with Oracle or is unable to recall and validate the job details, Oracle will only provide a standard job description letter, which will not include any reference to the ex-employee’s performance or proficiency.* The purpose of the policy mentioned in the text is to enable employee concurrence on raising a WSC transaction. This means that the policy provides the necessary guidelines or framework for employees to agree or be aligned on the process of initiating such transactions. As a result, there is no need for any additional agreement or documentation beyond what is outlined in the policy itself. Employees are encouraged to read and understand this policy before proceeding with a WSC transaction to ensure compliance and smooth execution.If my WSC is assigned but I am not coming to the office regularly, will there be any consequences?* Yes, there could be an impact if your WSC (Work Space Coordinator or Workstation, depending on context) is assigned to you but you are not coming to the office regularly. Regular office attendance might be tied to policies regarding workspace allocation, productivity expectations, or team collaboration requirements set by your organization. Not showing up regularly could lead to issues such as reassignment of your WSC to someone else who needs it more, potential disciplinary actions, or a perception of reduced commitment to your role. It is advisable to check your company's attendance or remote working policies to understand the specific implications and communicate with your supervisor or HR department to clarify expectations or request flexibility if needed.* Before submitting a request, you should ensure that you have completed all necessary preparatory steps as outlined in the relevant guidelines or instructions. This may include gathering all required documentation, verifying that the information provided is accurate and complete, and confirming that you meet any eligibility criteria or prerequisites for the request. Additionally, it might be necessary to consult with relevant parties or authorities to clarify any doubts or obtain necessary approvals. Finally, review the submission process to ensure that you are following the correct procedure and format for the request to avoid delays or rejections.** What is the purpose of the FAQs for Hybrid Work Policy & HCM Workspace Category Transactions?
The purpose of the FAQs for Hybrid Work Policy & HCM Workspace Category Transactions is to provide clear and concise information, guidance, and answers to common questions related to the hybrid work policy and transactions within the HCM (Human Capital Management) workspace category. These FAQs are designed to assist employees, managers, and other stakeholders in understanding the rules, procedures, and best practices associated with hybrid work arrangements and related HR processes. By addressing frequently asked questions, the FAQs aim to ensure smooth implementation of the hybrid work policy, reduce confusion, and improve compliance with organizational guidelines while supporting effective use of the HCM system for workspace-related transactions.*** Yes, you will receive a notification once the transaction has been actioned. This means that after the transaction is completed or processed, you will be informed through a notification, ensuring you are aware of the status of your transaction. - Loss:
TripletLosswith these parameters:{ "distance_metric": "TripletDistanceMetric.EUCLIDEAN", "triplet_margin": 5 }
Training Hyperparameters
Non-Default Hyperparameters
eval_strategy: epochlearning_rate: 2e-05num_train_epochs: 10warmup_ratio: 0.1fp16: Trueload_best_model_at_end: Truebatch_sampler: no_duplicates
All Hyperparameters
Click to expand
overwrite_output_dir: Falsedo_predict: Falseeval_strategy: epochprediction_loss_only: Trueper_device_train_batch_size: 8per_device_eval_batch_size: 8per_gpu_train_batch_size: Noneper_gpu_eval_batch_size: Nonegradient_accumulation_steps: 1eval_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: 10max_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: 42data_seed: Nonejit_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_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: {}
Training Logs
| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.2941 | 10 | 5.3486 | - |
| 0.5882 | 20 | 5.2454 | - |
| 0.8824 | 30 | 5.1519 | - |
| 1.0 | 34 | - | 5.2129 |
| 1.1765 | 40 | 5.1441 | - |
| 1.4706 | 50 | 5.0806 | - |
| 1.7647 | 60 | 5.1823 | - |
| 2.0 | 68 | - | 5.4481 |
| 2.0588 | 70 | 4.9768 | - |
| 2.3529 | 80 | 5.0202 | - |
| 2.6471 | 90 | 5.0213 | - |
| 2.9412 | 100 | 5.0522 | - |
| 3.0 | 102 | - | 5.7325 |
| 3.2353 | 110 | 4.7469 | - |
| 3.5294 | 120 | 4.879 | - |
| 3.8235 | 130 | 4.8031 | - |
| 4.0 | 136 | - | 6.3459 |
| 4.1176 | 140 | 5.1303 | - |
| 4.4118 | 150 | 4.7167 | - |
| 4.7059 | 160 | 4.5992 | - |
| 5.0 | 170 | 4.9378 | 7.3565 |
| 5.2941 | 180 | 4.4152 | - |
| 5.5882 | 190 | 4.1651 | - |
| 5.8824 | 200 | 4.2056 | - |
| 6.0 | 204 | - | 6.9692 |
| 6.1765 | 210 | 3.3609 | - |
| 6.4706 | 220 | 3.4834 | - |
| 6.7647 | 230 | 3.6762 | - |
| 7.0 | 238 | - | 6.1434 |
| 7.0588 | 240 | 2.9816 | - |
| 7.3529 | 250 | 2.9793 | - |
| 7.6471 | 260 | 3.0509 | - |
| 7.9412 | 270 | 3.0593 | - |
| 8.0 | 272 | - | 7.8592 |
| 8.2353 | 280 | 2.9929 | - |
| 8.5294 | 290 | 2.6469 | - |
| 8.8235 | 300 | 2.5231 | - |
| 9.0 | 306 | - | 6.9215 |
| 9.1176 | 310 | 2.4078 | - |
| 9.4118 | 320 | 2.4752 | - |
| 9.7059 | 330 | 2.2656 | - |
| 10.0 | 340 | 2.2931 | 7.4240 |
- The bold row denotes the saved checkpoint.
Framework Versions
- Python: 3.10.10
- Sentence Transformers: 5.1.0
- Transformers: 4.55.4
- PyTorch: 2.8.0+cu128
- Accelerate: 1.10.0
- Datasets: 4.0.0
- Tokenizers: 0.21.4
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}
}
- Downloads last month
- 5
Model tree for AL3110/mpnet-cleaned-finetuned-triplet
Base model
microsoft/mpnet-base