SentenceTransformer based on Snowflake/snowflake-arctic-embed-l-v2.0

This is a sentence-transformers model finetuned from Snowflake/snowflake-arctic-embed-l-v2.0. It maps sentences & paragraphs to a 1024-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-l-v2.0
  • Maximum Sequence Length: 8192 tokens
  • Output Dimensionality: 1024 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

SentenceTransformer(
  (0): Transformer({'max_seq_length': 8192, 'do_lower_case': False}) with Transformer model: XLMRobertaModel 
  (1): Pooling({'word_embedding_dimension': 1024, '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("haophancs/snowflake-arctic-embed-l-v2.0-pits")
# Run inference
sentences = [
    'Fixed-point observation test.\nPre-check.\nAll members.\n02-08-19_Steering_Switch.\nExternal SW.\nSteering SW( ).\nSOURCE DOWN.\n02-08-19-042.\n1_A.\nExternal SW>Steering SW( )>SOURCE DOWN',
    'Updating AM/FM broadcast station list ACC disconnection → Manual update of station list results in failure to detect broadcast stations.\nAudio.\nAM_FM.\nIllegal Behavior/Incorrect Action.\nRadio.\nST.\nAudioPF.\nAudioPF.\nWhen executing ACC OFF, if the previous source was FM/AM, issue a radio switch request (OFF) and then execute a radio switch request (FM or AM). Before the completion of the audio OFF power switch, the above-mentioned wireless power switch was requested..\nVehicle: Desktop Environment Actual Machine: Display: RD_AM Screen Audio: AM The radio preset mode should be "Broadcast List" The received electric field of the radio should have receivable broadcast stations in the Broadcast List Connected Devices: RADIO ANT Vehicle Signals: ACC ON, PKB ON, SPD OFF (0km), REV OFF, TAIL OFF.\n① Press [List Update] → Manual update of the broadcast station list begins ※ ONS "Cannot operate during broadcast station search" is displayed ② During manual update of the broadcast station list, perform ACC momentary disconnection ※ ACC momentary disconnection involves turning OFF/ON within less than 1 second ※ When ACC momentarily disconnects, the backlight will turn off for a moment but quickly returns to displaying ONS "Cannot operate during broadcast station search" ③ No operation until completion of broadcast station list update → ONS "No receivable broadcast stations TS[OK]" is displayed ★NG occurs ④ Press TS[OK] → ONS disappears ⑤ Press [List Update] → ONS "No receivable broadcast stations TS[OK]" is displayed ★NG occurs.\nDuring the ACC disconnection performed while updating the radio station list, the receivable radio stations will not be extracted during manual update of the station list, and ONS "No available broadcast stations" will be displayed. If you perform a manual update of the station list again after displaying ONS "No available broadcast stations", ONS "No available broadcast stations" will be displayed immediately after the manual update operation, making it impossible to manually update the station list..\nWhen manually updating the broadcast station list, search for receivable broadcast stations and extract up to 12 stations in order of reception sensitivity as the "Broadcast Station List.".\n2-1.No Use Case/Insufficient Use Cases.\nConsideration遗漏 in ACC instantaneous disconnection. It has entered a path where source switching is not executed after radio switch request (OFF).',
    "[Navi]After Heat Run, the navigation app crashes due to inactivity..\nNavi.\nNavigation common.\nApp crash.\nNavi.\nNaviApp.\nClear the list (vector) of icon rectangle information for collision detection at the timing when updating the FBO for rendering..\nDisplay: AM Audio: AM • Connected to rear seat • TV antenna connected • Radio antenna connected • Route setting: Available (with driving) • Bluetooth connection available • Wi-Fi connection available • Stack more than 7 activities and NaviApp's Activity (name search) is older than 7th position • ACC on.\nNo operation.\nAfter heat run, the navigation app crashes due to inactivity. ■Supplement · Although it does not recover with ACC off/on as shown in the video, we have confirmed that it recovers after turning ACC on about 10 minutes after ACC off. · The heat run operation time is over 80 hours..\nThe nav app does not crash even when left idle after a heat run..\n5-5. Remains of Past Design/Left as It Was from Past Design.\nAt the time of drawing execution, I am creating a list (vector array) of icon rectangle information for collision detection. However, this list is replaced with a new one after display execution. Therefore, in cases where display completion does not occur due to drawing cancellation or similar issues, the list continues to be registered without being cleared, resulting in unexpected memory allocation continuing indefinitely.",
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 1024]

# 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@30 0.3063
cosine_accuracy@100 0.4505
cosine_accuracy@300 0.5946
cosine_precision@30 0.0102
cosine_precision@100 0.0045
cosine_precision@300 0.002
cosine_recall@30 0.3063
cosine_recall@100 0.4505
cosine_recall@300 0.5946
cosine_ndcg@10 0.0735
cosine_mrr@10 0.0513
cosine_map@100 0.0627

Training Details

Training Dataset

Unnamed Dataset

  • Size: 5,945 training samples
  • Columns: positive and anchor
  • Approximate statistics based on the first 1000 samples:
    positive anchor
    type string string
    details
    • min: 31 tokens
    • mean: 167.44 tokens
    • max: 805 tokens
    • min: 183 tokens
    • mean: 366.94 tokens
    • max: 634 tokens
  • Samples:
    positive anchor
    Fixed-point observation test.
    Pre-check.
    All members.
    02-06-51_Drive Recorder Integration.
    Drive recorder integration.
    Collaboration function.
    Image quality adjustment.
    02-06-51-120.
    2_B.
    Drive recorder connection > Connection function > Image quality adjustment.
    Screen: Drive Recorder File Playback (Map) Screen.
    ①Launch the picture adjustment screen and change the brightness and contrast settings..
    ・Adjustable brightness and contrast
    [ ] When manually switching the camera connection determination during the connection of a wide camera (YOP), the guide lines for the rear camera's top-down view change..
    Diag.
    Camera_Diag.
    Illegal Behavior/Incorrect Action.
    camera.
    ST.
    VideoPF.
    VideoPF.
    Modify the possible range for setting the guideline vertex coordinates to include the footer area (0-799, 0-479). This will prevent the coordinate range check from considering it abnormal and ensure that the initial guide lines are not displayed..
    ・System Information Settings ・Wide Camera (YOP) Connected ・Vehicle Speed 0 km/h ・Parking Brake: ON.
    ① REV ON: Current guidelines are confirmed ② REV OFF ③ Transition to developer diag ④ Press TSW[Camera Settings] ⑤ Press TSW[Manual Switch for Camera Connection Judgment] ⑥ Press TSW[Wide Camera(YOP)]→Press [Yes] ⑦ ACC OFF, then ACC ON for more than 10 seconds ⑧ REV ON: Current guidelines are confirmed →★The guideline of the rear camera top-down view is changed.
    When manually switching the came...
    Fixed-point observation test.
    Pre-check.
    All members.
    02-50-54_Developer_Diag_Function_for_.
    -1600.
    3_C.
    >>
    [ ] When manually switching the camera connection determination during the connection of a wide camera (YOP), the guide lines for the rear camera's top-down view change..
    Diag.
    Camera_Diag.
    Illegal Behavior/Incorrect Action.
    camera.
    ST.
    VideoPF.
    VideoPF.
    Modify the possible range for setting the guideline vertex coordinates to include the footer area (0-799, 0-479). This will prevent the coordinate range check from considering it abnormal and ensure that the initial guide lines are not displayed..
    ・System Information Settings ・Wide Camera (YOP) Connected ・Vehicle Speed 0 km/h ・Parking Brake: ON.
    ① REV ON: Current guidelines are confirmed ② REV OFF ③ Transition to developer diag ④ Press TSW[Camera Settings] ⑤ Press TSW[Manual Switch for Camera Connection Judgment] ⑥ Press TSW[Wide Camera(YOP)]→Press [Yes] ⑦ ACC OFF, then ACC ON for more than 10 seconds ⑧ REV ON: Current guidelines are confirmed →★The guideline of the rear camera top-down view is changed.
    When manually switching the came...
    Fixed-point observation test.
    Pre-check.
    All members.
    02-06-58_Camera.
    Rear view monitor.
    Rear camera (back view monitor).
    Caution message display.
    1_A.
    Back view monitor > Rear camera (back view monitor) > Caution message display.
    Screen: Current Location Screen Voice: Audio OFF Camera: Normal Camera Connected.
    ①REV ON⇒"Please visually confirm the surroundings of the vehicle.".
    ・OSD (visual warning messages can be displayed)
    [ ] When manually switching the camera connection determination during the connection of a wide camera (YOP), the guide lines for the rear camera's top-down view change..
    Diag.
    Camera_Diag.
    Illegal Behavior/Incorrect Action.
    camera.
    ST.
    VideoPF.
    VideoPF.
    Modify the possible range for setting the guideline vertex coordinates to include the footer area (0-799, 0-479). This will prevent the coordinate range check from considering it abnormal and ensure that the initial guide lines are not displayed..
    ・System Information Settings ・Wide Camera (YOP) Connected ・Vehicle Speed 0 km/h ・Parking Brake: ON.
    ① REV ON: Current guidelines are confirmed ② REV OFF ③ Transition to developer diag ④ Press TSW[Camera Settings] ⑤ Press TSW[Manual Switch for Camera Connection Judgment] ⑥ Press TSW[Wide Camera(YOP)]→Press [Yes] ⑦ ACC OFF, then ACC ON for more than 10 seconds ⑧ REV ON: Current guidelines are confirmed →★The guideline of the rear camera top-down view is changed.
    When manually switching the came...
  • Loss: MatryoshkaLoss with these parameters:
    {
        "loss": "MultipleNegativesRankingLoss",
        "matryoshka_dims": [
            1024
        ],
        "matryoshka_weights": [
            1
        ],
        "n_dims_per_step": -1
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: epoch
  • gradient_accumulation_steps: 16
  • learning_rate: 2e-05
  • num_train_epochs: 4
  • lr_scheduler_type: cosine
  • warmup_ratio: 0.1
  • bf16: True
  • tf32: True
  • load_best_model_at_end: True
  • optim: adamw_torch_fused
  • batch_sampler: no_duplicates

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: 8
  • per_gpu_train_batch_size: None
  • per_gpu_eval_batch_size: None
  • gradient_accumulation_steps: 16
  • eval_accumulation_steps: None
  • torch_empty_cache_steps: None
  • learning_rate: 2e-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: 4
  • max_steps: -1
  • lr_scheduler_type: cosine
  • 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: True
  • fp16: False
  • fp16_opt_level: O1
  • half_precision_backend: auto
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: True
  • 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_fused
  • 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
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional

Training Logs

Epoch Step Training Loss dim_1024_cosine_ndcg@10
0 0 - 0.0776
0.2151 10 1.6503 -
0.4301 20 1.4755 -
0.6452 30 1.3519 -
0.8602 40 1.478 -
1.0323 48 - 0.0840
1.0228 50 1.117 -
1.2379 60 1.3709 -
1.4530 70 1.2806 -
1.6680 80 1.1826 -
1.8831 90 1.2987 -
2.0336 97 - 0.0792
2.0457 100 0.9801 -
2.2608 110 1.2541 -
2.4758 120 1.1502 -
2.6909 130 1.1076 -
2.9059 140 1.1814 -
3.0349 146 - 0.0747
3.0685 150 0.8835 -
3.2836 160 1.1296 -
3.4987 170 1.0703 -
3.7137 180 1.013 -
3.7997 184 - 0.0735
  • The bold row denotes the saved checkpoint.

Framework Versions

  • Python: 3.11.11
  • Sentence Transformers: 3.3.1
  • Transformers: 4.44.2
  • PyTorch: 2.5.1+cu124
  • Accelerate: 1.3.0
  • Datasets: 2.19.0
  • 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}
}
Downloads last month
18
Safetensors
Model size
568M params
Tensor type
F32
·
Inference Providers NEW
This model is not currently available via any of the supported third-party Inference Providers, and the model is not deployed on the HF Inference API.

Model tree for haophancs/snowflake-arctic-embed-l-v2.0-pits

Finetuned
(9)
this model

Evaluation results