s2593817 commited on
Commit
c89964f
·
verified ·
1 Parent(s): c70c5ff

Add new SentenceTransformer model.

Browse files
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,525 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: sentence-transformers/all-mpnet-base-v2
3
+ datasets: []
4
+ language: []
5
+ library_name: sentence-transformers
6
+ pipeline_tag: sentence-similarity
7
+ tags:
8
+ - sentence-transformers
9
+ - sentence-similarity
10
+ - feature-extraction
11
+ - generated_from_trainer
12
+ - dataset_size:300000
13
+ - loss:CoSENTLoss
14
+ widget:
15
+ - source_sentence: SELECT DISTINCT count(alias3.col1) , alias1.col2 FROM table1 AS
16
+ alias1 JOIN table2 AS alias2 ON alias1.col2 = alias2.col2 JOIN table3 AS alias3
17
+ ON alias1.col1 = alias3.col1 WHERE alias2.col3 = str AND alias3.year = num GROUP
18
+ BY alias1.col2
19
+ sentences:
20
+ - SELECT col1 , avg(col2) FROM table1 WHERE col3 LIKE str GROUP BY col1
21
+ - SELECT col1 , col2 FROM table1 WHERE col3 LIKE str GROUP BY col1 ORDER BY count(*)
22
+ DESC LIMIT num
23
+ - SELECT col1 , avg(col2) FROM table1 GROUP BY col1 ORDER BY avg(col2)
24
+ - source_sentence: SELECT alias2.year FROM table1 AS alias1 JOIN table2 AS alias2
25
+ ON alias1.col1 = alias2.col2 WHERE alias1.alias1 = str
26
+ sentences:
27
+ - SELECT alias1.col1 , alias2.col2 FROM table1 AS alias1 JOIN table2 AS alias2 ON
28
+ alias1.col3 = alias2.col3
29
+ - SELECT DISTINCT alias1.col1 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias2.col2
30
+ = alias1.col3 JOIN table3 AS alias3 ON alias2.col4 = alias3.col3 WHERE alias3.col5
31
+ > num
32
+ - SELECT col1 FROM table1 ORDER BY col2 LIMIT num
33
+ - source_sentence: SELECT DISTINCT count(alias2.col1) FROM table1 AS alias1 JOIN table2
34
+ AS alias2 ON alias1.col2 = alias2.col2 WHERE alias1.col3 = str
35
+ sentences:
36
+ - SELECT alias3.col1 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col2
37
+ = alias2.col2 JOIN table3 AS alias3 ON alias2.col3 = alias3.col3 WHERE alias1.col4
38
+ = str AND alias1.col5 = str
39
+ - SELECT count(DISTINCT col1) FROM table1 WHERE col1 NOT IN ( SELECT col2 FROM table2
40
+ )
41
+ - SELECT count(*) FROM table1 WHERE col1 = str AND col2 < num
42
+ - source_sentence: SELECT alias1.col1 FROM table1 AS alias1 JOIN table2 AS alias2
43
+ ON alias1.col2 = alias2.col2 WHERE alias2.col3 LIKE str
44
+ sentences:
45
+ - SELECT col1 FROM table1 ORDER BY col2 DESC
46
+ - SELECT col1 FROM table1 WHERE col2 NOT IN (SELECT col2 FROM table2)
47
+ - SELECT alias1.col1 , alias1.col2 , alias1.col3 FROM table1 AS alias1 JOIN table2
48
+ AS alias2 ON alias1.col4 = alias2.col5 ORDER BY alias2.col6 LIMIT num
49
+ - source_sentence: SELECT alias1.col1 FROM table1 AS alias1 JOIN table2 AS alias2
50
+ ON alias1.col2 = alias2.col2 JOIN table3 AS alias3 ON alias2.col3 = alias3.col3
51
+ WHERE alias3.col4 = str INTERSECT SELECT alias1.col1 FROM table1 AS alias1 JOIN
52
+ table2 AS alias2 ON alias1.col2 = alias2.col2 JOIN table3 AS alias3 ON alias2.col3
53
+ = alias3.col3 WHERE alias3.col4 = str
54
+ sentences:
55
+ - SELECT count(*) FROM table1
56
+ - SELECT count(DISTINCT col1) FROM table1
57
+ - SELECT count(col1) FROM table1 WHERE col2 = num
58
+ ---
59
+
60
+ # SentenceTransformer based on sentence-transformers/all-mpnet-base-v2
61
+
62
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2). 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.
63
+
64
+ ## Model Details
65
+
66
+ ### Model Description
67
+ - **Model Type:** Sentence Transformer
68
+ - **Base model:** [sentence-transformers/all-mpnet-base-v2](https://huggingface.co/sentence-transformers/all-mpnet-base-v2) <!-- at revision 84f2bcc00d77236f9e89c8a360a00fb1139bf47d -->
69
+ - **Maximum Sequence Length:** 384 tokens
70
+ - **Output Dimensionality:** 768 tokens
71
+ - **Similarity Function:** Cosine Similarity
72
+ <!-- - **Training Dataset:** Unknown -->
73
+ <!-- - **Language:** Unknown -->
74
+ <!-- - **License:** Unknown -->
75
+
76
+ ### Model Sources
77
+
78
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
79
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
80
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
81
+
82
+ ### Full Model Architecture
83
+
84
+ ```
85
+ SentenceTransformer(
86
+ (0): Transformer({'max_seq_length': 384, 'do_lower_case': False}) with Transformer model: MPNetModel
87
+ (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})
88
+ (2): Normalize()
89
+ )
90
+ ```
91
+
92
+ ## Usage
93
+
94
+ ### Direct Usage (Sentence Transformers)
95
+
96
+ First install the Sentence Transformers library:
97
+
98
+ ```bash
99
+ pip install -U sentence-transformers
100
+ ```
101
+
102
+ Then you can load this model and run inference.
103
+ ```python
104
+ from sentence_transformers import SentenceTransformer
105
+
106
+ # Download from the 🤗 Hub
107
+ model = SentenceTransformer("s2593817/sft-sql-embedding")
108
+ # Run inference
109
+ sentences = [
110
+ 'SELECT alias1.col1 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col2 = alias2.col2 JOIN table3 AS alias3 ON alias2.col3 = alias3.col3 WHERE alias3.col4 = str INTERSECT SELECT alias1.col1 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col2 = alias2.col2 JOIN table3 AS alias3 ON alias2.col3 = alias3.col3 WHERE alias3.col4 = str',
111
+ 'SELECT count(col1) FROM table1 WHERE col2 = num',
112
+ 'SELECT count(DISTINCT col1) FROM table1',
113
+ ]
114
+ embeddings = model.encode(sentences)
115
+ print(embeddings.shape)
116
+ # [3, 768]
117
+
118
+ # Get the similarity scores for the embeddings
119
+ similarities = model.similarity(embeddings, embeddings)
120
+ print(similarities.shape)
121
+ # [3, 3]
122
+ ```
123
+
124
+ <!--
125
+ ### Direct Usage (Transformers)
126
+
127
+ <details><summary>Click to see the direct usage in Transformers</summary>
128
+
129
+ </details>
130
+ -->
131
+
132
+ <!--
133
+ ### Downstream Usage (Sentence Transformers)
134
+
135
+ You can finetune this model on your own dataset.
136
+
137
+ <details><summary>Click to expand</summary>
138
+
139
+ </details>
140
+ -->
141
+
142
+ <!--
143
+ ### Out-of-Scope Use
144
+
145
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
146
+ -->
147
+
148
+ <!--
149
+ ## Bias, Risks and Limitations
150
+
151
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
152
+ -->
153
+
154
+ <!--
155
+ ### Recommendations
156
+
157
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
158
+ -->
159
+
160
+ ## Training Details
161
+
162
+ ### Training Dataset
163
+
164
+ #### Unnamed Dataset
165
+
166
+
167
+ * Size: 300,000 training samples
168
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
169
+ * Approximate statistics based on the first 1000 samples:
170
+ | | sentence1 | sentence2 | score |
171
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------|
172
+ | type | string | string | float |
173
+ | details | <ul><li>min: 8 tokens</li><li>mean: 38.49 tokens</li><li>max: 189 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 37.44 tokens</li><li>max: 153 tokens</li></ul> | <ul><li>min: 0.04</li><li>mean: 0.36</li><li>max: 1.0</li></ul> |
174
+ * Samples:
175
+ | sentence1 | sentence2 | score |
176
+ |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------|
177
+ | <code>SELECT DISTINCT count(DISTINCT alias4.col1) , alias3.col2 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col3 = alias2.col3 JOIN table3 AS alias3 ON alias3.col4 = alias1.col4 JOIN table4 AS alias4 ON alias3.col4 = alias4.col5 WHERE alias2.col6 = str GROUP BY alias3.col2 ORDER BY count(DISTINCT alias4.col1) DESC</code> | <code>SELECT count(*) FROM table1 WHERE col1 = str</code> | <code>0.14221014492753623</code> |
178
+ | <code>SELECT DISTINCT count(alias2.col1) FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col2 = alias2.col2 WHERE alias1.col3 = str</code> | <code>SELECT alias3.col1 FROM table1 AS alias1 JOIN table2 AS alias2 ON alias1.col2 = alias2.col2 JOIN table3 AS alias3 ON alias2.col3 = alias3.col3 WHERE alias1.col4 = str AND alias1.col5 = str</code> | <code>0.5468686868686868</code> |
179
+ | <code>SELECT count(*) FROM table1</code> | <code>SELECT count(*) FROM table1 WHERE col1 LIKE str</code> | <code>0.6269230769230769</code> |
180
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
181
+ ```json
182
+ {
183
+ "scale": 20.0,
184
+ "similarity_fct": "pairwise_cos_sim"
185
+ }
186
+ ```
187
+
188
+ ### Training Hyperparameters
189
+ #### Non-Default Hyperparameters
190
+
191
+ - `per_device_train_batch_size`: 160
192
+ - `learning_rate`: 2e-05
193
+ - `num_train_epochs`: 8
194
+ - `warmup_ratio`: 0.2
195
+ - `fp16`: True
196
+ - `dataloader_num_workers`: 16
197
+ - `batch_sampler`: no_duplicates
198
+
199
+ #### All Hyperparameters
200
+ <details><summary>Click to expand</summary>
201
+
202
+ - `overwrite_output_dir`: False
203
+ - `do_predict`: False
204
+ - `eval_strategy`: no
205
+ - `prediction_loss_only`: True
206
+ - `per_device_train_batch_size`: 160
207
+ - `per_device_eval_batch_size`: 8
208
+ - `per_gpu_train_batch_size`: None
209
+ - `per_gpu_eval_batch_size`: None
210
+ - `gradient_accumulation_steps`: 1
211
+ - `eval_accumulation_steps`: None
212
+ - `learning_rate`: 2e-05
213
+ - `weight_decay`: 0.0
214
+ - `adam_beta1`: 0.9
215
+ - `adam_beta2`: 0.999
216
+ - `adam_epsilon`: 1e-08
217
+ - `max_grad_norm`: 1.0
218
+ - `num_train_epochs`: 8
219
+ - `max_steps`: -1
220
+ - `lr_scheduler_type`: linear
221
+ - `lr_scheduler_kwargs`: {}
222
+ - `warmup_ratio`: 0.2
223
+ - `warmup_steps`: 0
224
+ - `log_level`: passive
225
+ - `log_level_replica`: warning
226
+ - `log_on_each_node`: True
227
+ - `logging_nan_inf_filter`: True
228
+ - `save_safetensors`: True
229
+ - `save_on_each_node`: False
230
+ - `save_only_model`: False
231
+ - `restore_callback_states_from_checkpoint`: False
232
+ - `no_cuda`: False
233
+ - `use_cpu`: False
234
+ - `use_mps_device`: False
235
+ - `seed`: 42
236
+ - `data_seed`: None
237
+ - `jit_mode_eval`: False
238
+ - `use_ipex`: False
239
+ - `bf16`: False
240
+ - `fp16`: True
241
+ - `fp16_opt_level`: O1
242
+ - `half_precision_backend`: auto
243
+ - `bf16_full_eval`: False
244
+ - `fp16_full_eval`: False
245
+ - `tf32`: None
246
+ - `local_rank`: 0
247
+ - `ddp_backend`: None
248
+ - `tpu_num_cores`: None
249
+ - `tpu_metrics_debug`: False
250
+ - `debug`: []
251
+ - `dataloader_drop_last`: False
252
+ - `dataloader_num_workers`: 16
253
+ - `dataloader_prefetch_factor`: None
254
+ - `past_index`: -1
255
+ - `disable_tqdm`: False
256
+ - `remove_unused_columns`: True
257
+ - `label_names`: None
258
+ - `load_best_model_at_end`: False
259
+ - `ignore_data_skip`: False
260
+ - `fsdp`: []
261
+ - `fsdp_min_num_params`: 0
262
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
263
+ - `fsdp_transformer_layer_cls_to_wrap`: None
264
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
265
+ - `deepspeed`: None
266
+ - `label_smoothing_factor`: 0.0
267
+ - `optim`: adamw_torch
268
+ - `optim_args`: None
269
+ - `adafactor`: False
270
+ - `group_by_length`: False
271
+ - `length_column_name`: length
272
+ - `ddp_find_unused_parameters`: None
273
+ - `ddp_bucket_cap_mb`: None
274
+ - `ddp_broadcast_buffers`: False
275
+ - `dataloader_pin_memory`: True
276
+ - `dataloader_persistent_workers`: False
277
+ - `skip_memory_metrics`: True
278
+ - `use_legacy_prediction_loop`: False
279
+ - `push_to_hub`: False
280
+ - `resume_from_checkpoint`: None
281
+ - `hub_model_id`: None
282
+ - `hub_strategy`: every_save
283
+ - `hub_private_repo`: False
284
+ - `hub_always_push`: False
285
+ - `gradient_checkpointing`: False
286
+ - `gradient_checkpointing_kwargs`: None
287
+ - `include_inputs_for_metrics`: False
288
+ - `eval_do_concat_batches`: True
289
+ - `fp16_backend`: auto
290
+ - `push_to_hub_model_id`: None
291
+ - `push_to_hub_organization`: None
292
+ - `mp_parameters`:
293
+ - `auto_find_batch_size`: False
294
+ - `full_determinism`: False
295
+ - `torchdynamo`: None
296
+ - `ray_scope`: last
297
+ - `ddp_timeout`: 1800
298
+ - `torch_compile`: False
299
+ - `torch_compile_backend`: None
300
+ - `torch_compile_mode`: None
301
+ - `dispatch_batches`: None
302
+ - `split_batches`: None
303
+ - `include_tokens_per_second`: False
304
+ - `include_num_input_tokens_seen`: False
305
+ - `neftune_noise_alpha`: None
306
+ - `optim_target_modules`: None
307
+ - `batch_eval_metrics`: False
308
+ - `eval_on_start`: False
309
+ - `batch_sampler`: no_duplicates
310
+ - `multi_dataset_batch_sampler`: proportional
311
+
312
+ </details>
313
+
314
+ ### Training Logs
315
+ <details><summary>Click to expand</summary>
316
+
317
+ | Epoch | Step | Training Loss |
318
+ |:------:|:-----:|:-------------:|
319
+ | 0.0533 | 100 | 12.0379 |
320
+ | 0.1067 | 200 | 9.2042 |
321
+ | 0.16 | 300 | 8.6521 |
322
+ | 0.2133 | 400 | 8.5353 |
323
+ | 0.2667 | 500 | 8.4472 |
324
+ | 0.32 | 600 | 8.4105 |
325
+ | 0.3733 | 700 | 8.3927 |
326
+ | 0.4267 | 800 | 8.3553 |
327
+ | 0.48 | 900 | 8.3326 |
328
+ | 0.5333 | 1000 | 8.3168 |
329
+ | 0.5867 | 1100 | 8.2941 |
330
+ | 0.64 | 1200 | 6.0021 |
331
+ | 0.6933 | 1300 | 5.3802 |
332
+ | 0.7467 | 1400 | 5.3282 |
333
+ | 0.8 | 1500 | 5.2365 |
334
+ | 0.8533 | 1600 | 5.0198 |
335
+ | 0.9067 | 1700 | 4.899 |
336
+ | 0.96 | 1800 | 4.8887 |
337
+ | 1.0133 | 1900 | 4.7603 |
338
+ | 1.0667 | 2000 | 4.6292 |
339
+ | 1.12 | 2100 | 4.4811 |
340
+ | 1.1733 | 2200 | 4.2841 |
341
+ | 1.2267 | 2300 | 4.2251 |
342
+ | 1.28 | 2400 | 4.0261 |
343
+ | 1.3333 | 2500 | 3.8628 |
344
+ | 1.3867 | 2600 | 3.8404 |
345
+ | 1.44 | 2700 | 3.6471 |
346
+ | 1.4933 | 2800 | 3.6673 |
347
+ | 1.5467 | 2900 | 3.5626 |
348
+ | 1.6 | 3000 | 3.5391 |
349
+ | 1.6533 | 3100 | 3.5629 |
350
+ | 1.7067 | 3200 | 3.4787 |
351
+ | 1.76 | 3300 | 3.4401 |
352
+ | 1.8133 | 3400 | 3.491 |
353
+ | 1.8667 | 3500 | 3.3358 |
354
+ | 1.92 | 3600 | 3.3555 |
355
+ | 1.9733 | 3700 | 3.161 |
356
+ | 2.0267 | 3800 | 3.1708 |
357
+ | 2.08 | 3900 | 3.1678 |
358
+ | 2.1333 | 4000 | 3.1348 |
359
+ | 2.1867 | 4100 | 2.9159 |
360
+ | 2.24 | 4200 | 2.8359 |
361
+ | 2.2933 | 4300 | 2.8359 |
362
+ | 2.3467 | 4400 | 2.796 |
363
+ | 2.4 | 4500 | 2.8483 |
364
+ | 2.4533 | 4600 | 2.7774 |
365
+ | 2.5067 | 4700 | 2.7766 |
366
+ | 2.56 | 4800 | 2.7185 |
367
+ | 2.6133 | 4900 | 2.778 |
368
+ | 2.6667 | 5000 | 2.7114 |
369
+ | 2.72 | 5100 | 2.6623 |
370
+ | 2.7733 | 5200 | 2.5093 |
371
+ | 2.8267 | 5300 | 2.4835 |
372
+ | 2.88 | 5400 | 2.2851 |
373
+ | 2.9333 | 5500 | 2.1488 |
374
+ | 2.9867 | 5600 | 2.2175 |
375
+ | 3.04 | 5700 | 2.0813 |
376
+ | 3.0933 | 5800 | 2.1489 |
377
+ | 3.1467 | 5900 | 2.1337 |
378
+ | 3.2 | 6000 | 2.2258 |
379
+ | 3.2533 | 6100 | 2.1601 |
380
+ | 3.3067 | 6200 | 1.9266 |
381
+ | 3.36 | 6300 | 1.8427 |
382
+ | 3.4133 | 6400 | 1.8434 |
383
+ | 3.4667 | 6500 | 1.917 |
384
+ | 3.52 | 6600 | 1.8204 |
385
+ | 3.5733 | 6700 | 2.0209 |
386
+ | 3.6267 | 6800 | 1.7852 |
387
+ | 3.68 | 6900 | 1.9566 |
388
+ | 3.7333 | 7000 | 1.852 |
389
+ | 3.7867 | 7100 | 1.8562 |
390
+ | 3.84 | 7200 | 1.7595 |
391
+ | 3.8933 | 7300 | 1.4295 |
392
+ | 3.9467 | 7400 | 1.2669 |
393
+ | 4.0 | 7500 | 1.2029 |
394
+ | 4.0533 | 7600 | 1.3074 |
395
+ | 4.1067 | 7700 | 1.435 |
396
+ | 4.16 | 7800 | 1.5712 |
397
+ | 4.2133 | 7900 | 1.2366 |
398
+ | 4.2667 | 8000 | 1.526 |
399
+ | 4.32 | 8100 | 1.2565 |
400
+ | 4.3733 | 8200 | 1.4546 |
401
+ | 4.4267 | 8300 | 1.374 |
402
+ | 4.48 | 8400 | 1.3387 |
403
+ | 4.5333 | 8500 | 1.3776 |
404
+ | 4.5867 | 8600 | 1.3984 |
405
+ | 4.64 | 8700 | 1.3577 |
406
+ | 4.6933 | 8800 | 1.2393 |
407
+ | 4.7467 | 8900 | 1.4125 |
408
+ | 4.8 | 9000 | 1.6127 |
409
+ | 4.8533 | 9100 | 1.6897 |
410
+ | 4.9067 | 9200 | 1.1217 |
411
+ | 4.96 | 9300 | 1.406 |
412
+ | 5.0133 | 9400 | 1.4641 |
413
+ | 5.0667 | 9500 | 1.48 |
414
+ | 5.12 | 9600 | 1.3367 |
415
+ | 5.1733 | 9700 | 1.4681 |
416
+ | 5.2267 | 9800 | 1.4628 |
417
+ | 5.28 | 9900 | 1.32 |
418
+ | 5.3333 | 10000 | 1.448 |
419
+ | 5.3867 | 10100 | 1.2516 |
420
+ | 5.44 | 10200 | 1.4421 |
421
+ | 5.4933 | 10300 | 1.2542 |
422
+ | 5.5467 | 10400 | 1.4545 |
423
+ | 5.6 | 10500 | 1.1441 |
424
+ | 5.6533 | 10600 | 1.251 |
425
+ | 5.7067 | 10700 | 1.3396 |
426
+ | 5.76 | 10800 | 1.0305 |
427
+ | 5.8133 | 10900 | 1.0155 |
428
+ | 5.8667 | 11000 | 0.9871 |
429
+ | 5.92 | 11100 | 1.074 |
430
+ | 5.9733 | 11200 | 0.4534 |
431
+ | 6.0267 | 11300 | 0.1965 |
432
+ | 6.08 | 11400 | 0.1822 |
433
+ | 6.1333 | 11500 | 0.2101 |
434
+ | 6.1867 | 11600 | 0.2326 |
435
+ | 6.24 | 11700 | 0.4126 |
436
+ | 6.2933 | 11800 | 0.4871 |
437
+ | 6.3467 | 11900 | 0.2012 |
438
+ | 6.4 | 12000 | 0.2113 |
439
+ | 6.4533 | 12100 | 0.1788 |
440
+ | 6.5067 | 12200 | 0.2271 |
441
+ | 6.56 | 12300 | 0.1685 |
442
+ | 6.6133 | 12400 | 0.3347 |
443
+ | 6.6667 | 12500 | 0.123 |
444
+ | 6.72 | 12600 | 0.155 |
445
+ | 6.7733 | 12700 | 0.2476 |
446
+ | 6.8267 | 12800 | 0.1926 |
447
+ | 6.88 | 12900 | 0.1394 |
448
+ | 6.9333 | 13000 | 0.1683 |
449
+ | 6.9867 | 13100 | 0.2484 |
450
+ | 7.04 | 13200 | 0.1338 |
451
+ | 7.0933 | 13300 | 0.1568 |
452
+ | 7.1467 | 13400 | 0.1206 |
453
+ | 7.2 | 13500 | 0.1683 |
454
+ | 7.2533 | 13600 | 0.1831 |
455
+ | 7.3067 | 13700 | 0.3077 |
456
+ | 7.36 | 13800 | 0.3533 |
457
+ | 7.4133 | 13900 | 0.1165 |
458
+ | 7.4667 | 14000 | 0.2128 |
459
+ | 7.52 | 14100 | 0.236 |
460
+ | 7.5733 | 14200 | 0.3616 |
461
+ | 7.6267 | 14300 | 0.2989 |
462
+ | 7.68 | 14400 | 0.2416 |
463
+ | 7.7333 | 14500 | 0.2105 |
464
+ | 7.7867 | 14600 | 0.1575 |
465
+ | 7.84 | 14700 | 0.224 |
466
+ | 7.8933 | 14800 | 0.1593 |
467
+ | 7.9467 | 14900 | 0.1293 |
468
+ | 8.0 | 15000 | 0.0985 |
469
+
470
+ </details>
471
+
472
+ ### Framework Versions
473
+ - Python: 3.10.12
474
+ - Sentence Transformers: 3.0.1
475
+ - Transformers: 4.42.4
476
+ - PyTorch: 2.3.1+cu121
477
+ - Accelerate: 0.33.0
478
+ - Datasets: 2.20.0
479
+ - Tokenizers: 0.19.1
480
+
481
+ ## Citation
482
+
483
+ ### BibTeX
484
+
485
+ #### Sentence Transformers
486
+ ```bibtex
487
+ @inproceedings{reimers-2019-sentence-bert,
488
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
489
+ author = "Reimers, Nils and Gurevych, Iryna",
490
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
491
+ month = "11",
492
+ year = "2019",
493
+ publisher = "Association for Computational Linguistics",
494
+ url = "https://arxiv.org/abs/1908.10084",
495
+ }
496
+ ```
497
+
498
+ #### CoSENTLoss
499
+ ```bibtex
500
+ @online{kexuefm-8847,
501
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
502
+ author={Su Jianlin},
503
+ year={2022},
504
+ month={Jan},
505
+ url={https://kexue.fm/archives/8847},
506
+ }
507
+ ```
508
+
509
+ <!--
510
+ ## Glossary
511
+
512
+ *Clearly define terms in order to be accessible across audiences.*
513
+ -->
514
+
515
+ <!--
516
+ ## Model Card Authors
517
+
518
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
519
+ -->
520
+
521
+ <!--
522
+ ## Model Card Contact
523
+
524
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
525
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "models/sft-sql-embedding",
3
+ "architectures": [
4
+ "MPNetModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "eos_token_id": 2,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 768,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 3072,
14
+ "layer_norm_eps": 1e-05,
15
+ "max_position_embeddings": 514,
16
+ "model_type": "mpnet",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 12,
19
+ "pad_token_id": 1,
20
+ "relative_attention_num_buckets": 32,
21
+ "torch_dtype": "float32",
22
+ "transformers_version": "4.41.2",
23
+ "vocab_size": 30527
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.3.0+cpu"
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:862b852885ed728c86e8eb1c986309d9a6abfb4901fc9873c0e60c32d5cc8b0d
3
+ size 437967672
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": 384,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "[UNK]",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,72 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": true,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "104": {
36
+ "content": "[UNK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "30526": {
44
+ "content": "<mask>",
45
+ "lstrip": true,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ }
51
+ },
52
+ "bos_token": "<s>",
53
+ "clean_up_tokenization_spaces": true,
54
+ "cls_token": "<s>",
55
+ "do_lower_case": true,
56
+ "eos_token": "</s>",
57
+ "mask_token": "<mask>",
58
+ "max_length": 128,
59
+ "model_max_length": 384,
60
+ "pad_to_multiple_of": null,
61
+ "pad_token": "<pad>",
62
+ "pad_token_type_id": 0,
63
+ "padding_side": "right",
64
+ "sep_token": "</s>",
65
+ "stride": 0,
66
+ "strip_accents": null,
67
+ "tokenize_chinese_chars": true,
68
+ "tokenizer_class": "MPNetTokenizer",
69
+ "truncation_side": "right",
70
+ "truncation_strategy": "longest_first",
71
+ "unk_token": "[UNK]"
72
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff