Sentence Similarity
sentence-transformers
Safetensors
English
distilbert
feature-extraction
Generated from Trainer
dataset_size:404290
loss:OnlineContrastiveLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use yahyaabd/stsb-distilbert-base-ocl with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use yahyaabd/stsb-distilbert-base-ocl with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("yahyaabd/stsb-distilbert-base-ocl") sentences = [ "What does the lock symbol on my iPhone 6 means?", "How did the Soviet Navy compare to the US Navy?", "What does the iPhone icon with lock and arrow mean?", "What is the importance of electrical engineering?" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Add new SentenceTransformer model
Browse files- 1_Pooling/config.json +10 -0
- README.md +582 -0
- config.json +24 -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 +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +59 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"word_embedding_dimension": 768,
|
| 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,582 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
language:
|
| 3 |
+
- en
|
| 4 |
+
tags:
|
| 5 |
+
- sentence-transformers
|
| 6 |
+
- sentence-similarity
|
| 7 |
+
- feature-extraction
|
| 8 |
+
- generated_from_trainer
|
| 9 |
+
- dataset_size:404290
|
| 10 |
+
- loss:OnlineContrastiveLoss
|
| 11 |
+
base_model: sentence-transformers/stsb-distilbert-base
|
| 12 |
+
widget:
|
| 13 |
+
- source_sentence: What does the lock symbol on my iPhone 6 means?
|
| 14 |
+
sentences:
|
| 15 |
+
- How did the Soviet Navy compare to the US Navy?
|
| 16 |
+
- What does the iPhone icon with lock and arrow mean?
|
| 17 |
+
- What is the importance of electrical engineering?
|
| 18 |
+
- source_sentence: Why are blue and red neon lights illegal or restricted for commercial
|
| 19 |
+
uses in Honduras?
|
| 20 |
+
sentences:
|
| 21 |
+
- Why are blue and red neon lights illegal or restricted for commercial uses in
|
| 22 |
+
Colombia?
|
| 23 |
+
- Why would I want a Raspberry Pi?
|
| 24 |
+
- How do I see things as they are?
|
| 25 |
+
- source_sentence: How will Hillary Clinton deal with russia?
|
| 26 |
+
sentences:
|
| 27 |
+
- What would have happened if Barty crouch Jr escaped the dementors and made it
|
| 28 |
+
back to the graveyard?
|
| 29 |
+
- How will Hillary Clinton deal with terrorism?
|
| 30 |
+
- I am a commercial student who wishes to study accounting, but now I wish to study
|
| 31 |
+
law. Is it possible?
|
| 32 |
+
- source_sentence: What are the best managing skills?
|
| 33 |
+
sentences:
|
| 34 |
+
- What are the top skills of effective Product Managers?
|
| 35 |
+
- How do I lose weight in a short time?
|
| 36 |
+
- What are some good songs for lyrical dances?
|
| 37 |
+
- source_sentence: What is the best fact checking sources that all Quorans will most
|
| 38 |
+
trust?
|
| 39 |
+
sentences:
|
| 40 |
+
- Do people still write love letters?
|
| 41 |
+
- Is working in McKinsey one of the best and surest ways to get into Harvard Business
|
| 42 |
+
School?
|
| 43 |
+
- What is the most memorable book that Quorans have read?
|
| 44 |
+
datasets:
|
| 45 |
+
- sentence-transformers/quora-duplicates
|
| 46 |
+
pipeline_tag: sentence-similarity
|
| 47 |
+
library_name: sentence-transformers
|
| 48 |
+
metrics:
|
| 49 |
+
- cosine_accuracy
|
| 50 |
+
- cosine_accuracy_threshold
|
| 51 |
+
- cosine_f1
|
| 52 |
+
- cosine_f1_threshold
|
| 53 |
+
- cosine_precision
|
| 54 |
+
- cosine_recall
|
| 55 |
+
- cosine_ap
|
| 56 |
+
- cosine_mcc
|
| 57 |
+
- average_precision
|
| 58 |
+
- f1
|
| 59 |
+
- precision
|
| 60 |
+
- recall
|
| 61 |
+
- threshold
|
| 62 |
+
- cosine_accuracy@1
|
| 63 |
+
- cosine_accuracy@3
|
| 64 |
+
- cosine_accuracy@5
|
| 65 |
+
- cosine_accuracy@10
|
| 66 |
+
- cosine_precision@1
|
| 67 |
+
- cosine_precision@3
|
| 68 |
+
- cosine_precision@5
|
| 69 |
+
- cosine_precision@10
|
| 70 |
+
- cosine_recall@1
|
| 71 |
+
- cosine_recall@3
|
| 72 |
+
- cosine_recall@5
|
| 73 |
+
- cosine_recall@10
|
| 74 |
+
- cosine_ndcg@10
|
| 75 |
+
- cosine_mrr@10
|
| 76 |
+
- cosine_map@100
|
| 77 |
+
model-index:
|
| 78 |
+
- name: SentenceTransformer based on sentence-transformers/stsb-distilbert-base
|
| 79 |
+
results:
|
| 80 |
+
- task:
|
| 81 |
+
type: binary-classification
|
| 82 |
+
name: Binary Classification
|
| 83 |
+
dataset:
|
| 84 |
+
name: quora duplicates
|
| 85 |
+
type: quora-duplicates
|
| 86 |
+
metrics:
|
| 87 |
+
- type: cosine_accuracy
|
| 88 |
+
value: 0.869
|
| 89 |
+
name: Cosine Accuracy
|
| 90 |
+
- type: cosine_accuracy_threshold
|
| 91 |
+
value: 0.813665509223938
|
| 92 |
+
name: Cosine Accuracy Threshold
|
| 93 |
+
- type: cosine_f1
|
| 94 |
+
value: 0.8390243902439025
|
| 95 |
+
name: Cosine F1
|
| 96 |
+
- type: cosine_f1_threshold
|
| 97 |
+
value: 0.7617226243019104
|
| 98 |
+
name: Cosine F1 Threshold
|
| 99 |
+
- type: cosine_precision
|
| 100 |
+
value: 0.7818181818181819
|
| 101 |
+
name: Cosine Precision
|
| 102 |
+
- type: cosine_recall
|
| 103 |
+
value: 0.9052631578947369
|
| 104 |
+
name: Cosine Recall
|
| 105 |
+
- type: cosine_ap
|
| 106 |
+
value: 0.8852756469769394
|
| 107 |
+
name: Cosine Ap
|
| 108 |
+
- type: cosine_mcc
|
| 109 |
+
value: 0.7337941850587686
|
| 110 |
+
name: Cosine Mcc
|
| 111 |
+
- task:
|
| 112 |
+
type: paraphrase-mining
|
| 113 |
+
name: Paraphrase Mining
|
| 114 |
+
dataset:
|
| 115 |
+
name: quora duplicates dev
|
| 116 |
+
type: quora-duplicates-dev
|
| 117 |
+
metrics:
|
| 118 |
+
- type: average_precision
|
| 119 |
+
value: 0.5427423938771084
|
| 120 |
+
name: Average Precision
|
| 121 |
+
- type: f1
|
| 122 |
+
value: 0.5532539228607665
|
| 123 |
+
name: F1
|
| 124 |
+
- type: precision
|
| 125 |
+
value: 0.5508021390374331
|
| 126 |
+
name: Precision
|
| 127 |
+
- type: recall
|
| 128 |
+
value: 0.5557276315132138
|
| 129 |
+
name: Recall
|
| 130 |
+
- type: threshold
|
| 131 |
+
value: 0.865865558385849
|
| 132 |
+
name: Threshold
|
| 133 |
+
- task:
|
| 134 |
+
type: information-retrieval
|
| 135 |
+
name: Information Retrieval
|
| 136 |
+
dataset:
|
| 137 |
+
name: Unknown
|
| 138 |
+
type: unknown
|
| 139 |
+
metrics:
|
| 140 |
+
- type: cosine_accuracy@1
|
| 141 |
+
value: 0.9298
|
| 142 |
+
name: Cosine Accuracy@1
|
| 143 |
+
- type: cosine_accuracy@3
|
| 144 |
+
value: 0.9732
|
| 145 |
+
name: Cosine Accuracy@3
|
| 146 |
+
- type: cosine_accuracy@5
|
| 147 |
+
value: 0.982
|
| 148 |
+
name: Cosine Accuracy@5
|
| 149 |
+
- type: cosine_accuracy@10
|
| 150 |
+
value: 0.9868
|
| 151 |
+
name: Cosine Accuracy@10
|
| 152 |
+
- type: cosine_precision@1
|
| 153 |
+
value: 0.9298
|
| 154 |
+
name: Cosine Precision@1
|
| 155 |
+
- type: cosine_precision@3
|
| 156 |
+
value: 0.4154
|
| 157 |
+
name: Cosine Precision@3
|
| 158 |
+
- type: cosine_precision@5
|
| 159 |
+
value: 0.26792
|
| 160 |
+
name: Cosine Precision@5
|
| 161 |
+
- type: cosine_precision@10
|
| 162 |
+
value: 0.1417
|
| 163 |
+
name: Cosine Precision@10
|
| 164 |
+
- type: cosine_recall@1
|
| 165 |
+
value: 0.8009069531416296
|
| 166 |
+
name: Cosine Recall@1
|
| 167 |
+
- type: cosine_recall@3
|
| 168 |
+
value: 0.9349178789609083
|
| 169 |
+
name: Cosine Recall@3
|
| 170 |
+
- type: cosine_recall@5
|
| 171 |
+
value: 0.9610774822138647
|
| 172 |
+
name: Cosine Recall@5
|
| 173 |
+
- type: cosine_recall@10
|
| 174 |
+
value: 0.9765400300287947
|
| 175 |
+
name: Cosine Recall@10
|
| 176 |
+
- type: cosine_ndcg@10
|
| 177 |
+
value: 0.9525570390902354
|
| 178 |
+
name: Cosine Ndcg@10
|
| 179 |
+
- type: cosine_mrr@10
|
| 180 |
+
value: 0.9522342063492065
|
| 181 |
+
name: Cosine Mrr@10
|
| 182 |
+
- type: cosine_map@100
|
| 183 |
+
value: 0.9400294978560327
|
| 184 |
+
name: Cosine Map@100
|
| 185 |
+
---
|
| 186 |
+
|
| 187 |
+
# SentenceTransformer based on sentence-transformers/stsb-distilbert-base
|
| 188 |
+
|
| 189 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/stsb-distilbert-base](https://huggingface.co/sentence-transformers/stsb-distilbert-base) on the [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) dataset. It maps sentences & paragraphs to a 768-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
| 190 |
+
|
| 191 |
+
## Model Details
|
| 192 |
+
|
| 193 |
+
### Model Description
|
| 194 |
+
- **Model Type:** Sentence Transformer
|
| 195 |
+
- **Base model:** [sentence-transformers/stsb-distilbert-base](https://huggingface.co/sentence-transformers/stsb-distilbert-base) <!-- at revision a560fa5fec90547a51a4a41a392d4aef93b49f16 -->
|
| 196 |
+
- **Maximum Sequence Length:** 128 tokens
|
| 197 |
+
- **Output Dimensionality:** 768 dimensions
|
| 198 |
+
- **Similarity Function:** Cosine Similarity
|
| 199 |
+
- **Training Dataset:**
|
| 200 |
+
- [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates)
|
| 201 |
+
- **Language:** en
|
| 202 |
+
<!-- - **License:** Unknown -->
|
| 203 |
+
|
| 204 |
+
### Model Sources
|
| 205 |
+
|
| 206 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 207 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 208 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 209 |
+
|
| 210 |
+
### Full Model Architecture
|
| 211 |
+
|
| 212 |
+
```
|
| 213 |
+
SentenceTransformer(
|
| 214 |
+
(0): Transformer({'max_seq_length': 128, 'do_lower_case': False}) with Transformer model: DistilBertModel
|
| 215 |
+
(1): Pooling({'word_embedding_dimension': 768, '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})
|
| 216 |
+
)
|
| 217 |
+
```
|
| 218 |
+
|
| 219 |
+
## Usage
|
| 220 |
+
|
| 221 |
+
### Direct Usage (Sentence Transformers)
|
| 222 |
+
|
| 223 |
+
First install the Sentence Transformers library:
|
| 224 |
+
|
| 225 |
+
```bash
|
| 226 |
+
pip install -U sentence-transformers
|
| 227 |
+
```
|
| 228 |
+
|
| 229 |
+
Then you can load this model and run inference.
|
| 230 |
+
```python
|
| 231 |
+
from sentence_transformers import SentenceTransformer
|
| 232 |
+
|
| 233 |
+
# Download from the 🤗 Hub
|
| 234 |
+
model = SentenceTransformer("yahyaabd/stsb-distilbert-base-ocl")
|
| 235 |
+
# Run inference
|
| 236 |
+
sentences = [
|
| 237 |
+
'What is the best fact checking sources that all Quorans will most trust?',
|
| 238 |
+
'What is the most memorable book that Quorans have read?',
|
| 239 |
+
'Is working in McKinsey one of the best and surest ways to get into Harvard Business School?',
|
| 240 |
+
]
|
| 241 |
+
embeddings = model.encode(sentences)
|
| 242 |
+
print(embeddings.shape)
|
| 243 |
+
# [3, 768]
|
| 244 |
+
|
| 245 |
+
# Get the similarity scores for the embeddings
|
| 246 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 247 |
+
print(similarities.shape)
|
| 248 |
+
# [3, 3]
|
| 249 |
+
```
|
| 250 |
+
|
| 251 |
+
<!--
|
| 252 |
+
### Direct Usage (Transformers)
|
| 253 |
+
|
| 254 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 255 |
+
|
| 256 |
+
</details>
|
| 257 |
+
-->
|
| 258 |
+
|
| 259 |
+
<!--
|
| 260 |
+
### Downstream Usage (Sentence Transformers)
|
| 261 |
+
|
| 262 |
+
You can finetune this model on your own dataset.
|
| 263 |
+
|
| 264 |
+
<details><summary>Click to expand</summary>
|
| 265 |
+
|
| 266 |
+
</details>
|
| 267 |
+
-->
|
| 268 |
+
|
| 269 |
+
<!--
|
| 270 |
+
### Out-of-Scope Use
|
| 271 |
+
|
| 272 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 273 |
+
-->
|
| 274 |
+
|
| 275 |
+
## Evaluation
|
| 276 |
+
|
| 277 |
+
### Metrics
|
| 278 |
+
|
| 279 |
+
#### Binary Classification
|
| 280 |
+
|
| 281 |
+
* Dataset: `quora-duplicates`
|
| 282 |
+
* Evaluated with [<code>BinaryClassificationEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.BinaryClassificationEvaluator)
|
| 283 |
+
|
| 284 |
+
| Metric | Value |
|
| 285 |
+
|:--------------------------|:-----------|
|
| 286 |
+
| cosine_accuracy | 0.869 |
|
| 287 |
+
| cosine_accuracy_threshold | 0.8137 |
|
| 288 |
+
| cosine_f1 | 0.839 |
|
| 289 |
+
| cosine_f1_threshold | 0.7617 |
|
| 290 |
+
| cosine_precision | 0.7818 |
|
| 291 |
+
| cosine_recall | 0.9053 |
|
| 292 |
+
| **cosine_ap** | **0.8853** |
|
| 293 |
+
| cosine_mcc | 0.7338 |
|
| 294 |
+
|
| 295 |
+
#### Paraphrase Mining
|
| 296 |
+
|
| 297 |
+
* Dataset: `quora-duplicates-dev`
|
| 298 |
+
* Evaluated with [<code>ParaphraseMiningEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.ParaphraseMiningEvaluator)
|
| 299 |
+
|
| 300 |
+
| Metric | Value |
|
| 301 |
+
|:----------------------|:-----------|
|
| 302 |
+
| **average_precision** | **0.5427** |
|
| 303 |
+
| f1 | 0.5533 |
|
| 304 |
+
| precision | 0.5508 |
|
| 305 |
+
| recall | 0.5557 |
|
| 306 |
+
| threshold | 0.8659 |
|
| 307 |
+
|
| 308 |
+
#### Information Retrieval
|
| 309 |
+
|
| 310 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
|
| 311 |
+
|
| 312 |
+
| Metric | Value |
|
| 313 |
+
|:--------------------|:-----------|
|
| 314 |
+
| cosine_accuracy@1 | 0.9298 |
|
| 315 |
+
| cosine_accuracy@3 | 0.9732 |
|
| 316 |
+
| cosine_accuracy@5 | 0.982 |
|
| 317 |
+
| cosine_accuracy@10 | 0.9868 |
|
| 318 |
+
| cosine_precision@1 | 0.9298 |
|
| 319 |
+
| cosine_precision@3 | 0.4154 |
|
| 320 |
+
| cosine_precision@5 | 0.2679 |
|
| 321 |
+
| cosine_precision@10 | 0.1417 |
|
| 322 |
+
| cosine_recall@1 | 0.8009 |
|
| 323 |
+
| cosine_recall@3 | 0.9349 |
|
| 324 |
+
| cosine_recall@5 | 0.9611 |
|
| 325 |
+
| cosine_recall@10 | 0.9765 |
|
| 326 |
+
| **cosine_ndcg@10** | **0.9526** |
|
| 327 |
+
| cosine_mrr@10 | 0.9522 |
|
| 328 |
+
| cosine_map@100 | 0.94 |
|
| 329 |
+
|
| 330 |
+
<!--
|
| 331 |
+
## Bias, Risks and Limitations
|
| 332 |
+
|
| 333 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 334 |
+
-->
|
| 335 |
+
|
| 336 |
+
<!--
|
| 337 |
+
### Recommendations
|
| 338 |
+
|
| 339 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 340 |
+
-->
|
| 341 |
+
|
| 342 |
+
## Training Details
|
| 343 |
+
|
| 344 |
+
### Training Dataset
|
| 345 |
+
|
| 346 |
+
#### quora-duplicates
|
| 347 |
+
|
| 348 |
+
* Dataset: [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) at [451a485](https://huggingface.co/datasets/sentence-transformers/quora-duplicates/tree/451a4850bd141edb44ade1b5828c259abd762cdb)
|
| 349 |
+
* Size: 404,290 training samples
|
| 350 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
| 351 |
+
* Approximate statistics based on the first 1000 samples:
|
| 352 |
+
| | sentence1 | sentence2 | label |
|
| 353 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:------------------------------------------------|
|
| 354 |
+
| type | string | string | int |
|
| 355 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 16.01 tokens</li><li>max: 67 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.9 tokens</li><li>max: 72 tokens</li></ul> | <ul><li>0: ~64.40%</li><li>1: ~35.60%</li></ul> |
|
| 356 |
+
* Samples:
|
| 357 |
+
| sentence1 | sentence2 | label |
|
| 358 |
+
|:----------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------|:---------------|
|
| 359 |
+
| <code>How much worse do things need to get before the "blue" states cut off welfare to the "red" states?</code> | <code>If the red states and the blue states were separated into two countries, which country would be more successful?</code> | <code>0</code> |
|
| 360 |
+
| <code>Can you offer me any advice on how to lose weight?</code> | <code>What are the best ways to lose weight? What is the best diet plan?</code> | <code>1</code> |
|
| 361 |
+
| <code>How do I break my knee?</code> | <code>How do I break my elbow?</code> | <code>0</code> |
|
| 362 |
+
* Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
|
| 363 |
+
|
| 364 |
+
### Evaluation Dataset
|
| 365 |
+
|
| 366 |
+
#### quora-duplicates
|
| 367 |
+
|
| 368 |
+
* Dataset: [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) at [451a485](https://huggingface.co/datasets/sentence-transformers/quora-duplicates/tree/451a4850bd141edb44ade1b5828c259abd762cdb)
|
| 369 |
+
* Size: 404,290 evaluation samples
|
| 370 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
| 371 |
+
* Approximate statistics based on the first 1000 samples:
|
| 372 |
+
| | sentence1 | sentence2 | label |
|
| 373 |
+
|:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:------------------------------------------------|
|
| 374 |
+
| type | string | string | int |
|
| 375 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 15.98 tokens</li><li>max: 53 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 15.9 tokens</li><li>max: 77 tokens</li></ul> | <ul><li>0: ~62.00%</li><li>1: ~38.00%</li></ul> |
|
| 376 |
+
* Samples:
|
| 377 |
+
| sentence1 | sentence2 | label |
|
| 378 |
+
|:---------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------|:---------------|
|
| 379 |
+
| <code>Which is the best SAP online training centre at Hyderabad?</code> | <code>Which is the best sap workflow online training institute in Hyderabad?</code> | <code>1</code> |
|
| 380 |
+
| <code>How did World War Two start?</code> | <code>What will most likely cause World War III?</code> | <code>0</code> |
|
| 381 |
+
| <code>How do I find a unique string from a given string in Java without methods such as split, contain, and divide?</code> | <code>How can I split the string "[] {() <>} []" into " [,], {, (, ..." in Java?</code> | <code>0</code> |
|
| 382 |
+
* Loss: [<code>OnlineContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#onlinecontrastiveloss)
|
| 383 |
+
|
| 384 |
+
### Training Hyperparameters
|
| 385 |
+
#### Non-Default Hyperparameters
|
| 386 |
+
|
| 387 |
+
- `eval_strategy`: steps
|
| 388 |
+
- `per_device_train_batch_size`: 64
|
| 389 |
+
- `per_device_eval_batch_size`: 64
|
| 390 |
+
- `num_train_epochs`: 1
|
| 391 |
+
- `warmup_ratio`: 0.1
|
| 392 |
+
- `fp16`: True
|
| 393 |
+
- `batch_sampler`: no_duplicates
|
| 394 |
+
|
| 395 |
+
#### All Hyperparameters
|
| 396 |
+
<details><summary>Click to expand</summary>
|
| 397 |
+
|
| 398 |
+
- `overwrite_output_dir`: False
|
| 399 |
+
- `do_predict`: False
|
| 400 |
+
- `eval_strategy`: steps
|
| 401 |
+
- `prediction_loss_only`: True
|
| 402 |
+
- `per_device_train_batch_size`: 64
|
| 403 |
+
- `per_device_eval_batch_size`: 64
|
| 404 |
+
- `per_gpu_train_batch_size`: None
|
| 405 |
+
- `per_gpu_eval_batch_size`: None
|
| 406 |
+
- `gradient_accumulation_steps`: 1
|
| 407 |
+
- `eval_accumulation_steps`: None
|
| 408 |
+
- `torch_empty_cache_steps`: None
|
| 409 |
+
- `learning_rate`: 5e-05
|
| 410 |
+
- `weight_decay`: 0.0
|
| 411 |
+
- `adam_beta1`: 0.9
|
| 412 |
+
- `adam_beta2`: 0.999
|
| 413 |
+
- `adam_epsilon`: 1e-08
|
| 414 |
+
- `max_grad_norm`: 1.0
|
| 415 |
+
- `num_train_epochs`: 1
|
| 416 |
+
- `max_steps`: -1
|
| 417 |
+
- `lr_scheduler_type`: linear
|
| 418 |
+
- `lr_scheduler_kwargs`: {}
|
| 419 |
+
- `warmup_ratio`: 0.1
|
| 420 |
+
- `warmup_steps`: 0
|
| 421 |
+
- `log_level`: passive
|
| 422 |
+
- `log_level_replica`: warning
|
| 423 |
+
- `log_on_each_node`: True
|
| 424 |
+
- `logging_nan_inf_filter`: True
|
| 425 |
+
- `save_safetensors`: True
|
| 426 |
+
- `save_on_each_node`: False
|
| 427 |
+
- `save_only_model`: False
|
| 428 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 429 |
+
- `no_cuda`: False
|
| 430 |
+
- `use_cpu`: False
|
| 431 |
+
- `use_mps_device`: False
|
| 432 |
+
- `seed`: 42
|
| 433 |
+
- `data_seed`: None
|
| 434 |
+
- `jit_mode_eval`: False
|
| 435 |
+
- `use_ipex`: False
|
| 436 |
+
- `bf16`: False
|
| 437 |
+
- `fp16`: True
|
| 438 |
+
- `fp16_opt_level`: O1
|
| 439 |
+
- `half_precision_backend`: auto
|
| 440 |
+
- `bf16_full_eval`: False
|
| 441 |
+
- `fp16_full_eval`: False
|
| 442 |
+
- `tf32`: None
|
| 443 |
+
- `local_rank`: 0
|
| 444 |
+
- `ddp_backend`: None
|
| 445 |
+
- `tpu_num_cores`: None
|
| 446 |
+
- `tpu_metrics_debug`: False
|
| 447 |
+
- `debug`: []
|
| 448 |
+
- `dataloader_drop_last`: False
|
| 449 |
+
- `dataloader_num_workers`: 0
|
| 450 |
+
- `dataloader_prefetch_factor`: None
|
| 451 |
+
- `past_index`: -1
|
| 452 |
+
- `disable_tqdm`: False
|
| 453 |
+
- `remove_unused_columns`: True
|
| 454 |
+
- `label_names`: None
|
| 455 |
+
- `load_best_model_at_end`: False
|
| 456 |
+
- `ignore_data_skip`: False
|
| 457 |
+
- `fsdp`: []
|
| 458 |
+
- `fsdp_min_num_params`: 0
|
| 459 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 460 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 461 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 462 |
+
- `deepspeed`: None
|
| 463 |
+
- `label_smoothing_factor`: 0.0
|
| 464 |
+
- `optim`: adamw_torch
|
| 465 |
+
- `optim_args`: None
|
| 466 |
+
- `adafactor`: False
|
| 467 |
+
- `group_by_length`: False
|
| 468 |
+
- `length_column_name`: length
|
| 469 |
+
- `ddp_find_unused_parameters`: None
|
| 470 |
+
- `ddp_bucket_cap_mb`: None
|
| 471 |
+
- `ddp_broadcast_buffers`: False
|
| 472 |
+
- `dataloader_pin_memory`: True
|
| 473 |
+
- `dataloader_persistent_workers`: False
|
| 474 |
+
- `skip_memory_metrics`: True
|
| 475 |
+
- `use_legacy_prediction_loop`: False
|
| 476 |
+
- `push_to_hub`: False
|
| 477 |
+
- `resume_from_checkpoint`: None
|
| 478 |
+
- `hub_model_id`: None
|
| 479 |
+
- `hub_strategy`: every_save
|
| 480 |
+
- `hub_private_repo`: None
|
| 481 |
+
- `hub_always_push`: False
|
| 482 |
+
- `gradient_checkpointing`: False
|
| 483 |
+
- `gradient_checkpointing_kwargs`: None
|
| 484 |
+
- `include_inputs_for_metrics`: False
|
| 485 |
+
- `include_for_metrics`: []
|
| 486 |
+
- `eval_do_concat_batches`: True
|
| 487 |
+
- `fp16_backend`: auto
|
| 488 |
+
- `push_to_hub_model_id`: None
|
| 489 |
+
- `push_to_hub_organization`: None
|
| 490 |
+
- `mp_parameters`:
|
| 491 |
+
- `auto_find_batch_size`: False
|
| 492 |
+
- `full_determinism`: False
|
| 493 |
+
- `torchdynamo`: None
|
| 494 |
+
- `ray_scope`: last
|
| 495 |
+
- `ddp_timeout`: 1800
|
| 496 |
+
- `torch_compile`: False
|
| 497 |
+
- `torch_compile_backend`: None
|
| 498 |
+
- `torch_compile_mode`: None
|
| 499 |
+
- `dispatch_batches`: None
|
| 500 |
+
- `split_batches`: None
|
| 501 |
+
- `include_tokens_per_second`: False
|
| 502 |
+
- `include_num_input_tokens_seen`: False
|
| 503 |
+
- `neftune_noise_alpha`: None
|
| 504 |
+
- `optim_target_modules`: None
|
| 505 |
+
- `batch_eval_metrics`: False
|
| 506 |
+
- `eval_on_start`: False
|
| 507 |
+
- `use_liger_kernel`: False
|
| 508 |
+
- `eval_use_gather_object`: False
|
| 509 |
+
- `average_tokens_across_devices`: False
|
| 510 |
+
- `prompts`: None
|
| 511 |
+
- `batch_sampler`: no_duplicates
|
| 512 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 513 |
+
|
| 514 |
+
</details>
|
| 515 |
+
|
| 516 |
+
### Training Logs
|
| 517 |
+
| Epoch | Step | Training Loss | Validation Loss | quora-duplicates_cosine_ap | quora-duplicates-dev_average_precision | cosine_ndcg@10 |
|
| 518 |
+
|:------:|:----:|:-------------:|:---------------:|:--------------------------:|:--------------------------------------:|:--------------:|
|
| 519 |
+
| 0 | 0 | - | - | 0.7402 | 0.4200 | 0.9413 |
|
| 520 |
+
| 0.0640 | 100 | 2.481 | - | - | - | - |
|
| 521 |
+
| 0.1280 | 200 | 2.1466 | - | - | - | - |
|
| 522 |
+
| 0.1599 | 250 | - | 1.7997 | 0.8327 | 0.4596 | 0.9355 |
|
| 523 |
+
| 0.1919 | 300 | 2.0354 | - | - | - | - |
|
| 524 |
+
| 0.2559 | 400 | 1.9342 | - | - | - | - |
|
| 525 |
+
| 0.3199 | 500 | 1.9132 | 1.6231 | 0.8617 | 0.4896 | 0.9425 |
|
| 526 |
+
| 0.3839 | 600 | 1.8015 | - | - | - | - |
|
| 527 |
+
| 0.4479 | 700 | 1.7407 | - | - | - | - |
|
| 528 |
+
| 0.4798 | 750 | - | 1.4953 | 0.8737 | 0.5112 | 0.9468 |
|
| 529 |
+
| 0.5118 | 800 | 1.6454 | - | - | - | - |
|
| 530 |
+
| 0.5758 | 900 | 1.6568 | - | - | - | - |
|
| 531 |
+
| 0.6398 | 1000 | 1.6811 | 1.4678 | 0.8751 | 0.5290 | 0.9457 |
|
| 532 |
+
| 0.7038 | 1100 | 1.711 | - | - | - | - |
|
| 533 |
+
| 0.7678 | 1200 | 1.6449 | - | - | - | - |
|
| 534 |
+
| 0.7997 | 1250 | - | 1.4363 | 0.8811 | 0.5327 | 0.9507 |
|
| 535 |
+
| 0.8317 | 1300 | 1.5921 | - | - | - | - |
|
| 536 |
+
| 0.8957 | 1400 | 1.5062 | - | - | - | - |
|
| 537 |
+
| 0.9597 | 1500 | 1.5728 | 1.4029 | 0.8853 | 0.5427 | 0.9526 |
|
| 538 |
+
|
| 539 |
+
|
| 540 |
+
### Framework Versions
|
| 541 |
+
- Python: 3.10.12
|
| 542 |
+
- Sentence Transformers: 3.4.0
|
| 543 |
+
- Transformers: 4.48.1
|
| 544 |
+
- PyTorch: 2.5.1+cu124
|
| 545 |
+
- Accelerate: 1.3.0
|
| 546 |
+
- Datasets: 3.2.0
|
| 547 |
+
- Tokenizers: 0.21.0
|
| 548 |
+
|
| 549 |
+
## Citation
|
| 550 |
+
|
| 551 |
+
### BibTeX
|
| 552 |
+
|
| 553 |
+
#### Sentence Transformers
|
| 554 |
+
```bibtex
|
| 555 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 556 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 557 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 558 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 559 |
+
month = "11",
|
| 560 |
+
year = "2019",
|
| 561 |
+
publisher = "Association for Computational Linguistics",
|
| 562 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 563 |
+
}
|
| 564 |
+
```
|
| 565 |
+
|
| 566 |
+
<!--
|
| 567 |
+
## Glossary
|
| 568 |
+
|
| 569 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 570 |
+
-->
|
| 571 |
+
|
| 572 |
+
<!--
|
| 573 |
+
## Model Card Authors
|
| 574 |
+
|
| 575 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 576 |
+
-->
|
| 577 |
+
|
| 578 |
+
<!--
|
| 579 |
+
## Model Card Contact
|
| 580 |
+
|
| 581 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 582 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"_name_or_path": "sentence-transformers/stsb-distilbert-base",
|
| 3 |
+
"activation": "gelu",
|
| 4 |
+
"architectures": [
|
| 5 |
+
"DistilBertModel"
|
| 6 |
+
],
|
| 7 |
+
"attention_dropout": 0.1,
|
| 8 |
+
"dim": 768,
|
| 9 |
+
"dropout": 0.1,
|
| 10 |
+
"hidden_dim": 3072,
|
| 11 |
+
"initializer_range": 0.02,
|
| 12 |
+
"max_position_embeddings": 512,
|
| 13 |
+
"model_type": "distilbert",
|
| 14 |
+
"n_heads": 12,
|
| 15 |
+
"n_layers": 6,
|
| 16 |
+
"pad_token_id": 0,
|
| 17 |
+
"qa_dropout": 0.1,
|
| 18 |
+
"seq_classif_dropout": 0.2,
|
| 19 |
+
"sinusoidal_pos_embds": false,
|
| 20 |
+
"tie_weights_": true,
|
| 21 |
+
"torch_dtype": "float32",
|
| 22 |
+
"transformers_version": "4.48.1",
|
| 23 |
+
"vocab_size": 30522
|
| 24 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "3.4.0",
|
| 4 |
+
"transformers": "4.48.1",
|
| 5 |
+
"pytorch": "2.5.1+cu124"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": "cosine"
|
| 10 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:38f41621bacba4d0210b4ad4b3bd8bf190d1728154f739dc69f5021ed1e179b6
|
| 3 |
+
size 265462608
|
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": 128,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,59 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": false,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"full_tokenizer_file": null,
|
| 50 |
+
"mask_token": "[MASK]",
|
| 51 |
+
"model_max_length": 128,
|
| 52 |
+
"never_split": null,
|
| 53 |
+
"pad_token": "[PAD]",
|
| 54 |
+
"sep_token": "[SEP]",
|
| 55 |
+
"strip_accents": null,
|
| 56 |
+
"tokenize_chinese_chars": true,
|
| 57 |
+
"tokenizer_class": "DistilBertTokenizer",
|
| 58 |
+
"unk_token": "[UNK]"
|
| 59 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|