pauhidalgoo commited on
Commit
d81294c
1 Parent(s): d000696

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,551 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - ca
4
+ library_name: sentence-transformers
5
+ tags:
6
+ - sentence-transformers
7
+ - sentence-similarity
8
+ - feature-extraction
9
+ - dataset_size:1K<n<10K
10
+ - loss:CoSENTLoss
11
+ base_model: projecte-aina/roberta-base-ca-v2
12
+ metrics:
13
+ - pearson_cosine
14
+ - spearman_cosine
15
+ - pearson_manhattan
16
+ - spearman_manhattan
17
+ - pearson_euclidean
18
+ - spearman_euclidean
19
+ - pearson_dot
20
+ - spearman_dot
21
+ - pearson_max
22
+ - spearman_max
23
+ widget:
24
+ - source_sentence: Dia Internacional del Nen Prematur
25
+ sentences:
26
+ - El 'primer' Dia Internacional de la Dona
27
+ - Les concordances són adjectiu / substantiu o verb / substantiu.
28
+ - Es conserva la boca, per on s'entrava la llenya a la cambra de combustió.
29
+ - source_sentence: Vulneració del dret a la llibertat
30
+ sentences:
31
+ - Vulneració del dret a un jutge imparcial
32
+ - Detenen un home a Malgrat de Mar per apallissar un escombriaire
33
+ - Hi ha 1.298 nous positius, sumant ja un total de 26.032 casos, 2.249 greus
34
+ - source_sentence: Agafem un taxi i ens plantem allà.
35
+ sentences:
36
+ - Agafem un cotxe i ens dirigim cap a Marivent.
37
+ - El líder del PSC, Miquel Iceta, serà el nou president del Senat
38
+ - La mitjana anual és de -2.4 °C i la pluviometria de només 336 litres.
39
+ - source_sentence: No ho entenc, però és el que hi ha.
40
+ sentences:
41
+ - La meva percepció és ben diferent.
42
+ - El Punt d'Informació Juvenil és el servei més actiu del centre.
43
+ - Va ser el primer militant de la Joventut Comunista a ser diputat al Congrés.
44
+ - source_sentence: Però que hi ha de cert en tot això?
45
+ sentences:
46
+ - Però, què hi ha de veritat en tot això?
47
+ - Els camioners dissolen la marxa lenta a les rondes de Barcelona
48
+ - Catalunya és el destí preferit en càmpings, amb més de 1,8 milions de pernoctacions
49
+ pipeline_tag: sentence-similarity
50
+ model-index:
51
+ - name: SentenceTransformer based on projecte-aina/roberta-base-ca-v2
52
+ results:
53
+ - task:
54
+ type: semantic-similarity
55
+ name: Semantic Similarity
56
+ dataset:
57
+ name: Unknown
58
+ type: unknown
59
+ metrics:
60
+ - type: pearson_cosine
61
+ value: 0.9349981863430619
62
+ name: Pearson Cosine
63
+ - type: spearman_cosine
64
+ value: 0.9898745854094829
65
+ name: Spearman Cosine
66
+ - type: pearson_manhattan
67
+ value: 0.93632129298827
68
+ name: Pearson Manhattan
69
+ - type: spearman_manhattan
70
+ value: 0.9686713208543439
71
+ name: Spearman Manhattan
72
+ - type: pearson_euclidean
73
+ value: 0.937727418152861
74
+ name: Pearson Euclidean
75
+ - type: spearman_euclidean
76
+ value: 0.9702251672597351
77
+ name: Spearman Euclidean
78
+ - type: pearson_dot
79
+ value: 0.9162818325389069
80
+ name: Pearson Dot
81
+ - type: spearman_dot
82
+ value: 0.9364241335059265
83
+ name: Spearman Dot
84
+ - type: pearson_max
85
+ value: 0.937727418152861
86
+ name: Pearson Max
87
+ - type: spearman_max
88
+ value: 0.9898745854094829
89
+ name: Spearman Max
90
+ - type: pearson_cosine
91
+ value: 0.7184562914987533
92
+ name: Pearson Cosine
93
+ - type: spearman_cosine
94
+ value: 0.731194582268392
95
+ name: Spearman Cosine
96
+ - type: pearson_manhattan
97
+ value: 0.6843033521378273
98
+ name: Pearson Manhattan
99
+ - type: spearman_manhattan
100
+ value: 0.672243797555491
101
+ name: Spearman Manhattan
102
+ - type: pearson_euclidean
103
+ value: 0.6853003565335036
104
+ name: Pearson Euclidean
105
+ - type: spearman_euclidean
106
+ value: 0.6732492757969866
107
+ name: Spearman Euclidean
108
+ - type: pearson_dot
109
+ value: 0.591430532036044
110
+ name: Pearson Dot
111
+ - type: spearman_dot
112
+ value: 0.6075047296209968
113
+ name: Spearman Dot
114
+ - type: pearson_max
115
+ value: 0.7184562914987533
116
+ name: Pearson Max
117
+ - type: spearman_max
118
+ value: 0.731194582268392
119
+ name: Spearman Max
120
+ - type: pearson_cosine
121
+ value: 0.7428580994426089
122
+ name: Pearson Cosine
123
+ - type: spearman_cosine
124
+ value: 0.771439206347715
125
+ name: Spearman Cosine
126
+ - type: pearson_manhattan
127
+ value: 0.7146499318383212
128
+ name: Pearson Manhattan
129
+ - type: spearman_manhattan
130
+ value: 0.7266919074231987
131
+ name: Spearman Manhattan
132
+ - type: pearson_euclidean
133
+ value: 0.7136174727854737
134
+ name: Pearson Euclidean
135
+ - type: spearman_euclidean
136
+ value: 0.7268619569548143
137
+ name: Spearman Euclidean
138
+ - type: pearson_dot
139
+ value: 0.6408741655346061
140
+ name: Pearson Dot
141
+ - type: spearman_dot
142
+ value: 0.642786988233003
143
+ name: Spearman Dot
144
+ - type: pearson_max
145
+ value: 0.7428580994426089
146
+ name: Pearson Max
147
+ - type: spearman_max
148
+ value: 0.771439206347715
149
+ name: Spearman Max
150
+ ---
151
+
152
+ # SentenceTransformer based on projecte-aina/roberta-base-ca-v2
153
+
154
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [projecte-aina/roberta-base-ca-v2](https://huggingface.co/projecte-aina/roberta-base-ca-v2) 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.
155
+
156
+ ## Model Details
157
+
158
+ ### Model Description
159
+ - **Model Type:** Sentence Transformer
160
+ - **Base model:** [projecte-aina/roberta-base-ca-v2](https://huggingface.co/projecte-aina/roberta-base-ca-v2) <!-- at revision 772dfdf344529cf40009372bf14915c4a8aa1152 -->
161
+ - **Maximum Sequence Length:** 512 tokens
162
+ - **Output Dimensionality:** 768 tokens
163
+ - **Similarity Function:** Cosine Similarity
164
+ - **Training Dataset:**
165
+ - [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca)
166
+ - **Language:** ca
167
+ <!-- - **License:** Unknown -->
168
+
169
+ ### Model Sources
170
+
171
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
172
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
173
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
174
+
175
+ ### Full Model Architecture
176
+
177
+ ```
178
+ SentenceTransformer(
179
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: RobertaModel
180
+ (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})
181
+ )
182
+ ```
183
+
184
+ ## Usage
185
+
186
+ ### Direct Usage (Sentence Transformers)
187
+
188
+ First install the Sentence Transformers library:
189
+
190
+ ```bash
191
+ pip install -U sentence-transformers
192
+ ```
193
+
194
+ Then you can load this model and run inference.
195
+ ```python
196
+ from sentence_transformers import SentenceTransformer
197
+
198
+ # Download from the 🤗 Hub
199
+ model = SentenceTransformer("pauhidalgoo/finetuned-sts-roberta-base-ca-v2")
200
+ # Run inference
201
+ sentences = [
202
+ 'Però que hi ha de cert en tot això?',
203
+ 'Però, què hi ha de veritat en tot això?',
204
+ 'Els camioners dissolen la marxa lenta a les rondes de Barcelona',
205
+ ]
206
+ embeddings = model.encode(sentences)
207
+ print(embeddings.shape)
208
+ # [3, 768]
209
+
210
+ # Get the similarity scores for the embeddings
211
+ similarities = model.similarity(embeddings, embeddings)
212
+ print(similarities.shape)
213
+ # [3, 3]
214
+ ```
215
+
216
+ <!--
217
+ ### Direct Usage (Transformers)
218
+
219
+ <details><summary>Click to see the direct usage in Transformers</summary>
220
+
221
+ </details>
222
+ -->
223
+
224
+ <!--
225
+ ### Downstream Usage (Sentence Transformers)
226
+
227
+ You can finetune this model on your own dataset.
228
+
229
+ <details><summary>Click to expand</summary>
230
+
231
+ </details>
232
+ -->
233
+
234
+ <!--
235
+ ### Out-of-Scope Use
236
+
237
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
238
+ -->
239
+
240
+ ## Evaluation
241
+
242
+ ### Metrics
243
+
244
+ #### Semantic Similarity
245
+
246
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
247
+
248
+ | Metric | Value |
249
+ |:--------------------|:-----------|
250
+ | pearson_cosine | 0.935 |
251
+ | **spearman_cosine** | **0.9899** |
252
+ | pearson_manhattan | 0.9363 |
253
+ | spearman_manhattan | 0.9687 |
254
+ | pearson_euclidean | 0.9377 |
255
+ | spearman_euclidean | 0.9702 |
256
+ | pearson_dot | 0.9163 |
257
+ | spearman_dot | 0.9364 |
258
+ | pearson_max | 0.9377 |
259
+ | spearman_max | 0.9899 |
260
+
261
+ #### Semantic Similarity
262
+
263
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
264
+
265
+ | Metric | Value |
266
+ |:--------------------|:-----------|
267
+ | pearson_cosine | 0.7185 |
268
+ | **spearman_cosine** | **0.7312** |
269
+ | pearson_manhattan | 0.6843 |
270
+ | spearman_manhattan | 0.6722 |
271
+ | pearson_euclidean | 0.6853 |
272
+ | spearman_euclidean | 0.6732 |
273
+ | pearson_dot | 0.5914 |
274
+ | spearman_dot | 0.6075 |
275
+ | pearson_max | 0.7185 |
276
+ | spearman_max | 0.7312 |
277
+
278
+ #### Semantic Similarity
279
+
280
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
281
+
282
+ | Metric | Value |
283
+ |:--------------------|:-----------|
284
+ | pearson_cosine | 0.7429 |
285
+ | **spearman_cosine** | **0.7714** |
286
+ | pearson_manhattan | 0.7146 |
287
+ | spearman_manhattan | 0.7267 |
288
+ | pearson_euclidean | 0.7136 |
289
+ | spearman_euclidean | 0.7269 |
290
+ | pearson_dot | 0.6409 |
291
+ | spearman_dot | 0.6428 |
292
+ | pearson_max | 0.7429 |
293
+ | spearman_max | 0.7714 |
294
+
295
+ <!--
296
+ ## Bias, Risks and Limitations
297
+
298
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
299
+ -->
300
+
301
+ <!--
302
+ ### Recommendations
303
+
304
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
305
+ -->
306
+
307
+ ## Training Details
308
+
309
+ ### Training Dataset
310
+
311
+ #### projecte-aina/sts-ca
312
+
313
+ * Dataset: [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca)
314
+ * Size: 2,073 training samples
315
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
316
+ * Approximate statistics based on the first 1000 samples:
317
+ | | sentence1 | sentence2 | label |
318
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
319
+ | type | string | string | float |
320
+ | details | <ul><li>min: 7 tokens</li><li>mean: 22.3 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 7 tokens</li><li>mean: 21.07 tokens</li><li>max: 51 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 2.56</li><li>max: 5.0</li></ul> |
321
+ * Samples:
322
+ | sentence1 | sentence2 | label |
323
+ |:-------------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|
324
+ | <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> |
325
+ | <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> |
326
+ | <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> |
327
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
328
+ ```json
329
+ {
330
+ "scale": 20.0,
331
+ "similarity_fct": "pairwise_cos_sim"
332
+ }
333
+ ```
334
+
335
+ ### Evaluation Dataset
336
+
337
+ #### projecte-aina/sts-ca
338
+
339
+ * Dataset: [projecte-aina/sts-ca](https://huggingface.co/datasets/projecte-aina/sts-ca)
340
+ * Size: 500 evaluation samples
341
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>label</code>
342
+ * Approximate statistics based on the first 1000 samples:
343
+ | | sentence1 | sentence2 | label |
344
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
345
+ | type | string | string | float |
346
+ | details | <ul><li>min: 8 tokens</li><li>mean: 22.81 tokens</li><li>max: 60 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 21.94 tokens</li><li>max: 65 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 2.58</li><li>max: 5.0</li></ul> |
347
+ * Samples:
348
+ | sentence1 | sentence2 | label |
349
+ |:---------------------------------------------------------------------------------------------------------------------------------|:---------------------------------------------------------------------------------------------------------------------------------|:--------------------------------|
350
+ | <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> |
351
+ | <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> |
352
+ | <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> |
353
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
354
+ ```json
355
+ {
356
+ "scale": 20.0,
357
+ "similarity_fct": "pairwise_cos_sim"
358
+ }
359
+ ```
360
+
361
+ ### Training Hyperparameters
362
+ #### Non-Default Hyperparameters
363
+
364
+ - `per_device_train_batch_size`: 16
365
+ - `per_device_eval_batch_size`: 16
366
+ - `learning_rate`: 2e-05
367
+ - `weight_decay`: 0.01
368
+ - `num_train_epochs`: 25
369
+ - `warmup_ratio`: 0.1
370
+ - `fp16`: True
371
+
372
+ #### All Hyperparameters
373
+ <details><summary>Click to expand</summary>
374
+
375
+ - `overwrite_output_dir`: False
376
+ - `do_predict`: False
377
+ - `eval_strategy`: no
378
+ - `prediction_loss_only`: True
379
+ - `per_device_train_batch_size`: 16
380
+ - `per_device_eval_batch_size`: 16
381
+ - `per_gpu_train_batch_size`: None
382
+ - `per_gpu_eval_batch_size`: None
383
+ - `gradient_accumulation_steps`: 1
384
+ - `eval_accumulation_steps`: None
385
+ - `learning_rate`: 2e-05
386
+ - `weight_decay`: 0.01
387
+ - `adam_beta1`: 0.9
388
+ - `adam_beta2`: 0.999
389
+ - `adam_epsilon`: 1e-08
390
+ - `max_grad_norm`: 1.0
391
+ - `num_train_epochs`: 25
392
+ - `max_steps`: -1
393
+ - `lr_scheduler_type`: linear
394
+ - `lr_scheduler_kwargs`: {}
395
+ - `warmup_ratio`: 0.1
396
+ - `warmup_steps`: 0
397
+ - `log_level`: passive
398
+ - `log_level_replica`: warning
399
+ - `log_on_each_node`: True
400
+ - `logging_nan_inf_filter`: True
401
+ - `save_safetensors`: True
402
+ - `save_on_each_node`: False
403
+ - `save_only_model`: False
404
+ - `restore_callback_states_from_checkpoint`: False
405
+ - `no_cuda`: False
406
+ - `use_cpu`: False
407
+ - `use_mps_device`: False
408
+ - `seed`: 42
409
+ - `data_seed`: None
410
+ - `jit_mode_eval`: False
411
+ - `use_ipex`: False
412
+ - `bf16`: False
413
+ - `fp16`: True
414
+ - `fp16_opt_level`: O1
415
+ - `half_precision_backend`: auto
416
+ - `bf16_full_eval`: False
417
+ - `fp16_full_eval`: False
418
+ - `tf32`: None
419
+ - `local_rank`: 0
420
+ - `ddp_backend`: None
421
+ - `tpu_num_cores`: None
422
+ - `tpu_metrics_debug`: False
423
+ - `debug`: []
424
+ - `dataloader_drop_last`: False
425
+ - `dataloader_num_workers`: 0
426
+ - `dataloader_prefetch_factor`: None
427
+ - `past_index`: -1
428
+ - `disable_tqdm`: False
429
+ - `remove_unused_columns`: True
430
+ - `label_names`: None
431
+ - `load_best_model_at_end`: False
432
+ - `ignore_data_skip`: False
433
+ - `fsdp`: []
434
+ - `fsdp_min_num_params`: 0
435
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
436
+ - `fsdp_transformer_layer_cls_to_wrap`: None
437
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
438
+ - `deepspeed`: None
439
+ - `label_smoothing_factor`: 0.0
440
+ - `optim`: adamw_torch
441
+ - `optim_args`: None
442
+ - `adafactor`: False
443
+ - `group_by_length`: False
444
+ - `length_column_name`: length
445
+ - `ddp_find_unused_parameters`: None
446
+ - `ddp_bucket_cap_mb`: None
447
+ - `ddp_broadcast_buffers`: False
448
+ - `dataloader_pin_memory`: True
449
+ - `dataloader_persistent_workers`: False
450
+ - `skip_memory_metrics`: True
451
+ - `use_legacy_prediction_loop`: False
452
+ - `push_to_hub`: False
453
+ - `resume_from_checkpoint`: None
454
+ - `hub_model_id`: None
455
+ - `hub_strategy`: every_save
456
+ - `hub_private_repo`: False
457
+ - `hub_always_push`: False
458
+ - `gradient_checkpointing`: False
459
+ - `gradient_checkpointing_kwargs`: None
460
+ - `include_inputs_for_metrics`: False
461
+ - `eval_do_concat_batches`: True
462
+ - `fp16_backend`: auto
463
+ - `push_to_hub_model_id`: None
464
+ - `push_to_hub_organization`: None
465
+ - `mp_parameters`:
466
+ - `auto_find_batch_size`: False
467
+ - `full_determinism`: False
468
+ - `torchdynamo`: None
469
+ - `ray_scope`: last
470
+ - `ddp_timeout`: 1800
471
+ - `torch_compile`: False
472
+ - `torch_compile_backend`: None
473
+ - `torch_compile_mode`: None
474
+ - `dispatch_batches`: None
475
+ - `split_batches`: None
476
+ - `include_tokens_per_second`: False
477
+ - `include_num_input_tokens_seen`: False
478
+ - `neftune_noise_alpha`: None
479
+ - `optim_target_modules`: None
480
+ - `batch_eval_metrics`: False
481
+ - `batch_sampler`: batch_sampler
482
+ - `multi_dataset_batch_sampler`: proportional
483
+
484
+ </details>
485
+
486
+ ### Training Logs
487
+ | Epoch | Step | Training Loss | spearman_cosine |
488
+ |:-------:|:----:|:-------------:|:---------------:|
489
+ | 3.8462 | 500 | 4.3798 | - |
490
+ | 7.6923 | 1000 | 3.6486 | - |
491
+ | 11.5385 | 1500 | 3.2479 | - |
492
+ | 15.3846 | 2000 | 2.9539 | - |
493
+ | 19.2308 | 2500 | 2.6753 | - |
494
+ | 23.0769 | 3000 | 2.4955 | - |
495
+ | 25.0 | 3250 | - | 0.7714 |
496
+
497
+
498
+ ### Framework Versions
499
+ - Python: 3.10.12
500
+ - Sentence Transformers: 3.0.0
501
+ - Transformers: 4.41.1
502
+ - PyTorch: 2.3.0+cu121
503
+ - Accelerate: 0.30.1
504
+ - Datasets: 2.19.2
505
+ - Tokenizers: 0.19.1
506
+
507
+ ## Citation
508
+
509
+ ### BibTeX
510
+
511
+ #### Sentence Transformers
512
+ ```bibtex
513
+ @inproceedings{reimers-2019-sentence-bert,
514
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
515
+ author = "Reimers, Nils and Gurevych, Iryna",
516
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
517
+ month = "11",
518
+ year = "2019",
519
+ publisher = "Association for Computational Linguistics",
520
+ url = "https://arxiv.org/abs/1908.10084",
521
+ }
522
+ ```
523
+
524
+ #### CoSENTLoss
525
+ ```bibtex
526
+ @online{kexuefm-8847,
527
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
528
+ author={Su Jianlin},
529
+ year={2022},
530
+ month={Jan},
531
+ url={https://kexue.fm/archives/8847},
532
+ }
533
+ ```
534
+
535
+ <!--
536
+ ## Glossary
537
+
538
+ *Clearly define terms in order to be accessible across audiences.*
539
+ -->
540
+
541
+ <!--
542
+ ## Model Card Authors
543
+
544
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
545
+ -->
546
+
547
+ <!--
548
+ ## Model Card Contact
549
+
550
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
551
+ -->
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "projecte-aina/roberta-base-ca-v2",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 514,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.41.1",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 50262
28
+ }
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
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:f977a114b5a4323fa23957a3825b529a2a5c3fe14ba56c8ef2cf6accd478a12c
3
+ size 498595688
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": true,
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": true,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": true,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "<pad>",
32
+ "lstrip": false,
33
+ "normalized": true,
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": true,
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": true,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "<s>",
6
+ "lstrip": false,
7
+ "normalized": true,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "<pad>",
14
+ "lstrip": false,
15
+ "normalized": true,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "</s>",
22
+ "lstrip": false,
23
+ "normalized": true,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "<unk>",
30
+ "lstrip": false,
31
+ "normalized": true,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "<mask>",
38
+ "lstrip": true,
39
+ "normalized": true,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ }
44
+ },
45
+ "bos_token": "<s>",
46
+ "clean_up_tokenization_spaces": true,
47
+ "cls_token": "<s>",
48
+ "eos_token": "</s>",
49
+ "errors": "replace",
50
+ "mask_token": "<mask>",
51
+ "max_len": 512,
52
+ "model_max_length": 512,
53
+ "pad_token": "<pad>",
54
+ "sep_token": "</s>",
55
+ "tokenizer_class": "RobertaTokenizer",
56
+ "trim_offsets": true,
57
+ "unk_token": "<unk>"
58
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff