vprelovac's picture
Update README.md
ae6f6be
metadata
tags:
  - mteb
model-index:
  - name: universal-sentence-encoder-multilingual-3
    results:
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_counterfactual
          name: MTEB AmazonCounterfactualClassification (en)
          config: en
          split: test
          revision: e8379541af4e31359cca9fbcf4b00f2671dba205
        metrics:
          - type: accuracy
            value: 69.83582089552239
          - type: ap
            value: 31.78315481798218
          - type: f1
            value: 63.49599891839609
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_polarity
          name: MTEB AmazonPolarityClassification
          config: default
          split: test
          revision: e2d317d38cd51312af73b3d32a06d1a08b442046
        metrics:
          - type: accuracy
            value: 65.24337500000001
          - type: ap
            value: 60.210780218392365
          - type: f1
            value: 64.93158500771304
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_reviews_multi
          name: MTEB AmazonReviewsClassification (en)
          config: en
          split: test
          revision: 1399c76144fd37290681b995c656ef9b2e06e26d
        metrics:
          - type: accuracy
            value: 33.95400000000001
          - type: f1
            value: 33.54319450350246
      - task:
          type: Clustering
        dataset:
          type: mteb/arxiv-clustering-p2p
          name: MTEB ArxivClusteringP2P
          config: default
          split: test
          revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d
        metrics:
          - type: v_measure
            value: 33.721026148085606
      - task:
          type: Clustering
        dataset:
          type: mteb/arxiv-clustering-s2s
          name: MTEB ArxivClusteringS2S
          config: default
          split: test
          revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53
        metrics:
          - type: v_measure
            value: 23.989923856346987
      - task:
          type: STS
        dataset:
          type: mteb/biosses-sts
          name: MTEB BIOSSES
          config: default
          split: test
          revision: d3fb88f8f02e40887cd149695127462bbcf29b4a
        metrics:
          - type: cos_sim_pearson
            value: 80.07123979932489
          - type: cos_sim_spearman
            value: 78.19395037690312
          - type: euclidean_pearson
            value: 78.16919457797398
          - type: euclidean_spearman
            value: 78.19395037690312
          - type: manhattan_pearson
            value: 77.91224702148509
          - type: manhattan_spearman
            value: 77.37284733016378
      - task:
          type: Classification
        dataset:
          type: mteb/banking77
          name: MTEB Banking77Classification
          config: default
          split: test
          revision: 0fd18e25b25c072e09e0d92ab615fda904d66300
        metrics:
          - type: accuracy
            value: 72.78571428571429
          - type: f1
            value: 71.7761168332973
      - task:
          type: Clustering
        dataset:
          type: mteb/biorxiv-clustering-p2p
          name: MTEB BiorxivClusteringP2P
          config: default
          split: test
          revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40
        metrics:
          - type: v_measure
            value: 30.883580770801693
      - task:
          type: Clustering
        dataset:
          type: mteb/biorxiv-clustering-s2s
          name: MTEB BiorxivClusteringS2S
          config: default
          split: test
          revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908
        metrics:
          - type: v_measure
            value: 21.053335896002615
      - task:
          type: Classification
        dataset:
          type: mteb/emotion
          name: MTEB EmotionClassification
          config: default
          split: test
          revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37
        metrics:
          - type: accuracy
            value: 35.6
          - type: f1
            value: 32.46907363797937
      - task:
          type: Classification
        dataset:
          type: mteb/imdb
          name: MTEB ImdbClassification
          config: default
          split: test
          revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7
        metrics:
          - type: accuracy
            value: 66.32400000000001
          - type: ap
            value: 60.96534738097902
          - type: f1
            value: 66.17106527460737
      - task:
          type: Classification
        dataset:
          type: mteb/mtop_domain
          name: MTEB MTOPDomainClassification (en)
          config: en
          split: test
          revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf
        metrics:
          - type: accuracy
            value: 90.40355677154584
          - type: f1
            value: 90.02197700114169
      - task:
          type: Classification
        dataset:
          type: mteb/mtop_intent
          name: MTEB MTOPIntentClassification (en)
          config: en
          split: test
          revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba
        metrics:
          - type: accuracy
            value: 62.282261741906076
          - type: f1
            value: 42.66509438922704
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_massive_intent
          name: MTEB MassiveIntentClassification (en)
          config: en
          split: test
          revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7
        metrics:
          - type: accuracy
            value: 66.11634162743779
          - type: f1
            value: 63.22561882532336
      - task:
          type: Classification
        dataset:
          type: mteb/amazon_massive_scenario
          name: MTEB MassiveScenarioClassification (en)
          config: en
          split: test
          revision: 7d571f92784cd94a019292a1f45445077d0ef634
        metrics:
          - type: accuracy
            value: 73.73570948217888
          - type: f1
            value: 72.60926811627525
      - task:
          type: Clustering
        dataset:
          type: mteb/medrxiv-clustering-p2p
          name: MTEB MedrxivClusteringP2P
          config: default
          split: test
          revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73
        metrics:
          - type: v_measure
            value: 28.682218411117113
      - task:
          type: Clustering
        dataset:
          type: mteb/medrxiv-clustering-s2s
          name: MTEB MedrxivClusteringS2S
          config: default
          split: test
          revision: 35191c8c0dca72d8ff3efcd72aa802307d469663
        metrics:
          - type: v_measure
            value: 24.249068423345125
      - task:
          type: Clustering
        dataset:
          type: mteb/reddit-clustering
          name: MTEB RedditClustering
          config: default
          split: test
          revision: 24640382cdbf8abc73003fb0fa6d111a705499eb
        metrics:
          - type: v_measure
            value: 43.81857444082751
      - task:
          type: Clustering
        dataset:
          type: mteb/reddit-clustering-p2p
          name: MTEB RedditClusteringP2P
          config: default
          split: test
          revision: 282350215ef01743dc01b456c7f5241fa8937f16
        metrics:
          - type: v_measure
            value: 58.37019068224756
      - task:
          type: STS
        dataset:
          type: mteb/sickr-sts
          name: MTEB SICK-R
          config: default
          split: test
          revision: a6ea5a8cab320b040a23452cc28066d9beae2cee
        metrics:
          - type: cos_sim_pearson
            value: 80.40531780187507
          - type: cos_sim_spearman
            value: 74.43055388885399
          - type: euclidean_pearson
            value: 77.56731280002846
          - type: euclidean_spearman
            value: 74.43055238430316
          - type: manhattan_pearson
            value: 77.0225674793828
          - type: manhattan_spearman
            value: 73.0157763009755
      - task:
          type: STS
        dataset:
          type: mteb/sts12-sts
          name: MTEB STS12
          config: default
          split: test
          revision: a0d554a64d88156834ff5ae9920b964011b16384
        metrics:
          - type: cos_sim_pearson
            value: 77.89513323602442
          - type: cos_sim_spearman
            value: 72.57556877265816
          - type: euclidean_pearson
            value: 73.85821376234655
          - type: euclidean_spearman
            value: 72.57491371628555
          - type: manhattan_pearson
            value: 74.09836169887191
          - type: manhattan_spearman
            value: 72.68258315762111
      - task:
          type: STS
        dataset:
          type: mteb/sts13-sts
          name: MTEB STS13
          config: default
          split: test
          revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca
        metrics:
          - type: cos_sim_pearson
            value: 70.35242787171663
          - type: cos_sim_spearman
            value: 72.21957543640191
          - type: euclidean_pearson
            value: 71.69509554469398
          - type: euclidean_spearman
            value: 72.21957537220672
          - type: manhattan_pearson
            value: 71.48837487133736
          - type: manhattan_spearman
            value: 72.10777865383778
      - task:
          type: STS
        dataset:
          type: mteb/sts14-sts
          name: MTEB STS14
          config: default
          split: test
          revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375
        metrics:
          - type: cos_sim_pearson
            value: 74.16772362444075
          - type: cos_sim_spearman
            value: 69.97673740601287
          - type: euclidean_pearson
            value: 72.31559291876557
          - type: euclidean_spearman
            value: 69.97673740601287
          - type: manhattan_pearson
            value: 72.24271795357289
          - type: manhattan_spearman
            value: 69.49367729167946
      - task:
          type: STS
        dataset:
          type: mteb/sts15-sts
          name: MTEB STS15
          config: default
          split: test
          revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3
        metrics:
          - type: cos_sim_pearson
            value: 81.79182911906513
          - type: cos_sim_spearman
            value: 82.22437412512745
          - type: euclidean_pearson
            value: 81.83097544031064
          - type: euclidean_spearman
            value: 82.22436565654309
          - type: manhattan_pearson
            value: 81.36464923871902
          - type: manhattan_spearman
            value: 81.5343779056359
      - task:
          type: STS
        dataset:
          type: mteb/sts16-sts
          name: MTEB STS16
          config: default
          split: test
          revision: 4d8694f8f0e0100860b497b999b3dbed754a0513
        metrics:
          - type: cos_sim_pearson
            value: 75.43557616859144
          - type: cos_sim_spearman
            value: 76.91365659685123
          - type: euclidean_pearson
            value: 76.56513219626397
          - type: euclidean_spearman
            value: 76.91365659685123
          - type: manhattan_pearson
            value: 76.17721999284116
          - type: manhattan_spearman
            value: 76.35088101292793
      - 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: 84.94818288101212
          - type: cos_sim_spearman
            value: 85.2167560886111
          - type: euclidean_pearson
            value: 85.17622731729108
          - type: euclidean_spearman
            value: 85.2167560886111
          - type: manhattan_pearson
            value: 84.8324354792735
          - type: manhattan_spearman
            value: 84.69897393431455
      - 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: 61.591839696719234
          - type: cos_sim_spearman
            value: 61.90385583991066
          - type: euclidean_pearson
            value: 63.49437829898753
          - type: euclidean_spearman
            value: 61.90385583991066
          - type: manhattan_pearson
            value: 60.78565195357755
          - type: manhattan_spearman
            value: 59.802983782193905
      - task:
          type: STS
        dataset:
          type: mteb/stsbenchmark-sts
          name: MTEB STSBenchmark
          config: default
          split: test
          revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831
        metrics:
          - type: cos_sim_pearson
            value: 81.37748727839765
          - type: cos_sim_spearman
            value: 80.28214972273051
          - type: euclidean_pearson
            value: 81.0274577938496
          - type: euclidean_spearman
            value: 80.28214972273051
          - type: manhattan_pearson
            value: 80.18978223617367
          - type: manhattan_spearman
            value: 79.17781398461948
      - task:
          type: PairClassification
        dataset:
          type: mteb/sprintduplicatequestions-pairclassification
          name: MTEB SprintDuplicateQuestions
          config: default
          split: test
          revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46
        metrics:
          - type: cos_sim_accuracy
            value: 99.62475247524752
          - type: cos_sim_ap
            value: 87.05032305596566
          - type: cos_sim_f1
            value: 80.25987006496752
          - type: cos_sim_precision
            value: 80.21978021978022
          - type: cos_sim_recall
            value: 80.30000000000001
          - type: dot_accuracy
            value: 99.62475247524752
          - type: dot_ap
            value: 87.05032305596568
          - type: dot_f1
            value: 80.25987006496752
          - type: dot_precision
            value: 80.21978021978022
          - type: dot_recall
            value: 80.30000000000001
          - type: euclidean_accuracy
            value: 99.62475247524752
          - type: euclidean_ap
            value: 87.05031186021066
          - type: euclidean_f1
            value: 80.25987006496752
          - type: euclidean_precision
            value: 80.21978021978022
          - type: euclidean_recall
            value: 80.30000000000001
          - type: manhattan_accuracy
            value: 99.64554455445544
          - type: manhattan_ap
            value: 87.773065204317
          - type: manhattan_f1
            value: 81.32094943240455
          - type: manhattan_precision
            value: 84.00852878464818
          - type: manhattan_recall
            value: 78.8
          - type: max_accuracy
            value: 99.64554455445544
          - type: max_ap
            value: 87.773065204317
          - type: max_f1
            value: 81.32094943240455
      - task:
          type: Clustering
        dataset:
          type: mteb/stackexchange-clustering
          name: MTEB StackExchangeClustering
          config: default
          split: test
          revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259
        metrics:
          - type: v_measure
            value: 47.82768409586564
      - task:
          type: Clustering
        dataset:
          type: mteb/stackexchange-clustering-p2p
          name: MTEB StackExchangeClusteringP2P
          config: default
          split: test
          revision: 815ca46b2622cec33ccafc3735d572c266efdb44
        metrics:
          - type: v_measure
            value: 33.010238746581386
      - task:
          type: Summarization
        dataset:
          type: mteb/summeval
          name: MTEB SummEval
          config: default
          split: test
          revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c
        metrics:
          - type: cos_sim_pearson
            value: 30.93460869020161
          - type: cos_sim_spearman
            value: 30.793100826598852
          - type: dot_pearson
            value: 30.934611387819803
          - type: dot_spearman
            value: 30.793100826598852
      - task:
          type: Classification
        dataset:
          type: mteb/toxic_conversations_50k
          name: MTEB ToxicConversationsClassification
          config: default
          split: test
          revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c
        metrics:
          - type: accuracy
            value: 67.56439999999999
          - type: ap
            value: 12.622864890343005
          - type: f1
            value: 51.866745839430514
      - task:
          type: Classification
        dataset:
          type: mteb/tweet_sentiment_extraction
          name: MTEB TweetSentimentExtractionClassification
          config: default
          split: test
          revision: d604517c81ca91fe16a244d1248fc021f9ecee7a
        metrics:
          - type: accuracy
            value: 57.2354272778721
          - type: f1
            value: 57.42332031933637
      - task:
          type: Clustering
        dataset:
          type: mteb/twentynewsgroups-clustering
          name: MTEB TwentyNewsgroupsClustering
          config: default
          split: test
          revision: 6125ec4e24fa026cec8a478383ee943acfbd5449
        metrics:
          - type: v_measure
            value: 37.46769271159515
      - task:
          type: PairClassification
        dataset:
          type: mteb/twittersemeval2015-pairclassification
          name: MTEB TwitterSemEval2015
          config: default
          split: test
          revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1
        metrics:
          - type: cos_sim_accuracy
            value: 81.53424330929249
          - type: cos_sim_ap
            value: 57.033163698414114
          - type: cos_sim_f1
            value: 54.54983148772268
          - type: cos_sim_precision
            value: 50.154935812306334
          - type: cos_sim_recall
            value: 59.788918205804755
          - type: dot_accuracy
            value: 81.53424330929249
          - type: dot_ap
            value: 57.03315710343203
          - type: dot_f1
            value: 54.54983148772268
          - type: dot_precision
            value: 50.154935812306334
          - type: dot_recall
            value: 59.788918205804755
          - type: euclidean_accuracy
            value: 81.53424330929249
          - type: euclidean_ap
            value: 57.033158170117446
          - type: euclidean_f1
            value: 54.54983148772268
          - type: euclidean_precision
            value: 50.154935812306334
          - type: euclidean_recall
            value: 59.788918205804755
          - type: manhattan_accuracy
            value: 81.29582166060678
          - type: manhattan_ap
            value: 55.74973597316332
          - type: manhattan_f1
            value: 53.15203955500617
          - type: manhattan_precision
            value: 50
          - type: manhattan_recall
            value: 56.72823218997362
          - type: max_accuracy
            value: 81.53424330929249
          - type: max_ap
            value: 57.033163698414114
          - type: max_f1
            value: 54.54983148772268
      - task:
          type: PairClassification
        dataset:
          type: mteb/twitterurlcorpus-pairclassification
          name: MTEB TwitterURLCorpus
          config: default
          split: test
          revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf
        metrics:
          - type: cos_sim_accuracy
            value: 87.27053983777701
          - type: cos_sim_ap
            value: 82.20632443836952
          - type: cos_sim_f1
            value: 74.4764795144158
          - type: cos_sim_precision
            value: 73.40711935387377
          - type: cos_sim_recall
            value: 75.57745611333539
          - type: dot_accuracy
            value: 87.27053983777701
          - type: dot_ap
            value: 82.20632570091198
          - type: dot_f1
            value: 74.4764795144158
          - type: dot_precision
            value: 73.40711935387377
          - type: dot_recall
            value: 75.57745611333539
          - type: euclidean_accuracy
            value: 87.27053983777701
          - type: euclidean_ap
            value: 82.20632379487282
          - type: euclidean_f1
            value: 74.4764795144158
          - type: euclidean_precision
            value: 73.40711935387377
          - type: euclidean_recall
            value: 75.57745611333539
          - type: manhattan_accuracy
            value: 87.18321884581053
          - type: manhattan_ap
            value: 81.95324384723243
          - type: manhattan_f1
            value: 74.28318388132404
          - type: manhattan_precision
            value: 71.32733328608887
          - type: manhattan_recall
            value: 77.49461040960887
          - type: max_accuracy
            value: 87.27053983777701
          - type: max_ap
            value: 82.20632570091198
          - type: max_f1
            value: 74.4764795144158

This is a part of the MTEB test.

# !pip install tensorflow_text 

import tensorflow_hub as hub
from tensorflow_text import SentencepieceTokenizer
import tensorflow as tf

embedder=hub.load("https://tfhub.dev/google/universal-sentence-encoder-multilingual-large/3")

class USE():
    def encode(self, sentences, batch_size=32, **kwargs):
        embeddings = []
        for i in range(0, len(sentences), batch_size):
            batch_sentences = sentences[i:i+batch_size]
            batch_embeddings = embedder(batch_sentences)
            embeddings.extend(batch_embeddings)
        return embeddings


model = USE()