Downloads · 30 days
56
0% of all-time downloads
RedHatAI/bge-base-en-v1.5-sparse
bge-base-en-v1.5-sparse is a feature extraction model from RedHatAI. Use it when you need embeddings to search or compare text. It is set up for transformers. The card lists the license as mit.
This is the sparse ONNX variant of the bge-small-en-v1.5 embeddings model accelerated with Sparsify for quantization/pruning and DeepSparseSentenceTransformers for inference.
Downloads · 30 days
56
0% of all-time downloads
All-time downloads
36.7K
Public
Repo size
181 MB
Likes
1
Public
Click a slice to open those files.
.onnx181 MB · 100%
From the Hugging Face model README
This is the sparse ONNX variant of the bge-small-en-v1.5 embeddings model accelerated with Sparsify for quantization/pruning and DeepSparseSentenceTransformers for inference.
pip install -U deepsparse-nightly[sentence_transformers]
from deepsparse.sentence_transformers import DeepSparseSentenceTransformer
model = DeepSparseSentenceTransformer('neuralmagic/bge-base-en-v1.5-sparse', 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.