SentenceTransformer based on BAAI/bge-base-en-v1.5

This is a sentence-transformers model finetuned from BAAI/bge-base-en-v1.5. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, classification, clustering, and more.

Model Details

Model Description

  • Model Type: Sentence Transformer
  • Base model: BAAI/bge-base-en-v1.5
  • Maximum Sequence Length: 256 tokens
  • Output Dimensionality: 768 dimensions
  • Similarity Function: Cosine Similarity
  • Supported Modality: Text

Model Sources

Full Model Architecture

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': 768, 'pooling_mode': 'cls', '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 = [
    'Title: HOT-ROLLED STEEL SHEET, COLD-ROLLED STEEL SHEET, GALVANIZED STEEL SHEET, AND METHODS OF MANUFACTURING THE SAME\nAbstract: A hot-rolled steel sheet has an average value of the X-ray random intensity ratio of a {100}<011> to {223}<110> orientation group at least in a sheet thickness central portion that is in a sheet thickness range of ⅝ to ⅜ from a steel sheet surface of 1.0 to 6.0, an X-ray random intensity ratio of a {332}<113> crystal orientation of 1.0 to 5.0, rC which is an r value in a direction perpendicular to a rolling direction of 0.70 to 1.10, and r30 which is an r value in a direction that forms an angle of 30° with respect to the rolling direction of 0.70 to 1.10.',
    'Title: METHOD FOR PRODUCING A FLAT PRODUCT FROM AN IRON-BASED SHAPE MEMORY ALLOY\nAbstract: Methods for producing a flat product from an iron-based shape memory alloy may involve casting a melt comprised of iron, alloying elements, and impurities into a strip having a thickness of 1-30 mm and cooling the melt as the strip is formed. A twin-roll caster may be employed to help cool and form the melt into the strip. The resultant flat product is highly resistant to bending and is robust under pressure and torsion.',
    'Title: AUTOMATED NETWORK CONNECTION SHARING\nAbstract: Concepts and technologies are described herein for providing automated network connection sharing. Techniques disclosed herein can initiate Internet connection sharing between a first computer and a second computer, wherein the Internet connection sharing enables the first computer to function as a host to provide Internet access to the second computer. If there is a break in the connection, a system determines if the second computer is in proximity to the first computer. If it is determined that the first computer is in proximity to the second computer, the techniques disclosed herein verify access rights. Once the access rights are verified, the system automatically establishes Internet connection sharing between the first computer and the second computer. The techniques disclosed herein enable access to a service for sharing a network connection without requiring user interaction.',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 768]

# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.5762, 0.0685],
#         [0.5762, 1.0000, 0.0148],
#         [0.0685, 0.0148, 1.0000]])

Training Details

Training Dataset

Unnamed Dataset

  • Size: 39,291 training samples
  • Columns: anchor and positive
  • Approximate statistics based on the first 100 samples:
    anchor positive
    type string string
    modality text text
    details
    • min: 48 tokens
    • mean: 151.09 tokens
    • max: 256 tokens
    • min: 45 tokens
    • mean: 145.53 tokens
    • max: 256 tokens
  • Samples:
    anchor positive
    Title: METHOD FOR PROCESS OPERATORS TO PERSONALIZE SETTINGS FOR ENABLING DETECTION OF ABNORMAL PROCESS BEHAVIORS
    Abstract: A system, method, and an apparatus relating to automatically setting up pre-upset warning conditions for entire systems based on drifting parameters. The drifting parameters may provide monitoring to operate the process so that the upset condition is never reached, by allowing the operator can take actions so that the process remains in a stable state. The aim is to monitor and limit variations in parameters to enable the operator to achieve a much tighter control on the process and not allow the alarm to occur in the first place. Additionally, the important values may be displayed in context, and the operator may directly manipulate the values through a variety of touch input.
    Title: DIGITAL MOTOR CONTROLLER STABILITY ANALYSIS TOOL
    Abstract: A computer-implemented method for performing stability analysis for a digital motor controller includes receiving a reference signal to be injected into a digital speed control loop and controlling, by a hardware description language (VHDL) component, the injection of the reference signal into the digital control loop through a field programmable gate array (FPGA) hardware interface. The method also includes providing the reference signal to the digital speed control loop to determine a performance of the digital motor controller and receiving a feedback signal, at the FPGA hardware interface, from the digital speed control loop based on the reference signal. The method includes comparing the reference signal to the feedback signal to evaluate the performance of the digital motor controller and exporting a result of the comparing by the FPGA hardware interface to indicate the performance of the digital motor controller.
    Title: Terminal mechanism, Permanent Magnet Adjustable-Speed Motor and Centrifugal Refrigeration Compressor
    Abstract: Disclosed are a terminal mechanism, a permanent magnet adjustable-speed motor and a centrifugal refrigeration compressor. The terminal mechanism comprises a terminal board, power supply connectors and sealing rings; the terminal board is made of steel, and the magnetic permeability μ of the steel is less than or equal to 1.31×10−6 H/m. The terminal board is a flat board having an upper surface and a lower surface, and is provided with terminal holes thereon. The sealing rings are sleeved on the power supply connectors. The power supply connectors are fixed on the terminal board through the terminal holes. The sealing rings are in sealing engagement with the terminal board, so as to reduce heat generated by an electric eddy current.
    Title: METHOD FOR MAKING A POWER CONNECTION
    Abstract: The invention provides systems and methods for power connection, which may be a sealed power connection. The sealed power connection may be used with an electric machine or any device that may require electrical and/or mechanical connection for power. The sealed power connection may provide an effective electrical connection while providing a robust mechanical connection. The electric machine or device may be fluid-sealed and/or fluid-cooled. The sealed power connection may provide for electrical insulation of the connection from the machine or device enclosure, and may also be sealed to provide for fluid sealing and/or internal fluid cooling of the electric machine or device, as well as fluid cooling of the connection.
    Title: METHOD, DEVICE AND SYSTEM FOR PROJECTION ON SCREEN
    Abstract: The present disclosure relates to a method, a device and a system in a smart home system for projection on a screen. The method may include: receiving predetermined type of signal, and establishing a predetermined type of connection with a second electronic device which sends the predetermined type of signal; according to the predetermined type of connection, notifying the second electronic device to start a WiFi P2P connection service; and after the first electronic device starting the WiFi P2P connection service, establishing a WiFi P2P connection with the second electronic device which has started the WiFi P2P connection service, and performing projection on a screen of the second electronic device.
    Title: Multiband Wireless Communication Method, Coordinating Device, and Network
    Abstract: Disclosed are a multi-band wireless communication method, a coordinating device and a network, wherein the method is applied to a coordinating device that supports multi-band communication, wherein the coordinating device manages a node resource information table, and the node resource information table includes terminal information of a subnet where the coordinating device is located and other subnets; the method includes: the coordinating device receiving a link establishment request; the coordinating device responding to the link establishment request according to the node resource information table, instructing transmitting and receiving ends to establish a point-to-point connection or coordinating to establish relay links between the transmitting and receiving ends; and receiving and forwarding received data packets when the coordinating device is a relay node.
  • Loss: 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
    }
    

Training Hyperparameters

Non-Default Hyperparameters

  • per_device_train_batch_size: 16
  • num_train_epochs: 1
  • learning_rate: 2e-05
  • warmup_steps: 0.1
  • fp16: True
  • dataloader_num_workers: 2
  • batch_sampler: no_duplicates

All Hyperparameters

Click to expand
  • per_device_train_batch_size: 16
  • num_train_epochs: 1
  • max_steps: -1
  • learning_rate: 2e-05
  • lr_scheduler_type: linear
  • lr_scheduler_kwargs: None
  • warmup_steps: 0.1
  • optim: adamw_torch_fused
  • optim_args: None
  • weight_decay: 0.0
  • adam_beta1: 0.9
  • adam_beta2: 0.999
  • adam_epsilon: 1e-08
  • optim_target_modules: None
  • gradient_accumulation_steps: 1
  • average_tokens_across_devices: True
  • max_grad_norm: 1.0
  • label_smoothing_factor: 0.0
  • bf16: False
  • fp16: True
  • bf16_full_eval: False
  • fp16_full_eval: False
  • tf32: None
  • gradient_checkpointing: False
  • gradient_checkpointing_kwargs: None
  • torch_compile: False
  • torch_compile_backend: None
  • torch_compile_mode: None
  • use_liger_kernel: False
  • liger_kernel_config: None
  • use_cache: False
  • neftune_noise_alpha: None
  • torch_empty_cache_steps: None
  • auto_find_batch_size: False
  • log_on_each_node: True
  • logging_nan_inf_filter: True
  • include_num_input_tokens_seen: no
  • log_level: passive
  • log_level_replica: warning
  • disable_tqdm: False
  • project: huggingface
  • trackio_space_id: None
  • trackio_bucket_id: None
  • trackio_static_space_id: None
  • per_device_eval_batch_size: 8
  • prediction_loss_only: True
  • eval_on_start: False
  • eval_do_concat_batches: True
  • eval_use_gather_object: False
  • eval_accumulation_steps: None
  • include_for_metrics: []
  • batch_eval_metrics: False
  • save_only_model: False
  • save_on_each_node: False
  • enable_jit_checkpoint: False
  • push_to_hub: False
  • hub_private_repo: None
  • hub_model_id: None
  • hub_strategy: every_save
  • hub_always_push: False
  • hub_revision: None
  • load_best_model_at_end: False
  • ignore_data_skip: False
  • restore_callback_states_from_checkpoint: False
  • full_determinism: False
  • seed: 42
  • data_seed: None
  • use_cpu: False
  • 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
  • dataloader_drop_last: False
  • dataloader_num_workers: 2
  • dataloader_pin_memory: True
  • dataloader_persistent_workers: False
  • dataloader_prefetch_factor: None
  • dataloader_multiprocessing_context: None
  • dataloader_in_order: True
  • remove_unused_columns: True
  • label_names: None
  • train_sampling_strategy: random
  • length_column_name: length
  • ddp_find_unused_parameters: None
  • ddp_bucket_cap_mb: None
  • ddp_broadcast_buffers: False
  • ddp_static_graph: None
  • ddp_backend: None
  • ddp_timeout: 1800
  • fsdp: None
  • fsdp_config: None
  • deepspeed: None
  • debug: []
  • skip_memory_metrics: True
  • do_predict: False
  • resume_from_checkpoint: None
  • local_rank: -1
  • prompts: None
  • batch_sampler: no_duplicates
  • multi_dataset_batch_sampler: proportional
  • router_mapping: {}
  • learning_rate_mapping: {}
  • warmup_ratio: None

Training Logs

Epoch Step Training Loss
0.0407 50 1.5115
0.0814 100 1.0744
0.1221 150 0.9523
0.1629 200 0.9376
0.2036 250 0.9118
0.2443 300 0.9300
0.2850 350 0.9179
0.3257 400 0.8813
0.3664 450 0.8283
0.4072 500 0.8399
0.4479 550 0.8350
0.4886 600 0.8227
0.5293 650 0.8668
0.5700 700 0.7845
0.6107 750 0.7699
0.6515 800 0.8075
0.6922 850 0.8143
0.7329 900 0.7978
0.7736 950 0.8160
0.8143 1000 0.8105
0.8550 1050 0.7341
0.8958 1100 0.7515
0.9365 1150 0.7128
0.9772 1200 0.6976

Training Time

  • Training: 30.0 minutes

Framework Versions

  • Python: 3.13.16
  • Sentence Transformers: 5.7.0
  • Transformers: 5.20.2
  • PyTorch: 2.11.0+cu130
  • Accelerate: 1.15.0
  • Datasets: 4.8.5
  • Tokenizers: 0.23.3

Additional Resources

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{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},
}
Downloads last month
22
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

Model tree for patzer-adi/bge-patent-mnrl

Finetuned
(512)
this model

Papers for patzer-adi/bge-patent-mnrl