CoolFace
Modelpublic

zeroshot/gte-small-quant

sourceHugging Facemitupdated 3y agoView on Hugging Face
1likes40downloads
Model Card

gte-small-quant

This is the quantized (INT8) ONNX variant of the gte-small embeddings model created with DeepSparse Optimum for ONNX export/inference and Neural Magic's Sparsify for one-shot quantization.

Current list of sparse and quantized gte ONNX models:

LinksSparsification Method
zeroshot/gte-large-sparseQuantization (INT8) & 50% Pruning
zeroshot/gte-large-quantQuantization (INT8)
zeroshot/gte-base-sparseQuantization (INT8) & 50% Pruning
zeroshot/gte-base-quantQuantization (INT8)
zeroshot/gte-small-sparseQuantization (INT8) & 50% Pruning
zeroshot/gte-small-quantQuantization (INT8)
bash
pip install -U deepsparse-nightly[sentence_transformers]
python
from deepsparse.sentence_transformers import SentenceTransformer
model = SentenceTransformer('zeroshot/gte-small-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 further details regarding DeepSparse & Sentence Transformers integration, refer to the DeepSparse README.

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

;)