Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks
Paper • 1908.10084 • Published • 17
How to use ivvvvvi/cv_embedder with sentence-transformers:
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("ivvvvvi/cv_embedder")
sentences = [
"Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role.\nQuery: Title: Photo Retoucher (project freelance)\nCompany: Skylum\nCategory: Design\nSkills: Creative and Gaming, Design\nLanguages: Ukrainian - Native\nExperience: 1 year experience\nEmployment: PART_TIME\nWork format: Full Remote\nLocation: \nDomain: Other\n\nDescription:\nSkylum empowers millions of photographers to create incredible images. Our award-winning photo editing software combines AI-powered automation with full creative control. We make editing enjoyable, easy, and accessible for everyone.\n\n \nYou’ll join an environment where growth, learning, and creativity are encouraged. Flexible schedules, trust-based workflows, and a supportive team give you everything you need to focus on your best work.\n\n \n🇺🇦 Proudly Ukrainian, Skylum stands with Ukraine through action, regularly supporting organizations that help accelerate our victory.\n\nWe are looking for a skilled Photo Retoucher to join our creative flow. You will be working with a wide variety of genres — from breathtaking landscapes and macro shots to street photography, portraits, and wildlife. Your main task will be to deliver high-quality, natural-looking results using Luminar and processing RAW files.\n\nRequired experience:\n \nAt least 6 months of professional retouching experience\nMacBook with an M1 chip (or newer) is a must for optimal software performance\nActive PE (Individual Entrepreneur Group 3) status is required for contracting\nDeep understanding of RAW processing\nAbility to achieve a specific visual result and, more importantly, clearly describe your workflow step-by-step\nA strong eye for detail and a commitment to natural-looking retouching (avoiding over-processed looks)\n\n \nKey responsibilities:\nProcess a diverse range of photography: landscapes, street, portraits, macro, nature, and animals\nWork with a pre-agreed monthly volume of photos\nMaintain consistency and high quality across different genres\n\n \nWhat to expect when you apply\nAn interview with our Talent Acquisition Manager\nTest task to show your skills\nManagement interview\nAnd finally, your job offer!",
"Candidate Resume: Title: Back-end Developer\nSeniority: Senior\nSkills: Python\nLanguages: Ukrainian, Russian, English\nLocation: Ukraine\nExperience: 5-10 years\n\nSummary: C/Python/JavaScript developer. Good knowledge FreeBSD and Linux OS, SQL (MySQL, PestgreSQL) and NoSQL (Redis). I worked with the following frameworks: Python(Django, Django REST, Flask), JavaScript(AngularJS, ReactJS).",
"Candidate Resume: Title: Application Development Senior Analyst\nSeniority: Middle\nLocation: Delhi\nExperience: 0-3 years\n\nSummary: SAP EWM Functional Consultant with more than 2 years of rich experience in SAP EWM.Great exposure to configurations of SAP-EWM, business solution planning, functional Design specifications, Test scenarios, Test scripts. Excellent exposure of working in complex projects and complicated designs with multiple systems and interfaces closely working with SAP.\nWork history: Hello! I am Shabnam. I am a Graphic Designer. I design Posters, Business Cards, Templates, and Photo Editing, Vector & Raster image manipulation.",
"Candidate Resume: Title: Junior Auditor\nSeniority: Middle\nLanguages: English, Portuguese, French\nLocation: Netherlands\nExperience: 0-3 years\n\nSummary: https://github.com/lidianevesribeiro Aspiring Data Professional with over 4 years of experience in Business Management, Audit, and Finance across international companies. In these roles, I consistently leveraged data to improve processes, ensure compliance, and support strategic decisions from auditing financial statements to driving transformation and continuous improvement initiatives. Currently deepening my technical expertise through a Postgraduate in Data Science & Business Analytics, with hands-on projects in Python, SQL, Machine Learning, Microsoft Fabric, and Power BI. I also completed the Tekya Pro Program, an intensive training combining mentorship and a real-world data project analyzing frozen accounts at Revolut. With a strong business foundation and a data-driven mindset, I’m \nWork history: - Perform internal audits and compliance testing using data analytics to detect anomalies and support risk assessment, usually working in teams of 3 to 5 people. - Develop financial models, track KPIs, and generate reports to improve process efficiency. - Ensure regulatory compliance through control testing and documentation. | - Monitor KPIs, support cash flow tracking, coordinate audits, and leverage AP analytics to improve reporting and processes, collaborating with a team of 10 people. - Process +70 invoices daily using SAP, ensuring accuracy, reconciliation, and compliance with internal and regulatory standards. - Handle supplier issues via a ticketing tool, resolving up to 10 tickets per day to maintain smooth operations and timely payments. | - Use Excel and Power BI for budgeting, KPI forecasting, and generating actionable financial insights. - Collaborate with a team of 8 people to manage AP/AR processes, ensure compliance, and assist in audits through data-driven improvements"
]
embeddings = model.encode(sentences)
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [4, 4]This is a sentence-transformers model finetuned from Qwen/Qwen3-0.6B. It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for retrieval.
SentenceTransformer(
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}, 'message': {'method': 'forward', 'method_output_name': 'last_hidden_state', 'format': 'flat'}}, 'module_output_name': 'token_embeddings', 'architecture': 'Qwen3Model'})
(1): Pooling({'embedding_dimension': 1024, 'pooling_mode': 'lasttoken', 'include_prompt': True})
)
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("sentence_transformers_model_id")
# Run inference
sentences = [
'Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role.\nQuery: Title: Junior Project Manager (PMO Support – SAP Program)\nCompany: Sii Ukraine\nCategory: Project Manager\nSkills: Management, Project Manager\nLanguages: English - C1 - Advanced, Ukrainian - Native\nExperience: 1 year experience\nEmployment: FULL_TIME\nWork format: Full Remote\nLocation: Tax residence in Ukraine is required\nDomain: Energy / Utilities\n\nDescription:\nSii Ukraine is a subsidiary of Sii Poland — the leader in IT, engineering, and consultancy services with over 7500 IT experts in Poland and more than 250 prestigious customers. We are looking for ambitious and top-quality professionals to join our project teams.\n \nThe Junior Project Manager (PMO Support) provides administrative and organizational support within a large-scale, multi-year SAP S/4HANA implementation programme in a complex, international environment. \n\nThis role is designed for a junior or trainee-level professional who is motivated to grow in project management and gain hands-on experience in supporting experienced project managers and cross-functional teams.\n\nThe position focuses on ensuring smooth coordination, documentation, and communication across stakeholders, while contributing to the successful delivery of a global transformation programme within a leading international energy technology organization.\n \nYour Tasks:\nSupport experienced Project Managers in the coordination of a large SAP S/4HANA implementation programme\nOrganize and coordinate meetings (scheduling, agendas, logistics, follow-ups)\nPrepare meeting minutes, action trackers, and project documentation\nManage and structure project documentation, presentations, and files\nMaintain and administer SharePoint spaces for cross-functional collaboration\nSupport Track & Trace activities across project tasks and deliverables\nAssist in preparing presentations for internal and stakeholder meetings\nProvide support in risk tracking and basic budget monitoring activities\nEnsure proper documentation management and version control\nFacilitate communication between project teams, stakeholders, and external partners\nProvide general administrative and organizational support to the PMO\n\nRequirements:\n1-2 years of experience in PMO support, project coordination, or administrative roles (junior or trainee profiles are welcome)\nBasic knowledge of project management principles and PMO practices\nPractical experience with Microsoft SharePoint and Microsoft PowerPoint\nAbility to manage and organize project documentation, including structuring and version control\nExperience supporting meeting and presentation preparation, including note-taking and follow-ups\nBasic understanding of Track & Trace activities related to project tasks and deliverables\nStrong organizational and coordination abilities with close attention to detail\nAbility to communicate effectively and collaborate with diverse stakeholders\nCapability to work in a structured and professional environment\nProactive mindset with motivation to learn and take initiative\nFluency in English (required)\nTax residence in Ukraine is required',
'Candidate Resume: Title: Project Manager\nSeniority: Middle\nLanguages: English, Ukrainian, Russian\nLocation: Ukraine\nExperience: 0-3 years\n\nSummary: Currently working as a project manager mostly. Partially doing some front-end development (JS/CSS/HTML5) and back-end (PHP/Smarty/MySQL).\nWork history: My responsibilities include... managing projects :) | Design and development',
'Candidate Resume: Title: Senior Software Engineer\nSeniority: Senior\nLocation: Michigan\nExperience: 10+ years\n\nSummary: Team player software engineer with a positive attitude, phenomenal time management skills, attention to detail, and a strong focus on user experience. Worked as a full-stack developer in the medical and automotive industries. Recently traveled the world while developing small business websites and mobile apps, including a photo collage maker and several games for iOS. Passionate about the future of technology and human-centered design. Email: chris@chris-hendrickson.com Github: https://github.com/ninjacom Website: http://www.chris-hendrickson.com Escape Cube (iOS) - Preview Video: https://youtu.be/X7VHpmiCsfo iTunes Games: https://itunes.apple.com/us/developer/chris-hendrickson/id557902223 Global Game Jam 2018 - Unity VR game: https://globalgamejam.org/2018/games/dominoes\nWork history: Skills: .NET Framework, C#, Object Oriented Programming (OOP), Domain-Driven Design (DDD), SQL Server Management Studio, Stored Procedures, Entity Framework (EF) Core, JSON, REST APIs, Postman, XML, Python, Azure Devops, Powershell Scripting, Test Driven Development (TDD), Unit and Integration Testing, Git & Github, ASP.NET MVC, API Development and Testing, Design Patterns | Developed token authorized C# API calls to expose core bank data. Project managed and developed python automations to save employees hundreds of back-office labor hours. Created ETL and API applications with Mulesoft Anypoint Studio. Built and managed CICD pipelines in Azure Devops. | Game Designer, Software Developer, World Traveler, Optimistic Futurist | Pluralsight Continuous Testing with NCrunch | Pluralsight Encapsulation and SOLID',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[0.9999, 0.7596, 0.6911],
# [0.7596, 1.0000, 0.7885],
# [0.6911, 0.7885, 1.0000]])
sentence1, sentence2, and score| sentence1 | sentence2 | score | |
|---|---|---|---|
| type | string | string | float |
| modality | text | text | |
| details |
|
|
|
| sentence1 | sentence2 | score |
|---|---|---|
Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role. |
Candidate Resume: Title: Computer Engineer (Information Security) |
0.3333333333333333 |
Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role. |
Candidate Resume: Title: Co-Founder Golang Developer |
0.6666666666666666 |
Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role. |
Candidate Resume: Title: Frontend Developer |
0.3333333333333333 |
CoSENTLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "pairwise_cos_sim"
}
sentence1, sentence2, and score| sentence1 | sentence2 | score | |
|---|---|---|---|
| type | string | string | float |
| modality | text | text | |
| details |
|
|
|
| sentence1 | sentence2 | score |
|---|---|---|
Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role. |
Candidate Resume: Title: System Integrator |
0.3333333333333333 |
Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role. |
Candidate Resume: Title: Senior Software Engineer |
0.3333333333333333 |
Search for a candidate for this job: Instruct: Given a job listing, retrieve the most relevant candidate profiles that match the required skills, experience, and role. |
Candidate Resume: Title: QA Engineer |
0.3333333333333333 |
CoSENTLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "pairwise_cos_sim"
}
num_train_epochs: 4learning_rate: 2e-05warmup_steps: 0.1gradient_accumulation_steps: 4bf16: Truetf32: Trueper_device_eval_batch_size: 4per_device_train_batch_size: 8num_train_epochs: 4max_steps: -1learning_rate: 2e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 4average_tokens_across_devices: Truemax_grad_norm: 1.0label_smoothing_factor: 0.0bf16: Truefp16: Falsebf16_full_eval: Falsefp16_full_eval: Falsetf32: Truegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 4prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Noneremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonewarmup_ratio: Nonelocal_rank: -1prompts: Nonebatch_sampler: batch_samplermulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | Validation Loss |
|---|---|---|---|
| 0.1105 | 10 | 3.1358 | - |
| 0.2210 | 20 | 2.9751 | - |
| 0.3315 | 30 | 3.1855 | - |
| 0.4420 | 40 | 2.9830 | - |
| 0.5525 | 50 | 2.8721 | - |
| 0.6630 | 60 | 3.0209 | - |
| 0.7735 | 70 | 2.9303 | - |
| 0.8840 | 80 | 2.9119 | - |
| 0.9945 | 90 | 2.8226 | - |
| 1.0 | 91 | - | 1.5093 |
| 1.0994 | 100 | 2.6964 | - |
| 1.2099 | 110 | 2.6714 | - |
| 1.3204 | 120 | 2.7469 | - |
| 1.4309 | 130 | 2.6812 | - |
| 1.5414 | 140 | 2.7814 | - |
| 1.6519 | 150 | 2.6438 | - |
| 1.7624 | 160 | 2.6611 | - |
| 1.8729 | 170 | 2.6188 | - |
| 1.9834 | 180 | 2.6251 | - |
| 2.0 | 182 | - | 1.4555 |
| 2.0884 | 190 | 2.4713 | - |
| 2.1989 | 200 | 2.4649 | - |
| 2.3094 | 210 | 2.2881 | - |
| 2.4199 | 220 | 2.5158 | - |
| 2.5304 | 230 | 2.3849 | - |
| 2.6409 | 240 | 2.1406 | - |
| 2.7514 | 250 | 2.4799 | - |
| 2.8619 | 260 | 2.1610 | - |
| 2.9724 | 270 | 2.3063 | - |
| 3.0 | 273 | - | 1.3578 |
| 3.0773 | 280 | 2.2504 | - |
| 3.1878 | 290 | 2.0670 | - |
| 3.2983 | 300 | 2.0648 | - |
| 3.4088 | 310 | 1.9947 | - |
| 3.5193 | 320 | 2.0342 | - |
| 3.6298 | 330 | 2.1131 | - |
| 3.7403 | 340 | 1.9564 | - |
| 3.8508 | 350 | 2.0953 | - |
| 3.9613 | 360 | 1.8951 | - |
| 4.0 | 364 | - | 1.3413 |
@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",
}
@article{10531646,
author={Huang, Xiang and Peng, Hao and Zou, Dongcheng and Liu, Zhiwei and Li, Jianxin and Liu, Kay and Wu, Jia and Su, Jianlin and Yu, Philip S.},
journal={IEEE/ACM Transactions on Audio, Speech, and Language Processing},
title={CoSENT: Consistent Sentence Embedding via Similarity Ranking},
year={2024},
doi={10.1109/TASLP.2024.3402087}
}