Loading…
Loading…
This is a sentence-transformers model finetuned from BAAI/bge-small-en-v1.5. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for retrieval.
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': 'cls', 'include_prompt': True})
(2): Normalize({})
)
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
queries = [
'Represent this sentence for searching relevant passages: The LC-5500 is producing bad cuts with heavy dross on the bottom, which component should I replace?',
]
documents = [
'[maintenance_log] log_LC-5500_01 - 2025-04-22 | Corrective Maintenance | Technician A. Deshmukh\nUnscheduled intervention during Shift B following operator report of poor cut quality. Inspection of the cut components revealed heavy dross on underside of cut edge, matching failure mode LC5500-FM-01. Further examination of the cutting head indicated nozzle orifice degradation and wear, which disrupted the gas flow dynamics for the assist gas types (Nitrogen and Oxygen). Action taken: Removed damaged nozzle and replaced with spare part SP-7001. Verified nozzle standoff_mm maintained at 0.8 mm relative to the sheet surface. Performed test cut on 10 mm mild steel, verifying gas pressure against the material parameter table. Total downtime: 45 minutes. Parts consumed: SP-7001 (1 unit). Technician remarks: Cut edge quality restored to acceptable manufacturing standards. No further dross observed.',
'[maintenance_log] log_LC-5500_03 - 2026-03-22 | Corrective Maintenance | Technician S. Deshmukh\nObserved condition: Shift B operators reported poor cut quality during processing of 12 mm structural carbon steel sheet, well within the max_sheet_thickness_mm rating of 20 mm. Inspection of cut components revealed severe dross accumulation on the underside of the cut edge, corresponding to failure mode LC5500-FM-01. Edge geometry degraded due to inconsistent assist gas flow and orifice degradation.\n\nAction taken: Powered down LC-5500 and locked out electrical supply. Removed inspection access cover on the cutting head assembly. Extracted worn cutting nozzle and cleaned seating surfaces with lint-free ethanol wipes. Installed replacement cutting nozzle part SP-7001. Performed nozzle centering routine and executed test cuts on reference material. Verified assist gas pressure alignment against standard cutting parameter table.\n\nParts consumed: SP-7001.\n\nDowntime in minutes: 45.\n\nTechnician remarks: Worn nozzle orifice caused turbulent gas jet stream, leading to incomplete slag ejection. Post-repair test cuts showed clean edges free of dross. Handed over machine to Shift C production supervisor without further anomalies.',
'[maintenance_log] log_HP-450_01 - 2025-04-05 | Corrective Maintenance | Technician R. Kulkarni\nObserved condition: Shift A operator reported audible pump cavitation and vibration during initial cold startup of asset HP-450. Reservoir temperature was recorded at 21 degC. Hydraulic system parameter checks indicated pump starvation on the suction side, corresponding to failure mode HP450-FM-04.\n\nAction taken: Isolated system power and drained suction line. Inspected tank interior and found heavy contamination on the suction strainer. Removed and cleaned the suction strainer using solvent degreaser. Verified proper functioning of the reservoir immersion heater circuit. Replaced clogged line filter element with fresh SP-2004 stock. Refilled suction line, primed pump, and restarted system during Shift B.\n\nParts consumed: SP-2004 (1 ea)\n\nDowntime: 45 minutes\n\nTechnician remarks: Cavitation noise eliminated upon restart. Oil tank heater maintained standby oil temperature above minimum threshold. Pump operation verified smooth with static reservoir fluid level normal at 380 L capacity. Plant location: MPW-PUN-01.',
]
query_embeddings = model.encode_query(queries)
document_embeddings = model.encode_document(documents)
print(query_embeddings.shape, document_embeddings.shape)
# [1, 384] [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(query_embeddings, document_embeddings)
print(similarities)
# tensor([[0.7618, 0.7514, 0.2863]])
valInformationRetrievalEvaluator| Metric | Value |
|---|---|
| cosine_accuracy@1 | 0.5593 |
| cosine_accuracy@3 | 0.8305 |
| cosine_accuracy@5 | 0.9153 |
| cosine_precision@1 | 0.5593 |
| cosine_precision@3 | 0.2768 |
| cosine_precision@5 | 0.1831 |
| cosine_precision@10 | 0.0958 |
| cosine_recall@1 | 0.5593 |
| cosine_recall@3 | 0.8305 |
| cosine_recall@5 | 0.9153 |
| cosine_recall@10 | 0.9576 |
| cosine_ndcg@5 | 0.7484 |
| cosine_ndcg@10 | 0.763 |
| cosine_mrr@10 | 0.6993 |
| cosine_map@100 | 0.7024 |
anchor, positive, and negative| anchor | positive | negative | |
|---|---|---|---|
| type | string | string | string |
| modality | text | text | text |
| details |
|
|
|
| anchor | positive | negative |
|---|---|---|
Represent this sentence for searching relevant passages: What procedures should technicians follow when replacing the SP-1001 on the CNC-XR200? |
[spare_parts_catalog] catalog_01 - SP-1001 | Turret Index Motor |
[manual] manual_CNC-XR200 - Overview |
Represent this sentence for searching relevant passages: The CNC-XR200 is throwing tool change errors due to a faulty SP-1001, what specific components need to be checked during inspection? |
[spare_parts_catalog] catalog_01 - SP-1001 | Turret Index Motor |
[maintenance_log] log_IM-780_03 - 2026-04-19 | Corrective Maintenance | Technician R. Kulkarni |
Represent this sentence for searching relevant passages: What maintenance tasks are required to prevent clamping alarms and seal degradation in part SP-1002? |
[spare_parts_catalog] catalog_01 - SP-1002 | Turret Clamp Assembly |
[manual] manual_WR-3000 - Routine Maintenance Schedule |
MultipleNegativesRankingLoss with these parameters:{
"scale": 20.0,
"similarity_fct": "cos_sim",
"gather_across_devices": false,
"directions": [
"query_to_doc"
],
"partition_mode": "joint",
"hardness_mode": null,
"hardness_strength": 0.0
}
per_device_train_batch_size: 32num_train_epochs: 4learning_rate: 2e-05warmup_steps: 0.1fp16: Truebatch_sampler: no_duplicatesper_device_train_batch_size: 32num_train_epochs: 4max_steps: -1learning_rate: 2e-05lr_scheduler_type: linearlr_scheduler_kwargs: Nonewarmup_steps: 0.1optim: adamw_torch_fusedoptim_args: Noneweight_decay: 0.0adam_beta1: 0.9adam_beta2: 0.999adam_epsilon: 1e-08optim_target_modules: Nonegradient_accumulation_steps: 1average_tokens_across_devices: Truemax_grad_norm: 1.0label_smoothing_factor: 0.0bf16: Falsefp16: Truebf16_full_eval: Falsefp16_full_eval: Falsetf32: Nonegradient_checkpointing: Falsegradient_checkpointing_kwargs: Nonetorch_compile: Falsetorch_compile_backend: Nonetorch_compile_mode: Noneuse_liger_kernel: Falseliger_kernel_config: Noneuse_cache: Falseneftune_noise_alpha: Nonetorch_empty_cache_steps: Noneauto_find_batch_size: Falselog_on_each_node: Truelogging_nan_inf_filter: Trueinclude_num_input_tokens_seen: nolog_level: passivelog_level_replica: warningdisable_tqdm: Falseproject: huggingfacetrackio_space_id: Nonetrackio_bucket_id: Nonetrackio_static_space_id: Noneper_device_eval_batch_size: 8prediction_loss_only: Trueeval_on_start: Falseeval_do_concat_batches: Trueeval_use_gather_object: Falseeval_accumulation_steps: Noneinclude_for_metrics: []batch_eval_metrics: Falsesave_only_model: Falsesave_on_each_node: Falseenable_jit_checkpoint: Falsepush_to_hub: Falsehub_private_repo: Nonehub_model_id: Nonehub_strategy: every_savehub_always_push: Falsehub_revision: Noneload_best_model_at_end: Falseignore_data_skip: Falserestore_callback_states_from_checkpoint: Falsefull_determinism: Falseseed: 42data_seed: Noneuse_cpu: Falseaccelerator_config: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}parallelism_config: Nonedataloader_drop_last: Falsedataloader_num_workers: 0dataloader_pin_memory: Truedataloader_persistent_workers: Falsedataloader_prefetch_factor: Noneremove_unused_columns: Truelabel_names: Nonetrain_sampling_strategy: randomlength_column_name: lengthddp_find_unused_parameters: Noneddp_bucket_cap_mb: Noneddp_broadcast_buffers: Falseddp_static_graph: Noneddp_backend: Noneddp_timeout: 1800fsdp: Nonefsdp_config: Nonedeepspeed: Nonedebug: []skip_memory_metrics: Truedo_predict: Falseresume_from_checkpoint: Nonewarmup_ratio: Nonelocal_rank: -1prompts: Nonebatch_sampler: no_duplicatesmulti_dataset_batch_sampler: proportionalrouter_mapping: {}learning_rate_mapping: {}| Epoch | Step | Training Loss | val_cosine_ndcg@10 |
|---|---|---|---|
| -1 | -1 | - | 0.6569 |
| 0.6667 | 10 | 1.9032 | - |
| 1.3333 | 20 | 1.3079 | - |
| 2.0 | 30 | 1.0632 | - |
| 2.6667 | 40 | 0.9233 | - |
| 3.3333 | 50 | 0.9080 | - |
| 4.0 | 60 | 0.8408 | - |
| -1 | -1 | - | 0.7630 |
@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",
}
@misc{oord2019representationlearningcontrastivepredictive,
title={Representation Learning with Contrastive Predictive Coding},
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
year={2019},
eprint={1807.03748},
archivePrefix={arXiv},
primaryClass={cs.LG},
url={https://arxiv.org/abs/1807.03748},
}
BAAI/bge-small-en-v1.5