SentenceTransformer

This is a sentence-transformers model trained. 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
  • Maximum Sequence Length: 2048 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity

Model Sources

Full Model Architecture

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

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("JalalKhal/test")
# Run inference
queries = [
    "Attach clips to secure LH upper C-pillar trim",
]
documents = [
    'TITLE: Trim - C-Pillar - Upper - LH (Remove and Replace)\nREMOVE:\n- Remove the rear trunk parcel shelf. See Parcel Shelf - Rear Trunk (Remove and Replace).\n- Remove the LH and RH side bolster trims. See Bolster - Outer - Seat - 2nd Row - LH (Remove and Replace).\n- Remove 2nd row lower seat cushion. See Seat Cushion - Lower - 2nd Row (Remove and Replace).\n- Remove and discard the lower bolt that attaches the LH 2nd row seat belt retractor to the vehicle.\n- Fold the LH 2nd row seat to the down position.  If seat cushion is not present, protect the seat as required.\n- Remove the LH lower C-pillar trim. See Trim - C-Pillar - Lower - LH (Remove and Replace).\n- Remove the LH mid C-pillar trim. See Trim - C-Pillar - Mid - LH (Remove and Replace).\n- Release the clips (x7) that attach the LH upper C-pillar trim to the C-pillar, and then feed the seat belt through the trim to remove it from the vehicle.\n\nINSTALL:\n- Position the LH upper C-pillar trim to the C-pillar, feed the seat belt through the trim, and then fasten the clips (x7) that attach the trim to the vehicle.\n- Install the LH mid C-pillar trim. See Trim - C-Pillar - Mid - LH (Remove and Replace).\n- Install the LH lower C-pillar trim. See Trim - C-Pillar - Lower - LH (Remove and Replace).\n- Fold the LH 2nd row seat to the up position.  Remove the seat cushion protection.\n- Install a new lower bolt that attaches the LH 2nd row seat belt retractor to the vehicle.\n- Install the 2nd row lower seat cushion. See Seat Cushion - Lower - 2nd Row (Remove and Replace).\n- Install the LH and RH side bolster trims. See Bolster - Outer - Seat - 2nd Row - LH (Remove and Replace).\n- Install the rear trunk parcel shelf. See Parcel Shelf - Rear Trunk (Remove and Replace).\n',
    'TITLE: Park Brake Caliper - Caliper Seized/Motor Failure - Release\nPROCEDURE:\n- Move the vehicle to a 2 post lift. See Raise Vehicle - 2 Post Lift.\n- Remove the LH rear wheel. See Wheel Assembly (Remove and Install).\n- Release the red locking tab, and then disconnect the electrical harness from the LH rear brake caliper motor connector.\n- Remove the screws (x2) that attach the LH rear brake caliper motor to the LH rear brake caliper, and then remove the motor from the caliper.\n- Use a 5 mm Allen wrench or 5 mm hex bit socket to rotate the brake shaft clockwise to back off the piston and release the pads.\n- Replace the LH rear brake caliper. See Brake Caliper - Rear - LH (Remove and Replace).  While it is possible to reassemble the motor to the caliper, it is not advised. The motor might be damaged in such a way that it will not engage the brake pads again or will fail to release, or the brake shaft will bind again and either not engage the brake pads or fail to release.\n- Install the LH rear wheel. See Wheel Assembly (Remove and Install).\n',
    'TITLE: HV Battery Air Leak Test (In Vehicle)\nPROCEDURE:\n- Move the vehicle to a 2-post lift. See Raise Vehicle - 2 Post Lift.\n- Remove the rear underhood apron. See Underhood Apron - Rear (Remove and Replace).\n- Disconnect LV power. See LV Power (Disconnect and Connect).\n- Remove the mid aero shield panel. See Panel - Aero Shield - Rear (Remove and Replace). .\n- Carefully remove the gore breathers (x4) from the breather assembly at the rear of the HV battery pack.\n- Insert tapered plugs into three breather holes so that they fit snugly.  Do not push plugs too far inside.\n- Install the leak test adapter into the fourth breather hole.  Use an S-hook or zip tie to hang the hose to reduce strain at the insertion point.\n- Connect the enclosure leak tester hose to the leak test adapter.  Restrain the enclosure leak tester hose so that it will not tug the leak test adapter out of the HV battery.\n- Turn valve P2 (left) and valve P1 (right) to the closed (vertical) position on the enclosure leak tester.\n- Turn the knob on the regulator to the fully closed setting.\n- Connect the supply compressed air line to the enclosure leak tester.\n- Turn valve P1 (right) to the open (horizontal) position and slowly adjust the regulator so that 0.3 psi is displayed on the gauge.  Do not go below 0.27 psi or above 0.33 psi.\n- Make sure that the regulator is set to 0.3 psi.\n- Slowly turn valve P2 (left) to the open (horizontal) position and allow air to enter the HV battery.\n- Allow 60 seconds for the pressure to stabilize.\n- Turn valve P1 (right) to the close (vertical) position.\n- Record the beginning pressure value and start a 30 second timer.\n- After 30 seconds has elapsed, record the end pressure value, and then substract the end pressure value from the beginning pressure value. -   If the pressure difference is more than 0.026 psi, inspect the HV battery for leaks, turn valve P2 (left) to the close (vertical) position, and retest from step 12. -   If the pressure difference is 0.026 psi or less, continue to the next step.\n- Disconnect the supply compressed air line from the enclosure leak tester.\n- Slowly turn valve P1 (right) to the open (horizontal) position, and allow air to exit the HV battery.\n- Disconnect the enclosure leak tester hose from the leak test adapter.\n- Remove the leak test adapter from the fourth breather hole.\n- Remove the tapered plugs from the three breather holes.\n- Carefully install the gore breathers (x4) into the breather assembly at the rear of the HV battery pack.  If damaged, replace with part number 1108907-00-B.\n- Install the mid aero shield panel. See Panel - Aero Shield - Rear (Remove and Replace).\n- Connect LV power. See LV Power (Disconnect and Connect).\n- Install the rear underhood apron. See Underhood Apron - Rear (Remove and Replace).\n- Remove the vehicle from the 2-post lift. See Raise Vehicle - 2 Post Lift.\n',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 768] [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[ 0.5192, -0.1762,  0.0215]])

Evaluation

Metrics

Information Retrieval

Metric Value
cosine_accuracy@1 0.206
cosine_accuracy@3 0.4573
cosine_accuracy@5 0.5925
cosine_accuracy@10 0.7251
cosine_precision@1 0.206
cosine_precision@5 0.1185
cosine_precision@10 0.0725
cosine_recall@1 0.206
cosine_recall@5 0.5925
cosine_recall@10 0.7251
cosine_ndcg@10 0.4494
cosine_mrr@10 0.3628
cosine_map@100 0.3733

Training Details

Training Dataset

Unnamed Dataset

  • Size: 6,094 training samples
  • Columns: query and positive
  • Approximate statistics based on the first 1000 samples:
    query positive
    type string string
    details
    • min: 5 tokens
    • mean: 10.92 tokens
    • max: 18 tokens
    • min: 39 tokens
    • mean: 548.03 tokens
    • max: 2024 tokens
  • Samples:
    query positive
    How to lower the left front window? TITLE: Superbeam (Remove and Replace)
    REMOVE:
    - Open the LH front door and lower the LH front window.
    - Perform the "Deflate All" section of Air Suspension - Pressurize / Depressurize - Full System.
    - Remove the rear underhood apron. See Underhood Apron - Rear (Remove and Replace).
    - Disconnect LV power. See LV Power (Disconnect and Connect).
    - Remove the LH and RH underhood aprons. See Underhood Apron - LH (Remove and Replace).
    - Remove the front underhood apron. See Underhood Apron - Front (Remove and Replace).
    - Remove the underhood storage unit access panel. See Underhood Storage Unit Access Panel (Remove and Replace).
    - Remove the underhood storage unit. See Underhood Storage Unit (Remove and Install).
    - Remove the schrader valve cap from the air reservoir.
    - Press down on the schrader valve to deflate completely the residual pressure from the air reservoir.
    - Reinstall the schrader valve cap onto the air reservoir.
    - Remove the nut that attaches the valve block line to the superb...
    Remove both wiper blades from arms TITLE: Wiper Blades - Pair (Remove and Replace)
    REMOVE:
    - Use the touchscreen to put the wipers in "Wiper Service Mode".
    - Place a shop towel under the wiper arm to protect the windshield.
    - Press the first tab located on either wiper blade and slide the wiper blade from the wiper arm until it stops.
    - Press the second tab on the wiper blade and slide out the blade to remove it from the wiper arm.
    - Repeat steps 3 and 4 on the other wiper blade.

    INSTALL:
    - Slide in the LH wiper blade to the LH wiper arm until it is secured by the locking tabs.
    - Repeat step 1 for the RH wiper blade.
    - Use the touchscreen to disable the "Wiper Service Mode".
    Replace aero shield panel after valve installation TITLE: Umbrella Valve - Set (Remove and Replace)
    REMOVE:
    - Open the front doors and lower the front windows.
    - Open the RH rear door.
    - Remove the RH rocker panel molding. See Molding - Rocker Panel - LH (Remove and Replace).
    - Raise and support the vehicle. See Raise Vehicle - 2 Post Lift.
    - Remove the mid aero shield panel. See Panel - Aero Shield - Rear (Remove and Replace).
    - Remove the umbrella valves (x5) from the RH side of the HV battery. If liquid is observed leaking from the valve during removal, immediately halt the procedure and consult Toolbox article 5401800 for further instructions.

    INSTALL:
    - Use IPA wipes to thoroughly clean the thermal vent openings (x5). Make sure no dirt or debris enters the HV battery enclosure during cleaning.
    - Use a gloved finger to apply grease around the perimeter of each thermal vent opening (x5). - For EMEA: Molykote M77 (PN: 1014689-00-B) or Klübersynth RA 44 (PN: 1110230-01-A). - For other reagions: High Vacuum Grease (PN: 1024173-0...
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim",
        "gather_across_devices": false
    }
    

Evaluation Dataset

Unnamed Dataset

  • Size: 1,524 evaluation samples
  • Columns: query and positive
  • Approximate statistics based on the first 1000 samples:
    query positive
    type string string
    details
    • min: 6 tokens
    • mean: 10.78 tokens
    • max: 18 tokens
    • min: 39 tokens
    • mean: 565.23 tokens
    • max: 2024 tokens
  • Samples:
    query positive
    Put back trunk floor front trim TITLE: Carpet - Rear Trunk (5 Seat) (Remove and Replace)
    REMOVE:
    - Remove the rear trunk parcel shelf. See Parcel Shelf - Rear Trunk (Remove and Replace).
    - Remove the rear trunk load floor. See Trunk Load Floor - Rear (Remove and Replace).
    - Remove the rear trunk trim. See Trim - Rear Trunk - Rear Wall (Remove and Replace).
    - Remove the LH trunk load floor bracket. See Bracket - Trunk Load Floor - LH (Remove and Replace).
    - Remove the RH trunk load floor bracket. See Bracket - Trunk Load Floor - RH (Remove and Replace).
    - Remove the trunk floor front trim. See Trim - Front - Floor - Trunk (Remove and Replace).
    - Release the clips (x2) that attach the rear trunk carpet to the vehicle.

    INSTALL:
    - Secure the clips (x2) that attach the rear trunk carpet to the vehicle.
    - Install the trunk floor front trim. See Trim - Front - Floor - Trunk (Remove and Replace).
    - Install the RH trunk load floor bracket. See Bracket - Trunk Load Floor - RH (Remove and Replace).
    - Remove the LH trunk load f...
    Cannot remove FM antenna amplifier bolt TITLE: Antenna Amplifier - FM (Remove and Replace)
    REMOVE:
    - Open the liftgate.
    - Remove the lower liftgate trim. See Trim - Liftgate - Lower (Remove and Replace).
    - Remove the speaker grill trim. See Grille - Speaker - Liftgate (Remove and Replace).
    - Remove the upper liftgate trim. See Trim - Upper - Liftgate (Remove and Replace).
    - Disconnect the connectors (x2) to the FM antenna amplifier.
    - Remove the bolt that attaches the FM antenna amplifier to the liftgate.
    - Carefully pry the FM antenna amplifier away from the lift game to release the retainer, and then remove the antenna amplifier from the liftgate.

    INSTALL:
    - Position the FM antenna amplifier onto the liftgate, and then press the antenna into the liftgate to seat the retainer. Make sure the datum is lined up and the retainer clips in securely.
    - Install the bolt that attaches the FM antenna amplifier to the liftgate.
    - Connect the connectors (x2) to the FM antenna amplifier.
    - Install the upper liftgate trim. See Trim - U...
    Install all parts removed for instrument panel access TITLE: Instrument Cluster (Remove and Replace)
    REMOVE:
    - Remove the IP sub-assembly. See Sub Assembly - Instrument Panel (Remove and Install).
    - Remove the IP passenger air vent. See Air Vent - Instrument Panel - Passenger (LHD) (Remove and Replace).
    - Remove the IP driver air vent . See Air Vent - Instrument Panel - Driver (LHD) (Remove and Replace).

    INSTALL:
    - Install the IP driver air vent . See Air Vent - Instrument Panel - Driver (LHD) (Remove and Replace).
    - Install the IP passenger air vent. See Air Vent - Instrument Panel - Passenger (LHD) (Remove and Replace).
    - Install the instrument panel sub-assembly and all other parts that were removed for access . See Sub Assembly - Instrument Panel (Remove and Install).
  • Loss: MultipleNegativesRankingLoss with these parameters:
    {
        "scale": 20.0,
        "similarity_fct": "cos_sim",
        "gather_across_devices": false
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • eval_strategy: steps
  • per_device_train_batch_size: 48
  • learning_rate: 2e-05
  • num_train_epochs: 175
  • warmup_ratio: 0.1
  • fp16: True

All Hyperparameters

Click to expand
  • overwrite_output_dir: False
  • do_predict: False
  • eval_strategy: steps
  • prediction_loss_only: True
  • per_device_train_batch_size: 48
  • per_device_eval_batch_size: 8
  • 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: 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: 175
  • max_steps: -1
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • 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
  • 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: 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}
  • parallelism_config: 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
  • 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
  • use_legacy_prediction_loop: False
  • 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_inputs_for_metrics: False
  • include_for_metrics: []
  • 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
  • include_tokens_per_second: False
  • 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
  • prompts: None
  • batch_sampler: batch_sampler
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}

Training Logs

Epoch Step Training Loss Validation Loss val_cosine_ndcg@10
0.7874 100 3.7453 - -
1.5748 200 3.7059 - -
2.3622 300 3.5356 - -
3.1496 400 2.7703 - -
3.9370 500 1.7011 0.6095 0.3177
4.7244 600 1.4672 - -
5.5118 700 1.3951 - -
6.2992 800 1.2983 - -
7.0866 900 1.2653 - -
7.8740 1000 1.1974 0.4356 0.3667
8.6614 1100 1.1251 - -
9.4488 1200 1.0679 - -
10.2362 1300 1.0855 - -
11.0236 1400 0.9993 - -
11.8110 1500 0.945 0.3670 0.3866
12.5984 1600 0.9357 - -
13.3858 1700 0.9259 - -
14.1732 1800 0.8819 - -
14.9606 1900 0.8228 - -
15.7480 2000 0.8088 0.3129 0.4001
16.5354 2100 0.7801 - -
17.3228 2200 0.7595 - -
18.1102 2300 0.7247 - -
18.8976 2400 0.7001 - -
19.6850 2500 0.6788 0.2797 0.4116
20.4724 2600 0.6708 - -
21.2598 2700 0.6469 - -
22.0472 2800 0.6378 - -
22.8346 2900 0.6063 - -
23.6220 3000 0.5802 0.2613 0.4206
24.4094 3100 0.5618 - -
25.1969 3200 0.5856 - -
25.9843 3300 0.5491 - -
26.7717 3400 0.5334 - -
27.5591 3500 0.5258 0.2563 0.4234
28.3465 3600 0.5192 - -
29.1339 3700 0.4945 - -
29.9213 3800 0.4866 - -
30.7087 3900 0.4816 - -
31.4961 4000 0.465 0.2445 0.4327
32.2835 4100 0.4796 - -
33.0709 4200 0.4713 - -
33.8583 4300 0.445 - -
34.6457 4400 0.4401 - -
35.4331 4500 0.4258 0.2367 0.4336
36.2205 4600 0.4402 - -
37.0079 4700 0.4334 - -
37.7953 4800 0.4125 - -
38.5827 4900 0.4035 - -
39.3701 5000 0.4126 0.2317 0.4431
40.1575 5100 0.3924 - -
40.9449 5200 0.3924 - -
41.7323 5300 0.3809 - -
42.5197 5400 0.365 - -
43.3071 5500 0.3653 0.2397 0.4448
44.0945 5600 0.3648 - -
44.8819 5700 0.3611 - -
45.6693 5800 0.3525 - -
46.4567 5900 0.3455 - -
47.2441 6000 0.3437 0.2301 0.4453
48.0315 6100 0.3504 - -
48.8189 6200 0.3303 - -
49.6063 6300 0.3233 - -
50.3937 6400 0.3282 - -
51.1811 6500 0.3469 0.2240 0.4508
51.9685 6600 0.3115 - -
52.7559 6700 0.3165 - -
53.5433 6800 0.3092 - -
54.3307 6900 0.3088 - -
55.1181 7000 0.3044 0.2235 0.4494
55.9055 7100 0.3176 - -
56.6929 7200 0.2949 - -

Framework Versions

  • Python: 3.12.9
  • Sentence Transformers: 5.2.0
  • Transformers: 4.57.6
  • PyTorch: 2.9.0+cu128
  • Accelerate: 1.12.0
  • Datasets: 4.5.0
  • Tokenizers: 0.22.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}
}
Downloads last month
177
Safetensors
Model size
0.1B params
Tensor type
F32
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Papers for JalalKhal/test

Evaluation results