antoinelouis commited on
Commit
6ef92dc
1 Parent(s): 8f682bf

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +85 -96
README.md CHANGED
@@ -1,156 +1,145 @@
1
  ---
2
  pipeline_tag: sentence-similarity
3
  language: fr
4
- license: apache-2.0
5
  datasets:
6
  - unicamp-dl/mmarco
7
  metrics:
8
  - recall
9
-
10
  tags:
11
- - sentence-transformers
12
  - feature-extraction
13
  - sentence-similarity
14
- - transformers
15
-
16
  ---
17
 
18
- # biencoder-camembert-L8-mmarcoFR
19
 
20
- 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. The model was trained on the **French** portion of the [mMARCO](https://huggingface.co/datasets/unicamp-dl/mmarco) dataset.
21
 
22
- ## Usage
23
- ***
 
 
 
 
 
 
 
 
 
 
 
24
 
25
- #### Sentence-Transformers
26
 
27
- Using this model becomes easy when you have [sentence-transformers](https://www.SBERT.net) installed:
28
 
29
- ```
30
- pip install -U sentence-transformers
31
- ```
32
 
33
- Then you can use the model like this:
34
 
35
  ```python
36
  from sentence_transformers import SentenceTransformer
37
- sentences = ["This is an example sentence", "Each sentence is converted"]
 
 
38
 
39
  model = SentenceTransformer('antoinelouis/biencoder-camembert-L8-mmarcoFR')
40
- embeddings = model.encode(sentences)
41
- print(embeddings)
 
 
 
 
42
  ```
43
 
 
 
 
44
 
 
 
45
 
46
- #### 🤗 Transformers
 
47
 
48
- Without [sentence-transformers](https://www.SBERT.net), you can use the model like this: First, you pass your input through the transformer model, then you have to apply the right pooling-operation on-top of the contextualized word embeddings.
 
 
 
 
 
 
 
 
 
 
 
49
 
50
  ```python
51
- from transformers import AutoTokenizer, AutoModel
52
  import torch
 
 
53
 
54
-
55
- #Mean Pooling - Take attention mask into account for correct averaging
56
  def mean_pooling(model_output, attention_mask):
 
57
  token_embeddings = model_output[0] #First element of model_output contains all token embeddings
58
  input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
59
  return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
60
 
61
 
62
- # Sentences we want sentence embeddings for
63
- sentences = ['This is an example sentence', 'Each sentence is converted']
64
 
65
- # Load model from HuggingFace Hub
66
  tokenizer = AutoTokenizer.from_pretrained('antoinelouis/biencoder-camembert-L8-mmarcoFR')
67
  model = AutoModel.from_pretrained('antoinelouis/biencoder-camembert-L8-mmarcoFR')
68
 
69
- # Tokenize sentences
70
- encoded_input = tokenizer(sentences, padding=True, truncation=True, return_tensors='pt')
71
-
72
- # Compute token embeddings
73
  with torch.no_grad():
74
- model_output = model(**encoded_input)
75
-
76
- # Perform pooling. In this case, mean pooling.
77
- sentence_embeddings = mean_pooling(model_output, encoded_input['attention_mask'])
78
-
79
- print("Sentence embeddings:")
80
- print(sentence_embeddings)
 
 
81
  ```
82
 
83
-
84
-
85
- ## Evaluation
86
  ***
87
 
 
88
 
 
89
 
90
- <!--- Describe how your model was evaluated -->
91
-
92
- Below, we compared its results with other biencoder models fine-tuned on the same dataset:
93
- | | model | MRR@10 | NDCG@10 | MAP@10 | Recall@10 | Recall@100 (↑) | Recall@500 |
94
- |---:|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---------:|----------:|---------:|------------:|-------------:|-------------:|
95
- | 0 | [biencoder-camembert-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camembert-base-mmarcoFR) | 28.53 | 33.72 | 27.93 | 51.46 | 77.82 | 89.13 |
96
- | 1 | [biencoder-all-mpnet-base-v2-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-all-mpnet-base-v2-mmarcoFR) | 28.04 | 33.28 | 27.5 | 51.07 | 77.68 | 88.67 |
97
- | 2 | [biencoder-multi-qa-mpnet-base-cos-v1-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-multi-qa-mpnet-base-cos-v1-mmarcoFR) | 27.6 | 32.92 | 27.09 | 50.97 | 77.41 | 87.79 |
98
- | 3 | [biencoder-sentence-camembert-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-sentence-camembert-base-mmarcoFR) | 27.63 | 32.7 | 27.01 | 50.1 | 76.85 | 88.73 |
99
- | 4 | [biencoder-distilcamembert-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-distilcamembert-base-mmarcoFR) | 26.8 | 31.87 | 26.23 | 49.2 | 76.44 | 87.87 |
100
- | 5 | [biencoder-mpnet-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-mpnet-base-mmarcoFR) | 27.2 | 32.22 | 26.63 | 49.41 | 75.71 | 86.88 |
101
- | 6 | [biencoder-multi-qa-distilbert-cos-v1-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-multi-qa-distilbert-cos-v1-mmarcoFR) | 26.36 | 31.26 | 25.82 | 47.93 | 75.42 | 86.78 |
102
- | 7 | [biencoder-bert-base-uncased-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-bert-base-uncased-mmarcoFR) | 26.3 | 31.14 | 25.74 | 47.67 | 74.57 | 86.33 |
103
- | 8 | [biencoder-msmarco-distilbert-cos-v5-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-msmarco-distilbert-cos-v5-mmarcoFR) | 25.75 | 30.63 | 25.24 | 47.22 | 73.96 | 85.64 |
104
- | 9 | [biencoder-all-distilroberta-v1-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-all-distilroberta-v1-mmarcoFR) | 26.17 | 30.91 | 25.67 | 47.06 | 73.5 | 85.69 |
105
- | 10 | [biencoder-all-MiniLM-L6-v2-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-all-MiniLM-L6-v2-mmarcoFR) | 25.49 | 30.39 | 24.99 | 47.1 | 73.48 | 86.09 |
106
- | 11 | [biencoder-distilbert-base-uncased-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-distilbert-base-uncased-mmarcoFR) | 25.18 | 29.83 | 24.64 | 45.77 | 73.16 | 85.13 |
107
- | 12 | [biencoder-msmarco-MiniLM-L12-cos-v5-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-msmarco-MiniLM-L12-cos-v5-mmarcoFR) | 26.22 | 30.99 | 25.69 | 47.29 | 73.09 | 84.95 |
108
- | 13 | [biencoder-roberta-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-roberta-base-mmarcoFR) | 25.94 | 30.72 | 25.43 | 46.98 | 73.07 | 84.76 |
109
- | 14 | [biencoder-distiluse-base-multilingual-cased-v1-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-distiluse-base-multilingual-cased-v1-mmarcoFR) | 24.57 | 29.08 | 24.04 | 44.51 | 72.54 | 85.13 |
110
- | 15 | [biencoder-multi-qa-MiniLM-L6-cos-v1-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-multi-qa-MiniLM-L6-cos-v1-mmarcoFR) | 24.72 | 29.58 | 24.25 | 46.05 | 72.19 | 84.6 |
111
- | 16 | [biencoder-MiniLM-L12-H384-uncased-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-MiniLM-L12-H384-uncased-mmarcoFR) | 25.43 | 30.1 | 24.88 | 46.13 | 72.16 | 83.84 |
112
- | 17 | [biencoder-mMiniLMv2-L12-H384-distilled-from-XLMR-Large-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-mMiniLMv2-L12-H384-distilled-from-XLMR-Large-mmarcoFR) | 24.74 | 29.41 | 24.23 | 45.4 | 71.52 | 84.42 |
113
- | 18 | [biencoder-electra-base-discriminator-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-electra-base-discriminator-mmarcoFR) | 24.77 | 29.37 | 24.21 | 45.2 | 70.84 | 83.25 |
114
- | 19 | [biencoder-bert-medium-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-bert-medium-mmarcoFR) | 23.86 | 28.56 | 23.39 | 44.47 | 70.57 | 83.58 |
115
- | 20 | [biencoder-msmarco-MiniLM-L6-cos-v5-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-msmarco-MiniLM-L6-cos-v5-mmarcoFR) | 24.39 | 28.96 | 23.91 | 44.58 | 70.36 | 82.88 |
116
- | 21 | [biencoder-distilroberta-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-distilroberta-base-mmarcoFR) | 23.94 | 28.44 | 23.46 | 43.77 | 70.08 | 82.86 |
117
- | 22 | [biencoder-camemberta-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camemberta-base-mmarcoFR) | 24.78 | 29.24 | 24.23 | 44.58 | 69.59 | 82.18 |
118
- | 23 | [biencoder-electra-base-french-europeana-cased-discriminator-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-electra-base-french-europeana-cased-discriminator-mmarcoFR) | 23.38 | 27.97 | 22.91 | 43.5 | 68.96 | 81.61 |
119
- | 24 | [biencoder-bert-small-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-bert-small-mmarcoFR) | 22.4 | 26.84 | 21.95 | 41.96 | 68.88 | 82.14 |
120
- | 25 | [biencoder-mMiniLM-L6-v2-mmarcoFR-v2-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-mMiniLM-L6-v2-mmarcoFR-v2-mmarcoFR) | 22.87 | 27.26 | 22.37 | 42.3 | 68.78 | 81.39 |
121
- | 26 | [biencoder-MiniLM-L6-H384-uncased-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-MiniLM-L6-H384-uncased-mmarcoFR) | 22.86 | 27.34 | 22.41 | 42.62 | 68.4 | 81.54 |
122
- | 27 | [biencoder-deberta-v3-small-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-deberta-v3-small-mmarcoFR) | 22.44 | 26.84 | 21.97 | 41.84 | 68.17 | 80.9 |
123
- | 28 | [biencoder-mMiniLMv2-L6-H384-distilled-from-XLMR-Large-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-mMiniLMv2-L6-H384-distilled-from-XLMR-Large-mmarcoFR) | 22.29 | 26.57 | 21.8 | 41.25 | 66.78 | 79.83 |
124
- | 29 | [biencoder-bert-mini-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-bert-mini-mmarcoFR) | 20.06 | 24.09 | 19.66 | 37.78 | 64.27 | 77.39 |
125
- | 30 | [biencoder-electra-small-discriminator-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-electra-small-discriminator-mmarcoFR) | 20.32 | 24.36 | 19.9 | 38.16 | 63.98 | 77.23 |
126
- | 31 | [biencoder-deberta-v3-xsmall-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-deberta-v3-xsmall-mmarcoFR) | 17.7 | 21.29 | 17.31 | 33.59 | 58.76 | 73.45 |
127
- | 32 | [biencoder-bert-tiny-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-bert-tiny-mmarcoFR) | 14.94 | 18.22 | 14.59 | 29.46 | 51.94 | 66.3 |
128
- | 33 | [biencoder-t5-small-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-t5-small-mmarcoFR) | 12.44 | 15.1 | 12.14 | 24.28 | 47.82 | 63.37 |
129
- | 34 | [biencoder-bert-small-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-bert-small-mmarcoFR) | 0.22 | 0.28 | 0.21 | 0.5 | 1.25 | 2.34 |
130
-
131
-
132
 
133
- ## Training
134
  ***
135
 
136
- #### Background
137
-
138
- We used the [output/-/camembert-L8](https://huggingface.co/output/-/camembert-L8) model and fine-tuned it on a 500K sentence pairs dataset in French. We used a contrastive learning objective: given a sentence from the pair, the model should predict which out of a set of randomly sampled other sentences, was actually paired with it in our dataset. Formally, we compute the cos similarity from each possible sentence pairs from the batch. We then apply the cross entropy loss with a temperature of 0.05 by comparing with true pairs.
139
-
140
- #### Hyperparameters
141
-
142
- We trained the model on a single Tesla V100 GPU with 32GBs of memory during 40 epochs (i.e., 39.0k steps) using a batch size of 512. We used the AdamW optimizer with an initial learning rate of 2e-05, weight decay of 0.01, learning rate warmup over the first 3900 steps, and linear decay of the learning rate. The sequence length was limited to 128 tokens.
143
 
144
  #### Data
145
 
146
- We used the French version of the [mMARCO](https://huggingface.co/datasets/unicamp-dl/mmarco) dataset to fine-tune our model. mMARCO is a multi-lingual machine-translated version of the MS MARCO dataset, a large-scale IR dataset comprising:
147
- - a corpus of 8.8M passages;
148
- - a training set of ~533k queries (with at least one relevant passage);
149
- - a development set of ~101k queries;
150
- - a smaller dev set of 6,980 queries (which is actually used for evaluation in most published works).
151
- Link: [https://ir-datasets.com/mmarco.html#mmarco/v2/fr/](https://ir-datasets.com/mmarco.html#mmarco/v2/fr/)
152
 
 
153
 
 
 
 
 
 
 
154
 
155
  ## Citation
156
 
 
1
  ---
2
  pipeline_tag: sentence-similarity
3
  language: fr
4
+ license: mit
5
  datasets:
6
  - unicamp-dl/mmarco
7
  metrics:
8
  - recall
 
9
  tags:
 
10
  - feature-extraction
11
  - sentence-similarity
12
+ library_name: sentence-transformers
 
13
  ---
14
 
15
+ <h1 align="center">biencoder-camembert-L8-mmarcoFR</h1>
16
 
 
17
 
18
+ <h4 align="center">
19
+ <p>
20
+ <a href=#usage>🛠️ Usage</a> |
21
+ <a href="#evaluation">📊 Evaluation</a> |
22
+ <a href="#train">🤖 Training</a> |
23
+ <a href="#citation">🔗 Citation</a> |
24
+ <p>
25
+ </h4>
26
+
27
+ This is a [sentence-transformers](https://www.SBERT.net) model. It maps questions and paragraphs 768-dimensional dense vectors and should be used for semantic search.
28
+ The model uses an [CamemBERT-L8](https://huggingface.co/antoinelouis/camembert-L8) backbone, which is a pruned version of the pre-trained [CamemBERT](https://huggingface.co/camembert-base)
29
+ checkpoint with 26% less parameters, obtained by [dropping the top-layers](https://doi.org/10.48550/arXiv.2004.03844) from the original model.
30
+ The model was trained on the **French** portion of the [mMARCO](https://huggingface.co/datasets/unicamp-dl/mmarco) retrieval dataset.
31
 
32
+ ## Usage
33
 
34
+ Here are some examples for using this model with [Sentence-Transformers](#using-sentence-transformers), [FlagEmbedding](#using-flagembedding), or [Huggingface Transformers](#using-huggingface-transformers).
35
 
36
+ #### Using Sentence-Transformers
 
 
37
 
38
+ Start by installing the [library](https://www.SBERT.net): `pip install -U sentence-transformers`. Then, you can use the model like this:
39
 
40
  ```python
41
  from sentence_transformers import SentenceTransformer
42
+
43
+ queries = ["Ceci est un exemple de requête.", "Voici un second exemple."]
44
+ passages = ["Ceci est un exemple de passage.", "Et voilà un deuxième exemple."]
45
 
46
  model = SentenceTransformer('antoinelouis/biencoder-camembert-L8-mmarcoFR')
47
+
48
+ q_embeddings = model.encode(queries, normalize_embeddings=True)
49
+ p_embeddings = model.encode(passages, normalize_embeddings=True)
50
+
51
+ similarity = q_embeddings @ p_embeddings.T
52
+ print(similarity)
53
  ```
54
 
55
+ #### Using FlagEmbedding
56
+
57
+ Start by installing the [library](https://github.com/FlagOpen/FlagEmbedding/): `pip install -U FlagEmbedding`. Then, you can use the model like this:
58
 
59
+ ```python
60
+ from FlagEmbedding import FlagModel
61
 
62
+ queries = ["Ceci est un exemple de requête.", "Voici un second exemple."]
63
+ passages = ["Ceci est un exemple de passage.", "Et voilà un deuxième exemple."]
64
 
65
+ model = FlagModel('antoinelouis/biencoder-camembert-L8-mmarcoFR')
66
+
67
+ q_embeddings = model.encode(queries, normalize_embeddings=True)
68
+ p_embeddings = model.encode(passages, normalize_embeddings=True)
69
+
70
+ similarity = q_embeddings @ p_embeddings.T
71
+ print(similarity)
72
+ ```
73
+
74
+ #### Using Transformers
75
+
76
+ Start by installing the [library](https://huggingface.co/docs/transformers): `pip install -U transformers`. Then, you can use the model like this:
77
 
78
  ```python
 
79
  import torch
80
+ from torch.nn.functional import normalize
81
+ from transformers import AutoTokenizer, AutoModel
82
 
 
 
83
  def mean_pooling(model_output, attention_mask):
84
+ """ Perform mean pooling on-top of the contextualized word embeddings, while ignoring mask tokens in the mean computation."""
85
  token_embeddings = model_output[0] #First element of model_output contains all token embeddings
86
  input_mask_expanded = attention_mask.unsqueeze(-1).expand(token_embeddings.size()).float()
87
  return torch.sum(token_embeddings * input_mask_expanded, 1) / torch.clamp(input_mask_expanded.sum(1), min=1e-9)
88
 
89
 
90
+ queries = ["Ceci est un exemple de requête.", "Voici un second exemple."]
91
+ passages = ["Ceci est un exemple de passage.", "Et voilà un deuxième exemple."]
92
 
 
93
  tokenizer = AutoTokenizer.from_pretrained('antoinelouis/biencoder-camembert-L8-mmarcoFR')
94
  model = AutoModel.from_pretrained('antoinelouis/biencoder-camembert-L8-mmarcoFR')
95
 
96
+ q_input = tokenizer(queries, padding=True, truncation=True, return_tensors='pt')
97
+ p_input = tokenizer(passages, padding=True, truncation=True, return_tensors='pt')
 
 
98
  with torch.no_grad():
99
+ q_output = model(**encoded_queries)
100
+ p_output = model(**encoded_passages)
101
+ q_embeddings = mean_pooling(q_output, q_input['attention_mask'])
102
+ q_embedddings = normalize(q_embeddings, p=2, dim=1)
103
+ p_embeddings = mean_pooling(p_output, p_input['attention_mask'])
104
+ p_embedddings = normalize(p_embeddings, p=2, dim=1)
105
+
106
+ similarity = q_embeddings @ p_embeddings.T
107
+ print(similarity)
108
  ```
109
 
 
 
 
110
  ***
111
 
112
+ ## Evaluation
113
 
114
+ We evaluate the model on the smaller development set of [mMARCO-fr](https://ir-datasets.com/mmarco.html#mmarco/v2/fr/), which consists of 6,980 queries for a corpus of 8.8M candidate passages. Below, we compare the model performance with other CamemBERT-based biencoder models fine-tuned on the same dataset. We report the mean reciprocal rank (MRR), normalized discounted cumulative gainand (NDCG), mean average precision (MAP), and recall at various cut-offs (R@k).
115
 
116
+ | | model | Vocab. | #Param. | Size | R@500 | R@100(↑) | R@10 | MRR@10 | NDCG@10 | MAP@10 |
117
+ |---:|:-------------------------------------------------------------------------------------------------------------|:-------|--------:|------:|-------:|---------:|-------:|-------:|--------:|-------:|
118
+ | 1 | [biencoder-camembert-base-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camembert-base-mmarcoFR) | 🇫🇷 | 111M | 445MB | 89.1 | 77.8 | 51.5 | 28.5 | 33.7 | 27.9 |
119
+ | 2 | [biencoder-camembert-L10-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camembert-L10-mmarcoFR) | 🇫🇷 | 96M | 386MB | 87.8 | 76.7 | 49.5 | 27.5 | 32.5 | 27.0 |
120
+ | 3 | **biencoder-camembert-L8-mmarcoFR** | 🇫🇷 | 82M | 329MB | 87.4 | 75.9 | 48.9 | 26.7 | 31.8 | 26.2 |
121
+ | 4 | [biencoder-camembert-L6-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camembert-L6-mmarcoFR) | 🇫🇷 | 68M | 272MB | 86.7 | 74.9 | 46.7 | 25.7 | 30.4 | 25.1 |
122
+ | 5 | [biencoder-camembert-L4-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camembert-L4-mmarcoFR) | 🇫🇷 | 54M | 216MB | 85.4 | 72.1 | 44.2 | 23.7 | 28.3 | 23.2 |
123
+ | 6 | [biencoder-camembert-L2-mmarcoFR](https://huggingface.co/antoinelouis/biencoder-camembert-L2-mmarcoFR) | 🇫🇷 | 40M | 159MB | 81.0 | 66.3 | 38.5 | 20.1 | 24.3 | 19.7 |
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
124
 
 
125
  ***
126
 
127
+ ## Training
 
 
 
 
 
 
128
 
129
  #### Data
130
 
131
+ We use the French training samples from the [mMARCO](https://huggingface.co/datasets/unicamp-dl/mmarco) dataset, a multilingual machine-translated version of MS MARCO
132
+ that contains 8.8M passages and 539K training queries. We do not employ the BM25 negatives provided by the official dataset but instead sample harder negatives mined
133
+ from 12 distinct dense retrievers, using the [msmarco-hard-negatives](https://huggingface.co/datasets/sentence-transformers/msmarco-hard-negatives) distillation dataset.
 
 
 
134
 
135
+ #### Implementation
136
 
137
+ The model is initialized from the [camembert-L8](https://huggingface.co/antoinelouis/camembert-L8) checkpoint and optimized via the cross-entropy loss
138
+ (as in [DPR](https://doi.org/10.48550/arXiv.2004.04906)) with a temperature of 0.05. It is fine-tuned on one 32GB NVIDIA V100 GPU for 39k steps (or 40 epochs)
139
+ using the AdamW optimizer with a batch size of 512, a peak learning rate of 2e-5 with warm up along the first 3900 steps and linear scheduling.
140
+ We set the maximum sequence lengths for both the questions and passages to 128 tokens. We use the cosine similarity to compute relevance scores.
141
+
142
+ ***
143
 
144
  ## Citation
145