Noss / README.md
JoeNoss1998's picture
Add new SentenceTransformer model.
1a513fd verified
metadata
base_model: Snowflake/snowflake-arctic-embed-m
library_name: sentence-transformers
metrics:
  - cosine_accuracy@1
  - cosine_accuracy@3
  - cosine_accuracy@5
  - cosine_accuracy@10
  - cosine_precision@1
  - cosine_precision@3
  - cosine_precision@5
  - cosine_precision@10
  - cosine_recall@1
  - cosine_recall@3
  - cosine_recall@5
  - cosine_recall@10
  - cosine_ndcg@10
  - cosine_mrr@10
  - cosine_map@100
  - dot_accuracy@1
  - dot_accuracy@3
  - dot_accuracy@5
  - dot_accuracy@10
  - dot_precision@1
  - dot_precision@3
  - dot_precision@5
  - dot_precision@10
  - dot_recall@1
  - dot_recall@3
  - dot_recall@5
  - dot_recall@10
  - dot_ndcg@10
  - dot_mrr@10
  - dot_map@100
pipeline_tag: sentence-similarity
tags:
  - sentence-transformers
  - sentence-similarity
  - feature-extraction
  - generated_from_trainer
  - dataset_size:800
  - loss:MatryoshkaLoss
  - loss:MultipleNegativesRankingLoss
widget:
  - source_sentence: How can bias testing influence the design and launch of automated systems?
    sentences:
      - >-
        reinforce those legal protections but extend beyond them to ensure
        equity for underserved communities48 

        even in circumstances where a specific legal protection may not be
        clearly established. These protections 

        should be instituted throughout the design, development, and deployment
        process and are described below 

        roughly in the order in which they would be instituted. 

        Protect the public from algorithmic discrimination in a proactive and
        ongoing manner 

        Proactive assessment of equity in design. Those responsible for the
        development, use, or oversight of
      - >-
        the severity of certain diseases in Black Americans. Instances of
        discriminatory practices built into and 

        resulting from AI and other automated systems exist across many
        industries, areas, and contexts. While automated 

        systems have the capacity to drive extraordinary advances and
        innovations, algorithmic discrimination 

        protections should be built into their design, deployment, and ongoing
        use. 

        Many companies, non-profits, and federal government agencies are already
        taking steps to ensure the public 

        is protected from algorithmic discrimination. Some companies have
        instituted bias testing as part of their product 

        quality assessment and launch procedures, and in some cases this testing
        has led products to be changed or not
      - >-
        accuracy), and enable human users to understand, appropriately trust,
        and effectively manage the emerging 

        generation of artificially intelligent partners.95 The National Science
        Foundation’s program on Fairness in 

        Artificial Intelligence also includes a specific interest in research
        foundations for explainable AI.96

        45
  - source_sentence: What is the intended use of the systems mentioned in the context?
    sentences:
      - >-
        In discussion of technical and governance interventions that that are
        needed to protect against the harms of these technologies, panelists
        individually described the importance of: receiving community input into
        the design and use of technologies, public reporting on crucial elements
        of these systems, better notice and consent procedures that ensure
        privacy based on context and use case, ability to opt-out of using these
        systems and receive a fallback to a human process, providing
        explanations of decisions and how these systems work, the need for
        governance including training in using these systems, ensuring the
        technological use cases are genuinely related to the goal task and are
        locally validated to work, and the need for institution
      - >-
        part of its loan underwriting and pricing model was found to be much
        more likely to charge an applicant whoattended a Historically Black
        College or University (HBCU) higher loan prices for refinancing a
        student loanthan an applicant who did not attend an HBCU. This was found
        to be true even when controlling for

        other credit-related factors.32

        •A hiring tool that learned the features of a company's employees
        (predominantly men) rejected women appli -

        cants for spurious and discriminatory reasons; resumes with the word
        “women’s,” such as “women’s

        chess club captain,” were penalized in the candidate ranking.33
      - systems with an intended use within sensi
  - source_sentence: >-
      How did the hospital's software error affect the patient's access to pain
      medication?
    sentences:
      - >-
        101

        •A fraud detection system for unemployment insurance distribution
        incorrectly flagged entries as fraudulent,leading to people with slight
        discrepancies or complexities in their files having their wages withheld
        and taxreturns seized without any chance to explain themselves or
        receive a review by a person.

        102

        •A patient was wrongly denied access to pain medication when the
        hospital’s software confused her medica -

        tion history with that of her dog’s. Even after she tracked down an
        explanation for the problem, doctorswere afraid to override the system,
        and she was forced to go without pain relief due to the system’s error.

        103
      - >-
        This section provides a brief summary of the problems that the principle
        seeks to address and protect against, including illustrative examples. 

        WHAT SHOULD BE EXPECTED OF AUTOMATED SYSTEMS : 

        •The expectations for automated systems are meant to serve as a
        blueprint for the development of additional technical

        standards and practices that should be tailored for particular sectors
        and contexts.

        •This section outlines practical steps that can be implemented to
        realize the vision of the Blueprint for an AI Bill of Rights. The
      - >-
        97 A human

        curing process,98 which helps voters to confirm their signatures and
        correct other voting mistakes, is

        important to ensure all votes are counted,99 and it is already standard
        practice in much of the country for

        both an election official and the voter to have the opportunity to
        review and correct any such issues.100 

        47
  - source_sentence: >-
      Which organizations and individuals submitted the documents mentioned in
      the context?
    sentences:
      - |-
        114 and were submitted by the below
        listed organizations and individuals:
        Accenture 
        Access Now ACT | The App Association AHIP 
        AIethicist.org
      - >-
        APPENDIX

        Panelists discussed the benefits of AI-enabled systems and their
        potential to build better and more 

        innovative infrastructure. They individually noted that while AI
        technologies may be new, the process of 

        technological diffusion is not, and that it was critical to have
        thoughtful and responsible development and 

        integration of technology within communities. Some p anelists suggested
        that the integration of technology 

        could benefit from examining how technological diffusion has worked in
        the realm of urban planning: 

        lessons learned from successes and failures there include the importance
        of balancing ownership rights, use 

        rights, and community health, safety and welfare, as well ensuring
        better representation of all voices,
      - |-
        26Algorithmic 
        Discrimination 
        Protections
  - source_sentence: >-
      What types of risks should be identified and mitigated before the
      deployment of an automated system?
    sentences:
      - >-
        APPENDIX

        Systems  that impact the safety of communities such as automated traffic
        control systems, elec 

        -ctrical grid controls, smart city technologies, and industrial
        emissions and environmental

        impact control algorithms; and

        Systems  related to access to benefits or services or assignment of
        penalties such as systems that
      - >-
        points to numerous examples of effective and proactive stakeholder
        engagement, including the Community-

        Based Participatory Research Program developed by the National
        Institutes of Health and the participatory 

        technology assessments developed by the National Oceanic and Atmospheric
        Administration.18

        The National Institute of Standards and Technology (NIST) is developing
        a risk 

        management framework to better manage risks posed to individuals,
        organizations, and 

        society by AI.19 The NIST AI Risk Management Framework, as mandated by
        Congress, is intended for 

        voluntary use to help incorporate trustworthiness considerations into
        the design, development, use, and
      - >-
        Risk identification and mitigation. Before deployment, and in a
        proactive and ongoing manner, poten -

        tial risks of the automated system should be identified and mitigated.
        Identified risks should focus on the potential for meaningful impact on
        people’s rights, opportunities, or access and include those to impacted
        communities that may not be direct users of the automated system, risks
        resulting from purposeful misuse of the system, and other concerns
        identified via the consultation process. Assessment and, where possible,
        mea

        -
model-index:
  - name: SentenceTransformer based on Snowflake/snowflake-arctic-embed-m
    results:
      - task:
          type: information-retrieval
          name: Information Retrieval
        dataset:
          name: Unknown
          type: unknown
        metrics:
          - type: cosine_accuracy@1
            value: 0.8
            name: Cosine Accuracy@1
          - type: cosine_accuracy@3
            value: 0.925
            name: Cosine Accuracy@3
          - type: cosine_accuracy@5
            value: 0.94
            name: Cosine Accuracy@5
          - type: cosine_accuracy@10
            value: 0.98
            name: Cosine Accuracy@10
          - type: cosine_precision@1
            value: 0.8
            name: Cosine Precision@1
          - type: cosine_precision@3
            value: 0.30833333333333335
            name: Cosine Precision@3
          - type: cosine_precision@5
            value: 0.18799999999999997
            name: Cosine Precision@5
          - type: cosine_precision@10
            value: 0.09799999999999999
            name: Cosine Precision@10
          - type: cosine_recall@1
            value: 0.8
            name: Cosine Recall@1
          - type: cosine_recall@3
            value: 0.925
            name: Cosine Recall@3
          - type: cosine_recall@5
            value: 0.94
            name: Cosine Recall@5
          - type: cosine_recall@10
            value: 0.98
            name: Cosine Recall@10
          - type: cosine_ndcg@10
            value: 0.8955920586775068
            name: Cosine Ndcg@10
          - type: cosine_mrr@10
            value: 0.868345238095238
            name: Cosine Mrr@10
          - type: cosine_map@100
            value: 0.8695985052884031
            name: Cosine Map@100
          - type: dot_accuracy@1
            value: 0.8
            name: Dot Accuracy@1
          - type: dot_accuracy@3
            value: 0.925
            name: Dot Accuracy@3
          - type: dot_accuracy@5
            value: 0.94
            name: Dot Accuracy@5
          - type: dot_accuracy@10
            value: 0.98
            name: Dot Accuracy@10
          - type: dot_precision@1
            value: 0.8
            name: Dot Precision@1
          - type: dot_precision@3
            value: 0.30833333333333335
            name: Dot Precision@3
          - type: dot_precision@5
            value: 0.18799999999999997
            name: Dot Precision@5
          - type: dot_precision@10
            value: 0.09799999999999999
            name: Dot Precision@10
          - type: dot_recall@1
            value: 0.8
            name: Dot Recall@1
          - type: dot_recall@3
            value: 0.925
            name: Dot Recall@3
          - type: dot_recall@5
            value: 0.94
            name: Dot Recall@5
          - type: dot_recall@10
            value: 0.98
            name: Dot Recall@10
          - type: dot_ndcg@10
            value: 0.8955920586775068
            name: Dot Ndcg@10
          - type: dot_mrr@10
            value: 0.868345238095238
            name: Dot Mrr@10
          - type: dot_map@100
            value: 0.8695985052884031
            name: Dot Map@100

SentenceTransformer based on Snowflake/snowflake-arctic-embed-m

This is a sentence-transformers model finetuned from Snowflake/snowflake-arctic-embed-m. 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: Snowflake/snowflake-arctic-embed-m
  • Maximum Sequence Length: 512 tokens
  • Output Dimensionality: 768 tokens
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) 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()
)

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("JoeNoss1998/Noss")
# Run inference
sentences = [
    'What types of risks should be identified and mitigated before the deployment of an automated system?',
    'Risk identification and mitigation. Before deployment, and in a proactive and ongoing manner, poten -\ntial risks of the automated system should be identified and mitigated. Identified risks should focus on the potential for meaningful impact on people’s rights, opportunities, or access and include those to impacted communities that may not be direct users of the automated system, risks resulting from purposeful misuse of the system, and other concerns identified via the consultation process. Assessment and, where possible, mea\n-',
    'APPENDIX\nSystems  that impact the safety of communities such as automated traffic control systems, elec \n-ctrical grid controls, smart city technologies, and industrial emissions and environmental\nimpact control algorithms; and\nSystems  related to access to benefits or services or assignment of penalties such as systems that',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

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

Evaluation

Metrics

Information Retrieval

Metric Value
cosine_accuracy@1 0.8
cosine_accuracy@3 0.925
cosine_accuracy@5 0.94
cosine_accuracy@10 0.98
cosine_precision@1 0.8
cosine_precision@3 0.3083
cosine_precision@5 0.188
cosine_precision@10 0.098
cosine_recall@1 0.8
cosine_recall@3 0.925
cosine_recall@5 0.94
cosine_recall@10 0.98
cosine_ndcg@10 0.8956
cosine_mrr@10 0.8683
cosine_map@100 0.8696
dot_accuracy@1 0.8
dot_accuracy@3 0.925
dot_accuracy@5 0.94
dot_accuracy@10 0.98
dot_precision@1 0.8
dot_precision@3 0.3083
dot_precision@5 0.188
dot_precision@10 0.098
dot_recall@1 0.8
dot_recall@3 0.925
dot_recall@5 0.94
dot_recall@10 0.98
dot_ndcg@10 0.8956
dot_mrr@10 0.8683
dot_map@100 0.8696

Training Details

Training Dataset

Unnamed Dataset

  • Size: 800 training samples
  • Columns: sentence_0 and sentence_1
  • Approximate statistics based on the first 800 samples:
    sentence_0 sentence_1
    type string string
    details
    • min: 10 tokens
    • mean: 20.05 tokens
    • max: 42 tokens
    • min: 3 tokens
    • mean: 116.96 tokens
    • max: 512 tokens
  • Samples:
    sentence_0 sentence_1
    What is the purpose of the AI Bill of Rights mentioned in the context? BLUEPRINT FOR AN
    AI B ILL OF
    RIGHTS
    MAKING AUTOMATED
    SYSTEMS WORK FOR
    THE AMERICAN PEOPLE
    OCTOBER 2022
    When was the Blueprint for an AI Bill of Rights published? BLUEPRINT FOR AN
    AI B ILL OF
    RIGHTS
    MAKING AUTOMATED
    SYSTEMS WORK FOR
    THE AMERICAN PEOPLE
    OCTOBER 2022
    What is the purpose of the Blueprint for an AI Bill of Rights published by the White House Office of Science and Technology Policy? About this Document
    The Blueprint for an AI Bill of Rights: Making Automated Systems Work for the American People was
    published by the White House Office of Science and Technology Policy in October 2022. This framework was
    released one year after OSTP announced the launch of a process to develop “a bill of rights for an AI-powered
    world.” Its release follows a year of public engagement to inform this initiative. The framework is available
    online at: https://www.whitehouse.gov/ostp/ai-bill-of-rights
    About the Office of Science and Technology Policy
    The Office of Science and Technology Policy (OSTP) was established by the National Science and Technology
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            768,
            512,
            256,
            128,
            64
        ],
        "matryoshka_weights": [
            1,
            1,
            1,
            1,
            1
        ],
        "n_dims_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 20
  • per_device_eval_batch_size: 20
  • num_train_epochs: 5
  • multi_dataset_batch_sampler: round_robin

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 20
  • per_device_eval_batch_size: 20
  • 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: 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: {}
  • warmup_ratio: 0.0
  • 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: False
  • 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: False
  • 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: None
  • 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: round_robin

Training Logs

Epoch Step cosine_map@100
1.0 40 0.8784
1.25 50 0.8759
2.0 80 0.8795
2.5 100 0.8775
3.0 120 0.8714
3.75 150 0.8747
4.0 160 0.8746
5.0 200 0.8696

Framework Versions

  • Python: 3.10.12
  • Sentence Transformers: 3.1.1
  • Transformers: 4.44.2
  • PyTorch: 2.4.1+cu121
  • Accelerate: 0.34.2
  • Datasets: 3.0.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",
}

MatryoshkaLoss

@misc{kusupati2024matryoshka,
    title={Matryoshka Representation Learning},
    author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
    year={2024},
    eprint={2205.13147},
    archivePrefix={arXiv},
    primaryClass={cs.LG}
}

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