Feature Extraction
Transformers
ONNX
English
bert
sparse sparsity quantized onnx embeddings int8
mteb
Eval Results (legacy)
Instructions to use zeroshot/gte-small-quant with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zeroshot/gte-small-quant with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("feature-extraction", model="zeroshot/gte-small-quant")# Load model directly from transformers import AutoTokenizer, AutoModel tokenizer = AutoTokenizer.from_pretrained("zeroshot/gte-small-quant") model = AutoModel.from_pretrained("zeroshot/gte-small-quant") - Notebooks
- Google Colab
- Kaggle
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:
| Links | Sparsification Method |
|---|---|
| zeroshot/gte-large-sparse | Quantization (INT8) & 50% Pruning |
| zeroshot/gte-large-quant | Quantization (INT8) |
| zeroshot/gte-base-sparse | Quantization (INT8) & 50% Pruning |
| zeroshot/gte-base-quant | Quantization (INT8) |
| zeroshot/gte-small-sparse | Quantization (INT8) & 50% Pruning |
| zeroshot/gte-small-quant | Quantization (INT8) |
pip install -U deepsparse-nightly[sentence_transformers]
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.
- Downloads last month
- 217
Spaces using zeroshot/gte-small-quant 11
🥇
mteb/leaderboard_legacy
🥇
SmileXing/leaderboard
🥇
sq66/leaderboard_legacy
🚀
reader-1/1
🥇
shiwan7788/leaderboard-uni
Evaluation results
- accuracy on MTEB AmazonCounterfactualClassification (en)test set self-reported72.881
- ap on MTEB AmazonCounterfactualClassification (en)test set self-reported35.742
- f1 on MTEB AmazonCounterfactualClassification (en)test set self-reported66.981
- accuracy on MTEB AmazonPolarityClassificationtest set self-reported91.032
- ap on MTEB AmazonPolarityClassificationtest set self-reported87.607
- f1 on MTEB AmazonPolarityClassificationtest set self-reported91.010
- accuracy on MTEB AmazonReviewsClassification (en)test set self-reported46.944
- f1 on MTEB AmazonReviewsClassification (en)test set self-reported46.333
- map on MTEB AskUbuntuDupQuestionstest set self-reported60.757
- mrr on MTEB AskUbuntuDupQuestionstest set self-reported73.516
- cos_sim_pearson on MTEB BIOSSEStest set self-reported89.071
- cos_sim_spearman on MTEB BIOSSEStest set self-reported87.806
- euclidean_pearson on MTEB BIOSSEStest set self-reported87.298
- euclidean_spearman on MTEB BIOSSEStest set self-reported87.563
- manhattan_pearson on MTEB BIOSSEStest set self-reported87.561
- manhattan_spearman on MTEB BIOSSEStest set self-reported87.460
