pauhidalgoo commited on
Commit
7a3dff5
1 Parent(s): 3388491

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,556 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - en
4
+ - ca
5
+ license: apache-2.0
6
+ library_name: sentence-transformers
7
+ tags:
8
+ - sentence-transformers
9
+ - sentence-similarity
10
+ - feature-extraction
11
+ - dataset_size:1K<n<10K
12
+ - loss:CoSENTLoss
13
+ base_model: microsoft/mpnet-base
14
+ metrics:
15
+ - pearson_cosine
16
+ - spearman_cosine
17
+ - pearson_manhattan
18
+ - spearman_manhattan
19
+ - pearson_euclidean
20
+ - spearman_euclidean
21
+ - pearson_dot
22
+ - spearman_dot
23
+ - pearson_max
24
+ - spearman_max
25
+ widget:
26
+ - source_sentence: Dia Internacional del Nen Prematur
27
+ sentences:
28
+ - Premiats a les comarques de Barcelona
29
+ - Les concordances són adjectiu / substantiu o verb / substantiu.
30
+ - Els Mossos en busquen un altre, que va aconseguir fugir en ser enxampats 'in fraganti'
31
+ - source_sentence: Vulneració del dret a la llibertat
32
+ sentences:
33
+ - Vulneració del dret a un jutge imparcial
34
+ - Detenen un home a Malgrat de Mar per apallissar un escombriaire
35
+ - La víctima ha rebut un cop de puny i ha caigut a terra inconscient
36
+ - source_sentence: Agafem un taxi i ens plantem allà.
37
+ sentences:
38
+ - És una activitat gratuïta oberta al públic general.
39
+ - El líder del PSC, Miquel Iceta, serà el nou president del Senat
40
+ - El PSOE ja no descarta l’aplicació de l’article 155 de la Constitució a Catalunya
41
+ - source_sentence: No ho entenc, però és el que hi ha.
42
+ sentences:
43
+ - és dels plats que a casa ens encanten!
44
+ - El Punt d'Informació Juvenil és el servei més actiu del centre.
45
+ - Puigdemont reunirà dimecres a Bèlgica els diputats de JxCat
46
+ - source_sentence: Però que hi ha de cert en tot això?
47
+ sentences:
48
+ - Però, què hi ha de veritat en tot això?
49
+ - Els camioners dissolen la marxa lenta a les rondes de Barcelona
50
+ - El 112 atén 747.730 trucades durant el primer semestre, un 9,6% més que l'any
51
+ passat
52
+ pipeline_tag: sentence-similarity
53
+ model-index:
54
+ - name: MPNet base trained on semantic text similarity
55
+ results:
56
+ - task:
57
+ type: semantic-similarity
58
+ name: Semantic Similarity
59
+ dataset:
60
+ name: Unknown
61
+ type: unknown
62
+ metrics:
63
+ - type: pearson_cosine
64
+ value: 0.9369799393019737
65
+ name: Pearson Cosine
66
+ - type: spearman_cosine
67
+ value: 0.991833254558149
68
+ name: Spearman Cosine
69
+ - type: pearson_manhattan
70
+ value: 0.9582116235734125
71
+ name: Pearson Manhattan
72
+ - type: spearman_manhattan
73
+ value: 0.9876060961452328
74
+ name: Spearman Manhattan
75
+ - type: pearson_euclidean
76
+ value: 0.9594231143506534
77
+ name: Pearson Euclidean
78
+ - type: spearman_euclidean
79
+ value: 0.9887559900790531
80
+ name: Spearman Euclidean
81
+ - type: pearson_dot
82
+ value: 0.9469313911363318
83
+ name: Pearson Dot
84
+ - type: spearman_dot
85
+ value: 0.9834282009396937
86
+ name: Spearman Dot
87
+ - type: pearson_max
88
+ value: 0.9594231143506534
89
+ name: Pearson Max
90
+ - type: spearman_max
91
+ value: 0.991833254558149
92
+ name: Spearman Max
93
+ - type: pearson_cosine
94
+ value: 0.5855972037779524
95
+ name: Pearson Cosine
96
+ - type: spearman_cosine
97
+ value: 0.5854785473306573
98
+ name: Spearman Cosine
99
+ - type: pearson_manhattan
100
+ value: 0.5881281979560977
101
+ name: Pearson Manhattan
102
+ - type: spearman_manhattan
103
+ value: 0.578667646485271
104
+ name: Spearman Manhattan
105
+ - type: pearson_euclidean
106
+ value: 0.5851079475768374
107
+ name: Pearson Euclidean
108
+ - type: spearman_euclidean
109
+ value: 0.5754637407144132
110
+ name: Spearman Euclidean
111
+ - type: pearson_dot
112
+ value: 0.5612927132777441
113
+ name: Pearson Dot
114
+ - type: spearman_dot
115
+ value: 0.5630862098985
116
+ name: Spearman Dot
117
+ - type: pearson_max
118
+ value: 0.5881281979560977
119
+ name: Pearson Max
120
+ - type: spearman_max
121
+ value: 0.5854785473306573
122
+ name: Spearman Max
123
+ - type: pearson_cosine
124
+ value: 0.6501162382185041
125
+ name: Pearson Cosine
126
+ - type: spearman_cosine
127
+ value: 0.6819594226888658
128
+ name: Spearman Cosine
129
+ - type: pearson_manhattan
130
+ value: 0.6517756634326819
131
+ name: Pearson Manhattan
132
+ - type: spearman_manhattan
133
+ value: 0.6701084565797553
134
+ name: Spearman Manhattan
135
+ - type: pearson_euclidean
136
+ value: 0.6553647425414415
137
+ name: Pearson Euclidean
138
+ - type: spearman_euclidean
139
+ value: 0.675292747578234
140
+ name: Spearman Euclidean
141
+ - type: pearson_dot
142
+ value: 0.6350099608995957
143
+ name: Pearson Dot
144
+ - type: spearman_dot
145
+ value: 0.6458150666120989
146
+ name: Spearman Dot
147
+ - type: pearson_max
148
+ value: 0.6553647425414415
149
+ name: Pearson Max
150
+ - type: spearman_max
151
+ value: 0.6819594226888658
152
+ name: Spearman Max
153
+ ---
154
+
155
+ # MPNet base trained on semantic text similarity
156
+
157
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) on the [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca) 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.
158
+
159
+ ## Model Details
160
+
161
+ ### Model Description
162
+ - **Model Type:** Sentence Transformer
163
+ - **Base model:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) <!-- at revision 6996ce1e91bd2a9c7d7f61daec37463394f73f09 -->
164
+ - **Maximum Sequence Length:** 512 tokens
165
+ - **Output Dimensionality:** 768 tokens
166
+ - **Similarity Function:** Cosine Similarity
167
+ - **Training Dataset:**
168
+ - [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca)
169
+ - **Languages:** en, ca
170
+ - **License:** apache-2.0
171
+
172
+ ### Model Sources
173
+
174
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
175
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
176
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
177
+
178
+ ### Full Model Architecture
179
+
180
+ ```
181
+ SentenceTransformer(
182
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
183
+ (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})
184
+ )
185
+ ```
186
+
187
+ ## Usage
188
+
189
+ ### Direct Usage (Sentence Transformers)
190
+
191
+ First install the Sentence Transformers library:
192
+
193
+ ```bash
194
+ pip install -U sentence-transformers
195
+ ```
196
+
197
+ Then you can load this model and run inference.
198
+ ```python
199
+ from sentence_transformers import SentenceTransformer
200
+
201
+ # Download from the 🤗 Hub
202
+ model = SentenceTransformer("pauhidalgoo/finetuned-sts-ca-mpnet-base")
203
+ # Run inference
204
+ sentences = [
205
+ 'Però que hi ha de cert en tot això?',
206
+ 'Però, què hi ha de veritat en tot això?',
207
+ 'Els camioners dissolen la marxa lenta a les rondes de Barcelona',
208
+ ]
209
+ embeddings = model.encode(sentences)
210
+ print(embeddings.shape)
211
+ # [3, 768]
212
+
213
+ # Get the similarity scores for the embeddings
214
+ similarities = model.similarity(embeddings, embeddings)
215
+ print(similarities.shape)
216
+ # [3, 3]
217
+ ```
218
+
219
+ <!--
220
+ ### Direct Usage (Transformers)
221
+
222
+ <details><summary>Click to see the direct usage in Transformers</summary>
223
+
224
+ </details>
225
+ -->
226
+
227
+ <!--
228
+ ### Downstream Usage (Sentence Transformers)
229
+
230
+ You can finetune this model on your own dataset.
231
+
232
+ <details><summary>Click to expand</summary>
233
+
234
+ </details>
235
+ -->
236
+
237
+ <!--
238
+ ### Out-of-Scope Use
239
+
240
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
241
+ -->
242
+
243
+ ## Evaluation
244
+
245
+ ### Metrics
246
+
247
+ #### Semantic Similarity
248
+
249
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
250
+
251
+ | Metric | Value |
252
+ |:--------------------|:-----------|
253
+ | pearson_cosine | 0.937 |
254
+ | **spearman_cosine** | **0.9918** |
255
+ | pearson_manhattan | 0.9582 |
256
+ | spearman_manhattan | 0.9876 |
257
+ | pearson_euclidean | 0.9594 |
258
+ | spearman_euclidean | 0.9888 |
259
+ | pearson_dot | 0.9469 |
260
+ | spearman_dot | 0.9834 |
261
+ | pearson_max | 0.9594 |
262
+ | spearman_max | 0.9918 |
263
+
264
+ #### Semantic Similarity
265
+
266
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
267
+
268
+ | Metric | Value |
269
+ |:--------------------|:-----------|
270
+ | pearson_cosine | 0.5856 |
271
+ | **spearman_cosine** | **0.5855** |
272
+ | pearson_manhattan | 0.5881 |
273
+ | spearman_manhattan | 0.5787 |
274
+ | pearson_euclidean | 0.5851 |
275
+ | spearman_euclidean | 0.5755 |
276
+ | pearson_dot | 0.5613 |
277
+ | spearman_dot | 0.5631 |
278
+ | pearson_max | 0.5881 |
279
+ | spearman_max | 0.5855 |
280
+
281
+ #### Semantic Similarity
282
+
283
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
284
+
285
+ | Metric | Value |
286
+ |:--------------------|:----------|
287
+ | pearson_cosine | 0.6501 |
288
+ | **spearman_cosine** | **0.682** |
289
+ | pearson_manhattan | 0.6518 |
290
+ | spearman_manhattan | 0.6701 |
291
+ | pearson_euclidean | 0.6554 |
292
+ | spearman_euclidean | 0.6753 |
293
+ | pearson_dot | 0.635 |
294
+ | spearman_dot | 0.6458 |
295
+ | pearson_max | 0.6554 |
296
+ | spearman_max | 0.682 |
297
+
298
+ <!--
299
+ ## Bias, Risks and Limitations
300
+
301
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
302
+ -->
303
+
304
+ <!--
305
+ ### Recommendations
306
+
307
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
308
+ -->
309
+
310
+ ## Training Details
311
+
312
+ ### Training Dataset
313
+
314
+ #### projecte-aina/sts-ca
315
+
316
+ * Dataset: [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca)
317
+ * Size: 2,073 training samples
318
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
319
+ * Approximate statistics based on the first 1000 samples:
320
+ | | sentence1 | sentence2 | label |
321
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
322
+ | type | string | string | float |
323
+ | details | <ul><li>min: 10 tokens</li><li>mean: 32.36 tokens</li><li>max: 82 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 30.57 tokens</li><li>max: 68 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 2.56</li><li>max: 5.0</li></ul> |
324
+ * Samples:
325
+ | sentence1 | sentence2 | label |
326
+ |:-------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|
327
+ | <code>Atorga per primer cop les mencions Encarna Sanahuja a la inclusió de la perspectiva de gènere en docència Universitària</code> | <code>Creen la menció M. Encarna Sanahuja a la inclusió de la perspectiva de gènere en docència universitària</code> | <code>3.5</code> |
328
+ | <code>Finalment, afegiu-hi els bolets que haureu saltat en una paella amb oli i deixeu-ho coure tot junt durant 5 minuts.</code> | <code>Finalment, poseu-hi les minipastanagues tallades a dauets, els pèsols, rectifiqueu-ho de sal i deixeu-ho coure tot junt durant un parell de minuts més.</code> | <code>1.25</code> |
329
+ | <code>El TC suspèn el pla d'acció exterior i de relacions amb la UE de la Generalitat</code> | <code>El Constitucional manté la suspensió del pla estratègic d'acció exterior i relacions amb la UE</code> | <code>3.6700000762939453</code> |
330
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
331
+ ```json
332
+ {
333
+ "scale": 20.0,
334
+ "similarity_fct": "pairwise_cos_sim"
335
+ }
336
+ ```
337
+
338
+ ### Evaluation Dataset
339
+
340
+ #### projecte-aina/sts-ca
341
+
342
+ * Dataset: [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca)
343
+ * Size: 500 evaluation samples
344
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
345
+ * Approximate statistics based on the first 1000 samples:
346
+ | | sentence1 | sentence2 | label |
347
+ |:--------|:-----------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:---------------------------------------------------------------|
348
+ | type | string | string | float |
349
+ | details | <ul><li>min: 10 tokens</li><li>mean: 32.94 tokens</li><li>max: 68 tokens</li></ul> | <ul><li>min: 12 tokens</li><li>mean: 31.42 tokens</li><li>max: 69 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 2.58</li><li>max: 5.0</li></ul> |
350
+ * Samples:
351
+ | sentence1 | sentence2 | label |
352
+ |:---------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|
353
+ | <code>L'euríbor puja una centèsima fins el -0,189% al gener després de setze mesos de caigudes</code> | <code>La morositat de bancs i caixes repunta moderadament fins el 9,44%, després d'onze mesos de caigudes</code> | <code>1.6699999570846558</code> |
354
+ | <code>Demanen 3 anys de presó a l'ex treballador d'una farmàcia de Lleida per robar més de 550 unitats de Viagra i Cialis</code> | <code>L'extreballador d'una farmàcia de Lleida accepta sis mesos de presó per robar més de 500 unitats de Viagra i Cialis</code> | <code>2.0</code> |
355
+ | <code>Es tracta d'un jove de 20 anys que ha estat denunciat als Mossos d'Esquadra</code> | <code>Es tracta d'un jove de 21 anys que ha estat denunciat penalment pels Mossos</code> | <code>3.0</code> |
356
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
357
+ ```json
358
+ {
359
+ "scale": 20.0,
360
+ "similarity_fct": "pairwise_cos_sim"
361
+ }
362
+ ```
363
+
364
+ ### Training Hyperparameters
365
+ #### Non-Default Hyperparameters
366
+
367
+ - `per_device_train_batch_size`: 16
368
+ - `per_device_eval_batch_size`: 16
369
+ - `num_train_epochs`: 40
370
+ - `warmup_ratio`: 0.1
371
+ - `fp16`: True
372
+
373
+ #### All Hyperparameters
374
+ <details><summary>Click to expand</summary>
375
+
376
+ - `overwrite_output_dir`: False
377
+ - `do_predict`: False
378
+ - `eval_strategy`: no
379
+ - `prediction_loss_only`: True
380
+ - `per_device_train_batch_size`: 16
381
+ - `per_device_eval_batch_size`: 16
382
+ - `per_gpu_train_batch_size`: None
383
+ - `per_gpu_eval_batch_size`: None
384
+ - `gradient_accumulation_steps`: 1
385
+ - `eval_accumulation_steps`: None
386
+ - `learning_rate`: 5e-05
387
+ - `weight_decay`: 0.0
388
+ - `adam_beta1`: 0.9
389
+ - `adam_beta2`: 0.999
390
+ - `adam_epsilon`: 1e-08
391
+ - `max_grad_norm`: 1.0
392
+ - `num_train_epochs`: 40
393
+ - `max_steps`: -1
394
+ - `lr_scheduler_type`: linear
395
+ - `lr_scheduler_kwargs`: {}
396
+ - `warmup_ratio`: 0.1
397
+ - `warmup_steps`: 0
398
+ - `log_level`: passive
399
+ - `log_level_replica`: warning
400
+ - `log_on_each_node`: True
401
+ - `logging_nan_inf_filter`: True
402
+ - `save_safetensors`: True
403
+ - `save_on_each_node`: False
404
+ - `save_only_model`: False
405
+ - `restore_callback_states_from_checkpoint`: False
406
+ - `no_cuda`: False
407
+ - `use_cpu`: False
408
+ - `use_mps_device`: False
409
+ - `seed`: 42
410
+ - `data_seed`: None
411
+ - `jit_mode_eval`: False
412
+ - `use_ipex`: False
413
+ - `bf16`: False
414
+ - `fp16`: True
415
+ - `fp16_opt_level`: O1
416
+ - `half_precision_backend`: auto
417
+ - `bf16_full_eval`: False
418
+ - `fp16_full_eval`: False
419
+ - `tf32`: None
420
+ - `local_rank`: 0
421
+ - `ddp_backend`: None
422
+ - `tpu_num_cores`: None
423
+ - `tpu_metrics_debug`: False
424
+ - `debug`: []
425
+ - `dataloader_drop_last`: False
426
+ - `dataloader_num_workers`: 0
427
+ - `dataloader_prefetch_factor`: None
428
+ - `past_index`: -1
429
+ - `disable_tqdm`: False
430
+ - `remove_unused_columns`: True
431
+ - `label_names`: None
432
+ - `load_best_model_at_end`: False
433
+ - `ignore_data_skip`: False
434
+ - `fsdp`: []
435
+ - `fsdp_min_num_params`: 0
436
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
437
+ - `fsdp_transformer_layer_cls_to_wrap`: None
438
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
439
+ - `deepspeed`: None
440
+ - `label_smoothing_factor`: 0.0
441
+ - `optim`: adamw_torch
442
+ - `optim_args`: None
443
+ - `adafactor`: False
444
+ - `group_by_length`: False
445
+ - `length_column_name`: length
446
+ - `ddp_find_unused_parameters`: None
447
+ - `ddp_bucket_cap_mb`: None
448
+ - `ddp_broadcast_buffers`: False
449
+ - `dataloader_pin_memory`: True
450
+ - `dataloader_persistent_workers`: False
451
+ - `skip_memory_metrics`: True
452
+ - `use_legacy_prediction_loop`: False
453
+ - `push_to_hub`: False
454
+ - `resume_from_checkpoint`: None
455
+ - `hub_model_id`: None
456
+ - `hub_strategy`: every_save
457
+ - `hub_private_repo`: False
458
+ - `hub_always_push`: False
459
+ - `gradient_checkpointing`: False
460
+ - `gradient_checkpointing_kwargs`: None
461
+ - `include_inputs_for_metrics`: False
462
+ - `eval_do_concat_batches`: True
463
+ - `fp16_backend`: auto
464
+ - `push_to_hub_model_id`: None
465
+ - `push_to_hub_organization`: None
466
+ - `mp_parameters`:
467
+ - `auto_find_batch_size`: False
468
+ - `full_determinism`: False
469
+ - `torchdynamo`: None
470
+ - `ray_scope`: last
471
+ - `ddp_timeout`: 1800
472
+ - `torch_compile`: False
473
+ - `torch_compile_backend`: None
474
+ - `torch_compile_mode`: None
475
+ - `dispatch_batches`: None
476
+ - `split_batches`: None
477
+ - `include_tokens_per_second`: False
478
+ - `include_num_input_tokens_seen`: False
479
+ - `neftune_noise_alpha`: None
480
+ - `optim_target_modules`: None
481
+ - `batch_eval_metrics`: False
482
+ - `batch_sampler`: batch_sampler
483
+ - `multi_dataset_batch_sampler`: proportional
484
+
485
+ </details>
486
+
487
+ ### Training Logs
488
+ | Epoch | Step | Training Loss | spearman_cosine |
489
+ |:-------:|:----:|:-------------:|:---------------:|
490
+ | 3.8462 | 500 | 4.5209 | - |
491
+ | 7.6923 | 1000 | 4.1445 | - |
492
+ | 11.5385 | 1500 | 3.9291 | - |
493
+ | 15.3846 | 2000 | 3.6952 | - |
494
+ | 19.2308 | 2500 | 3.5393 | - |
495
+ | 23.0769 | 3000 | 3.3778 | - |
496
+ | 26.9231 | 3500 | 3.1712 | - |
497
+ | 30.7692 | 4000 | 2.8265 | - |
498
+ | 34.6154 | 4500 | 2.6265 | - |
499
+ | 38.4615 | 5000 | 2.3259 | - |
500
+ | 40.0 | 5200 | - | 0.6820 |
501
+
502
+
503
+ ### Framework Versions
504
+ - Python: 3.10.12
505
+ - Sentence Transformers: 3.0.0
506
+ - Transformers: 4.41.1
507
+ - PyTorch: 2.3.0+cu121
508
+ - Accelerate: 0.30.1
509
+ - Datasets: 2.19.2
510
+ - Tokenizers: 0.19.1
511
+
512
+ ## Citation
513
+
514
+ ### BibTeX
515
+
516
+ #### Sentence Transformers
517
+ ```bibtex
518
+ @inproceedings{reimers-2019-sentence-bert,
519
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
520
+ author = "Reimers, Nils and Gurevych, Iryna",
521
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
522
+ month = "11",
523
+ year = "2019",
524
+ publisher = "Association for Computational Linguistics",
525
+ url = "https://arxiv.org/abs/1908.10084",
526
+ }
527
+ ```
528
+
529
+ #### CoSENTLoss
530
+ ```bibtex
531
+ @online{kexuefm-8847,
532
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
533
+ author={Su Jianlin},
534
+ year={2022},
535
+ month={Jan},
536
+ url={https://kexue.fm/archives/8847},
537
+ }
538
+ ```
539
+
540
+ <!--
541
+ ## Glossary
542
+
543
+ *Clearly define terms in order to be accessible across audiences.*
544
+ -->
545
+
546
+ <!--
547
+ ## Model Card Authors
548
+
549
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
550
+ -->
551
+
552
+ <!--
553
+ ## Model Card Contact
554
+
555
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
556
+ -->
config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "microsoft/mpnet-base",
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.1",
23
+ "vocab_size": 30527
24
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.0.0",
4
+ "transformers": "4.41.1",
5
+ "pytorch": "2.3.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:a59f3bb767db8f36339e5130becaa643563e96cdc95199662177a641878ce119
3
+ size 437967672
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<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": true,
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": true,
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,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "model_max_length": 512,
59
+ "pad_token": "<pad>",
60
+ "sep_token": "</s>",
61
+ "strip_accents": null,
62
+ "tokenize_chinese_chars": true,
63
+ "tokenizer_class": "MPNetTokenizer",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff