richie-ghost
commited on
Commit
•
c59b096
1
Parent(s):
4da7e4c
Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +551 -0
- added_tokens.json +3 -0
- config.json +45 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- spm.model +3 -0
- tokenizer.json +0 -0
- tokenizer_config.json +65 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 1024,
|
3 |
+
"pooling_mode_cls_token": false,
|
4 |
+
"pooling_mode_mean_tokens": true,
|
5 |
+
"pooling_mode_max_tokens": false,
|
6 |
+
"pooling_mode_mean_sqrt_len_tokens": false,
|
7 |
+
"pooling_mode_weightedmean_tokens": false,
|
8 |
+
"pooling_mode_lasttoken": false,
|
9 |
+
"include_prompt": true
|
10 |
+
}
|
README.md
ADDED
@@ -0,0 +1,551 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: cross-encoder/nli-deberta-v3-large
|
3 |
+
library_name: sentence-transformers
|
4 |
+
metrics:
|
5 |
+
- cosine_accuracy@1
|
6 |
+
- cosine_accuracy@3
|
7 |
+
- cosine_accuracy@5
|
8 |
+
- cosine_accuracy@10
|
9 |
+
- cosine_precision@1
|
10 |
+
- cosine_precision@3
|
11 |
+
- cosine_precision@5
|
12 |
+
- cosine_precision@10
|
13 |
+
- cosine_recall@1
|
14 |
+
- cosine_recall@3
|
15 |
+
- cosine_recall@5
|
16 |
+
- cosine_recall@10
|
17 |
+
- cosine_ndcg@10
|
18 |
+
- cosine_mrr@10
|
19 |
+
- cosine_map@100
|
20 |
+
- dot_accuracy@1
|
21 |
+
- dot_accuracy@3
|
22 |
+
- dot_accuracy@5
|
23 |
+
- dot_accuracy@10
|
24 |
+
- dot_precision@1
|
25 |
+
- dot_precision@3
|
26 |
+
- dot_precision@5
|
27 |
+
- dot_precision@10
|
28 |
+
- dot_recall@1
|
29 |
+
- dot_recall@3
|
30 |
+
- dot_recall@5
|
31 |
+
- dot_recall@10
|
32 |
+
- dot_ndcg@10
|
33 |
+
- dot_mrr@10
|
34 |
+
- dot_map@100
|
35 |
+
pipeline_tag: sentence-similarity
|
36 |
+
tags:
|
37 |
+
- sentence-transformers
|
38 |
+
- sentence-similarity
|
39 |
+
- feature-extraction
|
40 |
+
- generated_from_trainer
|
41 |
+
- dataset_size:40338
|
42 |
+
- loss:MultipleNegativesRankingLoss
|
43 |
+
widget:
|
44 |
+
- source_sentence: '"Rumpelstilsken, I command the sun to set!" He seemed to sense
|
45 |
+
a hesitation in his mind, and then the impression of jeweled gears turning.'
|
46 |
+
sentences:
|
47 |
+
- A football game is playing.
|
48 |
+
- He sensed hesitation when commanding Rumpelstiltskin.
|
49 |
+
- I ran and he saw me immediately.
|
50 |
+
- source_sentence: A woman wears sunglasses and a black coat as she walks.
|
51 |
+
sentences:
|
52 |
+
- The lady in black walks while wearing her shades.
|
53 |
+
- Two women were walking
|
54 |
+
- The people are running towards the mountains.
|
55 |
+
- source_sentence: The Congress relies on GAO to examine virtually every federal program,
|
56 |
+
activity, and policy, as well as institutions that rely on federal funds.
|
57 |
+
sentences:
|
58 |
+
- The men are standing in line at the restaurant.
|
59 |
+
- GAO helps Congress.
|
60 |
+
- Tide permitting, view the shrine from its base to appreciate its full size.
|
61 |
+
- source_sentence: The resort was named after Louis James Fraser, an English adventurer
|
62 |
+
and scoundrel, who dealt in mule hides, tin, opium, and gambling.
|
63 |
+
sentences:
|
64 |
+
- A man in front of people.
|
65 |
+
- The resort was named after an English adventurer and scoundrel.
|
66 |
+
- A woman is holding flowers by two men on a bench.
|
67 |
+
- source_sentence: Three men riding a bicycle, tow of them are wearing a helmet.
|
68 |
+
sentences:
|
69 |
+
- Accountability measures help establish the financial condition of the government.
|
70 |
+
- A man is pushing a truck.
|
71 |
+
- There are at least two helmets.
|
72 |
+
model-index:
|
73 |
+
- name: SentenceTransformer based on cross-encoder/nli-deberta-v3-large
|
74 |
+
results:
|
75 |
+
- task:
|
76 |
+
type: information-retrieval
|
77 |
+
name: Information Retrieval
|
78 |
+
dataset:
|
79 |
+
name: eval
|
80 |
+
type: eval
|
81 |
+
metrics:
|
82 |
+
- type: cosine_accuracy@1
|
83 |
+
value: 0.0003470672814715653
|
84 |
+
name: Cosine Accuracy@1
|
85 |
+
- type: cosine_accuracy@3
|
86 |
+
value: 0.2842728940453171
|
87 |
+
name: Cosine Accuracy@3
|
88 |
+
- type: cosine_accuracy@5
|
89 |
+
value: 0.42875204521790866
|
90 |
+
name: Cosine Accuracy@5
|
91 |
+
- type: cosine_accuracy@10
|
92 |
+
value: 0.5317318657345431
|
93 |
+
name: Cosine Accuracy@10
|
94 |
+
- type: cosine_precision@1
|
95 |
+
value: 0.0003470672814715653
|
96 |
+
name: Cosine Precision@1
|
97 |
+
- type: cosine_precision@3
|
98 |
+
value: 0.09475763134843902
|
99 |
+
name: Cosine Precision@3
|
100 |
+
- type: cosine_precision@5
|
101 |
+
value: 0.08575040904358174
|
102 |
+
name: Cosine Precision@5
|
103 |
+
- type: cosine_precision@10
|
104 |
+
value: 0.053173186573454316
|
105 |
+
name: Cosine Precision@10
|
106 |
+
- type: cosine_recall@1
|
107 |
+
value: 0.0003470672814715653
|
108 |
+
name: Cosine Recall@1
|
109 |
+
- type: cosine_recall@3
|
110 |
+
value: 0.2842728940453171
|
111 |
+
name: Cosine Recall@3
|
112 |
+
- type: cosine_recall@5
|
113 |
+
value: 0.42875204521790866
|
114 |
+
name: Cosine Recall@5
|
115 |
+
- type: cosine_recall@10
|
116 |
+
value: 0.5317318657345431
|
117 |
+
name: Cosine Recall@10
|
118 |
+
- type: cosine_ndcg@10
|
119 |
+
value: 0.2599623819220365
|
120 |
+
name: Cosine Ndcg@10
|
121 |
+
- type: cosine_mrr@10
|
122 |
+
value: 0.17320152646642903
|
123 |
+
name: Cosine Mrr@10
|
124 |
+
- type: cosine_map@100
|
125 |
+
value: 0.1849889511878054
|
126 |
+
name: Cosine Map@100
|
127 |
+
- type: dot_accuracy@1
|
128 |
+
value: 0.003718578015766771
|
129 |
+
name: Dot Accuracy@1
|
130 |
+
- type: dot_accuracy@3
|
131 |
+
value: 0.262531607913134
|
132 |
+
name: Dot Accuracy@3
|
133 |
+
- type: dot_accuracy@5
|
134 |
+
value: 0.40182954038375723
|
135 |
+
name: Dot Accuracy@5
|
136 |
+
- type: dot_accuracy@10
|
137 |
+
value: 0.5089741682780504
|
138 |
+
name: Dot Accuracy@10
|
139 |
+
- type: dot_precision@1
|
140 |
+
value: 0.003718578015766771
|
141 |
+
name: Dot Precision@1
|
142 |
+
- type: dot_precision@3
|
143 |
+
value: 0.08751053597104465
|
144 |
+
name: Dot Precision@3
|
145 |
+
- type: dot_precision@5
|
146 |
+
value: 0.08036590807675144
|
147 |
+
name: Dot Precision@5
|
148 |
+
- type: dot_precision@10
|
149 |
+
value: 0.050897416827805034
|
150 |
+
name: Dot Precision@10
|
151 |
+
- type: dot_recall@1
|
152 |
+
value: 0.003718578015766771
|
153 |
+
name: Dot Recall@1
|
154 |
+
- type: dot_recall@3
|
155 |
+
value: 0.262531607913134
|
156 |
+
name: Dot Recall@3
|
157 |
+
- type: dot_recall@5
|
158 |
+
value: 0.40182954038375723
|
159 |
+
name: Dot Recall@5
|
160 |
+
- type: dot_recall@10
|
161 |
+
value: 0.5089741682780504
|
162 |
+
name: Dot Recall@10
|
163 |
+
- type: dot_ndcg@10
|
164 |
+
value: 0.24760156704826422
|
165 |
+
name: Dot Ndcg@10
|
166 |
+
- type: dot_mrr@10
|
167 |
+
value: 0.16454750021051548
|
168 |
+
name: Dot Mrr@10
|
169 |
+
- type: dot_map@100
|
170 |
+
value: 0.17684391661589097
|
171 |
+
name: Dot Map@100
|
172 |
+
---
|
173 |
+
|
174 |
+
# SentenceTransformer based on cross-encoder/nli-deberta-v3-large
|
175 |
+
|
176 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [cross-encoder/nli-deberta-v3-large](https://huggingface.co/cross-encoder/nli-deberta-v3-large). It maps sentences & paragraphs to a 1024-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
177 |
+
|
178 |
+
## Model Details
|
179 |
+
|
180 |
+
### Model Description
|
181 |
+
- **Model Type:** Sentence Transformer
|
182 |
+
- **Base model:** [cross-encoder/nli-deberta-v3-large](https://huggingface.co/cross-encoder/nli-deberta-v3-large) <!-- at revision 52fab31a566138fbd1f6833a4efc1199f875f05e -->
|
183 |
+
- **Maximum Sequence Length:** 512 tokens
|
184 |
+
- **Output Dimensionality:** 1024 tokens
|
185 |
+
- **Similarity Function:** Cosine Similarity
|
186 |
+
<!-- - **Training Dataset:** Unknown -->
|
187 |
+
<!-- - **Language:** Unknown -->
|
188 |
+
<!-- - **License:** Unknown -->
|
189 |
+
|
190 |
+
### Model Sources
|
191 |
+
|
192 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
193 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
194 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
195 |
+
|
196 |
+
### Full Model Architecture
|
197 |
+
|
198 |
+
```
|
199 |
+
SentenceTransformer(
|
200 |
+
(0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: DebertaV2Model
|
201 |
+
(1): Pooling({'word_embedding_dimension': 1024, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
|
202 |
+
)
|
203 |
+
```
|
204 |
+
|
205 |
+
## Usage
|
206 |
+
|
207 |
+
### Direct Usage (Sentence Transformers)
|
208 |
+
|
209 |
+
First install the Sentence Transformers library:
|
210 |
+
|
211 |
+
```bash
|
212 |
+
pip install -U sentence-transformers
|
213 |
+
```
|
214 |
+
|
215 |
+
Then you can load this model and run inference.
|
216 |
+
```python
|
217 |
+
from sentence_transformers import SentenceTransformer
|
218 |
+
|
219 |
+
# Download from the 🤗 Hub
|
220 |
+
model = SentenceTransformer("richie-ghost/sbert_ft_cross-encoder-nli-deberta-v3-large")
|
221 |
+
# Run inference
|
222 |
+
sentences = [
|
223 |
+
'Three men riding a bicycle, tow of them are wearing a helmet.',
|
224 |
+
'There are at least two helmets.',
|
225 |
+
'Accountability measures help establish the financial condition of the government.',
|
226 |
+
]
|
227 |
+
embeddings = model.encode(sentences)
|
228 |
+
print(embeddings.shape)
|
229 |
+
# [3, 1024]
|
230 |
+
|
231 |
+
# Get the similarity scores for the embeddings
|
232 |
+
similarities = model.similarity(embeddings, embeddings)
|
233 |
+
print(similarities.shape)
|
234 |
+
# [3, 3]
|
235 |
+
```
|
236 |
+
|
237 |
+
<!--
|
238 |
+
### Direct Usage (Transformers)
|
239 |
+
|
240 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
241 |
+
|
242 |
+
</details>
|
243 |
+
-->
|
244 |
+
|
245 |
+
<!--
|
246 |
+
### Downstream Usage (Sentence Transformers)
|
247 |
+
|
248 |
+
You can finetune this model on your own dataset.
|
249 |
+
|
250 |
+
<details><summary>Click to expand</summary>
|
251 |
+
|
252 |
+
</details>
|
253 |
+
-->
|
254 |
+
|
255 |
+
<!--
|
256 |
+
### Out-of-Scope Use
|
257 |
+
|
258 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
259 |
+
-->
|
260 |
+
|
261 |
+
## Evaluation
|
262 |
+
|
263 |
+
### Metrics
|
264 |
+
|
265 |
+
#### Information Retrieval
|
266 |
+
* Dataset: `eval`
|
267 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
268 |
+
|
269 |
+
| Metric | Value |
|
270 |
+
|:--------------------|:----------|
|
271 |
+
| cosine_accuracy@1 | 0.0003 |
|
272 |
+
| cosine_accuracy@3 | 0.2843 |
|
273 |
+
| cosine_accuracy@5 | 0.4288 |
|
274 |
+
| cosine_accuracy@10 | 0.5317 |
|
275 |
+
| cosine_precision@1 | 0.0003 |
|
276 |
+
| cosine_precision@3 | 0.0948 |
|
277 |
+
| cosine_precision@5 | 0.0858 |
|
278 |
+
| cosine_precision@10 | 0.0532 |
|
279 |
+
| cosine_recall@1 | 0.0003 |
|
280 |
+
| cosine_recall@3 | 0.2843 |
|
281 |
+
| cosine_recall@5 | 0.4288 |
|
282 |
+
| cosine_recall@10 | 0.5317 |
|
283 |
+
| cosine_ndcg@10 | 0.26 |
|
284 |
+
| cosine_mrr@10 | 0.1732 |
|
285 |
+
| **cosine_map@100** | **0.185** |
|
286 |
+
| dot_accuracy@1 | 0.0037 |
|
287 |
+
| dot_accuracy@3 | 0.2625 |
|
288 |
+
| dot_accuracy@5 | 0.4018 |
|
289 |
+
| dot_accuracy@10 | 0.509 |
|
290 |
+
| dot_precision@1 | 0.0037 |
|
291 |
+
| dot_precision@3 | 0.0875 |
|
292 |
+
| dot_precision@5 | 0.0804 |
|
293 |
+
| dot_precision@10 | 0.0509 |
|
294 |
+
| dot_recall@1 | 0.0037 |
|
295 |
+
| dot_recall@3 | 0.2625 |
|
296 |
+
| dot_recall@5 | 0.4018 |
|
297 |
+
| dot_recall@10 | 0.509 |
|
298 |
+
| dot_ndcg@10 | 0.2476 |
|
299 |
+
| dot_mrr@10 | 0.1645 |
|
300 |
+
| dot_map@100 | 0.1768 |
|
301 |
+
|
302 |
+
<!--
|
303 |
+
## Bias, Risks and Limitations
|
304 |
+
|
305 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
306 |
+
-->
|
307 |
+
|
308 |
+
<!--
|
309 |
+
### Recommendations
|
310 |
+
|
311 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
312 |
+
-->
|
313 |
+
|
314 |
+
## Training Details
|
315 |
+
|
316 |
+
### Training Dataset
|
317 |
+
|
318 |
+
#### Unnamed Dataset
|
319 |
+
|
320 |
+
|
321 |
+
* Size: 40,338 training samples
|
322 |
+
* Columns: <code>sentence_0</code> and <code>sentence_1</code>
|
323 |
+
* Approximate statistics based on the first 1000 samples:
|
324 |
+
| | sentence_0 | sentence_1 |
|
325 |
+
|:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
|
326 |
+
| type | string | string |
|
327 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 19.64 tokens</li><li>max: 129 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 11.27 tokens</li><li>max: 36 tokens</li></ul> |
|
328 |
+
* Samples:
|
329 |
+
| sentence_0 | sentence_1 |
|
330 |
+
|:---------------------------------------------------------------------------------------|:------------------------------------------------------------|
|
331 |
+
| <code>A group of ladies trying to learn how to belly dance.</code> | <code>Several women learn the art of exotic dancing.</code> |
|
332 |
+
| <code>A man and a woman are having a conversation, while the man drinks a beer.</code> | <code>The man is drinking.</code> |
|
333 |
+
| <code>A brown dog drinks from a water bottle.</code> | <code>A brown cat drinks from a bowl.</code> |
|
334 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
335 |
+
```json
|
336 |
+
{
|
337 |
+
"scale": 20.0,
|
338 |
+
"similarity_fct": "cos_sim"
|
339 |
+
}
|
340 |
+
```
|
341 |
+
|
342 |
+
### Training Hyperparameters
|
343 |
+
#### Non-Default Hyperparameters
|
344 |
+
|
345 |
+
- `eval_strategy`: steps
|
346 |
+
- `per_device_train_batch_size`: 16
|
347 |
+
- `per_device_eval_batch_size`: 16
|
348 |
+
- `num_train_epochs`: 4
|
349 |
+
- `multi_dataset_batch_sampler`: round_robin
|
350 |
+
|
351 |
+
#### All Hyperparameters
|
352 |
+
<details><summary>Click to expand</summary>
|
353 |
+
|
354 |
+
- `overwrite_output_dir`: False
|
355 |
+
- `do_predict`: False
|
356 |
+
- `eval_strategy`: steps
|
357 |
+
- `prediction_loss_only`: True
|
358 |
+
- `per_device_train_batch_size`: 16
|
359 |
+
- `per_device_eval_batch_size`: 16
|
360 |
+
- `per_gpu_train_batch_size`: None
|
361 |
+
- `per_gpu_eval_batch_size`: None
|
362 |
+
- `gradient_accumulation_steps`: 1
|
363 |
+
- `eval_accumulation_steps`: None
|
364 |
+
- `torch_empty_cache_steps`: None
|
365 |
+
- `learning_rate`: 5e-05
|
366 |
+
- `weight_decay`: 0.0
|
367 |
+
- `adam_beta1`: 0.9
|
368 |
+
- `adam_beta2`: 0.999
|
369 |
+
- `adam_epsilon`: 1e-08
|
370 |
+
- `max_grad_norm`: 1
|
371 |
+
- `num_train_epochs`: 4
|
372 |
+
- `max_steps`: -1
|
373 |
+
- `lr_scheduler_type`: linear
|
374 |
+
- `lr_scheduler_kwargs`: {}
|
375 |
+
- `warmup_ratio`: 0.0
|
376 |
+
- `warmup_steps`: 0
|
377 |
+
- `log_level`: passive
|
378 |
+
- `log_level_replica`: warning
|
379 |
+
- `log_on_each_node`: True
|
380 |
+
- `logging_nan_inf_filter`: True
|
381 |
+
- `save_safetensors`: True
|
382 |
+
- `save_on_each_node`: False
|
383 |
+
- `save_only_model`: False
|
384 |
+
- `restore_callback_states_from_checkpoint`: False
|
385 |
+
- `no_cuda`: False
|
386 |
+
- `use_cpu`: False
|
387 |
+
- `use_mps_device`: False
|
388 |
+
- `seed`: 42
|
389 |
+
- `data_seed`: None
|
390 |
+
- `jit_mode_eval`: False
|
391 |
+
- `use_ipex`: False
|
392 |
+
- `bf16`: False
|
393 |
+
- `fp16`: False
|
394 |
+
- `fp16_opt_level`: O1
|
395 |
+
- `half_precision_backend`: auto
|
396 |
+
- `bf16_full_eval`: False
|
397 |
+
- `fp16_full_eval`: False
|
398 |
+
- `tf32`: None
|
399 |
+
- `local_rank`: 0
|
400 |
+
- `ddp_backend`: None
|
401 |
+
- `tpu_num_cores`: None
|
402 |
+
- `tpu_metrics_debug`: False
|
403 |
+
- `debug`: []
|
404 |
+
- `dataloader_drop_last`: False
|
405 |
+
- `dataloader_num_workers`: 0
|
406 |
+
- `dataloader_prefetch_factor`: None
|
407 |
+
- `past_index`: -1
|
408 |
+
- `disable_tqdm`: False
|
409 |
+
- `remove_unused_columns`: True
|
410 |
+
- `label_names`: None
|
411 |
+
- `load_best_model_at_end`: False
|
412 |
+
- `ignore_data_skip`: False
|
413 |
+
- `fsdp`: []
|
414 |
+
- `fsdp_min_num_params`: 0
|
415 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
416 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
417 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
418 |
+
- `deepspeed`: None
|
419 |
+
- `label_smoothing_factor`: 0.0
|
420 |
+
- `optim`: adamw_torch
|
421 |
+
- `optim_args`: None
|
422 |
+
- `adafactor`: False
|
423 |
+
- `group_by_length`: False
|
424 |
+
- `length_column_name`: length
|
425 |
+
- `ddp_find_unused_parameters`: None
|
426 |
+
- `ddp_bucket_cap_mb`: None
|
427 |
+
- `ddp_broadcast_buffers`: False
|
428 |
+
- `dataloader_pin_memory`: True
|
429 |
+
- `dataloader_persistent_workers`: False
|
430 |
+
- `skip_memory_metrics`: True
|
431 |
+
- `use_legacy_prediction_loop`: False
|
432 |
+
- `push_to_hub`: False
|
433 |
+
- `resume_from_checkpoint`: None
|
434 |
+
- `hub_model_id`: None
|
435 |
+
- `hub_strategy`: every_save
|
436 |
+
- `hub_private_repo`: False
|
437 |
+
- `hub_always_push`: False
|
438 |
+
- `gradient_checkpointing`: False
|
439 |
+
- `gradient_checkpointing_kwargs`: None
|
440 |
+
- `include_inputs_for_metrics`: False
|
441 |
+
- `eval_do_concat_batches`: True
|
442 |
+
- `fp16_backend`: auto
|
443 |
+
- `push_to_hub_model_id`: None
|
444 |
+
- `push_to_hub_organization`: None
|
445 |
+
- `mp_parameters`:
|
446 |
+
- `auto_find_batch_size`: False
|
447 |
+
- `full_determinism`: False
|
448 |
+
- `torchdynamo`: None
|
449 |
+
- `ray_scope`: last
|
450 |
+
- `ddp_timeout`: 1800
|
451 |
+
- `torch_compile`: False
|
452 |
+
- `torch_compile_backend`: None
|
453 |
+
- `torch_compile_mode`: None
|
454 |
+
- `dispatch_batches`: None
|
455 |
+
- `split_batches`: None
|
456 |
+
- `include_tokens_per_second`: False
|
457 |
+
- `include_num_input_tokens_seen`: False
|
458 |
+
- `neftune_noise_alpha`: None
|
459 |
+
- `optim_target_modules`: None
|
460 |
+
- `batch_eval_metrics`: False
|
461 |
+
- `eval_on_start`: False
|
462 |
+
- `eval_use_gather_object`: False
|
463 |
+
- `batch_sampler`: batch_sampler
|
464 |
+
- `multi_dataset_batch_sampler`: round_robin
|
465 |
+
|
466 |
+
</details>
|
467 |
+
|
468 |
+
### Training Logs
|
469 |
+
| Epoch | Step | Training Loss | eval_cosine_map@100 |
|
470 |
+
|:------:|:-----:|:-------------:|:-------------------:|
|
471 |
+
| 0.1983 | 500 | 1.2356 | 0.0873 |
|
472 |
+
| 0.3965 | 1000 | 0.4077 | 0.1200 |
|
473 |
+
| 0.5948 | 1500 | 0.3205 | 0.1280 |
|
474 |
+
| 0.7930 | 2000 | 0.2576 | 0.1416 |
|
475 |
+
| 0.9913 | 2500 | 0.2435 | 0.1476 |
|
476 |
+
| 1.0 | 2522 | - | 0.1492 |
|
477 |
+
| 1.1895 | 3000 | 0.1821 | 0.1553 |
|
478 |
+
| 1.3878 | 3500 | 0.1237 | 0.1589 |
|
479 |
+
| 1.5860 | 4000 | 0.1074 | 0.1603 |
|
480 |
+
| 1.7843 | 4500 | 0.0905 | 0.1654 |
|
481 |
+
| 1.9826 | 5000 | 0.0783 | 0.1685 |
|
482 |
+
| 2.0 | 5044 | - | 0.1683 |
|
483 |
+
| 2.1808 | 5500 | 0.0583 | 0.1698 |
|
484 |
+
| 2.3791 | 6000 | 0.0432 | 0.1746 |
|
485 |
+
| 2.5773 | 6500 | 0.0365 | 0.1749 |
|
486 |
+
| 2.7756 | 7000 | 0.0303 | 0.1791 |
|
487 |
+
| 2.9738 | 7500 | 0.0276 | 0.1788 |
|
488 |
+
| 3.0 | 7566 | - | 0.1805 |
|
489 |
+
| 3.1721 | 8000 | 0.02 | 0.1807 |
|
490 |
+
| 3.3703 | 8500 | 0.013 | 0.1823 |
|
491 |
+
| 3.5686 | 9000 | 0.0123 | 0.1839 |
|
492 |
+
| 3.7669 | 9500 | 0.0099 | 0.1852 |
|
493 |
+
| 3.9651 | 10000 | 0.01 | 0.1850 |
|
494 |
+
| 4.0 | 10088 | - | 0.1850 |
|
495 |
+
|
496 |
+
|
497 |
+
### Framework Versions
|
498 |
+
- Python: 3.10.12
|
499 |
+
- Sentence Transformers: 3.2.1
|
500 |
+
- Transformers: 4.44.2
|
501 |
+
- PyTorch: 2.5.0+cu121
|
502 |
+
- Accelerate: 1.0.1
|
503 |
+
- Datasets: 3.0.2
|
504 |
+
- Tokenizers: 0.19.1
|
505 |
+
|
506 |
+
## Citation
|
507 |
+
|
508 |
+
### BibTeX
|
509 |
+
|
510 |
+
#### Sentence Transformers
|
511 |
+
```bibtex
|
512 |
+
@inproceedings{reimers-2019-sentence-bert,
|
513 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
514 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
515 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
516 |
+
month = "11",
|
517 |
+
year = "2019",
|
518 |
+
publisher = "Association for Computational Linguistics",
|
519 |
+
url = "https://arxiv.org/abs/1908.10084",
|
520 |
+
}
|
521 |
+
```
|
522 |
+
|
523 |
+
#### MultipleNegativesRankingLoss
|
524 |
+
```bibtex
|
525 |
+
@misc{henderson2017efficient,
|
526 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
527 |
+
author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
|
528 |
+
year={2017},
|
529 |
+
eprint={1705.00652},
|
530 |
+
archivePrefix={arXiv},
|
531 |
+
primaryClass={cs.CL}
|
532 |
+
}
|
533 |
+
```
|
534 |
+
|
535 |
+
<!--
|
536 |
+
## Glossary
|
537 |
+
|
538 |
+
*Clearly define terms in order to be accessible across audiences.*
|
539 |
+
-->
|
540 |
+
|
541 |
+
<!--
|
542 |
+
## Model Card Authors
|
543 |
+
|
544 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
545 |
+
-->
|
546 |
+
|
547 |
+
<!--
|
548 |
+
## Model Card Contact
|
549 |
+
|
550 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
551 |
+
-->
|
added_tokens.json
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"[MASK]": 128000
|
3 |
+
}
|
config.json
ADDED
@@ -0,0 +1,45 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "/content/drive/MyDrive/cross-encoder-nli-deberta-v3-large/save_pretrained",
|
3 |
+
"architectures": [
|
4 |
+
"DebertaV2Model"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"hidden_act": "gelu",
|
8 |
+
"hidden_dropout_prob": 0.1,
|
9 |
+
"hidden_size": 1024,
|
10 |
+
"id2label": {
|
11 |
+
"0": "contradiction",
|
12 |
+
"1": "entailment",
|
13 |
+
"2": "neutral"
|
14 |
+
},
|
15 |
+
"initializer_range": 0.02,
|
16 |
+
"intermediate_size": 4096,
|
17 |
+
"label2id": {
|
18 |
+
"contradiction": 0,
|
19 |
+
"entailment": 1,
|
20 |
+
"neutral": 2
|
21 |
+
},
|
22 |
+
"layer_norm_eps": 1e-07,
|
23 |
+
"max_position_embeddings": 512,
|
24 |
+
"max_relative_positions": -1,
|
25 |
+
"model_type": "deberta-v2",
|
26 |
+
"norm_rel_ebd": "layer_norm",
|
27 |
+
"num_attention_heads": 16,
|
28 |
+
"num_hidden_layers": 24,
|
29 |
+
"pad_token_id": 0,
|
30 |
+
"pooler_dropout": 0,
|
31 |
+
"pooler_hidden_act": "gelu",
|
32 |
+
"pooler_hidden_size": 1024,
|
33 |
+
"pos_att_type": [
|
34 |
+
"p2c",
|
35 |
+
"c2p"
|
36 |
+
],
|
37 |
+
"position_biased_input": false,
|
38 |
+
"position_buckets": 256,
|
39 |
+
"relative_attention": true,
|
40 |
+
"share_att_key": true,
|
41 |
+
"torch_dtype": "float32",
|
42 |
+
"transformers_version": "4.44.2",
|
43 |
+
"type_vocab_size": 0,
|
44 |
+
"vocab_size": 128100
|
45 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.2.1",
|
4 |
+
"transformers": "4.44.2",
|
5 |
+
"pytorch": "2.5.0+cu121"
|
6 |
+
},
|
7 |
+
"prompts": {},
|
8 |
+
"default_prompt_name": null,
|
9 |
+
"similarity_fn_name": null
|
10 |
+
}
|
model.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:619a968147cbf44d673977b6b3dd7391112a1dff15f1618a086c84e7ac717fb0
|
3 |
+
size 1736094384
|
modules.json
ADDED
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
[
|
2 |
+
{
|
3 |
+
"idx": 0,
|
4 |
+
"name": "0",
|
5 |
+
"path": "",
|
6 |
+
"type": "sentence_transformers.models.Transformer"
|
7 |
+
},
|
8 |
+
{
|
9 |
+
"idx": 1,
|
10 |
+
"name": "1",
|
11 |
+
"path": "1_Pooling",
|
12 |
+
"type": "sentence_transformers.models.Pooling"
|
13 |
+
}
|
14 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 512,
|
3 |
+
"do_lower_case": false
|
4 |
+
}
|
special_tokens_map.json
ADDED
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"bos_token": {
|
3 |
+
"content": "[CLS]",
|
4 |
+
"lstrip": false,
|
5 |
+
"normalized": false,
|
6 |
+
"rstrip": false,
|
7 |
+
"single_word": false
|
8 |
+
},
|
9 |
+
"cls_token": {
|
10 |
+
"content": "[CLS]",
|
11 |
+
"lstrip": false,
|
12 |
+
"normalized": false,
|
13 |
+
"rstrip": false,
|
14 |
+
"single_word": false
|
15 |
+
},
|
16 |
+
"eos_token": {
|
17 |
+
"content": "[SEP]",
|
18 |
+
"lstrip": false,
|
19 |
+
"normalized": false,
|
20 |
+
"rstrip": false,
|
21 |
+
"single_word": false
|
22 |
+
},
|
23 |
+
"mask_token": {
|
24 |
+
"content": "[MASK]",
|
25 |
+
"lstrip": false,
|
26 |
+
"normalized": false,
|
27 |
+
"rstrip": false,
|
28 |
+
"single_word": false
|
29 |
+
},
|
30 |
+
"pad_token": {
|
31 |
+
"content": "[PAD]",
|
32 |
+
"lstrip": false,
|
33 |
+
"normalized": false,
|
34 |
+
"rstrip": false,
|
35 |
+
"single_word": false
|
36 |
+
},
|
37 |
+
"sep_token": {
|
38 |
+
"content": "[SEP]",
|
39 |
+
"lstrip": false,
|
40 |
+
"normalized": false,
|
41 |
+
"rstrip": false,
|
42 |
+
"single_word": false
|
43 |
+
},
|
44 |
+
"unk_token": {
|
45 |
+
"content": "[UNK]",
|
46 |
+
"lstrip": false,
|
47 |
+
"normalized": true,
|
48 |
+
"rstrip": false,
|
49 |
+
"single_word": false
|
50 |
+
}
|
51 |
+
}
|
spm.model
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:c679fbf93643d19aab7ee10c0b99e460bdbc02fedf34b92b05af343b4af586fd
|
3 |
+
size 2464616
|
tokenizer.json
ADDED
The diff for this file is too large to render.
See raw diff
|
|
tokenizer_config.json
ADDED
@@ -0,0 +1,65 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"added_tokens_decoder": {
|
3 |
+
"0": {
|
4 |
+
"content": "[PAD]",
|
5 |
+
"lstrip": false,
|
6 |
+
"normalized": false,
|
7 |
+
"rstrip": false,
|
8 |
+
"single_word": false,
|
9 |
+
"special": true
|
10 |
+
},
|
11 |
+
"1": {
|
12 |
+
"content": "[CLS]",
|
13 |
+
"lstrip": false,
|
14 |
+
"normalized": false,
|
15 |
+
"rstrip": false,
|
16 |
+
"single_word": false,
|
17 |
+
"special": true
|
18 |
+
},
|
19 |
+
"2": {
|
20 |
+
"content": "[SEP]",
|
21 |
+
"lstrip": false,
|
22 |
+
"normalized": false,
|
23 |
+
"rstrip": false,
|
24 |
+
"single_word": false,
|
25 |
+
"special": true
|
26 |
+
},
|
27 |
+
"3": {
|
28 |
+
"content": "[UNK]",
|
29 |
+
"lstrip": false,
|
30 |
+
"normalized": true,
|
31 |
+
"rstrip": false,
|
32 |
+
"single_word": false,
|
33 |
+
"special": true
|
34 |
+
},
|
35 |
+
"128000": {
|
36 |
+
"content": "[MASK]",
|
37 |
+
"lstrip": false,
|
38 |
+
"normalized": false,
|
39 |
+
"rstrip": false,
|
40 |
+
"single_word": false,
|
41 |
+
"special": true
|
42 |
+
}
|
43 |
+
},
|
44 |
+
"bos_token": "[CLS]",
|
45 |
+
"clean_up_tokenization_spaces": true,
|
46 |
+
"cls_token": "[CLS]",
|
47 |
+
"do_lower_case": false,
|
48 |
+
"eos_token": "[SEP]",
|
49 |
+
"mask_token": "[MASK]",
|
50 |
+
"max_length": 512,
|
51 |
+
"model_max_length": 512,
|
52 |
+
"pad_to_multiple_of": null,
|
53 |
+
"pad_token": "[PAD]",
|
54 |
+
"pad_token_type_id": 0,
|
55 |
+
"padding_side": "right",
|
56 |
+
"sep_token": "[SEP]",
|
57 |
+
"sp_model_kwargs": {},
|
58 |
+
"split_by_punct": false,
|
59 |
+
"stride": 0,
|
60 |
+
"tokenizer_class": "DebertaV2Tokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "[UNK]",
|
64 |
+
"vocab_type": "spm"
|
65 |
+
}
|