bge-base-en-v1.5-fp16-ov

Disclaimer: This model is provided for evaluation purposes only. Performance, accuracy, and stability may vary. Use at your own discretion.

Description

This is bge-base-en-v1.5 model converted to the OpenVINO™ IR (Intermediate Representation) format with weights compressed to FP16.

Compatibility

The provided OpenVINO™ IR model is compatible with:

  • OpenVINO version 2025.1.0 and higher
  • Optimum Intel 1.24.0 and higher

Running Model Inference with Optimum Intel

  1. Install packages required for using Optimum Intel integration with the OpenVINO backend:
pip install optimum[openvino]
  1. Run model inference:
import torch
from transformers import AutoTokenizer

from optimum.intel.openvino import OVModelForFeatureExtraction


# Sentences we want sentence embeddings for
sentences = ["Sample Data-1", "Sample Data-2"]

# Load model from HuggingFace Hub
tokenizer = AutoTokenizer.from_pretrained('OpenVINO/bge-base-en-v1.5-fp16-ov')
model = OVModelForFeatureExtraction.from_pretrained('OpenVINO/bge-base-en-v1.5-fp16-ov')

# Tokenize sentences
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')

# Compute token embeddings
model_output = model(**encoded_input)

# Perform pooling. In this case, cls pooling.
sentence_embeddings = model_output[0][:, 0]

# normalize embeddings
sentence_embeddings = torch.nn.functional.normalize(sentence_embeddings, p=2, dim=1)
print("Sentence embeddings:", sentence_embeddings)

For more examples and possible optimizations, refer to the Inference with Optimum Intel.

You can find more detailed usage examples in OpenVINO Notebooks:

Limitations

Check the original model card for limitations.

Legal information

The original model is distributed under MIT license. More details can be found in bge-base-en-v1.5.

Disclaimer

Intel is committed to respecting human rights and avoiding causing or contributing to adverse impacts on human rights. See Intel’s Global Human Rights Principles. Intel’s products and software are intended only to be used in applications that do not cause or contribute to adverse impacts on human rights.

Downloads last month
34
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for OpenVINO/bge-base-en-v1.5-fp16-ov

Finetuned
(430)
this model