CoolFace
Modelpublic

RedHatAI/bge-large-en-v1.5-quant

sourceHugging Facemitupdated 3y agoView on Hugging Face
22likes63downloads
Model Card

bge-large-en-v1.5-quant

<div> <img src="https://huggingface.co/zeroshot/bge-large-en-v1.5-quant/resolve/main/bge-large-latency.png" alt="latency" width="500" style="display:inline-block; margin-right:10px;"/> </div>

DeepSparse is able to improve latency performance on a 10 core laptop by 4.8X and up to 3.5X on a 16 core AWS instance.

Usage

This is the quantized (INT8) ONNX variant of the bge-large-en-v1.5 embeddings model accelerated with Sparsify for quantization and DeepSparseSentenceTransformers for inference.

bash
pip install -U deepsparse-nightly[sentence_transformers]
python
from deepsparse.sentence_transformers import DeepSparseSentenceTransformer
model = DeepSparseSentenceTransformer('neuralmagic/bge-large-en-v1.5-quant', export=False)

# Our sentences we like to encode
sentences = ['This framework generates embeddings for each input sentence',
    'Sentences are passed as a list of string.',
    'The quick brown fox jumps over the lazy dog.']

# Sentences are encoded by calling model.encode()
embeddings = model.encode(sentences)

# Print the embeddings
for sentence, embedding in zip(sentences, embeddings):
    print("Sentence:", sentence)
    print("Embedding:", embedding.shape)
    print("")

For general questions on these models and sparsification methods, reach out to the engineering team on our community Slack.