Ma787639046 commited on
Commit
34a6ff9
1 Parent(s): 669b3ff

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +25 -14
README.md CHANGED
@@ -8,14 +8,21 @@ tags:
8
 
9
  ---
10
 
11
- # {MODEL_NAME}
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('{MODEL_NAME}')
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('{MODEL_NAME}')
55
- model = AutoModel.from_pretrained('{MODEL_NAME}')
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(
@@ -88,4 +86,17 @@ SentenceTransformerforCL(
88
 
89
  ## Citing & Authors
90
 
 
 
 
 
 
 
 
 
 
 
 
 
 
91
  <!--- Describe where people can find more information -->
 
8
 
9
  ---
10
 
11
+ # bowdpr_wiki_triviaft
12
 
13
+ This is a fine-tuned retriever on the TriviaQA Task (without distillation). We introduce a novel pre-training paradigm, Bag-of-Word Prediction, for dense retrieval.
14
+ This retriever is initialized from a base-sized pre-trained model, [bowdpr/bowdpr_wiki](https://huggingface.co/bowdpr/bowdpr_wiki). Please refer to our [paper](https://arxiv.org/abs/2401.11248) for detailed pre-training and fine-tuning settings.
15
+
16
+ Finetuning on QA datasets involves a two-stage pipeline
17
+ - s1: BM25 negs
18
+ - s2: BM25 negs + Mined negatives from s1
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_wiki_triviaft')
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_wiki_triviaft')
62
+ model = AutoModel.from_pretrained('bowdpr/bowdpr_wiki_triviaft')
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(
 
86
 
87
  ## Citing & Authors
88
 
89
+ If you are interested in our work, please consider citing our paper.
90
+
91
+ ```
92
+ @misc{ma2024bow_pred,
93
+ title={Drop your Decoder: Pre-training with Bag-of-Word Prediction for Dense Passage Retrieval},
94
+ author={Guangyuan Ma and Xing Wu and Zijia Lin and Songlin Hu},
95
+ year={2024},
96
+ eprint={2401.11248},
97
+ archivePrefix={arXiv},
98
+ primaryClass={cs.IR}
99
+ }
100
+ ```
101
+
102
  <!--- Describe where people can find more information -->