booster-team's picture
Upload folder using huggingface_hub
251853b verified
metadata
base_model: sentence-transformers/all-MiniLM-L6-v2
datasets: []
language: []
library_name: sentence-transformers
pipeline_tag: sentence-similarity
tags:
  - sentence-transformers
  - sentence-similarity
  - feature-extraction
  - generated_from_trainer
  - dataset_size:8000
  - loss:MultipleNegativesRankingLoss
widget:
  - source_sentence: >-
      As a user, I want to reset my password via email so that I can regain
      access.
    sentences:
      - >-
        1. Ensure the user can access the 'Update Profile' form.<br>2. Verify
        that changes are saved and reflected in the user's profile.<br>3. Test
        the validation of profile fields (e.g., email format).
      - >-
        1. Ensure the user can access the 'Update Profile' form.<br>2. Verify
        that changes are saved and reflected in the user's profile.<br>3. Test
        the validation of profile fields (e.g., email format).
      - >-
        1. Verify that the password reset email is sent to the user's registered
        email address.<br>2. Ensure the email contains a password reset
        link.<br>3. Test the password reset link to confirm it allows setting a
        new password.
  - source_sentence: >-
      As a user, I want to update my profile information so that my account
      details are current.
    sentences:
      - >-
        1. Ensure the user can access the 'Order History' page.<br>2. Verify
        that the page displays previous orders correctly.<br>3. Test the ability
        to filter orders by date or status.
      - >-
        1. Verify that the password reset email is sent to the user's registered
        email address.<br>2. Ensure the email contains a password reset
        link.<br>3. Test the password reset link to confirm it allows setting a
        new password.
      - >-
        1. Ensure the user can access the 'Update Profile' form.<br>2. Verify
        that changes are saved and reflected in the user's profile.<br>3. Test
        the validation of profile fields (e.g., email format).
  - source_sentence: >-
      As a customer, I want to receive notifications for order status updates so
      that I stay informed.
    sentences:
      - >-
        1. Check that notifications are sent for order status changes.<br>2.
        Verify that notifications include accurate order details.<br>3. Test the
        notification settings to ensure users can customize their preferences.
      - >-
        1. Verify that the password reset email is sent to the user's registered
        email address.<br>2. Ensure the email contains a password reset
        link.<br>3. Test the password reset link to confirm it allows setting a
        new password.
      - >-
        1. Ensure the user can access the 'Order History' page.<br>2. Verify
        that the page displays previous orders correctly.<br>3. Test the ability
        to filter orders by date or status.
  - source_sentence: >-
      As a user, I want to reset my password via email so that I can regain
      access.
    sentences:
      - >-
        1. Ensure the user can access the 'Order History' page.<br>2. Verify
        that the page displays previous orders correctly.<br>3. Test the ability
        to filter orders by date or status.
      - >-
        1. Ensure the user can access the 'Update Profile' form.<br>2. Verify
        that changes are saved and reflected in the user's profile.<br>3. Test
        the validation of profile fields (e.g., email format).
      - >-
        1. Verify that the password reset email is sent to the user's registered
        email address.<br>2. Ensure the email contains a password reset
        link.<br>3. Test the password reset link to confirm it allows setting a
        new password.
  - source_sentence: >-
      As a user, I want to update my profile information so that my account
      details are current.
    sentences:
      - >-
        1. Ensure the user can access the 'Update Profile' form.<br>2. Verify
        that changes are saved and reflected in the user's profile.<br>3. Test
        the validation of profile fields (e.g., email format).
      - >-
        1. Confirm that an admin can access the 'Add New User' form.<br>2.
        Verify that the form allows entering user details and submitting.<br>3.
        Check that the new user is added to the user list after submission.
      - >-
        1. Test the search functionality by entering a product name and
        verifying that the results include the correct product.<br>2. Ensure the
        search returns results quickly.<br>3. Verify that searching for
        non-existent products returns no results.

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 semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.

Model Details

Model Description

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

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel 
  (1): Pooling({'word_embedding_dimension': 384, '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

# Download from the 🤗 Hub
model = SentenceTransformer("sentence_transformers_model_id")
# Run inference
sentences = [
    'As a user, I want to update my profile information so that my account details are current.',
    "1. Ensure the user can access the 'Update Profile' form.<br>2. Verify that changes are saved and reflected in the user's profile.<br>3. Test the validation of profile fields (e.g., email format).",
    '1. Test the search functionality by entering a product name and verifying that the results include the correct product.<br>2. Ensure the search returns results quickly.<br>3. Verify that searching for non-existent products returns no results.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities.shape)
# [3, 3]

Training Details

Training Dataset

Unnamed Dataset

  • Size: 8,000 training samples
  • Columns: query and answer
  • Approximate statistics based on the first 1000 samples:
    query answer
    type string string
    details
    • min: 21 tokens
    • mean: 22.0 tokens
    • max: 24 tokens
    • min: 46 tokens
    • mean: 51.98 tokens
    • max: 56 tokens
  • Samples:
    query answer
    As a user, I want to search for products by name so that I can find specific items. 1. Test the search functionality by entering a product name and verifying that the results include the correct product.
    2. Ensure the search returns results quickly.
    3. Verify that searching for non-existent products returns no results.
    As an admin, I want to add new users to the system so that I can manage user accounts. 1. Confirm that an admin can access the 'Add New User' form.
    2. Verify that the form allows entering user details and submitting.
    3. Check that the new user is added to the user list after submission.
    As a user, I want to search for products by name so that I can find specific items. 1. Test the search functionality by entering a product name and verifying that the results include the correct product.
    2. Ensure the search returns results quickly.
    3. Verify that searching for non-existent products returns no results.
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Evaluation Dataset

Unnamed Dataset

  • Size: 2,000 evaluation samples
  • Columns: query and answer
  • Approximate statistics based on the first 1000 samples:
    query answer
    type string string
    details
    • min: 21 tokens
    • mean: 22.0 tokens
    • max: 24 tokens
    • min: 46 tokens
    • mean: 51.54 tokens
    • max: 56 tokens
  • Samples:
    query answer
    As a user, I want to reset my password via email so that I can regain access. 1. Verify that the password reset email is sent to the user's registered email address.
    2. Ensure the email contains a password reset link.
    3. Test the password reset link to confirm it allows setting a new password.
    As a customer, I want to receive notifications for order status updates so that I stay informed. 1. Check that notifications are sent for order status changes.
    2. Verify that notifications include accurate order details.
    3. Test the notification settings to ensure users can customize their preferences.
    As a user, I want to view my order history so that I can track my previous purchases. 1. Ensure the user can access the 'Order History' page.
    2. Verify that the page displays previous orders correctly.
    3. Test the ability to filter orders by date or status.
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim"
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • per_device_eval_batch_size: 16
  • learning_rate: 3e-05
  • warmup_ratio: 0.1
  • fp16: True
  • load_best_model_at_end: True
  • ddp_find_unused_parameters: False

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: epoch
  • prediction_loss_only: True
  • per_device_train_batch_size: 8
  • per_device_eval_batch_size: 16
  • 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: 3e-05
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • max_grad_norm: 1.0
  • num_train_epochs: 3
  • 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: True
  • 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: False
  • 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}
  • 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: False
  • 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: False
  • resume_from_checkpoint: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_private_repo: False
  • hub_always_push: False
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • include_inputs_for_metrics: False
  • 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
  • dispatch_batches: None
  • split_batches: 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
  • eval_use_gather_object: False
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional

Training Logs

Click to expand
Epoch Step Training Loss loss
0.025 25 0.6305 -
0.05 50 0.7491 -
0.075 75 0.6931 -
0.1 100 0.7093 -
0.125 125 0.631 -
0.15 150 0.6127 -
0.175 175 0.5963 -
0.2 200 0.6556 -
0.225 225 0.6831 -
0.25 250 0.6389 -
0.275 275 0.6913 -
0.3 300 0.6447 -
0.325 325 0.6993 -
0.35 350 0.6581 -
0.375 375 0.6695 -
0.4 400 0.7076 -
0.425 425 0.6301 -
0.45 450 0.6121 -
0.475 475 0.6439 -
0.5 500 0.6782 -
0.525 525 0.7025 -
0.55 550 0.7228 -
0.575 575 0.6065 -
0.6 600 0.6496 -
0.625 625 0.6816 -
0.65 650 0.6302 -
0.675 675 0.692 -
0.7 700 0.7533 -
0.725 725 0.6567 -
0.75 750 0.6472 -
0.775 775 0.6461 -
0.8 800 0.661 -
0.825 825 0.6897 -
0.85 850 0.6097 -
0.875 875 0.6284 -
0.9 900 0.5923 -
0.925 925 0.6642 -
0.95 950 0.6531 -
0.975 975 0.6705 -
1.0 1000 0.7137 0.6765
1.025 1025 0.6601 -
1.05 1050 0.6739 -
1.075 1075 0.6487 -
1.1 1100 0.6864 -
1.125 1125 0.7744 -
1.15 1150 0.6698 -
1.175 1175 0.6421 -
1.2 1200 0.633 -
1.225 1225 0.678 -
1.25 1250 0.6264 -
1.275 1275 0.721 -
1.3 1300 0.6736 -
1.325 1325 0.5332 -
1.35 1350 0.6576 -
1.375 1375 0.6625 -
1.4 1400 0.7248 -
1.425 1425 0.6188 -
1.45 1450 0.6452 -
1.475 1475 0.7024 -
1.5 1500 0.7005 -
1.525 1525 0.6219 -
1.55 1550 0.6525 -
1.575 1575 0.6718 -
1.6 1600 0.6738 -
1.625 1625 0.6558 -
1.65 1650 0.6236 -
1.675 1675 0.7126 -
1.7 1700 0.6822 -
1.725 1725 0.6324 -
1.75 1750 0.7036 -
1.775 1775 0.6765 -
1.8 1800 0.654 -
1.825 1825 0.6923 -
1.85 1850 0.6976 -
1.875 1875 0.6904 -
1.9 1900 0.6307 -
1.925 1925 0.6437 -
1.95 1950 0.6333 -
1.975 1975 0.6214 -
2.0 2000 0.6424 0.6765
2.025 2025 0.7041 -
2.05 2050 0.7112 -
2.075 2075 0.6696 -
2.1 2100 0.6739 -
2.125 2125 0.6315 -
2.15 2150 0.7649 -
2.175 2175 0.7079 -
2.2 2200 0.6549 -
2.225 2225 0.6548 -
2.25 2250 0.6647 -
2.275 2275 0.7568 -
2.3 2300 0.6659 -
2.325 2325 0.604 -
2.35 2350 0.6342 -
2.375 2375 0.6891 -
2.4 2400 0.6856 -
2.425 2425 0.6683 -
2.45 2450 0.678 -
2.475 2475 0.7102 -
2.5 2500 0.6606 -
2.525 2525 0.6634 -
2.55 2550 0.6443 -
2.575 2575 0.6122 -
2.6 2600 0.6926 -
2.625 2625 0.5957 -
2.65 2650 0.6933 -
2.675 2675 0.691 -
2.7 2700 0.7015 -
2.725 2725 0.7057 -
2.75 2750 0.6386 -
2.775 2775 0.6868 -
2.8 2800 0.6992 -
2.825 2825 0.6338 -
2.85 2850 0.6175 -
2.875 2875 0.6125 -
2.9 2900 0.6675 -
2.925 2925 0.6369 -
2.95 2950 0.6468 -
2.975 2975 0.6627 -
3.0 3000 0.6685 0.6765

Framework Versions

  • Python: 3.10.14
  • Sentence Transformers: 3.0.1
  • Transformers: 4.44.1
  • PyTorch: 2.3.0
  • Accelerate: 0.33.0
  • Datasets: 2.19.1
  • Tokenizers: 0.19.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",
}

MultipleNegativesRankingLoss

@misc{henderson2017efficient,
    title={Efficient Natural Language Response Suggestion for Smart Reply}, 
    author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
    year={2017},
    eprint={1705.00652},
    archivePrefix={arXiv},
    primaryClass={cs.CL}
}