Run this model with HF Jobs

Run RedHatAI/bge-base-en-v1.5-sparse on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs to fine-tune https://huggingface.co/RedHatAI/bge-base-en-v1.5-sparse. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/RedHatAI/bge-base-en-v1.5-sparse on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
How to use from the
Use from the
Transformers library
# Use a pipeline as a high-level helper
from transformers import pipeline

pipe = pipeline("feature-extraction", model="RedHatAI/bge-base-en-v1.5-sparse")
# pip install -U transformers accelerate
# Load model directly
from transformers import AutoTokenizer, AutoModel

tokenizer = AutoTokenizer.from_pretrained("RedHatAI/bge-base-en-v1.5-sparse")
model = AutoModel.from_pretrained("RedHatAI/bge-base-en-v1.5-sparse", device_map="auto")
Quick Links

bge-base-en-v1.5-sparse

Usage

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.

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

Model tree for RedHatAI/bge-base-en-v1.5-sparse

Unable to build the model tree, the base model loops to the model itself. Learn more.

Evaluation results