Add auto-generated README
Browse files
README.md
CHANGED
@@ -1,200 +1,508 @@
|
|
1 |
---
|
2 |
-
|
|
|
3 |
tags:
|
|
|
4 |
- cross-encoder
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
5 |
---
|
6 |
|
7 |
-
#
|
8 |
-
|
9 |
-
<!-- Provide a quick summary of what the model is/does. -->
|
10 |
-
|
11 |
|
|
|
12 |
|
13 |
## Model Details
|
14 |
|
15 |
### Model Description
|
16 |
-
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
-
- **
|
22 |
-
- **
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
- **
|
27 |
-
- **
|
28 |
-
|
29 |
-
|
30 |
-
|
31 |
-
|
32 |
-
|
33 |
-
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
|
39 |
-
|
40 |
-
|
41 |
-
|
42 |
-
|
43 |
-
|
44 |
-
|
45 |
-
|
46 |
-
|
47 |
-
|
48 |
-
|
49 |
-
|
50 |
-
|
51 |
-
[
|
52 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
53 |
### Out-of-Scope Use
|
54 |
|
55 |
-
|
56 |
-
|
57 |
-
[More Information Needed]
|
58 |
-
|
59 |
-
## Bias, Risks, and Limitations
|
60 |
-
|
61 |
-
<!-- This section is meant to convey both technical and sociotechnical limitations. -->
|
62 |
-
|
63 |
-
[More Information Needed]
|
64 |
-
|
65 |
-
### Recommendations
|
66 |
-
|
67 |
-
<!-- This section is meant to convey recommendations with respect to the bias, risk, and technical limitations. -->
|
68 |
-
|
69 |
-
Users (both direct and downstream) should be made aware of the risks, biases and limitations of the model. More information needed for further recommendations.
|
70 |
-
|
71 |
-
## How to Get Started with the Model
|
72 |
-
|
73 |
-
Use the code below to get started with the model.
|
74 |
-
|
75 |
-
[More Information Needed]
|
76 |
-
|
77 |
-
## Training Details
|
78 |
-
|
79 |
-
### Training Data
|
80 |
-
|
81 |
-
<!-- This should link to a Dataset Card, perhaps with a short stub of information on what the training data is all about as well as documentation related to data pre-processing or additional filtering. -->
|
82 |
-
|
83 |
-
[More Information Needed]
|
84 |
-
|
85 |
-
### Training Procedure
|
86 |
-
|
87 |
-
<!-- This relates heavily to the Technical Specifications. Content here should link to that section when it is relevant to the training procedure. -->
|
88 |
-
|
89 |
-
#### Preprocessing [optional]
|
90 |
-
|
91 |
-
[More Information Needed]
|
92 |
-
|
93 |
-
|
94 |
-
#### Training Hyperparameters
|
95 |
-
|
96 |
-
- **Training regime:** [More Information Needed] <!--fp32, fp16 mixed precision, bf16 mixed precision, bf16 non-mixed precision, fp16 non-mixed precision, fp8 mixed precision -->
|
97 |
-
|
98 |
-
#### Speeds, Sizes, Times [optional]
|
99 |
-
|
100 |
-
<!-- This section provides information about throughput, start/end time, checkpoint size if relevant, etc. -->
|
101 |
-
|
102 |
-
[More Information Needed]
|
103 |
|
104 |
## Evaluation
|
105 |
|
106 |
-
|
107 |
-
|
108 |
-
### Testing Data, Factors & Metrics
|
109 |
-
|
110 |
-
#### Testing Data
|
111 |
-
|
112 |
-
<!-- This should link to a Dataset Card if possible. -->
|
113 |
-
|
114 |
-
[More Information Needed]
|
115 |
-
|
116 |
-
#### Factors
|
117 |
-
|
118 |
-
<!-- These are the things the evaluation is disaggregating by, e.g., subpopulations or domains. -->
|
119 |
-
|
120 |
-
[More Information Needed]
|
121 |
-
|
122 |
-
#### Metrics
|
123 |
-
|
124 |
-
<!-- These are the evaluation metrics being used, ideally with a description of why. -->
|
125 |
-
|
126 |
-
[More Information Needed]
|
127 |
-
|
128 |
-
### Results
|
129 |
-
|
130 |
-
[More Information Needed]
|
131 |
-
|
132 |
-
#### Summary
|
133 |
-
|
134 |
-
|
135 |
-
|
136 |
-
## Model Examination [optional]
|
137 |
-
|
138 |
-
<!-- Relevant interpretability work for the model goes here -->
|
139 |
-
|
140 |
-
[More Information Needed]
|
141 |
|
142 |
-
|
143 |
|
144 |
-
|
|
|
145 |
|
146 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
147 |
|
148 |
-
|
149 |
-
|
150 |
-
- **Cloud Provider:** [More Information Needed]
|
151 |
-
- **Compute Region:** [More Information Needed]
|
152 |
-
- **Carbon Emitted:** [More Information Needed]
|
153 |
|
154 |
-
|
|
|
155 |
|
156 |
-
|
157 |
-
|
158 |
-
[More Information Needed]
|
159 |
-
|
160 |
-
### Compute Infrastructure
|
161 |
-
|
162 |
-
[More Information Needed]
|
163 |
-
|
164 |
-
#### Hardware
|
165 |
-
|
166 |
-
[More Information Needed]
|
167 |
-
|
168 |
-
#### Software
|
169 |
-
|
170 |
-
[More Information Needed]
|
171 |
-
|
172 |
-
## Citation [optional]
|
173 |
-
|
174 |
-
<!-- If there is a paper or blog post introducing the model, the APA and Bibtex information for that should go in this section. -->
|
175 |
-
|
176 |
-
**BibTeX:**
|
177 |
-
|
178 |
-
[More Information Needed]
|
179 |
-
|
180 |
-
**APA:**
|
181 |
-
|
182 |
-
[More Information Needed]
|
183 |
-
|
184 |
-
## Glossary [optional]
|
185 |
-
|
186 |
-
<!-- If relevant, include terms and calculations in this section that can help readers understand the model or model card. -->
|
187 |
-
|
188 |
-
[More Information Needed]
|
189 |
-
|
190 |
-
## More Information [optional]
|
191 |
-
|
192 |
-
[More Information Needed]
|
193 |
|
194 |
-
|
|
|
195 |
|
196 |
-
|
197 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
198 |
## Model Card Contact
|
199 |
|
200 |
-
|
|
|
|
1 |
---
|
2 |
+
language:
|
3 |
+
- en
|
4 |
tags:
|
5 |
+
- sentence-transformers
|
6 |
- cross-encoder
|
7 |
+
- text-classification
|
8 |
+
- generated_from_trainer
|
9 |
+
- dataset_size:404290
|
10 |
+
- loss:BinaryCrossEntropyLoss
|
11 |
+
base_model: distilbert/distilroberta-base
|
12 |
+
datasets:
|
13 |
+
- sentence-transformers/quora-duplicates
|
14 |
+
pipeline_tag: text-classification
|
15 |
+
library_name: sentence-transformers
|
16 |
+
metrics:
|
17 |
+
- accuracy
|
18 |
+
- accuracy_threshold
|
19 |
+
- f1
|
20 |
+
- f1_threshold
|
21 |
+
- precision
|
22 |
+
- recall
|
23 |
+
- average_precision
|
24 |
+
co2_eq_emissions:
|
25 |
+
emissions: 26.889480385249758
|
26 |
+
energy_consumed: 0.06917762292257246
|
27 |
+
source: codecarbon
|
28 |
+
training_type: fine-tuning
|
29 |
+
on_cloud: false
|
30 |
+
cpu_model: 13th Gen Intel(R) Core(TM) i7-13700K
|
31 |
+
ram_total_size: 31.777088165283203
|
32 |
+
hours_used: 0.214
|
33 |
+
hardware_used: 1 x NVIDIA GeForce RTX 3090
|
34 |
+
model-index:
|
35 |
+
- name: CrossEncoder based on distilbert/distilroberta-base
|
36 |
+
results:
|
37 |
+
- task:
|
38 |
+
type: cross-encoder-classification
|
39 |
+
name: Cross Encoder Classification
|
40 |
+
dataset:
|
41 |
+
name: quora duplicates dev
|
42 |
+
type: quora-duplicates-dev
|
43 |
+
metrics:
|
44 |
+
- type: accuracy
|
45 |
+
value: 0.8938
|
46 |
+
name: Accuracy
|
47 |
+
- type: accuracy_threshold
|
48 |
+
value: 0.5088549852371216
|
49 |
+
name: Accuracy Threshold
|
50 |
+
- type: f1
|
51 |
+
value: 0.8612281373675477
|
52 |
+
name: F1
|
53 |
+
- type: f1_threshold
|
54 |
+
value: 0.3856155276298523
|
55 |
+
name: F1 Threshold
|
56 |
+
- type: precision
|
57 |
+
value: 0.8182920912178554
|
58 |
+
name: Precision
|
59 |
+
- type: recall
|
60 |
+
value: 0.908919428725411
|
61 |
+
name: Recall
|
62 |
+
- type: average_precision
|
63 |
+
value: 0.920292628179356
|
64 |
+
name: Average Precision
|
65 |
+
- task:
|
66 |
+
type: cross-encoder-classification
|
67 |
+
name: Cross Encoder Classification
|
68 |
+
dataset:
|
69 |
+
name: quora duplicates test
|
70 |
+
type: quora-duplicates-test
|
71 |
+
metrics:
|
72 |
+
- type: accuracy
|
73 |
+
value: 0.8938
|
74 |
+
name: Accuracy
|
75 |
+
- type: accuracy_threshold
|
76 |
+
value: 0.5091445446014404
|
77 |
+
name: Accuracy Threshold
|
78 |
+
- type: f1
|
79 |
+
value: 0.8612281373675477
|
80 |
+
name: F1
|
81 |
+
- type: f1_threshold
|
82 |
+
value: 0.38580775260925293
|
83 |
+
name: F1 Threshold
|
84 |
+
- type: precision
|
85 |
+
value: 0.8182920912178554
|
86 |
+
name: Precision
|
87 |
+
- type: recall
|
88 |
+
value: 0.908919428725411
|
89 |
+
name: Recall
|
90 |
+
- type: average_precision
|
91 |
+
value: 0.92029239602284
|
92 |
+
name: Average Precision
|
93 |
---
|
94 |
|
95 |
+
# CrossEncoder based on distilbert/distilroberta-base
|
|
|
|
|
|
|
96 |
|
97 |
+
This is a [Cross Encoder](https://www.sbert.net/docs/cross_encoder/usage/usage.html) model finetuned from [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) on the [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) dataset using the [sentence-transformers](https://www.SBERT.net) library. It computes scores for pairs of texts, which can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
98 |
|
99 |
## Model Details
|
100 |
|
101 |
### Model Description
|
102 |
+
- **Model Type:** Cross Encoder
|
103 |
+
- **Base model:** [distilbert/distilroberta-base](https://huggingface.co/distilbert/distilroberta-base) <!-- at revision fb53ab8802853c8e4fbdbcd0529f21fc6f459b2b -->
|
104 |
+
- **Maximum Sequence Length:** 514 tokens
|
105 |
+
- **Training Dataset:**
|
106 |
+
- [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates)
|
107 |
+
- **Language:** en
|
108 |
+
<!-- - **License:** Unknown -->
|
109 |
+
|
110 |
+
### Model Sources
|
111 |
+
|
112 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
113 |
+
- **Documentation:** [Cross Encoder Documentation](https://www.sbert.net/docs/cross_encoder/usage/usage.html)
|
114 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
115 |
+
- **Hugging Face:** [Cross Encoders on Hugging Face](https://huggingface.co/models?library=sentence-transformers&other=cross-encoder)
|
116 |
+
|
117 |
+
## Usage
|
118 |
+
|
119 |
+
### Direct Usage (Sentence Transformers)
|
120 |
+
|
121 |
+
First install the Sentence Transformers library:
|
122 |
+
|
123 |
+
```bash
|
124 |
+
pip install -U sentence-transformers
|
125 |
+
```
|
126 |
+
|
127 |
+
Then you can load this model and run inference.
|
128 |
+
```python
|
129 |
+
from sentence_transformers import CrossEncoder
|
130 |
+
|
131 |
+
# Download from the 🤗 Hub
|
132 |
+
model = CrossEncoder("sentence_transformers_model_id")
|
133 |
+
# Get scores for pairs...
|
134 |
+
pairs = [
|
135 |
+
['What is the step by step guide to invest in share market in india?', 'What is the step by step guide to invest in share market?'],
|
136 |
+
['What is the story of Kohinoor (Koh-i-Noor) Diamond?', 'What would happen if the Indian government stole the Kohinoor (Koh-i-Noor) diamond back?'],
|
137 |
+
['How can I increase the speed of my internet connection while using a VPN?', 'How can Internet speed be increased by hacking through DNS?'],
|
138 |
+
['Why am I mentally very lonely? How can I solve it?', 'Find the remainder when [math]23^{24}[/math] is divided by 24,23?'],
|
139 |
+
['Which one dissolve in water quikly sugar, salt, methane and carbon di oxide?', 'Which fish would survive in salt water?'],
|
140 |
+
]
|
141 |
+
scores = model.predict(pairs)
|
142 |
+
print(scores.shape)
|
143 |
+
# [5]
|
144 |
+
|
145 |
+
# ... or rank different texts based on similarity to a single text
|
146 |
+
ranks = model.rank(
|
147 |
+
'What is the step by step guide to invest in share market in india?',
|
148 |
+
[
|
149 |
+
'What is the step by step guide to invest in share market?',
|
150 |
+
'What would happen if the Indian government stole the Kohinoor (Koh-i-Noor) diamond back?',
|
151 |
+
'How can Internet speed be increased by hacking through DNS?',
|
152 |
+
'Find the remainder when [math]23^{24}[/math] is divided by 24,23?',
|
153 |
+
'Which fish would survive in salt water?',
|
154 |
+
]
|
155 |
+
)
|
156 |
+
# [{'corpus_id': ..., 'score': ...}, {'corpus_id': ..., 'score': ...}, ...]
|
157 |
+
```
|
158 |
+
|
159 |
+
<!--
|
160 |
+
### Direct Usage (Transformers)
|
161 |
+
|
162 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
163 |
+
|
164 |
+
</details>
|
165 |
+
-->
|
166 |
+
|
167 |
+
<!--
|
168 |
+
### Downstream Usage (Sentence Transformers)
|
169 |
+
|
170 |
+
You can finetune this model on your own dataset.
|
171 |
+
|
172 |
+
<details><summary>Click to expand</summary>
|
173 |
+
|
174 |
+
</details>
|
175 |
+
-->
|
176 |
+
|
177 |
+
<!--
|
178 |
### Out-of-Scope Use
|
179 |
|
180 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
181 |
+
-->
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
182 |
|
183 |
## Evaluation
|
184 |
|
185 |
+
### Metrics
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
186 |
|
187 |
+
#### Cross Encoder Classification
|
188 |
|
189 |
+
* Datasets: `quora-duplicates-dev` and `quora-duplicates-test`
|
190 |
+
* Evaluated with [<code>CEClassificationEvaluator</code>](https://sbert.net/docs/package_reference/cross_encoder/evaluation.html#sentence_transformers.cross_encoder.evaluation.CEClassificationEvaluator)
|
191 |
|
192 |
+
| Metric | quora-duplicates-dev | quora-duplicates-test |
|
193 |
+
|:----------------------|:---------------------|:----------------------|
|
194 |
+
| accuracy | 0.8938 | 0.8938 |
|
195 |
+
| accuracy_threshold | 0.5089 | 0.5091 |
|
196 |
+
| f1 | 0.8612 | 0.8612 |
|
197 |
+
| f1_threshold | 0.3856 | 0.3858 |
|
198 |
+
| precision | 0.8183 | 0.8183 |
|
199 |
+
| recall | 0.9089 | 0.9089 |
|
200 |
+
| **average_precision** | **0.9203** | **0.9203** |
|
201 |
|
202 |
+
<!--
|
203 |
+
## Bias, Risks and Limitations
|
|
|
|
|
|
|
204 |
|
205 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
206 |
+
-->
|
207 |
|
208 |
+
<!--
|
209 |
+
### Recommendations
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
210 |
|
211 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
212 |
+
-->
|
213 |
|
214 |
+
## Training Details
|
215 |
|
216 |
+
### Training Dataset
|
217 |
+
|
218 |
+
#### quora-duplicates
|
219 |
+
|
220 |
+
* Dataset: [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) at [451a485](https://huggingface.co/datasets/sentence-transformers/quora-duplicates/tree/451a4850bd141edb44ade1b5828c259abd762cdb)
|
221 |
+
* Size: 404,290 training samples
|
222 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
223 |
+
* Approximate statistics based on the first 1000 samples:
|
224 |
+
| | sentence1 | sentence2 | label |
|
225 |
+
|:--------|:-----------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------|
|
226 |
+
| type | string | string | int |
|
227 |
+
| details | <ul><li>min: 1 characters</li><li>mean: 59.15 characters</li><li>max: 354 characters</li></ul> | <ul><li>min: 6 characters</li><li>mean: 60.74 characters</li><li>max: 399 characters</li></ul> | <ul><li>0: ~64.20%</li><li>1: ~35.80%</li></ul> |
|
228 |
+
* Samples:
|
229 |
+
| sentence1 | sentence2 | label |
|
230 |
+
|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------------------------|:---------------|
|
231 |
+
| <code>What are the features of the Indian caste system?</code> | <code>What triggers you the most when you play video games?</code> | <code>0</code> |
|
232 |
+
| <code>What is the best place to learn Mandarin Chinese in Singapore?</code> | <code>What is the best place in Singapore for durian in December?</code> | <code>0</code> |
|
233 |
+
| <code>What will be Hillary Clinton's India policy if she wins the election?</code> | <code>How would the bilateral relationship between India and the USA be under Hillary Clinton's presidency?</code> | <code>1</code> |
|
234 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#binarycrossentropyloss)
|
235 |
+
|
236 |
+
### Evaluation Dataset
|
237 |
+
|
238 |
+
#### quora-duplicates
|
239 |
+
|
240 |
+
* Dataset: [quora-duplicates](https://huggingface.co/datasets/sentence-transformers/quora-duplicates) at [451a485](https://huggingface.co/datasets/sentence-transformers/quora-duplicates/tree/451a4850bd141edb44ade1b5828c259abd762cdb)
|
241 |
+
* Size: 404,290 evaluation samples
|
242 |
+
* Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
|
243 |
+
* Approximate statistics based on the first 1000 samples:
|
244 |
+
| | sentence1 | sentence2 | label |
|
245 |
+
|:--------|:-----------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------|:------------------------------------------------|
|
246 |
+
| type | string | string | int |
|
247 |
+
| details | <ul><li>min: 11 characters</li><li>mean: 57.9 characters</li><li>max: 244 characters</li></ul> | <ul><li>min: 12 characters</li><li>mean: 59.33 characters</li><li>max: 221 characters</li></ul> | <ul><li>0: ~62.00%</li><li>1: ~38.00%</li></ul> |
|
248 |
+
* Samples:
|
249 |
+
| sentence1 | sentence2 | label |
|
250 |
+
|:---------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------|:---------------|
|
251 |
+
| <code>What is the step by step guide to invest in share market in india?</code> | <code>What is the step by step guide to invest in share market?</code> | <code>0</code> |
|
252 |
+
| <code>What is the story of Kohinoor (Koh-i-Noor) Diamond?</code> | <code>What would happen if the Indian government stole the Kohinoor (Koh-i-Noor) diamond back?</code> | <code>0</code> |
|
253 |
+
| <code>How can I increase the speed of my internet connection while using a VPN?</code> | <code>How can Internet speed be increased by hacking through DNS?</code> | <code>0</code> |
|
254 |
+
* Loss: [<code>BinaryCrossEntropyLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#binarycrossentropyloss)
|
255 |
+
|
256 |
+
### Training Hyperparameters
|
257 |
+
#### Non-Default Hyperparameters
|
258 |
+
|
259 |
+
- `eval_strategy`: steps
|
260 |
+
- `per_device_train_batch_size`: 64
|
261 |
+
- `per_device_eval_batch_size`: 64
|
262 |
+
- `num_train_epochs`: 1
|
263 |
+
- `warmup_ratio`: 0.1
|
264 |
+
- `bf16`: True
|
265 |
+
|
266 |
+
#### All Hyperparameters
|
267 |
+
<details><summary>Click to expand</summary>
|
268 |
+
|
269 |
+
- `overwrite_output_dir`: False
|
270 |
+
- `do_predict`: False
|
271 |
+
- `eval_strategy`: steps
|
272 |
+
- `prediction_loss_only`: True
|
273 |
+
- `per_device_train_batch_size`: 64
|
274 |
+
- `per_device_eval_batch_size`: 64
|
275 |
+
- `per_gpu_train_batch_size`: None
|
276 |
+
- `per_gpu_eval_batch_size`: None
|
277 |
+
- `gradient_accumulation_steps`: 1
|
278 |
+
- `eval_accumulation_steps`: None
|
279 |
+
- `torch_empty_cache_steps`: None
|
280 |
+
- `learning_rate`: 5e-05
|
281 |
+
- `weight_decay`: 0.0
|
282 |
+
- `adam_beta1`: 0.9
|
283 |
+
- `adam_beta2`: 0.999
|
284 |
+
- `adam_epsilon`: 1e-08
|
285 |
+
- `max_grad_norm`: 1.0
|
286 |
+
- `num_train_epochs`: 1
|
287 |
+
- `max_steps`: -1
|
288 |
+
- `lr_scheduler_type`: linear
|
289 |
+
- `lr_scheduler_kwargs`: {}
|
290 |
+
- `warmup_ratio`: 0.1
|
291 |
+
- `warmup_steps`: 0
|
292 |
+
- `log_level`: passive
|
293 |
+
- `log_level_replica`: warning
|
294 |
+
- `log_on_each_node`: True
|
295 |
+
- `logging_nan_inf_filter`: True
|
296 |
+
- `save_safetensors`: True
|
297 |
+
- `save_on_each_node`: False
|
298 |
+
- `save_only_model`: False
|
299 |
+
- `restore_callback_states_from_checkpoint`: False
|
300 |
+
- `no_cuda`: False
|
301 |
+
- `use_cpu`: False
|
302 |
+
- `use_mps_device`: False
|
303 |
+
- `seed`: 42
|
304 |
+
- `data_seed`: None
|
305 |
+
- `jit_mode_eval`: False
|
306 |
+
- `use_ipex`: False
|
307 |
+
- `bf16`: True
|
308 |
+
- `fp16`: False
|
309 |
+
- `fp16_opt_level`: O1
|
310 |
+
- `half_precision_backend`: auto
|
311 |
+
- `bf16_full_eval`: False
|
312 |
+
- `fp16_full_eval`: False
|
313 |
+
- `tf32`: None
|
314 |
+
- `local_rank`: 0
|
315 |
+
- `ddp_backend`: None
|
316 |
+
- `tpu_num_cores`: None
|
317 |
+
- `tpu_metrics_debug`: False
|
318 |
+
- `debug`: []
|
319 |
+
- `dataloader_drop_last`: False
|
320 |
+
- `dataloader_num_workers`: 0
|
321 |
+
- `dataloader_prefetch_factor`: None
|
322 |
+
- `past_index`: -1
|
323 |
+
- `disable_tqdm`: False
|
324 |
+
- `remove_unused_columns`: True
|
325 |
+
- `label_names`: None
|
326 |
+
- `load_best_model_at_end`: False
|
327 |
+
- `ignore_data_skip`: False
|
328 |
+
- `fsdp`: []
|
329 |
+
- `fsdp_min_num_params`: 0
|
330 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
331 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
332 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
333 |
+
- `deepspeed`: None
|
334 |
+
- `label_smoothing_factor`: 0.0
|
335 |
+
- `optim`: adamw_torch
|
336 |
+
- `optim_args`: None
|
337 |
+
- `adafactor`: False
|
338 |
+
- `group_by_length`: False
|
339 |
+
- `length_column_name`: length
|
340 |
+
- `ddp_find_unused_parameters`: None
|
341 |
+
- `ddp_bucket_cap_mb`: None
|
342 |
+
- `ddp_broadcast_buffers`: False
|
343 |
+
- `dataloader_pin_memory`: True
|
344 |
+
- `dataloader_persistent_workers`: False
|
345 |
+
- `skip_memory_metrics`: True
|
346 |
+
- `use_legacy_prediction_loop`: False
|
347 |
+
- `push_to_hub`: False
|
348 |
+
- `resume_from_checkpoint`: None
|
349 |
+
- `hub_model_id`: None
|
350 |
+
- `hub_strategy`: every_save
|
351 |
+
- `hub_private_repo`: None
|
352 |
+
- `hub_always_push`: False
|
353 |
+
- `gradient_checkpointing`: False
|
354 |
+
- `gradient_checkpointing_kwargs`: None
|
355 |
+
- `include_inputs_for_metrics`: False
|
356 |
+
- `include_for_metrics`: []
|
357 |
+
- `eval_do_concat_batches`: True
|
358 |
+
- `fp16_backend`: auto
|
359 |
+
- `push_to_hub_model_id`: None
|
360 |
+
- `push_to_hub_organization`: None
|
361 |
+
- `mp_parameters`:
|
362 |
+
- `auto_find_batch_size`: False
|
363 |
+
- `full_determinism`: False
|
364 |
+
- `torchdynamo`: None
|
365 |
+
- `ray_scope`: last
|
366 |
+
- `ddp_timeout`: 1800
|
367 |
+
- `torch_compile`: False
|
368 |
+
- `torch_compile_backend`: None
|
369 |
+
- `torch_compile_mode`: None
|
370 |
+
- `dispatch_batches`: None
|
371 |
+
- `split_batches`: None
|
372 |
+
- `include_tokens_per_second`: False
|
373 |
+
- `include_num_input_tokens_seen`: False
|
374 |
+
- `neftune_noise_alpha`: None
|
375 |
+
- `optim_target_modules`: None
|
376 |
+
- `batch_eval_metrics`: False
|
377 |
+
- `eval_on_start`: False
|
378 |
+
- `use_liger_kernel`: False
|
379 |
+
- `eval_use_gather_object`: False
|
380 |
+
- `average_tokens_across_devices`: False
|
381 |
+
- `prompts`: None
|
382 |
+
- `batch_sampler`: batch_sampler
|
383 |
+
- `multi_dataset_batch_sampler`: proportional
|
384 |
+
|
385 |
+
</details>
|
386 |
+
|
387 |
+
### Training Logs
|
388 |
+
| Epoch | Step | Training Loss | Validation Loss | quora-duplicates-dev_average_precision | quora-duplicates-test_average_precision |
|
389 |
+
|:------:|:----:|:-------------:|:---------------:|:--------------------------------------:|:---------------------------------------:|
|
390 |
+
| -1 | -1 | - | - | 0.3711 | - |
|
391 |
+
| 0.0167 | 100 | 0.6574 | - | - | - |
|
392 |
+
| 0.0333 | 200 | 0.4804 | - | - | - |
|
393 |
+
| 0.0500 | 300 | 0.4406 | - | - | - |
|
394 |
+
| 0.0666 | 400 | 0.4208 | - | - | - |
|
395 |
+
| 0.0833 | 500 | 0.3929 | 0.3958 | 0.8210 | - |
|
396 |
+
| 0.0999 | 600 | 0.3986 | - | - | - |
|
397 |
+
| 0.1166 | 700 | 0.3743 | - | - | - |
|
398 |
+
| 0.1332 | 800 | 0.3938 | - | - | - |
|
399 |
+
| 0.1499 | 900 | 0.3602 | - | - | - |
|
400 |
+
| 0.1665 | 1000 | 0.3714 | 0.3437 | 0.8565 | - |
|
401 |
+
| 0.1832 | 1100 | 0.3486 | - | - | - |
|
402 |
+
| 0.1998 | 1200 | 0.3479 | - | - | - |
|
403 |
+
| 0.2165 | 1300 | 0.3417 | - | - | - |
|
404 |
+
| 0.2331 | 1400 | 0.3425 | - | - | - |
|
405 |
+
| 0.2498 | 1500 | 0.3353 | 0.3264 | 0.8742 | - |
|
406 |
+
| 0.2664 | 1600 | 0.3335 | - | - | - |
|
407 |
+
| 0.2831 | 1700 | 0.3274 | - | - | - |
|
408 |
+
| 0.2998 | 1800 | 0.3284 | - | - | - |
|
409 |
+
| 0.3164 | 1900 | 0.3118 | - | - | - |
|
410 |
+
| 0.3331 | 2000 | 0.3073 | 0.3282 | 0.8826 | - |
|
411 |
+
| 0.3497 | 2100 | 0.3233 | - | - | - |
|
412 |
+
| 0.3664 | 2200 | 0.3072 | - | - | - |
|
413 |
+
| 0.3830 | 2300 | 0.314 | - | - | - |
|
414 |
+
| 0.3997 | 2400 | 0.3065 | - | - | - |
|
415 |
+
| 0.4163 | 2500 | 0.3046 | 0.2877 | 0.8930 | - |
|
416 |
+
| 0.4330 | 2600 | 0.2857 | - | - | - |
|
417 |
+
| 0.4496 | 2700 | 0.285 | - | - | - |
|
418 |
+
| 0.4663 | 2800 | 0.2957 | - | - | - |
|
419 |
+
| 0.4829 | 2900 | 0.2965 | - | - | - |
|
420 |
+
| 0.4996 | 3000 | 0.2824 | 0.2842 | 0.8998 | - |
|
421 |
+
| 0.5162 | 3100 | 0.3019 | - | - | - |
|
422 |
+
| 0.5329 | 3200 | 0.2841 | - | - | - |
|
423 |
+
| 0.5495 | 3300 | 0.2981 | - | - | - |
|
424 |
+
| 0.5662 | 3400 | 0.2878 | - | - | - |
|
425 |
+
| 0.5828 | 3500 | 0.278 | 0.2803 | 0.9061 | - |
|
426 |
+
| 0.5995 | 3600 | 0.2841 | - | - | - |
|
427 |
+
| 0.6162 | 3700 | 0.2794 | - | - | - |
|
428 |
+
| 0.6328 | 3800 | 0.2808 | - | - | - |
|
429 |
+
| 0.6495 | 3900 | 0.27 | - | - | - |
|
430 |
+
| 0.6661 | 4000 | 0.2719 | 0.2697 | 0.9091 | - |
|
431 |
+
| 0.6828 | 4100 | 0.2792 | - | - | - |
|
432 |
+
| 0.6994 | 4200 | 0.2669 | - | - | - |
|
433 |
+
| 0.7161 | 4300 | 0.2696 | - | - | - |
|
434 |
+
| 0.7327 | 4400 | 0.2642 | - | - | - |
|
435 |
+
| 0.7494 | 4500 | 0.2684 | 0.2591 | 0.9140 | - |
|
436 |
+
| 0.7660 | 4600 | 0.2593 | - | - | - |
|
437 |
+
| 0.7827 | 4700 | 0.2756 | - | - | - |
|
438 |
+
| 0.7993 | 4800 | 0.2584 | - | - | - |
|
439 |
+
| 0.8160 | 4900 | 0.2525 | - | - | - |
|
440 |
+
| 0.8326 | 5000 | 0.267 | 0.2540 | 0.9168 | - |
|
441 |
+
| 0.8493 | 5100 | 0.2612 | - | - | - |
|
442 |
+
| 0.8659 | 5200 | 0.2607 | - | - | - |
|
443 |
+
| 0.8826 | 5300 | 0.2565 | - | - | - |
|
444 |
+
| 0.8993 | 5400 | 0.2432 | - | - | - |
|
445 |
+
| 0.9159 | 5500 | 0.2568 | 0.2489 | 0.9198 | - |
|
446 |
+
| 0.9326 | 5600 | 0.2572 | - | - | - |
|
447 |
+
| 0.9492 | 5700 | 0.2658 | - | - | - |
|
448 |
+
| 0.9659 | 5800 | 0.2568 | - | - | - |
|
449 |
+
| 0.9825 | 5900 | 0.2539 | - | - | - |
|
450 |
+
| 0.9992 | 6000 | 0.2458 | 0.2503 | 0.9203 | - |
|
451 |
+
| -1 | -1 | - | - | - | 0.9203 |
|
452 |
+
|
453 |
+
|
454 |
+
### Environmental Impact
|
455 |
+
Carbon emissions were measured using [CodeCarbon](https://github.com/mlco2/codecarbon).
|
456 |
+
- **Energy Consumed**: 0.069 kWh
|
457 |
+
- **Carbon Emitted**: 0.027 kg of CO2
|
458 |
+
- **Hours Used**: 0.214 hours
|
459 |
+
|
460 |
+
### Training Hardware
|
461 |
+
- **On Cloud**: No
|
462 |
+
- **GPU Model**: 1 x NVIDIA GeForce RTX 3090
|
463 |
+
- **CPU Model**: 13th Gen Intel(R) Core(TM) i7-13700K
|
464 |
+
- **RAM Size**: 31.78 GB
|
465 |
+
|
466 |
+
### Framework Versions
|
467 |
+
- Python: 3.11.6
|
468 |
+
- Sentence Transformers: 3.5.0.dev0
|
469 |
+
- Transformers: 4.49.0.dev0
|
470 |
+
- PyTorch: 2.5.0+cu121
|
471 |
+
- Accelerate: 1.3.0
|
472 |
+
- Datasets: 2.20.0
|
473 |
+
- Tokenizers: 0.21.0
|
474 |
+
|
475 |
+
## Citation
|
476 |
+
|
477 |
+
### BibTeX
|
478 |
+
|
479 |
+
#### Sentence Transformers
|
480 |
+
```bibtex
|
481 |
+
@inproceedings{reimers-2019-sentence-bert,
|
482 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
483 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
484 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
485 |
+
month = "11",
|
486 |
+
year = "2019",
|
487 |
+
publisher = "Association for Computational Linguistics",
|
488 |
+
url = "https://arxiv.org/abs/1908.10084",
|
489 |
+
}
|
490 |
+
```
|
491 |
+
|
492 |
+
<!--
|
493 |
+
## Glossary
|
494 |
+
|
495 |
+
*Clearly define terms in order to be accessible across audiences.*
|
496 |
+
-->
|
497 |
+
|
498 |
+
<!--
|
499 |
+
## Model Card Authors
|
500 |
+
|
501 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
502 |
+
-->
|
503 |
+
|
504 |
+
<!--
|
505 |
## Model Card Contact
|
506 |
|
507 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
508 |
+
-->
|