Ma787639046
commited on
Commit
•
a971e65
1
Parent(s):
659eff5
Update README.md
Browse files
README.md
CHANGED
@@ -8,14 +8,21 @@ tags:
|
|
8 |
|
9 |
---
|
10 |
|
11 |
-
#
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
-
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
14 |
|
15 |
<!--- Describe your model here -->
|
16 |
|
17 |
## Usage (Sentence-Transformers)
|
18 |
|
|
|
|
|
19 |
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
20 |
|
21 |
```
|
@@ -28,7 +35,7 @@ Then you can use the model like this:
|
|
28 |
from sentence_transformers import SentenceTransformer
|
29 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
30 |
|
31 |
-
model = SentenceTransformer('
|
32 |
embeddings = model.encode(sentences)
|
33 |
print(embeddings)
|
34 |
```
|
@@ -51,8 +58,8 @@ def cls_pooling(model_output, attention_mask):
|
|
51 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
52 |
|
53 |
# Load model from HuggingFace Hub
|
54 |
-
tokenizer = AutoTokenizer.from_pretrained('
|
55 |
-
model = AutoModel.from_pretrained('
|
56 |
|
57 |
# Tokenize sentences
|
58 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
@@ -69,15 +76,6 @@ print(sentence_embeddings)
|
|
69 |
```
|
70 |
|
71 |
|
72 |
-
|
73 |
-
## Evaluation Results
|
74 |
-
|
75 |
-
<!--- Describe how your model was evaluated -->
|
76 |
-
|
77 |
-
For an automated evaluation of this model, see the *Sentence Embeddings Benchmark*: [https://seb.sbert.net](https://seb.sbert.net?model_name={MODEL_NAME})
|
78 |
-
|
79 |
-
|
80 |
-
|
81 |
## Full Model Architecture
|
82 |
```
|
83 |
SentenceTransformerforCL(
|
|
|
8 |
|
9 |
---
|
10 |
|
11 |
+
# bowdpr_marco_ft
|
12 |
+
|
13 |
+
This is a fine-tuned retriever on the MS-MARCO Passage Ranking Task (without distillation). We introduce a novel pre-training paradigm, Bag-of-Word Prediction, for dense retrieval. Please refer to our [paper](https://arxiv.org/abs/2401.11248) for detailed pre-training and fine-tuning settings.
|
14 |
+
|
15 |
+
Finetuning on MS-MARCO dataset involves a two-stage pipeline
|
16 |
+
- s1: BM25 negs
|
17 |
+
- s2: Mined negatives from s1
|
18 |
|
|
|
19 |
|
20 |
<!--- Describe your model here -->
|
21 |
|
22 |
## Usage (Sentence-Transformers)
|
23 |
|
24 |
+
This is a [sentence-transformers](https://www.SBERT.net) model: It maps sentences & paragraphs to a 768 dimensional dense vector space and can be used for tasks like clustering or semantic search.
|
25 |
+
|
26 |
Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
|
27 |
|
28 |
```
|
|
|
35 |
from sentence_transformers import SentenceTransformer
|
36 |
sentences = ["This is an example sentence", "Each sentence is converted"]
|
37 |
|
38 |
+
model = SentenceTransformer('bowdpr/bowdpr_marco_ft')
|
39 |
embeddings = model.encode(sentences)
|
40 |
print(embeddings)
|
41 |
```
|
|
|
58 |
sentences = ['This is an example sentence', 'Each sentence is converted']
|
59 |
|
60 |
# Load model from HuggingFace Hub
|
61 |
+
tokenizer = AutoTokenizer.from_pretrained('bowdpr/bowdpr_marco_ft')
|
62 |
+
model = AutoModel.from_pretrained('bowdpr/bowdpr_marco_ft')
|
63 |
|
64 |
# Tokenize sentences
|
65 |
encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
|
|
|
76 |
```
|
77 |
|
78 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
79 |
## Full Model Architecture
|
80 |
```
|
81 |
SentenceTransformerforCL(
|