transformers mteb model-index endpoints_compatible region:us
---
tags:
- mteb
model-index:
- name: embed-english-v3.0
  results:
  - task:
      type: Classification
    dataset:
      name: MTEB AmazonCounterfactualClassification (en)
      type: mteb/amazon_counterfactual
      config: en
      split: test
      revision: e8379541af4e31359cca9fbcf4b00f2671dba205
    metrics:
    - type: accuracy
      value: 81.29850746268656
    - type: ap
      value: 46.181772245676136
    - type: f1
      value: 75.47731234579823
  - task:
      type: Classification
    dataset:
      name: MTEB AmazonPolarityClassification
      type: mteb/amazon_polarity
      config: default
      split: test
      revision: e2d317d38cd51312af73b3d32a06d1a08b442046
    metrics:
    - type: accuracy
      value: 95.61824999999999
    - type: ap
      value: 93.22525741797098
    - type: f1
      value: 95.61627312544859
  - task:
      type: Classification
    dataset:
      name: MTEB AmazonReviewsClassification (en)
      type: mteb/amazon_reviews_multi
      config: en
      split: test
      revision: 1399c76144fd37290681b995c656ef9b2e06e26d
    metrics:
    - type: accuracy
      value: 51.72
    - type: f1
      value: 50.529480725642465
  - task:
      type: Retrieval
    dataset:
      name: MTEB ArguAna
      type: arguana
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 61.521
  - task:
      type: Clustering
    dataset:
      name: MTEB ArxivClusteringP2P
      type: mteb/arxiv-clustering-p2p
      config: default
      split: test
      revision: a122ad7f3f0291bf49cc6f4d32aa80929df69d5d
    metrics:
    - type: v_measure
      value: 49.173332266218914
  - task:
      type: Clustering
    dataset:
      name: MTEB ArxivClusteringS2S
      type: mteb/arxiv-clustering-s2s
      config: default
      split: test
      revision: f910caf1a6075f7329cdf8c1a6135696f37dbd53
    metrics:
    - type: v_measure
      value: 42.1800504937582
  - task:
      type: Reranking
    dataset:
      name: MTEB AskUbuntuDupQuestions
      type: mteb/askubuntudupquestions-reranking
      config: default
      split: test
      revision: 2000358ca161889fa9c082cb41daa8dcfb161a54
    metrics:
    - type: map
      value: 61.69942465283367
    - type: mrr
      value: 73.8089741898606
  - task:
      type: STS
    dataset:
      name: MTEB BIOSSES
      type: mteb/biosses-sts
      config: default
      split: test
      revision: d3fb88f8f02e40887cd149695127462bbcf29b4a
    metrics:
    - type: cos_sim_pearson
      value: 85.1805709775319
    - type: cos_sim_spearman
      value: 83.50310749422796
    - type: euclidean_pearson
      value: 83.57134970408762
    - type: euclidean_spearman
      value: 83.50310749422796
    - type: manhattan_pearson
      value: 83.422472116232
    - type: manhattan_spearman
      value: 83.35611619312422
  - task:
      type: Classification
    dataset:
      name: MTEB Banking77Classification
      type: mteb/banking77
      config: default
      split: test
      revision: 0fd18e25b25c072e09e0d92ab615fda904d66300
    metrics:
    - type: accuracy
      value: 85.52922077922078
    - type: f1
      value: 85.48530911742581
  - task:
      type: Clustering
    dataset:
      name: MTEB BiorxivClusteringP2P
      type: mteb/biorxiv-clustering-p2p
      config: default
      split: test
      revision: 65b79d1d13f80053f67aca9498d9402c2d9f1f40
    metrics:
    - type: v_measure
      value: 40.95750155360001
  - task:
      type: Clustering
    dataset:
      name: MTEB BiorxivClusteringS2S
      type: mteb/biorxiv-clustering-s2s
      config: default
      split: test
      revision: 258694dd0231531bc1fd9de6ceb52a0853c6d908
    metrics:
    - type: v_measure
      value: 37.25334765305169
  - task:
      type: Retrieval
    dataset:
      name: MTEB CQADupstackAndroidRetrieval
      type: BeIR/cqadupstack
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 50.037
    - type: ndcg_at_10
      value: 49.089
    - type: ndcg_at_10
      value: 60.523
    - type: ndcg_at_10
      value: 39.293
    - type: ndcg_at_10
      value: 30.414
    - type: ndcg_at_10
      value: 43.662
    - type: ndcg_at_10
      value: 43.667
    - type: ndcg_at_10
      value: 41.53158333333334
    - type: ndcg_at_10
      value: 35.258
    - type: ndcg_at_10
      value: 30.866
    - type: ndcg_at_10
      value: 40.643
    - type: ndcg_at_10
      value: 40.663
    - type: ndcg_at_10
      value: 34.264
  - task:
      type: Retrieval
    dataset:
      name: MTEB ClimateFEVER
      type: climate-fever
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 38.433
  - task:
      type: Retrieval
    dataset:
      name: MTEB DBPedia
      type: dbpedia-entity
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 43.36
  - task:
      type: Classification
    dataset:
      name: MTEB EmotionClassification
      type: mteb/emotion
      config: default
      split: test
      revision: 4f58c6b202a23cf9a4da393831edf4f9183cad37
    metrics:
    - type: accuracy
      value: 51.574999999999996
    - type: f1
      value: 46.84362123583929
  - task:
      type: Retrieval
    dataset:
      name: MTEB FEVER
      type: fever
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 88.966
  - task:
      type: Retrieval
    dataset:
      name: MTEB FiQA2018
      type: fiqa
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 42.189
  - task:
      type: Retrieval
    dataset:
      name: MTEB HotpotQA
      type: hotpotqa
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 70.723
  - task:
      type: Classification
    dataset:
      name: MTEB ImdbClassification
      type: mteb/imdb
      config: default
      split: test
      revision: 3d86128a09e091d6018b6d26cad27f2739fc2db7
    metrics:
    - type: accuracy
      value: 93.56920000000001
    - type: ap
      value: 90.56104192134326
    - type: f1
      value: 93.56471146876505
  - task:
      type: Retrieval
    dataset:
      name: MTEB MSMARCO
      type: msmarco
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 42.931000000000004
  - task:
      type: Classification
    dataset:
      name: MTEB MTOPDomainClassification (en)
      type: mteb/mtop_domain
      config: en
      split: test
      revision: d80d48c1eb48d3562165c59d59d0034df9fff0bf
    metrics:
    - type: accuracy
      value: 94.88372093023256
    - type: f1
      value: 94.64417024711646
  - task:
      type: Classification
    dataset:
      name: MTEB MTOPIntentClassification (en)
      type: mteb/mtop_intent
      config: en
      split: test
      revision: ae001d0e6b1228650b7bd1c2c65fb50ad11a8aba
    metrics:
    - type: accuracy
      value: 76.52302781577748
    - type: f1
      value: 59.52848723786157
  - task:
      type: Classification
    dataset:
      name: MTEB MassiveIntentClassification (en)
      type: mteb/amazon_massive_intent
      config: en
      split: test
      revision: 31efe3c427b0bae9c22cbb560b8f15491cc6bed7
    metrics:
    - type: accuracy
      value: 73.84330867518494
    - type: f1
      value: 72.18121296285702
  - task:
      type: Classification
    dataset:
      name: MTEB MassiveScenarioClassification (en)
      type: mteb/amazon_massive_scenario
      config: en
      split: test
      revision: 7d571f92784cd94a019292a1f45445077d0ef634
    metrics:
    - type: accuracy
      value: 78.73907195696033
    - type: f1
      value: 78.86079300338558
  - task:
      type: Clustering
    dataset:
      name: MTEB MedrxivClusteringP2P
      type: mteb/medrxiv-clustering-p2p
      config: default
      split: test
      revision: e7a26af6f3ae46b30dde8737f02c07b1505bcc73
    metrics:
    - type: v_measure
      value: 37.40673427491627
  - task:
      type: Clustering
    dataset:
      name: MTEB MedrxivClusteringS2S
      type: mteb/medrxiv-clustering-s2s
      config: default
      split: test
      revision: 35191c8c0dca72d8ff3efcd72aa802307d469663
    metrics:
    - type: v_measure
      value: 33.38936252583581
  - task:
      type: Reranking
    dataset:
      name: MTEB MindSmallReranking
      type: mteb/mind_small
      config: default
      split: test
      revision: 3bdac13927fdc888b903db93b2ffdbd90b295a69
    metrics:
    - type: map
      value: 32.67317850167471
    - type: mrr
      value: 33.9334102169254
  - task:
      type: Retrieval
    dataset:
      name: MTEB NFCorpus
      type: nfcorpus
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 38.574000000000005
  - task:
      type: Retrieval
    dataset:
      name: MTEB NQ
      type: nq
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 61.556
  - task:
      type: Retrieval
    dataset:
      name: MTEB QuoraRetrieval
      type: quora
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 88.722
  - task:
      type: Clustering
    dataset:
      name: MTEB RedditClustering
      type: mteb/reddit-clustering
      config: default
      split: test
      revision: 24640382cdbf8abc73003fb0fa6d111a705499eb
    metrics:
    - type: v_measure
      value: 58.45790556534654
  - task:
      type: Clustering
    dataset:
      name: MTEB RedditClusteringP2P
      type: mteb/reddit-clustering-p2p
      config: default
      split: test
      revision: 282350215ef01743dc01b456c7f5241fa8937f16
    metrics:
    - type: v_measure
      value: 66.35141658656822
  - task:
      type: Retrieval
    dataset:
      name: MTEB SCIDOCS
      type: scidocs
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 20.314
  - task:
      type: STS
    dataset:
      name: MTEB SICK-R
      type: mteb/sickr-sts
      config: default
      split: test
      revision: a6ea5a8cab320b040a23452cc28066d9beae2cee
    metrics:
    - type: cos_sim_pearson
      value: 85.49945063881191
    - type: cos_sim_spearman
      value: 81.27177640994141
    - type: euclidean_pearson
      value: 82.74613694646263
    - type: euclidean_spearman
      value: 81.2717795980493
    - type: manhattan_pearson
      value: 82.75268512220467
    - type: manhattan_spearman
      value: 81.28362006796547
  - task:
      type: STS
    dataset:
      name: MTEB STS12
      type: mteb/sts12-sts
      config: default
      split: test
      revision: a0d554a64d88156834ff5ae9920b964011b16384
    metrics:
    - type: cos_sim_pearson
      value: 83.17562591888526
    - type: cos_sim_spearman
      value: 74.37099514810372
    - type: euclidean_pearson
      value: 79.97392043583372
    - type: euclidean_spearman
      value: 74.37103618585903
    - type: manhattan_pearson
      value: 80.00641585184354
    - type: manhattan_spearman
      value: 74.35403985608939
  - task:
      type: STS
    dataset:
      name: MTEB STS13
      type: mteb/sts13-sts
      config: default
      split: test
      revision: 7e90230a92c190f1bf69ae9002b8cea547a64cca
    metrics:
    - type: cos_sim_pearson
      value: 84.96937598668538
    - type: cos_sim_spearman
      value: 85.20181466598035
    - type: euclidean_pearson
      value: 84.51715977112744
    - type: euclidean_spearman
      value: 85.20181466598035
    - type: manhattan_pearson
      value: 84.45150037846719
    - type: manhattan_spearman
      value: 85.12338939049123
  - task:
      type: STS
    dataset:
      name: MTEB STS14
      type: mteb/sts14-sts
      config: default
      split: test
      revision: 6031580fec1f6af667f0bd2da0a551cf4f0b2375
    metrics:
    - type: cos_sim_pearson
      value: 84.58787775650663
    - type: cos_sim_spearman
      value: 80.97859876561874
    - type: euclidean_pearson
      value: 83.38711461294801
    - type: euclidean_spearman
      value: 80.97859876561874
    - type: manhattan_pearson
      value: 83.34934127987394
    - type: manhattan_spearman
      value: 80.9556224835537
  - task:
      type: STS
    dataset:
      name: MTEB STS15
      type: mteb/sts15-sts
      config: default
      split: test
      revision: ae752c7c21bf194d8b67fd573edf7ae58183cbe3
    metrics:
    - type: cos_sim_pearson
      value: 88.57387982528677
    - type: cos_sim_spearman
      value: 89.22666720704161
    - type: euclidean_pearson
      value: 88.50953296228646
    - type: euclidean_spearman
      value: 89.22666720704161
    - type: manhattan_pearson
      value: 88.45343635855095
    - type: manhattan_spearman
      value: 89.1638631562071
  - task:
      type: STS
    dataset:
      name: MTEB STS16
      type: mteb/sts16-sts
      config: default
      split: test
      revision: 4d8694f8f0e0100860b497b999b3dbed754a0513
    metrics:
    - type: cos_sim_pearson
      value: 85.26071496425682
    - type: cos_sim_spearman
      value: 86.31740966379304
    - type: euclidean_pearson
      value: 85.85515938268887
    - type: euclidean_spearman
      value: 86.31740966379304
    - type: manhattan_pearson
      value: 85.80077191882177
    - type: manhattan_spearman
      value: 86.27885602957302
  - task:
      type: STS
    dataset:
      name: MTEB STS17 (en-en)
      type: mteb/sts17-crosslingual-sts
      config: en-en
      split: test
      revision: af5e6fb845001ecf41f4c1e033ce921939a2a68d
    metrics:
    - type: cos_sim_pearson
      value: 90.41413251495673
    - type: cos_sim_spearman
      value: 90.3370719075361
    - type: euclidean_pearson
      value: 90.5785973346113
    - type: euclidean_spearman
      value: 90.3370719075361
    - type: manhattan_pearson
      value: 90.5278703024898
    - type: manhattan_spearman
      value: 90.23870483011629
  - task:
      type: STS
    dataset:
      name: MTEB STS22 (en)
      type: mteb/sts22-crosslingual-sts
      config: en
      split: test
      revision: 6d1ba47164174a496b7fa5d3569dae26a6813b80
    metrics:
    - type: cos_sim_pearson
      value: 66.1571023517868
    - type: cos_sim_spearman
      value: 66.42297916256133
    - type: euclidean_pearson
      value: 67.55835224919745
    - type: euclidean_spearman
      value: 66.42297916256133
    - type: manhattan_pearson
      value: 67.40537247802385
    - type: manhattan_spearman
      value: 66.26259339863576
  - task:
      type: STS
    dataset:
      name: MTEB STSBenchmark
      type: mteb/stsbenchmark-sts
      config: default
      split: test
      revision: b0fddb56ed78048fa8b90373c8a3cfc37b684831
    metrics:
    - type: cos_sim_pearson
      value: 87.4251695055504
    - type: cos_sim_spearman
      value: 88.54881886307972
    - type: euclidean_pearson
      value: 88.54094330250571
    - type: euclidean_spearman
      value: 88.54881886307972
    - type: manhattan_pearson
      value: 88.49069549839685
    - type: manhattan_spearman
      value: 88.49149164694148
  - task:
      type: Reranking
    dataset:
      name: MTEB SciDocsRR
      type: mteb/scidocs-reranking
      config: default
      split: test
      revision: d3c5e1fc0b855ab6097bf1cda04dd73947d7caab
    metrics:
    - type: map
      value: 85.19974508901711
    - type: mrr
      value: 95.95137342686361
  - task:
      type: Retrieval
    dataset:
      name: MTEB SciFact
      type: scifact
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 71.825
  - task:
      type: PairClassification
    dataset:
      name: MTEB SprintDuplicateQuestions
      type: mteb/sprintduplicatequestions-pairclassification
      config: default
      split: test
      revision: d66bd1f72af766a5cc4b0ca5e00c162f89e8cc46
    metrics:
    - type: cos_sim_accuracy
      value: 99.85346534653465
    - type: cos_sim_ap
      value: 96.2457455868878
    - type: cos_sim_f1
      value: 92.49492900608519
    - type: cos_sim_precision
      value: 93.82716049382715
    - type: cos_sim_recall
      value: 91.2
    - type: dot_accuracy
      value: 99.85346534653465
    - type: dot_ap
      value: 96.24574558688776
    - type: dot_f1
      value: 92.49492900608519
    - type: dot_precision
      value: 93.82716049382715
    - type: dot_recall
      value: 91.2
    - type: euclidean_accuracy
      value: 99.85346534653465
    - type: euclidean_ap
      value: 96.2457455868878
    - type: euclidean_f1
      value: 92.49492900608519
    - type: euclidean_precision
      value: 93.82716049382715
    - type: euclidean_recall
      value: 91.2
    - type: manhattan_accuracy
      value: 99.85643564356435
    - type: manhattan_ap
      value: 96.24594126679709
    - type: manhattan_f1
      value: 92.63585576434738
    - type: manhattan_precision
      value: 94.11764705882352
    - type: manhattan_recall
      value: 91.2
    - type: max_accuracy
      value: 99.85643564356435
    - type: max_ap
      value: 96.24594126679709
    - type: max_f1
      value: 92.63585576434738
  - task:
      type: Clustering
    dataset:
      name: MTEB StackExchangeClustering
      type: mteb/stackexchange-clustering
      config: default
      split: test
      revision: 6cbc1f7b2bc0622f2e39d2c77fa502909748c259
    metrics:
    - type: v_measure
      value: 68.41861859721674
  - task:
      type: Clustering
    dataset:
      name: MTEB StackExchangeClusteringP2P
      type: mteb/stackexchange-clustering-p2p
      config: default
      split: test
      revision: 815ca46b2622cec33ccafc3735d572c266efdb44
    metrics:
    - type: v_measure
      value: 37.51202861563424
  - task:
      type: Reranking
    dataset:
      name: MTEB StackOverflowDupQuestions
      type: mteb/stackoverflowdupquestions-reranking
      config: default
      split: test
      revision: e185fbe320c72810689fc5848eb6114e1ef5ec69
    metrics:
    - type: map
      value: 52.48207537634766
    - type: mrr
      value: 53.36204747050335
  - task:
      type: Summarization
    dataset:
      name: MTEB SummEval
      type: mteb/summeval
      config: default
      split: test
      revision: cda12ad7615edc362dbf25a00fdd61d3b1eaf93c
    metrics:
    - type: cos_sim_pearson
      value: 30.397150340510397
    - type: cos_sim_spearman
      value: 30.180928192386
    - type: dot_pearson
      value: 30.397148822378796
    - type: dot_spearman
      value: 30.180928192386
  - task:
      type: Retrieval
    dataset:
      name: MTEB TRECCOVID
      type: trec-covid
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 81.919
  - task:
      type: Retrieval
    dataset:
      name: MTEB Touche2020
      type: webis-touche2020
      config: default
      split: test
      revision: None
    metrics:
    - type: ndcg_at_10
      value: 32.419
  - task:
      type: Classification
    dataset:
      name: MTEB ToxicConversationsClassification
      type: mteb/toxic_conversations_50k
      config: default
      split: test
      revision: d7c0de2777da35d6aae2200a62c6e0e5af397c4c
    metrics:
    - type: accuracy
      value: 72.613
    - type: ap
      value: 15.696112954573444
    - type: f1
      value: 56.30148693392767
  - task:
      type: Classification
    dataset:
      name: MTEB TweetSentimentExtractionClassification
      type: mteb/tweet_sentiment_extraction
      config: default
      split: test
      revision: d604517c81ca91fe16a244d1248fc021f9ecee7a
    metrics:
    - type: accuracy
      value: 62.02037351443125
    - type: f1
      value: 62.31189055427593
  - task:
      type: Clustering
    dataset:
      name: MTEB TwentyNewsgroupsClustering
      type: mteb/twentynewsgroups-clustering
      config: default
      split: test
      revision: 6125ec4e24fa026cec8a478383ee943acfbd5449
    metrics:
    - type: v_measure
      value: 50.64186455543417
  - task:
      type: PairClassification
    dataset:
      name: MTEB TwitterSemEval2015
      type: mteb/twittersemeval2015-pairclassification
      config: default
      split: test
      revision: 70970daeab8776df92f5ea462b6173c0b46fd2d1
    metrics:
    - type: cos_sim_accuracy
      value: 86.27883411813792
    - type: cos_sim_ap
      value: 74.80076733774258
    - type: cos_sim_f1
      value: 68.97989210397255
    - type: cos_sim_precision
      value: 64.42968392120935
    - type: cos_sim_recall
      value: 74.22163588390501
    - type: dot_accuracy
      value: 86.27883411813792
    - type: dot_ap
      value: 74.80076608107143
    - type: dot_f1
      value: 68.97989210397255
    - type: dot_precision
      value: 64.42968392120935
    - type: dot_recall
      value: 74.22163588390501
    - type: euclidean_accuracy
      value: 86.27883411813792
    - type: euclidean_ap
      value: 74.80076820459502
    - type: euclidean_f1
      value: 68.97989210397255
    - type: euclidean_precision
      value: 64.42968392120935
    - type: euclidean_recall
      value: 74.22163588390501
    - type: manhattan_accuracy
      value: 86.23711032961793
    - type: manhattan_ap
      value: 74.73958348950038
    - type: manhattan_f1
      value: 68.76052948255115
    - type: manhattan_precision
      value: 63.207964601769916
    - type: manhattan_recall
      value: 75.3825857519789
    - type: max_accuracy
      value: 86.27883411813792
    - type: max_ap
      value: 74.80076820459502
    - type: max_f1
      value: 68.97989210397255
  - task:
      type: PairClassification
    dataset:
      name: MTEB TwitterURLCorpus
      type: mteb/twitterurlcorpus-pairclassification
      config: default
      split: test
      revision: 8b6510b0b1fa4e4c4f879467980e9be563ec1cdf
    metrics:
    - type: cos_sim_accuracy
      value: 89.09263787014399
    - type: cos_sim_ap
      value: 86.46378381763645
    - type: cos_sim_f1
      value: 78.67838784176413
    - type: cos_sim_precision
      value: 76.20868812238419
    - type: cos_sim_recall
      value: 81.3135201724669
    - type: dot_accuracy
      value: 89.09263787014399
    - type: dot_ap
      value: 86.46378353247907
    - type: dot_f1
      value: 78.67838784176413
    - type: dot_precision
      value: 76.20868812238419
    - type: dot_recall
      value: 81.3135201724669
    - type: euclidean_accuracy
      value: 89.09263787014399
    - type: euclidean_ap
      value: 86.46378511891255
    - type: euclidean_f1
      value: 78.67838784176413
    - type: euclidean_precision
      value: 76.20868812238419
    - type: euclidean_recall
      value: 81.3135201724669
    - type: manhattan_accuracy
      value: 89.09069740365584
    - type: manhattan_ap
      value: 86.44864502475154
    - type: manhattan_f1
      value: 78.67372818141132
    - type: manhattan_precision
      value: 76.29484953703704
    - type: manhattan_recall
      value: 81.20572836464429
    - type: max_accuracy
      value: 89.09263787014399
    - type: max_ap
      value: 86.46378511891255
    - type: max_f1
      value: 78.67838784176413
---


# Cohere embed-english-v3.0

This repository contains the tokenizer for the Cohere `embed-english-v3.0` model. See our blogpost [Cohere Embed V3](https://txt.cohere.com/introducing-embed-v3/) for more details on this model.

You can use the embedding model either via the Cohere API, AWS SageMaker or in your private deployments.

## Usage Cohere API

The following code snippet shows the usage of the Cohere API. Install the cohere SDK via:
```
pip install -U cohere
```

Get your free API key on: www.cohere.com


```python
# This snippet shows and example how to use the Cohere Embed V3 models for semantic search.
# Make sure to have the Cohere SDK in at least v4.30 install: pip install -U cohere 
# Get your API key from: www.cohere.com
import cohere
import numpy as np

cohere_key = "{YOUR_COHERE_API_KEY}"   #Get your API key from www.cohere.com
co = cohere.Client(cohere_key)

docs = ["The capital of France is Paris",
        "PyTorch is a machine learning framework based on the Torch library.",
        "The average cat lifespan is between 13-17 years"]


#Encode your documents with input type 'search_document'
doc_emb = co.embed(docs, input_type="search_document", model="embed-english-v3.0").embeddings
doc_emb = np.asarray(doc_emb)


#Encode your query with input type 'search_query'
query = "What is Pytorch"
query_emb = co.embed([query], input_type="search_query", model="embed-english-v3.0").embeddings
query_emb = np.asarray(query_emb)
query_emb.shape

#Compute the dot product between query embedding and document embedding
scores = np.dot(query_emb, doc_emb.T)[0]

#Find the highest scores
max_idx = np.argsort(-scores)

print(f"Query: {query}")
for idx in max_idx:
  print(f"Score: {scores[idx]:.2f}")
  print(docs[idx])
  print("--------")
```

## Usage AWS SageMaker
The embedding model can be privately deployed in your AWS Cloud using our [AWS SageMaker marketplace offering](https://aws.amazon.com/marketplace/pp/prodview-z6huxszcqc25i). It runs privately in your VPC, with latencies as low as 5ms for query encoding.

## Usage AWS Bedrock
Soon the model will also be available via AWS Bedrock. Stay tuned

## Private Deployment
You want to run the model on your own hardware? [Contact Sales](https://cohere.com/contact-sales) to learn more.

## Supported Languages
This model was trained on nearly 1B English training pairs. 

Evaluation results can be found in the [Embed V3.0 Benchmark Results spreadsheet](https://docs.google.com/spreadsheets/d/1w7gnHWMDBdEUrmHgSfDnGHJgVQE5aOiXCCwO3uNH_mI/edit?usp=sharing).