gte-small-quant / README.md
zeroshot's picture
Update README.md
9fe7720
metadata
tags:
  - sparse sparsity quantized onnx embeddings int8
  - mteb
model-index:
  - name: gte-small-quant
    results:
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_counterfactual
          name: MTEB AmazonCounterfactualClassification (en)
          config: en
          split: test
          revision: e8379541af4e31359cca9fbcf4b00f2671dba205
        metrics:
          - type: accuracy
            value: 72.88059701492537
          - type: ap
            value: 35.74239003564444
          - type: f1
            value: 66.98065758287116
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_polarity
          name: MTEB AmazonPolarityClassification
          config: default
          split: test
          revision: e2d317d38cd51312af73b3d32a06d1a08b442046
        metrics:
          - type: accuracy
            value: 91.031575
          - type: ap
            value: 87.60741691468986
          - type: f1
            value: 91.00983458583187
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_reviews_multi
          name: MTEB AmazonReviewsClassification (en)
          config: en
          split: test
          revision: 1399c76144fd37290681b995c656ef9b2e06e26d
        metrics:
          - type: accuracy
            value: 46.943999999999996
          - type: f1
            value: 46.33280307575562
      - task:
          type: Reranking
        dataset:
          type: mteb/askubuntudupquestions-reranking
          name: MTEB AskUbuntuDupQuestions
          config: default
          split: test
          revision: 2000358ca161889fa9c082cb41daa8dcfb161a54
        metrics:
          - type: map
            value: 60.75683986813218
          - type: mrr
            value: 73.51624675724399
      - task:
          type: STS
        dataset:
          type: mteb/biosses-sts
          name: MTEB BIOSSES
          config: default
          split: test
          revision: d3fb88f8f02e40887cd149695127462bbcf29b4a
        metrics:
          - type: cos_sim_pearson
            value: 89.07092347634877
          - type: cos_sim_spearman
            value: 87.80621759170344
          - type: euclidean_pearson
            value: 87.29751551472525
          - type: euclidean_spearman
            value: 87.5634409755362
          - type: manhattan_pearson
            value: 87.56100206227441
          - type: manhattan_spearman
            value: 87.45982415672536
      - task:
          type: Classification
        dataset:
          type: mteb/banking77
          name: MTEB Banking77Classification
          config: default
          split: test
          revision: 0fd18e25b25c072e09e0d92ab615fda904d66300
        metrics:
          - type: accuracy
            value: 83.46753246753246
          - type: f1
            value: 83.39526091362032
      - task:
          type: Classification
        dataset:
          type: mteb/emotion
          name: MTEB EmotionClassification
          config: default
          split: test
          revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37
        metrics:
          - type: accuracy
            value: 45.800000000000004
          - type: f1
            value: 40.76055487612189
      - task:
          type: Classification
        dataset:
          type: mteb/imdb
          name: MTEB ImdbClassification
          config: default
          split: test
          revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7
        metrics:
          - type: accuracy
            value: 85.0096
          - type: ap
            value: 79.91059611360778
          - type: f1
            value: 84.9738791599706
      - task:
          type: Classification
        dataset:
          type: mteb/mtop_domain
          name: MTEB MTOPDomainClassification (en)
          config: en
          split: test
          revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf
        metrics:
          - type: accuracy
            value: 92.51025991792065
          - type: f1
            value: 92.2852224639839
      - task:
          type: Classification
        dataset:
          type: mteb/mtop_intent
          name: MTEB MTOPIntentClassification (en)
          config: en
          split: test
          revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba
        metrics:
          - type: accuracy
            value: 69.61924304605563
          - type: f1
            value: 51.832892524807505
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_massive_intent
          name: MTEB MassiveIntentClassification (en)
          config: en
          split: test
          revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7
        metrics:
          - type: accuracy
            value: 70.2320107599193
          - type: f1
            value: 68.03367707473218
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_massive_scenario
          name: MTEB MassiveScenarioClassification (en)
          config: en
          split: test
          revision: 7d571f92784cd94a019292a1f45445077d0ef634
        metrics:
          - type: accuracy
            value: 75.28581035642232
          - type: f1
            value: 75.43554941058956
      - task:
          type: STS
        dataset:
          type: mteb/sickr-sts
          name: MTEB SICK-R
          config: default
          split: test
          revision: a6ea5a8cab320b040a23452cc28066d9beae2cee
        metrics:
          - type: cos_sim_pearson
            value: 83.58628262329275
          - type: cos_sim_spearman
            value: 77.30534089053104
          - type: euclidean_pearson
            value: 80.86400799226335
          - type: euclidean_spearman
            value: 77.26947744139412
          - type: manhattan_pearson
            value: 80.79442484789072
          - type: manhattan_spearman
            value: 77.18043722794019
      - task:
          type: STS
        dataset:
          type: mteb/sts12-sts
          name: MTEB STS12
          config: default
          split: test
          revision: a0d554a64d88156834ff5ae9920b964011b16384
        metrics:
          - type: cos_sim_pearson
            value: 82.77293561742106
          - type: cos_sim_spearman
            value: 73.98616407095425
          - type: euclidean_pearson
            value: 78.7096804108132
          - type: euclidean_spearman
            value: 73.52379687387366
          - type: manhattan_pearson
            value: 78.80694876432868
          - type: manhattan_spearman
            value: 73.64907838788528
      - task:
          type: STS
        dataset:
          type: mteb/sts13-sts
          name: MTEB STS13
          config: default
          split: test
          revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca
        metrics:
          - type: cos_sim_pearson
            value: 82.12995363427328
          - type: cos_sim_spearman
            value: 84.23345798311749
          - type: euclidean_pearson
            value: 83.94003648503143
          - type: euclidean_spearman
            value: 84.74522675669463
          - type: manhattan_pearson
            value: 83.82868963165394
          - type: manhattan_spearman
            value: 84.61059125620956
      - task:
          type: STS
        dataset:
          type: mteb/sts14-sts
          name: MTEB STS14
          config: default
          split: test
          revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375
        metrics:
          - type: cos_sim_pearson
            value: 81.88504872832357
          - type: cos_sim_spearman
            value: 80.09345991196561
          - type: euclidean_pearson
            value: 81.99899431994811
          - type: euclidean_spearman
            value: 80.25520445997002
          - type: manhattan_pearson
            value: 81.9635758954928
          - type: manhattan_spearman
            value: 80.24335353637277
      - task:
          type: STS
        dataset:
          type: mteb/sts15-sts
          name: MTEB STS15
          config: default
          split: test
          revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3
        metrics:
          - type: cos_sim_pearson
            value: 86.55052353126385
          - type: cos_sim_spearman
            value: 88.1950992730786
          - type: euclidean_pearson
            value: 87.83472249083056
          - type: euclidean_spearman
            value: 88.43301043636015
          - type: manhattan_pearson
            value: 87.75102815516877
          - type: manhattan_spearman
            value: 88.34719608377306
      - task:
          type: STS
        dataset:
          type: mteb/sts16-sts
          name: MTEB STS16
          config: default
          split: test
          revision: 4d8694f8f0e0100860b497b999b3dbed754a0513
        metrics:
          - type: cos_sim_pearson
            value: 81.58832350766542
          - type: cos_sim_spearman
            value: 83.60857270697358
          - type: euclidean_pearson
            value: 82.9059299279255
          - type: euclidean_spearman
            value: 83.87380773329784
          - type: manhattan_pearson
            value: 82.76009241925925
          - type: manhattan_spearman
            value: 83.72876466499108
      - task:
          type: STS
        dataset:
          type: mteb/sts17-crosslingual-sts
          name: MTEB STS17 (en-en)
          config: en-en
          split: test
          revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d
        metrics:
          - type: cos_sim_pearson
            value: 87.96440735880392
          - type: cos_sim_spearman
            value: 87.79655666183349
          - type: euclidean_pearson
            value: 88.47129589774806
          - type: euclidean_spearman
            value: 87.95235258398374
          - type: manhattan_pearson
            value: 88.37144209103296
          - type: manhattan_spearman
            value: 87.81869790317533
      - task:
          type: STS
        dataset:
          type: mteb/sts22-crosslingual-sts
          name: MTEB STS22 (en)
          config: en
          split: test
          revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80
        metrics:
          - type: cos_sim_pearson
            value: 66.66468384683428
          - type: cos_sim_spearman
            value: 66.84275911821702
          - type: euclidean_pearson
            value: 67.73972664535547
          - type: euclidean_spearman
            value: 66.57863145583491
          - type: manhattan_pearson
            value: 67.91309920462287
          - type: manhattan_spearman
            value: 66.67487869242575
      - task:
          type: STS
        dataset:
          type: mteb/stsbenchmark-sts
          name: MTEB STSBenchmark
          config: default
          split: test
          revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831
        metrics:
          - type: cos_sim_pearson
            value: 84.07668437020894
          - type: cos_sim_spearman
            value: 85.13186558138277
          - type: euclidean_pearson
            value: 85.28607166042313
          - type: euclidean_spearman
            value: 85.25082312265897
          - type: manhattan_pearson
            value: 85.0870328315141
          - type: manhattan_spearman
            value: 85.10612962221282
      - task:
          type: Reranking
        dataset:
          type: mteb/scidocs-reranking
          name: MTEB SciDocsRR
          config: default
          split: test
          revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab
        metrics:
          - type: map
            value: 84.33835340608282
          - type: mrr
            value: 95.54063220729888
      - task:
          type: PairClassification
        dataset:
          type: mteb/sprintduplicatequestions-pairclassification
          name: MTEB SprintDuplicateQuestions
          config: default
          split: test
          revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46
        metrics:
          - type: cos_sim_accuracy
            value: 99.81386138613861
          - type: cos_sim_ap
            value: 95.49398397880566
          - type: cos_sim_f1
            value: 90.5050505050505
          - type: cos_sim_precision
            value: 91.42857142857143
          - type: cos_sim_recall
            value: 89.60000000000001
          - type: dot_accuracy
            value: 99.75742574257426
          - type: dot_ap
            value: 93.40675781804289
          - type: dot_f1
            value: 87.45519713261648
          - type: dot_precision
            value: 89.61175236096537
          - type: dot_recall
            value: 85.39999999999999
          - type: euclidean_accuracy
            value: 99.81485148514851
          - type: euclidean_ap
            value: 95.39724876386569
          - type: euclidean_f1
            value: 90.5793450881612
          - type: euclidean_precision
            value: 91.26903553299492
          - type: euclidean_recall
            value: 89.9
          - type: manhattan_accuracy
            value: 99.81485148514851
          - type: manhattan_ap
            value: 95.46515830873487
          - type: manhattan_f1
            value: 90.56974459724951
          - type: manhattan_precision
            value: 88.996138996139
          - type: manhattan_recall
            value: 92.2
          - type: max_accuracy
            value: 99.81485148514851
          - type: max_ap
            value: 95.49398397880566
          - type: max_f1
            value: 90.5793450881612
      - task:
          type: Reranking
        dataset:
          type: mteb/stackoverflowdupquestions-reranking
          name: MTEB StackOverflowDupQuestions
          config: default
          split: test
          revision: e185fbe320c72810689fc5848eb6114e1ef5ec69
        metrics:
          - type: map
            value: 51.68384236354744
          - type: mrr
            value: 52.52933749257278
      - task:
          type: Classification
        dataset:
          type: mteb/toxic_conversations_50k
          name: MTEB ToxicConversationsClassification
          config: default
          split: test
          revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c
        metrics:
          - type: accuracy
            value: 69.7972
          - type: ap
            value: 13.790209566654962
          - type: f1
            value: 53.73625700975159
      - task:
          type: Classification
        dataset:
          type: mteb/tweet_sentiment_extraction
          name: MTEB TweetSentimentExtractionClassification
          config: default
          split: test
          revision: d604517c81ca91fe16a244d1248fc021f9ecee7a
        metrics:
          - type: accuracy
            value: 57.81550650820599
          - type: f1
            value: 58.22494506904567
      - task:
          type: PairClassification
        dataset:
          type: mteb/twittersemeval2015-pairclassification
          name: MTEB TwitterSemEval2015
          config: default
          split: test
          revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1
        metrics:
          - type: cos_sim_accuracy
            value: 84.30589497526375
          - type: cos_sim_ap
            value: 68.60854966172107
          - type: cos_sim_f1
            value: 65.06926244852113
          - type: cos_sim_precision
            value: 61.733364906464594
          - type: cos_sim_recall
            value: 68.7862796833773
          - type: dot_accuracy
            value: 81.63557250998392
          - type: dot_ap
            value: 58.80135920860792
          - type: dot_f1
            value: 57.39889705882353
          - type: dot_precision
            value: 50.834350834350836
          - type: dot_recall
            value: 65.91029023746702
          - type: euclidean_accuracy
            value: 84.37742146986946
          - type: euclidean_ap
            value: 68.88494996210581
          - type: euclidean_f1
            value: 65.23647001462702
          - type: euclidean_precision
            value: 60.62528318985048
          - type: euclidean_recall
            value: 70.60686015831135
          - type: manhattan_accuracy
            value: 84.21648685700661
          - type: manhattan_ap
            value: 68.54917405273397
          - type: manhattan_f1
            value: 64.97045701193778
          - type: manhattan_precision
            value: 59.826782145236514
          - type: manhattan_recall
            value: 71.08179419525065
          - type: max_accuracy
            value: 84.37742146986946
          - type: max_ap
            value: 68.88494996210581
          - type: max_f1
            value: 65.23647001462702
      - task:
          type: PairClassification
        dataset:
          type: mteb/twitterurlcorpus-pairclassification
          name: MTEB TwitterURLCorpus
          config: default
          split: test
          revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf
        metrics:
          - type: cos_sim_accuracy
            value: 88.60752124810804
          - type: cos_sim_ap
            value: 85.16030341274225
          - type: cos_sim_f1
            value: 77.50186985789081
          - type: cos_sim_precision
            value: 75.34904013961605
          - type: cos_sim_recall
            value: 79.781336618417
          - type: dot_accuracy
            value: 86.00147475453099
          - type: dot_ap
            value: 79.24446611557556
          - type: dot_f1
            value: 72.34317740892433
          - type: dot_precision
            value: 67.81624680048498
          - type: dot_recall
            value: 77.51770865414228
          - type: euclidean_accuracy
            value: 88.7026041060271
          - type: euclidean_ap
            value: 85.30879801684605
          - type: euclidean_f1
            value: 77.60992108229988
          - type: euclidean_precision
            value: 75.80384671854354
          - type: euclidean_recall
            value: 79.50415768401602
          - type: manhattan_accuracy
            value: 88.75305623471883
          - type: manhattan_ap
            value: 85.24656615741652
          - type: manhattan_f1
            value: 77.5542141739325
          - type: manhattan_precision
            value: 75.14079422382672
          - type: manhattan_recall
            value: 80.12781028641824
          - type: max_accuracy
            value: 88.75305623471883
          - type: max_ap
            value: 85.30879801684605
          - type: max_f1
            value: 77.60992108229988
license: mit
language:
  - en

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.

;)