SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2

This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for retrieval.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: sentence-transformers/all-MiniLM-L6-v2
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 384 dimensions
  • Similarity Function: Cosine Similarity
  • Supported Modality: Text

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
  (1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', '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

# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
    "Experienced in implementing process re-engineering, developing business requirements, use cases and test scripts using industry accepted practices., Should possess high level understanding of information technology concepts as well as the SDLC methodology., Must be flexible and able to multi-task, working on multiple projects and internal initiatives, inclusive of upgrades, maintenance, and enhancements., Conducts business process analyses and needs assessments to align information technology solutions with the business initiatives., Supports analytical functions by assisting programmers in ascertaining user needs and adapting user procedures to final program design., Organizes and facilitates application testing and user acceptance to ensure business community's needs are met., Acts as second and third level support for Production incidents and facilitates troubleshooting and close out of reported issues for multiple applications., Utilizes current organization wide and/or department specific software to complete assignments., Experienced in developing business requirements, use cases and test scripts using industry accepted practices., High level understanding of information technology concepts as well as the SDLC methodology.",
    "Developing and executing dynamic campaign strategies and methods that yields the best return on investment., Consistently learning and analyzing campaign data and seeking new ways to improve conversion rate and engagement., Performing monthly balance sheet, income statement and changes in financial position/budget variance analysis., Analyzed shipping data and sales data to increase efficiency and performing inventory audit to increase profitability., Interpreted business data, analyzed results using statistical methods and providing ongoing reports and presentations to management to provide insights into decision making., Developed and implementing centralized database and data collections systems to foster collaboration., Monitored and measured the effectiveness of shipping processes., Created daily sales reports on sales from company's eCommerce website with Microsoft Excel., Reconciled financial discrepancies by collecting and analyzing account information., Designed/produced value-added analysis and reporting for senior management.",
    'Verified and posted detailed business transactions to general ledger through FASKB system in support of day-to-day operations., Maintained investment program and subsidiary ledgers for partnership investments, including amortization schedule and interest accrual payments., Prepared and posted journal entries for inter company bank transactions in the accounting system., Participated in month-end close process and developed strong working relationships with stakeholders at all levels., Completed monthly balance sheet reconciliations and maintained proper documentation, researching and resolving reconciliation items through communication with various departments., Prepared and processed inter-company invoices, travel expense and reimbursement requests for the department, eliminating discrepancies and ensuring vendor payments were accurate and paid on time., Calculated student tuition, book charges, and posted to student general ledger account using CampusVue, then posted Title IV federal funds payments to student ledger accounts., Performed reconciliations of federal loans and grants, providing explanations, and manually imported and exported batches of Title IV & Non-Title IV funds files containing cash disbursements daily.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.7860, 0.5502],
#         [0.7860, 1.0000, 0.6022],
#         [0.5502, 0.6022, 1.0000]])

Evaluation

Metrics

Semantic Similarity

Metric Value
pearson_cosine 0.6286
spearman_cosine 0.7118

Training Details

Training Dataset

Unnamed Dataset

  • Size: 4,025 training samples
  • Columns: sentence_0, sentence_1, and label
  • Approximate statistics based on the first 100 samples:
    sentence_0 sentence_1 label
    type string string float
    modality text text
    details
    • min: 17 tokens
    • mean: 135.83 tokens
    • max: 351 tokens
    • min: 53 tokens
    • mean: 198.68 tokens
    • max: 427 tokens
    • min: 0.0
    • mean: 0.47
    • max: 1.0
  • Samples:
    sentence_0 sentence_1 label
    Experience with tools like DX Designer, Altium, etc., Use of test tools for signal integrity, EMC, etc., Desired experience in PCB: Design (preferably PAD), Schematic Capture and layout, Circuit Design, Experience with Capture schematics, PCB layout, routing and (PADs) tools, Working closely with the manufacturing team to ensure through documentation and for production of products, Familiarity with Code Composer Studio, Demonstrated experience in C Programming Extensive experience auditing suppliers and collaboratively working towards improving supplier quality to meet requirements, Pioneered advances in sterilization for battery operated portable medical devices, Successfully completed Root Cause Investigation training for CAPA offered by Weaver Consulting, LLC, Successfully completed the UL Knowledge Services training course on Designing for Compliance to IEC 60601-1 3rd Edition, Effectively audited various suppliers to identify root causes of material non-conformance and addressed issues in a timely fashion, Performed extensive process capability studies and tooling validations via IQ, OQ, and PQ, Applied knowledge of ISO 14971 Risk Management System, ISO 13485, 21CFR 820.30, and MDD 93/42/EEC Quality Management Systems, Currently implementing cost saving initiatives for certain access catheters estimated at reducing manufacturing cost by 60-80 percent by performing extensive supplier qualifications, Diplomatically resolved conflicting ex... 1.0
    Minimum of 5+ years of recent C++ experience required, Produce, debug, and implement functional software solutions, Execute full software development life cycle (SDLC), Work with internal field service teams to identify and solve issues, Develop high-quality software design and architecture, 7+ years of experience in a similar role with designing, programming, debugging, testing, and supporting multiple product lines, 5+ years experience with selected programming languages (C++), In-depth knowledge of PostgreSQL or other relational databases, Familiarity with the Linux operating system, Familiarity with version control system (GitBitbucket) Design, develop and verify data acquisition and sensor interface circuits, Design/Simulated a 600Watt precision current amplifier, Implement the communication and control firmware using C for MSP430 MCU, Develop the firmware using C/C++ for TMS320C6745 DSP and MSP430 MCU, Emulate McASP, SPI, UART and a customized LVDS communication using FPGA, Build motor related reference design and demos, solve customer EMC/EMI problems, Design the high voltage motor drive for the SPS-IPC show using C2000 DSP and ARM MCU 0.0
    Work as a technical expert with clients, analysts, programmers and other team members to develop technical solutions, Develop customized coding, software integration, perform analysis, configure solutions, using tools specific to the project, Lead and participate in the development, testing, implementation, maintenance, and support of highly complex solutions, Build non-functional monitoring capabilities and provide escalated support for highly complex applications in production, Build in and maintain security controls and monitoring in support of company standards, Typically lead moderately complex projects and participate in larger, more complex initiatives, Solve complex technical and operational problems and act as a resource for teammates with less experience, In an Agile environment, responsible for delivering high quality working software and automating manual reusable tasks, Develop code in accordance with the acceptance criteria established by the Product Owner, Bachelors Degr... Programmed applications and tools using C#/ ASP.Net using MVC and Entity Framework with goals of code abstraction, stability and reuse, Used variety of technologies, including ASP.NET, MVC, HTML5, JavaScript and SQL Server to create new applications, Handled all delegated tasks, including developing and building apps using C and C# to facilitate store employees, Developed and managed project plans while providing status updates to management and assisted in regression testing, Acted as a Business Analyst and effectively led discussions with the Business to get requirements and specifications, Participated in design sessions, and assisted in designing various application programs using C for RF apps, Helped design, develop and implement C # programs for the front end of the RF guns used in stores, Leveraged Agile methodologies to move development lifecycle rapidly through initial prototyping to enterprise-quality testing 1.0
  • Loss: CoSENTLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "pairwise_cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 32
  • num_train_epochs: 5
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • do_predict: False
  • prediction_loss_only: True
  • per_device_train_batch_size: 32
  • per_device_eval_batch_size: 32
  • gradient_accumulation_steps: 1
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 5e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1
  • num_train_epochs: 5
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_ratio: None
  • warmup_steps: 0
  • log_level: passive
  • log_level_replica: warning
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • enable_jit_checkpoint: False
  • save_on_each_node: False
  • save_only_model: False
  • restore_callback_states_from_checkpoint: False
  • use_cpu: False
  • seed: 42
  • data_seed: None
  • bf16: False
  • fp16: False
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • local_rank: -1
  • ddp_backend: None
  • debug: []
  • dataloader_drop_last: False
  • dataloader_num_workers: 0
  • dataloader_prefetch_factor: None
  • disable_tqdm: False
  • remove_unused_columns: True
  • label_names: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • fsdp: []
  • fsdp_config: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
  • accelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
  • parallelism_config: None
  • deepspeed: None
  • label_smoothing_factor: 0.0
  • optim: adamw_torch_fused
  • optim_args: None
  • group_by_length: False
  • length_column_name: length
  • project: huggingface
  • trackio_space_id: trackio
  • 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
  • push_to_hub: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: None
  • hub_always_push: False
  • hub_revision: None
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_for_metrics: []
  • eval_do_concat_batches: True
  • auto_find_batch_size: False
  • full_determinism: False
  • ddp_timeout: 1800
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • include_num_input_tokens_seen: no
  • neftune_noise_alpha: None
  • optim_target_modules: None
  • batch_eval_metrics: False
  • eval_on_start: False
  • use_liger_kernel: False
  • liger_kernel_config: None
  • eval_use_gather_object: False
  • average_tokens_across_devices: True
  • use_cache: False
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: round_robin
  • router_mapping: {}
  • learning_rate_mapping: {}

Training Logs

Epoch Step Training Loss resume-val_spearman_cosine
0.7937 100 - 0.3991
1.0 126 - 0.5908
1.5873 200 - 0.6359
2.0 252 - 0.6409
2.3810 300 - 0.6557
3.0 378 - 0.6835
3.1746 400 - 0.6892
3.9683 500 5.5916 0.6996
4.0 504 - 0.6990
4.7619 600 - 0.7112
5.0 630 - 0.7118

Training Time

  • Training: 7.3 minutes

Framework Versions

  • Python: 3.12.13
  • Sentence Transformers: 5.5.0
  • Transformers: 5.0.0
  • PyTorch: 2.10.0+cu128
  • Accelerate: 1.13.0
  • Datasets: 4.0.0
  • Tokenizers: 0.22.2

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",
}

CoSENTLoss

@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}
}
Downloads last month
24
Safetensors
Model size
22.7M params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for AQUABOT/sbert-resume-ranking

Paper for AQUABOT/sbert-resume-ranking

Evaluation results