jarredparrett
commited on
Commit
•
541e304
1
Parent(s):
8470706
Add new SentenceTransformer model.
Browse files- 1_Pooling/config.json +10 -0
- README.md +532 -0
- config.json +26 -0
- config_sentence_transformers.json +10 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +64 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"word_embedding_dimension": 384,
|
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,532 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
---
|
2 |
+
base_model: sentence-transformers/all-MiniLM-L6-v2
|
3 |
+
datasets: []
|
4 |
+
language: []
|
5 |
+
library_name: sentence-transformers
|
6 |
+
metrics:
|
7 |
+
- pearson_cosine
|
8 |
+
- spearman_cosine
|
9 |
+
- pearson_manhattan
|
10 |
+
- spearman_manhattan
|
11 |
+
- pearson_euclidean
|
12 |
+
- spearman_euclidean
|
13 |
+
- pearson_dot
|
14 |
+
- spearman_dot
|
15 |
+
- pearson_max
|
16 |
+
- spearman_max
|
17 |
+
pipeline_tag: sentence-similarity
|
18 |
+
tags:
|
19 |
+
- sentence-transformers
|
20 |
+
- sentence-similarity
|
21 |
+
- feature-extraction
|
22 |
+
- generated_from_trainer
|
23 |
+
- dataset_size:17500
|
24 |
+
- loss:ContrastiveLoss
|
25 |
+
widget:
|
26 |
+
- source_sentence: 1 Scenic Unit 110
|
27 |
+
sentences:
|
28 |
+
- 1 Scenic Unit 110
|
29 |
+
- 46 Drew Rear 21
|
30 |
+
- '110 Nightin - Gale #10'
|
31 |
+
- source_sentence: 131 Sayre Fl 1
|
32 |
+
sentences:
|
33 |
+
- 715 Union Unit Q
|
34 |
+
- 1 Rustic Apt D26
|
35 |
+
- 131 Sayre Apt 1
|
36 |
+
- source_sentence: '731 Eaton # 1'
|
37 |
+
sentences:
|
38 |
+
- '1100 Wesley #1'
|
39 |
+
- '731 Eaton #1'
|
40 |
+
- 815 Murray Flr 2
|
41 |
+
- source_sentence: 18 - 01 Pollitt Ste 4
|
42 |
+
sentences:
|
43 |
+
- 186 1st Apt 1
|
44 |
+
- '63 Mountain # A'
|
45 |
+
- 18 - 01 Pollitt Ste 4
|
46 |
+
- source_sentence: '612 Madison # 2'
|
47 |
+
sentences:
|
48 |
+
- '421 Jersey # 1'
|
49 |
+
- 8502 Liberty Fl 2
|
50 |
+
- 612 Madison Apt 2
|
51 |
+
model-index:
|
52 |
+
- name: SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
53 |
+
results:
|
54 |
+
- task:
|
55 |
+
type: semantic-similarity
|
56 |
+
name: Semantic Similarity
|
57 |
+
dataset:
|
58 |
+
name: test
|
59 |
+
type: test
|
60 |
+
metrics:
|
61 |
+
- type: pearson_cosine
|
62 |
+
value: 0.6004811664372558
|
63 |
+
name: Pearson Cosine
|
64 |
+
- type: spearman_cosine
|
65 |
+
value: 0.4540997609838606
|
66 |
+
name: Spearman Cosine
|
67 |
+
- type: pearson_manhattan
|
68 |
+
value: 0.4981741659289101
|
69 |
+
name: Pearson Manhattan
|
70 |
+
- type: spearman_manhattan
|
71 |
+
value: 0.45189578750840304
|
72 |
+
name: Spearman Manhattan
|
73 |
+
- type: pearson_euclidean
|
74 |
+
value: 0.4972646329389563
|
75 |
+
name: Pearson Euclidean
|
76 |
+
- type: spearman_euclidean
|
77 |
+
value: 0.45172321150833644
|
78 |
+
name: Spearman Euclidean
|
79 |
+
- type: pearson_dot
|
80 |
+
value: 0.6004811664029517
|
81 |
+
name: Pearson Dot
|
82 |
+
- type: spearman_dot
|
83 |
+
value: 0.45184703338997106
|
84 |
+
name: Spearman Dot
|
85 |
+
- type: pearson_max
|
86 |
+
value: 0.6004811664372558
|
87 |
+
name: Pearson Max
|
88 |
+
- type: spearman_max
|
89 |
+
value: 0.4540997609838606
|
90 |
+
name: Spearman Max
|
91 |
+
- task:
|
92 |
+
type: semantic-similarity
|
93 |
+
name: Semantic Similarity
|
94 |
+
dataset:
|
95 |
+
name: validation
|
96 |
+
type: validation
|
97 |
+
metrics:
|
98 |
+
- type: pearson_cosine
|
99 |
+
value: 0.9428978189133087
|
100 |
+
name: Pearson Cosine
|
101 |
+
- type: spearman_cosine
|
102 |
+
value: 0.6568158263615053
|
103 |
+
name: Spearman Cosine
|
104 |
+
- type: pearson_manhattan
|
105 |
+
value: 0.9703142955814245
|
106 |
+
name: Pearson Manhattan
|
107 |
+
- type: spearman_manhattan
|
108 |
+
value: 0.6535524581165605
|
109 |
+
name: Spearman Manhattan
|
110 |
+
- type: pearson_euclidean
|
111 |
+
value: 0.9704178537982603
|
112 |
+
name: Pearson Euclidean
|
113 |
+
- type: spearman_euclidean
|
114 |
+
value: 0.6535890675794356
|
115 |
+
name: Spearman Euclidean
|
116 |
+
- type: pearson_dot
|
117 |
+
value: 0.9428978176196957
|
118 |
+
name: Pearson Dot
|
119 |
+
- type: spearman_dot
|
120 |
+
value: 0.6535945302568601
|
121 |
+
name: Spearman Dot
|
122 |
+
- type: pearson_max
|
123 |
+
value: 0.9704178537982603
|
124 |
+
name: Pearson Max
|
125 |
+
- type: spearman_max
|
126 |
+
value: 0.6568158263615053
|
127 |
+
name: Spearman Max
|
128 |
+
---
|
129 |
+
|
130 |
+
# SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
|
131 |
+
|
132 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
|
133 |
+
|
134 |
+
## Model Details
|
135 |
+
|
136 |
+
### Model Description
|
137 |
+
- **Model Type:** Sentence Transformer
|
138 |
+
- **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision 8b3219a92973c328a8e22fadcfa821b5dc75636a -->
|
139 |
+
- **Maximum Sequence Length:** 256 tokens
|
140 |
+
- **Output Dimensionality:** 384 tokens
|
141 |
+
- **Similarity Function:** Cosine Similarity
|
142 |
+
<!-- - **Training Dataset:** Unknown -->
|
143 |
+
<!-- - **Language:** Unknown -->
|
144 |
+
<!-- - **License:** Unknown -->
|
145 |
+
|
146 |
+
### Model Sources
|
147 |
+
|
148 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
149 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
150 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
151 |
+
|
152 |
+
### Full Model Architecture
|
153 |
+
|
154 |
+
```
|
155 |
+
SentenceTransformer(
|
156 |
+
(0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
|
157 |
+
(1): Pooling({'word_embedding_dimension': 384, '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})
|
158 |
+
(2): Normalize()
|
159 |
+
)
|
160 |
+
```
|
161 |
+
|
162 |
+
## Usage
|
163 |
+
|
164 |
+
### Direct Usage (Sentence Transformers)
|
165 |
+
|
166 |
+
First install the Sentence Transformers library:
|
167 |
+
|
168 |
+
```bash
|
169 |
+
pip install -U sentence-transformers
|
170 |
+
```
|
171 |
+
|
172 |
+
Then you can load this model and run inference.
|
173 |
+
```python
|
174 |
+
from sentence_transformers import SentenceTransformer
|
175 |
+
|
176 |
+
# Download from the 🤗 Hub
|
177 |
+
model = SentenceTransformer("jarredparrett/fine-tuned-address-model-v0")
|
178 |
+
# Run inference
|
179 |
+
sentences = [
|
180 |
+
'612 Madison # 2',
|
181 |
+
'612 Madison Apt 2',
|
182 |
+
'421 Jersey # 1',
|
183 |
+
]
|
184 |
+
embeddings = model.encode(sentences)
|
185 |
+
print(embeddings.shape)
|
186 |
+
# [3, 384]
|
187 |
+
|
188 |
+
# Get the similarity scores for the embeddings
|
189 |
+
similarities = model.similarity(embeddings, embeddings)
|
190 |
+
print(similarities.shape)
|
191 |
+
# [3, 3]
|
192 |
+
```
|
193 |
+
|
194 |
+
<!--
|
195 |
+
### Direct Usage (Transformers)
|
196 |
+
|
197 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
198 |
+
|
199 |
+
</details>
|
200 |
+
-->
|
201 |
+
|
202 |
+
<!--
|
203 |
+
### Downstream Usage (Sentence Transformers)
|
204 |
+
|
205 |
+
You can finetune this model on your own dataset.
|
206 |
+
|
207 |
+
<details><summary>Click to expand</summary>
|
208 |
+
|
209 |
+
</details>
|
210 |
+
-->
|
211 |
+
|
212 |
+
<!--
|
213 |
+
### Out-of-Scope Use
|
214 |
+
|
215 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
216 |
+
-->
|
217 |
+
|
218 |
+
## Evaluation
|
219 |
+
|
220 |
+
### Metrics
|
221 |
+
|
222 |
+
#### Semantic Similarity
|
223 |
+
* Dataset: `test`
|
224 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
225 |
+
|
226 |
+
| Metric | Value |
|
227 |
+
|:-------------------|:-----------|
|
228 |
+
| pearson_cosine | 0.6005 |
|
229 |
+
| spearman_cosine | 0.4541 |
|
230 |
+
| pearson_manhattan | 0.4982 |
|
231 |
+
| spearman_manhattan | 0.4519 |
|
232 |
+
| pearson_euclidean | 0.4973 |
|
233 |
+
| spearman_euclidean | 0.4517 |
|
234 |
+
| pearson_dot | 0.6005 |
|
235 |
+
| spearman_dot | 0.4518 |
|
236 |
+
| pearson_max | 0.6005 |
|
237 |
+
| **spearman_max** | **0.4541** |
|
238 |
+
|
239 |
+
#### Semantic Similarity
|
240 |
+
* Dataset: `validation`
|
241 |
+
* Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
|
242 |
+
|
243 |
+
| Metric | Value |
|
244 |
+
|:-------------------|:-----------|
|
245 |
+
| pearson_cosine | 0.9429 |
|
246 |
+
| spearman_cosine | 0.6568 |
|
247 |
+
| pearson_manhattan | 0.9703 |
|
248 |
+
| spearman_manhattan | 0.6536 |
|
249 |
+
| pearson_euclidean | 0.9704 |
|
250 |
+
| spearman_euclidean | 0.6536 |
|
251 |
+
| pearson_dot | 0.9429 |
|
252 |
+
| spearman_dot | 0.6536 |
|
253 |
+
| pearson_max | 0.9704 |
|
254 |
+
| **spearman_max** | **0.6568** |
|
255 |
+
|
256 |
+
<!--
|
257 |
+
## Bias, Risks and Limitations
|
258 |
+
|
259 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
260 |
+
-->
|
261 |
+
|
262 |
+
<!--
|
263 |
+
### Recommendations
|
264 |
+
|
265 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
266 |
+
-->
|
267 |
+
|
268 |
+
## Training Details
|
269 |
+
|
270 |
+
### Training Dataset
|
271 |
+
|
272 |
+
#### Unnamed Dataset
|
273 |
+
|
274 |
+
|
275 |
+
* Size: 17,500 training samples
|
276 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
277 |
+
* Approximate statistics based on the first 1000 samples:
|
278 |
+
| | sentence_0 | sentence_1 | label |
|
279 |
+
|:--------|:--------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:------------------------------------------------|
|
280 |
+
| type | string | string | int |
|
281 |
+
| details | <ul><li>min: 5 tokens</li><li>mean: 7.0 tokens</li><li>max: 12 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 7.01 tokens</li><li>max: 12 tokens</li></ul> | <ul><li>0: ~18.70%</li><li>1: ~81.30%</li></ul> |
|
282 |
+
* Samples:
|
283 |
+
| sentence_0 | sentence_1 | label |
|
284 |
+
|:------------------------------------------------------|:------------------------------------------------------|:---------------|
|
285 |
+
| <code>32 Cinder #17</code> | <code>32 Cinder Unit 17</code> | <code>1</code> |
|
286 |
+
| <code>85 Allen Apt 2R</code> | <code>85 Allen #2R</code> | <code>1</code> |
|
287 |
+
| <code>138 - 162 Martin Luther King Jr Apt 1807</code> | <code>138 - 162 Martin Luther King Jr Apt 1807</code> | <code>1</code> |
|
288 |
+
* Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
|
289 |
+
```json
|
290 |
+
{
|
291 |
+
"distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
|
292 |
+
"margin": 0.5,
|
293 |
+
"size_average": true
|
294 |
+
}
|
295 |
+
```
|
296 |
+
|
297 |
+
### Training Hyperparameters
|
298 |
+
#### Non-Default Hyperparameters
|
299 |
+
|
300 |
+
- `eval_strategy`: steps
|
301 |
+
- `per_device_train_batch_size`: 16
|
302 |
+
- `per_device_eval_batch_size`: 16
|
303 |
+
- `num_train_epochs`: 4
|
304 |
+
- `multi_dataset_batch_sampler`: round_robin
|
305 |
+
|
306 |
+
#### All Hyperparameters
|
307 |
+
<details><summary>Click to expand</summary>
|
308 |
+
|
309 |
+
- `overwrite_output_dir`: False
|
310 |
+
- `do_predict`: False
|
311 |
+
- `eval_strategy`: steps
|
312 |
+
- `prediction_loss_only`: True
|
313 |
+
- `per_device_train_batch_size`: 16
|
314 |
+
- `per_device_eval_batch_size`: 16
|
315 |
+
- `per_gpu_train_batch_size`: None
|
316 |
+
- `per_gpu_eval_batch_size`: None
|
317 |
+
- `gradient_accumulation_steps`: 1
|
318 |
+
- `eval_accumulation_steps`: None
|
319 |
+
- `torch_empty_cache_steps`: None
|
320 |
+
- `learning_rate`: 5e-05
|
321 |
+
- `weight_decay`: 0.0
|
322 |
+
- `adam_beta1`: 0.9
|
323 |
+
- `adam_beta2`: 0.999
|
324 |
+
- `adam_epsilon`: 1e-08
|
325 |
+
- `max_grad_norm`: 1
|
326 |
+
- `num_train_epochs`: 4
|
327 |
+
- `max_steps`: -1
|
328 |
+
- `lr_scheduler_type`: linear
|
329 |
+
- `lr_scheduler_kwargs`: {}
|
330 |
+
- `warmup_ratio`: 0.0
|
331 |
+
- `warmup_steps`: 0
|
332 |
+
- `log_level`: passive
|
333 |
+
- `log_level_replica`: warning
|
334 |
+
- `log_on_each_node`: True
|
335 |
+
- `logging_nan_inf_filter`: True
|
336 |
+
- `save_safetensors`: True
|
337 |
+
- `save_on_each_node`: False
|
338 |
+
- `save_only_model`: False
|
339 |
+
- `restore_callback_states_from_checkpoint`: False
|
340 |
+
- `no_cuda`: False
|
341 |
+
- `use_cpu`: False
|
342 |
+
- `use_mps_device`: False
|
343 |
+
- `seed`: 42
|
344 |
+
- `data_seed`: None
|
345 |
+
- `jit_mode_eval`: False
|
346 |
+
- `use_ipex`: False
|
347 |
+
- `bf16`: False
|
348 |
+
- `fp16`: False
|
349 |
+
- `fp16_opt_level`: O1
|
350 |
+
- `half_precision_backend`: auto
|
351 |
+
- `bf16_full_eval`: False
|
352 |
+
- `fp16_full_eval`: False
|
353 |
+
- `tf32`: None
|
354 |
+
- `local_rank`: 0
|
355 |
+
- `ddp_backend`: None
|
356 |
+
- `tpu_num_cores`: None
|
357 |
+
- `tpu_metrics_debug`: False
|
358 |
+
- `debug`: []
|
359 |
+
- `dataloader_drop_last`: False
|
360 |
+
- `dataloader_num_workers`: 0
|
361 |
+
- `dataloader_prefetch_factor`: None
|
362 |
+
- `past_index`: -1
|
363 |
+
- `disable_tqdm`: False
|
364 |
+
- `remove_unused_columns`: True
|
365 |
+
- `label_names`: None
|
366 |
+
- `load_best_model_at_end`: False
|
367 |
+
- `ignore_data_skip`: False
|
368 |
+
- `fsdp`: []
|
369 |
+
- `fsdp_min_num_params`: 0
|
370 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
371 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
372 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
373 |
+
- `deepspeed`: None
|
374 |
+
- `label_smoothing_factor`: 0.0
|
375 |
+
- `optim`: adamw_torch
|
376 |
+
- `optim_args`: None
|
377 |
+
- `adafactor`: False
|
378 |
+
- `group_by_length`: False
|
379 |
+
- `length_column_name`: length
|
380 |
+
- `ddp_find_unused_parameters`: None
|
381 |
+
- `ddp_bucket_cap_mb`: None
|
382 |
+
- `ddp_broadcast_buffers`: False
|
383 |
+
- `dataloader_pin_memory`: True
|
384 |
+
- `dataloader_persistent_workers`: False
|
385 |
+
- `skip_memory_metrics`: True
|
386 |
+
- `use_legacy_prediction_loop`: False
|
387 |
+
- `push_to_hub`: False
|
388 |
+
- `resume_from_checkpoint`: None
|
389 |
+
- `hub_model_id`: None
|
390 |
+
- `hub_strategy`: every_save
|
391 |
+
- `hub_private_repo`: False
|
392 |
+
- `hub_always_push`: False
|
393 |
+
- `gradient_checkpointing`: False
|
394 |
+
- `gradient_checkpointing_kwargs`: None
|
395 |
+
- `include_inputs_for_metrics`: False
|
396 |
+
- `eval_do_concat_batches`: True
|
397 |
+
- `fp16_backend`: auto
|
398 |
+
- `push_to_hub_model_id`: None
|
399 |
+
- `push_to_hub_organization`: None
|
400 |
+
- `mp_parameters`:
|
401 |
+
- `auto_find_batch_size`: False
|
402 |
+
- `full_determinism`: False
|
403 |
+
- `torchdynamo`: None
|
404 |
+
- `ray_scope`: last
|
405 |
+
- `ddp_timeout`: 1800
|
406 |
+
- `torch_compile`: False
|
407 |
+
- `torch_compile_backend`: None
|
408 |
+
- `torch_compile_mode`: None
|
409 |
+
- `dispatch_batches`: None
|
410 |
+
- `split_batches`: None
|
411 |
+
- `include_tokens_per_second`: False
|
412 |
+
- `include_num_input_tokens_seen`: False
|
413 |
+
- `neftune_noise_alpha`: None
|
414 |
+
- `optim_target_modules`: None
|
415 |
+
- `batch_eval_metrics`: False
|
416 |
+
- `eval_on_start`: False
|
417 |
+
- `eval_use_gather_object`: False
|
418 |
+
- `batch_sampler`: batch_sampler
|
419 |
+
- `multi_dataset_batch_sampler`: round_robin
|
420 |
+
|
421 |
+
</details>
|
422 |
+
|
423 |
+
### Training Logs
|
424 |
+
| Epoch | Step | Training Loss | test_spearman_max | validation_spearman_max |
|
425 |
+
|:------:|:----:|:-------------:|:-----------------:|:-----------------------:|
|
426 |
+
| 0 | 0 | - | 0.4541 | - |
|
427 |
+
| 0.0914 | 100 | - | - | 0.6494 |
|
428 |
+
| 0.1828 | 200 | - | - | 0.6567 |
|
429 |
+
| 0.2742 | 300 | - | - | 0.6566 |
|
430 |
+
| 0.3656 | 400 | - | - | 0.6568 |
|
431 |
+
| 0.4570 | 500 | 0.0056 | - | 0.6568 |
|
432 |
+
| 0.5484 | 600 | - | - | 0.6568 |
|
433 |
+
| 0.6399 | 700 | - | - | 0.6566 |
|
434 |
+
| 0.7313 | 800 | - | - | 0.6568 |
|
435 |
+
| 0.8227 | 900 | - | - | 0.6568 |
|
436 |
+
| 0.9141 | 1000 | 0.0026 | - | 0.6570 |
|
437 |
+
| 1.0 | 1094 | - | - | 0.6568 |
|
438 |
+
| 1.0055 | 1100 | - | - | 0.6568 |
|
439 |
+
| 1.0969 | 1200 | - | - | 0.6568 |
|
440 |
+
| 1.1883 | 1300 | - | - | 0.6569 |
|
441 |
+
| 1.2797 | 1400 | - | - | 0.6569 |
|
442 |
+
| 1.3711 | 1500 | 0.0021 | - | 0.6569 |
|
443 |
+
| 1.4625 | 1600 | - | - | 0.6570 |
|
444 |
+
| 1.5539 | 1700 | - | - | 0.6570 |
|
445 |
+
| 1.6453 | 1800 | - | - | 0.6568 |
|
446 |
+
| 1.7367 | 1900 | - | - | 0.6567 |
|
447 |
+
| 1.8282 | 2000 | 0.0018 | - | 0.6569 |
|
448 |
+
| 1.9196 | 2100 | - | - | 0.6571 |
|
449 |
+
| 2.0 | 2188 | - | - | 0.6571 |
|
450 |
+
| 2.0110 | 2200 | - | - | 0.6570 |
|
451 |
+
| 2.1024 | 2300 | - | - | 0.6568 |
|
452 |
+
| 2.1938 | 2400 | - | - | 0.6569 |
|
453 |
+
| 2.2852 | 2500 | 0.0016 | - | 0.6570 |
|
454 |
+
| 2.3766 | 2600 | - | - | 0.6569 |
|
455 |
+
| 2.4680 | 2700 | - | - | 0.6570 |
|
456 |
+
| 2.5594 | 2800 | - | - | 0.6568 |
|
457 |
+
| 2.6508 | 2900 | - | - | 0.6569 |
|
458 |
+
| 2.7422 | 3000 | 0.0014 | - | 0.6568 |
|
459 |
+
| 2.8336 | 3100 | - | - | 0.6569 |
|
460 |
+
| 2.9250 | 3200 | - | - | 0.6569 |
|
461 |
+
| 3.0 | 3282 | - | - | 0.6569 |
|
462 |
+
| 3.0165 | 3300 | - | - | 0.6569 |
|
463 |
+
| 3.1079 | 3400 | - | - | 0.6568 |
|
464 |
+
| 3.1993 | 3500 | 0.0014 | - | 0.6568 |
|
465 |
+
| 3.2907 | 3600 | - | - | 0.6569 |
|
466 |
+
| 3.3821 | 3700 | - | - | 0.6569 |
|
467 |
+
| 3.4735 | 3800 | - | - | 0.6568 |
|
468 |
+
| 3.5649 | 3900 | - | - | 0.6568 |
|
469 |
+
| 3.6563 | 4000 | 0.0013 | - | 0.6568 |
|
470 |
+
| 3.7477 | 4100 | - | - | 0.6568 |
|
471 |
+
| 3.8391 | 4200 | - | - | 0.6568 |
|
472 |
+
| 3.9305 | 4300 | - | - | 0.6568 |
|
473 |
+
| 4.0 | 4376 | - | - | 0.6568 |
|
474 |
+
|
475 |
+
|
476 |
+
### Framework Versions
|
477 |
+
- Python: 3.10.12
|
478 |
+
- Sentence Transformers: 3.0.1
|
479 |
+
- Transformers: 4.44.2
|
480 |
+
- PyTorch: 2.4.0+cu121
|
481 |
+
- Accelerate: 0.33.0
|
482 |
+
- Datasets: 2.21.0
|
483 |
+
- Tokenizers: 0.19.1
|
484 |
+
|
485 |
+
## Citation
|
486 |
+
|
487 |
+
### BibTeX
|
488 |
+
|
489 |
+
#### Sentence Transformers
|
490 |
+
```bibtex
|
491 |
+
@inproceedings{reimers-2019-sentence-bert,
|
492 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
493 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
494 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
495 |
+
month = "11",
|
496 |
+
year = "2019",
|
497 |
+
publisher = "Association for Computational Linguistics",
|
498 |
+
url = "https://arxiv.org/abs/1908.10084",
|
499 |
+
}
|
500 |
+
```
|
501 |
+
|
502 |
+
#### ContrastiveLoss
|
503 |
+
```bibtex
|
504 |
+
@inproceedings{hadsell2006dimensionality,
|
505 |
+
author={Hadsell, R. and Chopra, S. and LeCun, Y.},
|
506 |
+
booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
|
507 |
+
title={Dimensionality Reduction by Learning an Invariant Mapping},
|
508 |
+
year={2006},
|
509 |
+
volume={2},
|
510 |
+
number={},
|
511 |
+
pages={1735-1742},
|
512 |
+
doi={10.1109/CVPR.2006.100}
|
513 |
+
}
|
514 |
+
```
|
515 |
+
|
516 |
+
<!--
|
517 |
+
## Glossary
|
518 |
+
|
519 |
+
*Clearly define terms in order to be accessible across audiences.*
|
520 |
+
-->
|
521 |
+
|
522 |
+
<!--
|
523 |
+
## Model Card Authors
|
524 |
+
|
525 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
526 |
+
-->
|
527 |
+
|
528 |
+
<!--
|
529 |
+
## Model Card Contact
|
530 |
+
|
531 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
532 |
+
-->
|
config.json
ADDED
@@ -0,0 +1,26 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"_name_or_path": "sentence-transformers/all-MiniLM-L6-v2",
|
3 |
+
"architectures": [
|
4 |
+
"BertModel"
|
5 |
+
],
|
6 |
+
"attention_probs_dropout_prob": 0.1,
|
7 |
+
"classifier_dropout": null,
|
8 |
+
"gradient_checkpointing": false,
|
9 |
+
"hidden_act": "gelu",
|
10 |
+
"hidden_dropout_prob": 0.1,
|
11 |
+
"hidden_size": 384,
|
12 |
+
"initializer_range": 0.02,
|
13 |
+
"intermediate_size": 1536,
|
14 |
+
"layer_norm_eps": 1e-12,
|
15 |
+
"max_position_embeddings": 512,
|
16 |
+
"model_type": "bert",
|
17 |
+
"num_attention_heads": 12,
|
18 |
+
"num_hidden_layers": 6,
|
19 |
+
"pad_token_id": 0,
|
20 |
+
"position_embedding_type": "absolute",
|
21 |
+
"torch_dtype": "float32",
|
22 |
+
"transformers_version": "4.44.2",
|
23 |
+
"type_vocab_size": 2,
|
24 |
+
"use_cache": true,
|
25 |
+
"vocab_size": 30522
|
26 |
+
}
|
config_sentence_transformers.json
ADDED
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"__version__": {
|
3 |
+
"sentence_transformers": "3.0.1",
|
4 |
+
"transformers": "4.44.2",
|
5 |
+
"pytorch": "2.4.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:616f36bc35680f3561fdadc0880c65fc5d0a8fdd7583c22baa1bc808c046c33d
|
3 |
+
size 90864192
|
modules.json
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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 |
+
{
|
15 |
+
"idx": 2,
|
16 |
+
"name": "2",
|
17 |
+
"path": "2_Normalize",
|
18 |
+
"type": "sentence_transformers.models.Normalize"
|
19 |
+
}
|
20 |
+
]
|
sentence_bert_config.json
ADDED
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"max_seq_length": 256,
|
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,64 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
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": true,
|
45 |
+
"cls_token": "[CLS]",
|
46 |
+
"do_basic_tokenize": true,
|
47 |
+
"do_lower_case": true,
|
48 |
+
"mask_token": "[MASK]",
|
49 |
+
"max_length": 128,
|
50 |
+
"model_max_length": 256,
|
51 |
+
"never_split": null,
|
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 |
+
"stride": 0,
|
58 |
+
"strip_accents": null,
|
59 |
+
"tokenize_chinese_chars": true,
|
60 |
+
"tokenizer_class": "BertTokenizer",
|
61 |
+
"truncation_side": "right",
|
62 |
+
"truncation_strategy": "longest_first",
|
63 |
+
"unk_token": "[UNK]"
|
64 |
+
}
|
vocab.txt
ADDED
The diff for this file is too large to render.
See raw diff
|
|