Views
No views yet
mpnet-base.| Dataset | Number of training tuples |
|---|---|
| WikiAnswers Duplicate question pairs from WikiAnswers | 77,427,422 |
| PAQ Automatically generated (Question, Paragraph) pairs for each paragraph in Wikipedia | 64,371,441 |
| Stack Exchange (Title, Body) pairs from all StackExchanges | 25,316,456 |
| Stack Exchange (Title, Answer) pairs from all StackExchanges | 21,396,559 |
| MS MARCO Triplets (query, answer, hard_negative) for 500k queries from Bing search engine | 17,579,773 |
| GOOAQ: Open Question Answering with Diverse Answer Types (query, answer) pairs for 3M Google queries and Google featured snippet | 3,012,496 |
| Amazon-QA (Question, Answer) pairs from Amazon product pages | 2,448,839 |
| Yahoo Answers (Title, Answer) pairs from Yahoo Answers | 1,198,260 |
| Yahoo Answers (Question, Answer) pairs from Yahoo Answers | 681,164 |
| Yahoo Answers (Title, Question) pairs from Yahoo Answers | 659,896 |
| SearchQA (Question, Answer) pairs for 140k questions, each with Top5 Google snippets on that question | 582,261 |
| ELI5 (Question, Answer) pairs from Reddit ELI5 (explainlikeimfive) | 325,475 |
| Stack Exchange Duplicate questions pairs (titles) | 304,525 |
| Quora Question Triplets (Question, Duplicate_Question, Hard_Negative) triplets for Quora Questions Pairs dataset | 103,663 |
| Natural Questions (NQ) (Question, Paragraph) pairs for 100k real Google queries with relevant Wikipedia paragraph | 100,231 |
| SQuAD2.0 (Question, Paragraph) pairs from SQuAD2.0 dataset | 87,599 |
| TriviaQA (Question, Evidence) pairs | 73,346 |
| Total | 214,988,242 |
| Setting | Value |
|---|---|
| Dimensions | 768 |
| Produces normalized embeddings | Yes |
| Pooling-Method | Mean pooling |
| Suitable score functions | dot-product, cosine-similarity, or euclidean distance |
1from sentence_transformers import SentenceTransformer, util
2
3question = "That is a happy person"
4contexts = [
5 "That is a happy dog",
6 "That is a very happy person",
7 "Today is a sunny day"
8]
9
10# Load the model
11model = SentenceTransformer('navteca//multi-qa-mpnet-base-cos-v1')
12
13# Encode question and contexts
14question_emb = model.encode(question)
15contexts_emb = model.encode(contexts)
16
17# Compute dot score between question and all contexts embeddings
18result = util.dot_score(question_emb, contexts_emb)[0].cpu().tolist()
19
20print(result)
21
22#[
23# 0.60806852579116820,
24# 0.94949364662170410,
25# 0.29836517572402954
26#]