ymelka commited on
Commit
f09530d
1 Parent(s): b082feb

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,581 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ language:
3
+ - de
4
+ - en
5
+ - es
6
+ - fr
7
+ - it
8
+ - nl
9
+ - pl
10
+ - pt
11
+ - ru
12
+ - zh
13
+ library_name: sentence-transformers
14
+ tags:
15
+ - sentence-transformers
16
+ - sentence-similarity
17
+ - feature-extraction
18
+ - generated_from_trainer
19
+ - dataset_size:5749
20
+ - loss:CoSENTLoss
21
+ base_model: ymelka/camembert-cosmetic-finetuned
22
+ datasets:
23
+ - PhilipMay/stsb_multi_mt
24
+ metrics:
25
+ - pearson_cosine
26
+ - spearman_cosine
27
+ - pearson_manhattan
28
+ - spearman_manhattan
29
+ - pearson_euclidean
30
+ - spearman_euclidean
31
+ - pearson_dot
32
+ - spearman_dot
33
+ - pearson_max
34
+ - spearman_max
35
+ widget:
36
+ - source_sentence: Nous nous déplaçons "... par rapport au cadre de repos cosmique
37
+ en mouvement ... à environ 371 km/s vers la constellation du Lion".
38
+ sentences:
39
+ - La dame a fait frire la viande panée dans de l'huile chaude.
40
+ - Il n'y a pas d'alambic qui ne soit pas relatif à un autre objet.
41
+ - Le joueur de basket-ball est sur le point de marquer des points pour son équipe.
42
+ - source_sentence: Le professeur Burkhauser a effectué des recherches approfondies
43
+ sur les personnes qui sont pénalisées par l'augmentation du salaire minimum.
44
+ sentences:
45
+ - Un adolescent parle à une fille par le biais d'une webcam.
46
+ - Une femme est en train de couper des oignons verts.
47
+ - Les lois sur le salaire minimum nuisent le plus aux personnes les moins qualifiées
48
+ et les moins productives.
49
+ - source_sentence: Bien que le terme "reine" puisse faire référence à la fois à la
50
+ reine régente (souveraine) ou à la reine consort, le roi a toujours été le souverain.
51
+ sentences:
52
+ - Des moutons paissent dans le champ devant une rangée d'arbres.
53
+ - Il y a une très bonne raison de ne pas appeler le conjoint de la Reine "Roi" -
54
+ parce qu'il n'est pas le Roi.
55
+ - Un groupe de personnes âgées pose autour d'une table à manger.
56
+ - source_sentence: Deux pygargues à tête blanche perchés sur une branche.
57
+ sentences:
58
+ - Un groupe de militaires joue dans un quintette de cuivres.
59
+ - Deux aigles sont perchés sur une branche.
60
+ - Un homme qui joue de la guitare sous la pluie.
61
+ - source_sentence: Un homme joue de la guitare.
62
+ sentences:
63
+ - Il est possible qu'un système solaire comme le nôtre existe en dehors d'une galaxie.
64
+ - Un homme joue de la flûte.
65
+ - Un homme est en train de manger une banane.
66
+ pipeline_tag: sentence-similarity
67
+ model-index:
68
+ - name: SentenceTransformer based on ymelka/camembert-cosmetic-finetuned
69
+ results:
70
+ - task:
71
+ type: semantic-similarity
72
+ name: Semantic Similarity
73
+ dataset:
74
+ name: stsb fr dev
75
+ type: stsb-fr-dev
76
+ metrics:
77
+ - type: pearson_cosine
78
+ value: 0.6401461834329478
79
+ name: Pearson Cosine
80
+ - type: spearman_cosine
81
+ value: 0.6661576168424006
82
+ name: Spearman Cosine
83
+ - type: pearson_manhattan
84
+ value: 0.7077411059971963
85
+ name: Pearson Manhattan
86
+ - type: spearman_manhattan
87
+ value: 0.7104395816607704
88
+ name: Spearman Manhattan
89
+ - type: pearson_euclidean
90
+ value: 0.6183470655093759
91
+ name: Pearson Euclidean
92
+ - type: spearman_euclidean
93
+ value: 0.6339424060254548
94
+ name: Spearman Euclidean
95
+ - type: pearson_dot
96
+ value: 0.18614455072383299
97
+ name: Pearson Dot
98
+ - type: spearman_dot
99
+ value: 0.21677402345623561
100
+ name: Spearman Dot
101
+ - type: pearson_max
102
+ value: 0.7077411059971963
103
+ name: Pearson Max
104
+ - type: spearman_max
105
+ value: 0.7104395816607704
106
+ name: Spearman Max
107
+ - type: pearson_cosine
108
+ value: 0.834390325106948
109
+ name: Pearson Cosine
110
+ - type: spearman_cosine
111
+ value: 0.8564941342147334
112
+ name: Spearman Cosine
113
+ - type: pearson_manhattan
114
+ value: 0.8518548236293758
115
+ name: Pearson Manhattan
116
+ - type: spearman_manhattan
117
+ value: 0.854193303324745
118
+ name: Spearman Manhattan
119
+ - type: pearson_euclidean
120
+ value: 0.8541012365072966
121
+ name: Pearson Euclidean
122
+ - type: spearman_euclidean
123
+ value: 0.8555434573522197
124
+ name: Spearman Euclidean
125
+ - type: pearson_dot
126
+ value: 0.4989804086580052
127
+ name: Pearson Dot
128
+ - type: spearman_dot
129
+ value: 0.5094008186566353
130
+ name: Spearman Dot
131
+ - type: pearson_max
132
+ value: 0.8541012365072966
133
+ name: Pearson Max
134
+ - type: spearman_max
135
+ value: 0.8564941342147334
136
+ name: Spearman Max
137
+ - task:
138
+ type: semantic-similarity
139
+ name: Semantic Similarity
140
+ dataset:
141
+ name: stsb fr test
142
+ type: stsb-fr-test
143
+ metrics:
144
+ - type: pearson_cosine
145
+ value: 0.7979696368103
146
+ name: Pearson Cosine
147
+ - type: spearman_cosine
148
+ value: 0.8219240068315988
149
+ name: Spearman Cosine
150
+ - type: pearson_manhattan
151
+ value: 0.8237827107867745
152
+ name: Pearson Manhattan
153
+ - type: spearman_manhattan
154
+ value: 0.8221440625680553
155
+ name: Spearman Manhattan
156
+ - type: pearson_euclidean
157
+ value: 0.8230384709547542
158
+ name: Pearson Euclidean
159
+ - type: spearman_euclidean
160
+ value: 0.8218369251066925
161
+ name: Spearman Euclidean
162
+ - type: pearson_dot
163
+ value: 0.4089365107737232
164
+ name: Pearson Dot
165
+ - type: spearman_dot
166
+ value: 0.4588995887587045
167
+ name: Spearman Dot
168
+ - type: pearson_max
169
+ value: 0.8237827107867745
170
+ name: Pearson Max
171
+ - type: spearman_max
172
+ value: 0.8221440625680553
173
+ name: Spearman Max
174
+ ---
175
+
176
+ # SentenceTransformer based on ymelka/camembert-cosmetic-finetuned
177
+
178
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [ymelka/camembert-cosmetic-finetuned](https://huggingface.co/ymelka/camembert-cosmetic-finetuned) on the [PhilipMay/stsb_multi_mt](https://huggingface.co/datasets/PhilipMay/stsb_multi_mt) 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.
179
+
180
+ ## Model Details
181
+
182
+ ### Model Description
183
+ - **Model Type:** Sentence Transformer
184
+ - **Base model:** [ymelka/camembert-cosmetic-finetuned](https://huggingface.co/ymelka/camembert-cosmetic-finetuned) <!-- at revision cd4cb90f9388340c5f02740130efd30336c08905 -->
185
+ - **Maximum Sequence Length:** 512 tokens
186
+ - **Output Dimensionality:** 768 tokens
187
+ - **Similarity Function:** Cosine Similarity
188
+ - **Training Dataset:**
189
+ - [PhilipMay/stsb_multi_mt](https://huggingface.co/datasets/PhilipMay/stsb_multi_mt)
190
+ - **Languages:** de, en, es, fr, it, nl, pl, pt, ru, zh
191
+ <!-- - **License:** Unknown -->
192
+
193
+ ### Model Sources
194
+
195
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
196
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
197
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
198
+
199
+ ### Full Model Architecture
200
+
201
+ ```
202
+ SentenceTransformer(
203
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: CamembertModel
204
+ (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})
205
+ )
206
+ ```
207
+
208
+ ## Usage
209
+
210
+ ### Direct Usage (Sentence Transformers)
211
+
212
+ First install the Sentence Transformers library:
213
+
214
+ ```bash
215
+ pip install -U sentence-transformers
216
+ ```
217
+
218
+ Then you can load this model and run inference.
219
+ ```python
220
+ from sentence_transformers import SentenceTransformer
221
+
222
+ # Download from the 🤗 Hub
223
+ model = SentenceTransformer("ymelka/camembert-cosmetic-similarity")
224
+ # Run inference
225
+ sentences = [
226
+ 'Un homme joue de la guitare.',
227
+ 'Un homme est en train de manger une banane.',
228
+ 'Un homme joue de la flûte.',
229
+ ]
230
+ embeddings = model.encode(sentences)
231
+ print(embeddings.shape)
232
+ # [3, 768]
233
+
234
+ # Get the similarity scores for the embeddings
235
+ similarities = model.similarity(embeddings, embeddings)
236
+ print(similarities.shape)
237
+ # [3, 3]
238
+ ```
239
+
240
+ <!--
241
+ ### Direct Usage (Transformers)
242
+
243
+ <details><summary>Click to see the direct usage in Transformers</summary>
244
+
245
+ </details>
246
+ -->
247
+
248
+ <!--
249
+ ### Downstream Usage (Sentence Transformers)
250
+
251
+ You can finetune this model on your own dataset.
252
+
253
+ <details><summary>Click to expand</summary>
254
+
255
+ </details>
256
+ -->
257
+
258
+ <!--
259
+ ### Out-of-Scope Use
260
+
261
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
262
+ -->
263
+
264
+ ## Evaluation
265
+
266
+ ### Metrics
267
+
268
+ #### Semantic Similarity
269
+ * Dataset: `stsb-fr-dev`
270
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
271
+
272
+ | Metric | Value |
273
+ |:--------------------|:-----------|
274
+ | pearson_cosine | 0.6401 |
275
+ | **spearman_cosine** | **0.6662** |
276
+ | pearson_manhattan | 0.7077 |
277
+ | spearman_manhattan | 0.7104 |
278
+ | pearson_euclidean | 0.6183 |
279
+ | spearman_euclidean | 0.6339 |
280
+ | pearson_dot | 0.1861 |
281
+ | spearman_dot | 0.2168 |
282
+ | pearson_max | 0.7077 |
283
+ | spearman_max | 0.7104 |
284
+
285
+ #### Semantic Similarity
286
+ * Dataset: `stsb-fr-dev`
287
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
288
+
289
+ | Metric | Value |
290
+ |:--------------------|:-----------|
291
+ | pearson_cosine | 0.8344 |
292
+ | **spearman_cosine** | **0.8565** |
293
+ | pearson_manhattan | 0.8519 |
294
+ | spearman_manhattan | 0.8542 |
295
+ | pearson_euclidean | 0.8541 |
296
+ | spearman_euclidean | 0.8555 |
297
+ | pearson_dot | 0.499 |
298
+ | spearman_dot | 0.5094 |
299
+ | pearson_max | 0.8541 |
300
+ | spearman_max | 0.8565 |
301
+
302
+ #### Semantic Similarity
303
+ * Dataset: `stsb-fr-test`
304
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
305
+
306
+ | Metric | Value |
307
+ |:--------------------|:-----------|
308
+ | pearson_cosine | 0.798 |
309
+ | **spearman_cosine** | **0.8219** |
310
+ | pearson_manhattan | 0.8238 |
311
+ | spearman_manhattan | 0.8221 |
312
+ | pearson_euclidean | 0.823 |
313
+ | spearman_euclidean | 0.8218 |
314
+ | pearson_dot | 0.4089 |
315
+ | spearman_dot | 0.4589 |
316
+ | pearson_max | 0.8238 |
317
+ | spearman_max | 0.8221 |
318
+
319
+ <!--
320
+ ## Bias, Risks and Limitations
321
+
322
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
323
+ -->
324
+
325
+ <!--
326
+ ### Recommendations
327
+
328
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
329
+ -->
330
+
331
+ ## Training Details
332
+
333
+ ### Training Dataset
334
+
335
+ #### PhilipMay/stsb_multi_mt
336
+
337
+ * Dataset: [PhilipMay/stsb_multi_mt](https://huggingface.co/datasets/PhilipMay/stsb_multi_mt) at [3acaa3d](https://huggingface.co/datasets/PhilipMay/stsb_multi_mt/tree/3acaa3dd8c91649e0b8e627ffad891f059e47c8c)
338
+ * Size: 5,749 training samples
339
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
340
+ * Approximate statistics based on the first 1000 samples:
341
+ | | sentence1 | sentence2 | score |
342
+ |:--------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:--------------------------------------------------------------|
343
+ | type | string | string | float |
344
+ | details | <ul><li>min: 6 tokens</li><li>mean: 11.1 tokens</li><li>max: 30 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 11.04 tokens</li><li>max: 26 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 2.7</li><li>max: 5.0</li></ul> |
345
+ * Samples:
346
+ | sentence1 | sentence2 | score |
347
+ |:-----------------------------------------------------------|:---------------------------------------------------------------------|:-------------------------------|
348
+ | <code>Un avion est en train de décoller.</code> | <code>Un avion est en train de décoller.</code> | <code>5.0</code> |
349
+ | <code>Un homme joue d'une grande flûte.</code> | <code>Un homme joue de la flûte.</code> | <code>3.799999952316284</code> |
350
+ | <code>Un homme étale du fromage râpé sur une pizza.</code> | <code>Un homme étale du fromage râpé sur une pizza non cuite.</code> | <code>3.799999952316284</code> |
351
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
352
+ ```json
353
+ {
354
+ "scale": 20.0,
355
+ "similarity_fct": "pairwise_cos_sim"
356
+ }
357
+ ```
358
+
359
+ ### Evaluation Dataset
360
+
361
+ #### PhilipMay/stsb_multi_mt
362
+
363
+ * Dataset: [PhilipMay/stsb_multi_mt](https://huggingface.co/datasets/PhilipMay/stsb_multi_mt) at [3acaa3d](https://huggingface.co/datasets/PhilipMay/stsb_multi_mt/tree/3acaa3dd8c91649e0b8e627ffad891f059e47c8c)
364
+ * Size: 1,500 evaluation samples
365
+ * Columns: <code>sentence1</code>, <code>sentence2</code>, and <code>score</code>
366
+ * Approximate statistics based on the first 1000 samples:
367
+ | | sentence1 | sentence2 | score |
368
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------|
369
+ | type | string | string | float |
370
+ | details | <ul><li>min: 6 tokens</li><li>mean: 17.45 tokens</li><li>max: 52 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 17.35 tokens</li><li>max: 48 tokens</li></ul> | <ul><li>min: 0.0</li><li>mean: 2.36</li><li>max: 5.0</li></ul> |
371
+ * Samples:
372
+ | sentence1 | sentence2 | score |
373
+ |:-------------------------------------------------------------------------|:----------------------------------------------------------------------------|:------------------|
374
+ | <code>Un homme avec un casque de sécurité est en train de danser.</code> | <code>Un homme portant un casque de sécurité est en train de danser.</code> | <code>5.0</code> |
375
+ | <code>Un jeune enfant monte à cheval.</code> | <code>Un enfant monte à cheval.</code> | <code>4.75</code> |
376
+ | <code>Un homme donne une souris à un serpent.</code> | <code>L'homme donne une souris au serpent.</code> | <code>5.0</code> |
377
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
378
+ ```json
379
+ {
380
+ "scale": 20.0,
381
+ "similarity_fct": "pairwise_cos_sim"
382
+ }
383
+ ```
384
+
385
+ ### Training Hyperparameters
386
+ #### Non-Default Hyperparameters
387
+
388
+ - `eval_strategy`: steps
389
+ - `per_device_train_batch_size`: 16
390
+ - `per_device_eval_batch_size`: 16
391
+ - `learning_rate`: 2e-05
392
+ - `weight_decay`: 0.01
393
+ - `warmup_ratio`: 0.1
394
+ - `bf16`: True
395
+ - `batch_sampler`: no_duplicates
396
+
397
+ #### All Hyperparameters
398
+ <details><summary>Click to expand</summary>
399
+
400
+ - `overwrite_output_dir`: False
401
+ - `do_predict`: False
402
+ - `eval_strategy`: steps
403
+ - `prediction_loss_only`: True
404
+ - `per_device_train_batch_size`: 16
405
+ - `per_device_eval_batch_size`: 16
406
+ - `per_gpu_train_batch_size`: None
407
+ - `per_gpu_eval_batch_size`: None
408
+ - `gradient_accumulation_steps`: 1
409
+ - `eval_accumulation_steps`: None
410
+ - `learning_rate`: 2e-05
411
+ - `weight_decay`: 0.01
412
+ - `adam_beta1`: 0.9
413
+ - `adam_beta2`: 0.999
414
+ - `adam_epsilon`: 1e-08
415
+ - `max_grad_norm`: 1.0
416
+ - `num_train_epochs`: 3
417
+ - `max_steps`: -1
418
+ - `lr_scheduler_type`: linear
419
+ - `lr_scheduler_kwargs`: {}
420
+ - `warmup_ratio`: 0.1
421
+ - `warmup_steps`: 0
422
+ - `log_level`: passive
423
+ - `log_level_replica`: warning
424
+ - `log_on_each_node`: True
425
+ - `logging_nan_inf_filter`: True
426
+ - `save_safetensors`: True
427
+ - `save_on_each_node`: False
428
+ - `save_only_model`: False
429
+ - `restore_callback_states_from_checkpoint`: False
430
+ - `no_cuda`: False
431
+ - `use_cpu`: False
432
+ - `use_mps_device`: False
433
+ - `seed`: 42
434
+ - `data_seed`: None
435
+ - `jit_mode_eval`: False
436
+ - `use_ipex`: False
437
+ - `bf16`: True
438
+ - `fp16`: False
439
+ - `fp16_opt_level`: O1
440
+ - `half_precision_backend`: auto
441
+ - `bf16_full_eval`: False
442
+ - `fp16_full_eval`: False
443
+ - `tf32`: None
444
+ - `local_rank`: 0
445
+ - `ddp_backend`: None
446
+ - `tpu_num_cores`: None
447
+ - `tpu_metrics_debug`: False
448
+ - `debug`: []
449
+ - `dataloader_drop_last`: False
450
+ - `dataloader_num_workers`: 0
451
+ - `dataloader_prefetch_factor`: None
452
+ - `past_index`: -1
453
+ - `disable_tqdm`: False
454
+ - `remove_unused_columns`: True
455
+ - `label_names`: None
456
+ - `load_best_model_at_end`: False
457
+ - `ignore_data_skip`: False
458
+ - `fsdp`: []
459
+ - `fsdp_min_num_params`: 0
460
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
461
+ - `fsdp_transformer_layer_cls_to_wrap`: None
462
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
463
+ - `deepspeed`: None
464
+ - `label_smoothing_factor`: 0.0
465
+ - `optim`: adamw_torch
466
+ - `optim_args`: None
467
+ - `adafactor`: False
468
+ - `group_by_length`: False
469
+ - `length_column_name`: length
470
+ - `ddp_find_unused_parameters`: None
471
+ - `ddp_bucket_cap_mb`: None
472
+ - `ddp_broadcast_buffers`: False
473
+ - `dataloader_pin_memory`: True
474
+ - `dataloader_persistent_workers`: False
475
+ - `skip_memory_metrics`: True
476
+ - `use_legacy_prediction_loop`: False
477
+ - `push_to_hub`: False
478
+ - `resume_from_checkpoint`: None
479
+ - `hub_model_id`: None
480
+ - `hub_strategy`: every_save
481
+ - `hub_private_repo`: False
482
+ - `hub_always_push`: False
483
+ - `gradient_checkpointing`: False
484
+ - `gradient_checkpointing_kwargs`: None
485
+ - `include_inputs_for_metrics`: False
486
+ - `eval_do_concat_batches`: True
487
+ - `fp16_backend`: auto
488
+ - `push_to_hub_model_id`: None
489
+ - `push_to_hub_organization`: None
490
+ - `mp_parameters`:
491
+ - `auto_find_batch_size`: False
492
+ - `full_determinism`: False
493
+ - `torchdynamo`: None
494
+ - `ray_scope`: last
495
+ - `ddp_timeout`: 1800
496
+ - `torch_compile`: False
497
+ - `torch_compile_backend`: None
498
+ - `torch_compile_mode`: None
499
+ - `dispatch_batches`: None
500
+ - `split_batches`: None
501
+ - `include_tokens_per_second`: False
502
+ - `include_num_input_tokens_seen`: False
503
+ - `neftune_noise_alpha`: None
504
+ - `optim_target_modules`: None
505
+ - `batch_eval_metrics`: False
506
+ - `batch_sampler`: no_duplicates
507
+ - `multi_dataset_batch_sampler`: proportional
508
+
509
+ </details>
510
+
511
+ ### Training Logs
512
+ | Epoch | Step | Training Loss | loss | stsb-fr-dev_spearman_cosine | stsb-fr-test_spearman_cosine |
513
+ |:------:|:----:|:-------------:|:------:|:---------------------------:|:----------------------------:|
514
+ | 0 | 0 | - | - | 0.6661 | - |
515
+ | 0.2778 | 100 | 4.9452 | 4.4417 | 0.7733 | - |
516
+ | 0.5556 | 200 | 4.667 | 4.4273 | 0.7986 | - |
517
+ | 0.8333 | 300 | 4.4904 | 4.3058 | 0.8338 | - |
518
+ | 1.1111 | 400 | 4.1679 | 4.2723 | 0.8491 | - |
519
+ | 1.3889 | 500 | 4.138 | 4.3575 | 0.8464 | - |
520
+ | 1.6667 | 600 | 4.5737 | 4.3427 | 0.8479 | - |
521
+ | 1.9444 | 700 | 4.3086 | 4.4455 | 0.8510 | - |
522
+ | 2.2222 | 800 | 3.8711 | 4.4135 | 0.8590 | - |
523
+ | 2.5 | 900 | 4.064 | 4.4775 | 0.8567 | - |
524
+ | 2.7778 | 1000 | 4.2255 | 4.4733 | 0.8565 | - |
525
+ | 3.0 | 1080 | - | - | - | 0.8219 |
526
+
527
+
528
+ ### Framework Versions
529
+ - Python: 3.10.12
530
+ - Sentence Transformers: 3.0.1
531
+ - Transformers: 4.41.2
532
+ - PyTorch: 2.3.0+cu121
533
+ - Accelerate: 0.31.0
534
+ - Datasets: 2.19.2
535
+ - Tokenizers: 0.19.1
536
+
537
+ ## Citation
538
+
539
+ ### BibTeX
540
+
541
+ #### Sentence Transformers
542
+ ```bibtex
543
+ @inproceedings{reimers-2019-sentence-bert,
544
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
545
+ author = "Reimers, Nils and Gurevych, Iryna",
546
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
547
+ month = "11",
548
+ year = "2019",
549
+ publisher = "Association for Computational Linguistics",
550
+ url = "https://arxiv.org/abs/1908.10084",
551
+ }
552
+ ```
553
+
554
+ #### CoSENTLoss
555
+ ```bibtex
556
+ @online{kexuefm-8847,
557
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
558
+ author={Su Jianlin},
559
+ year={2022},
560
+ month={Jan},
561
+ url={https://kexue.fm/archives/8847},
562
+ }
563
+ ```
564
+
565
+ <!--
566
+ ## Glossary
567
+
568
+ *Clearly define terms in order to be accessible across audiences.*
569
+ -->
570
+
571
+ <!--
572
+ ## Model Card Authors
573
+
574
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
575
+ -->
576
+
577
+ <!--
578
+ ## Model Card Contact
579
+
580
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
581
+ -->
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<unk>NOTUSED": 32005
3
+ }
config.json ADDED
@@ -0,0 +1,28 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "ymelka/camembert-cosmetic-finetuned",
3
+ "architectures": [
4
+ "CamembertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 5,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 6,
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 768,
13
+ "initializer_range": 0.02,
14
+ "intermediate_size": 3072,
15
+ "layer_norm_eps": 1e-05,
16
+ "max_position_embeddings": 514,
17
+ "model_type": "camembert",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "output_past": true,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "torch_dtype": "float32",
24
+ "transformers_version": "4.41.2",
25
+ "type_vocab_size": 1,
26
+ "use_cache": true,
27
+ "vocab_size": 32005
28
+ }
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+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:6f66d6be5bb6bba34ea50403bf4983ee4721b9b78dc9793bb7a0081fff3173f0
3
+ size 442510176
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
+ }
sentencepiece.bpe.model ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:988bc5a00281c6d210a5d34bd143d0363741a432fefe741bf71e61b1869d4314
3
+ size 810912
special_tokens_map.json ADDED
@@ -0,0 +1,56 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "additional_special_tokens": [
3
+ "<s>NOTUSED",
4
+ "</s>NOTUSED",
5
+ "<unk>NOTUSED"
6
+ ],
7
+ "bos_token": {
8
+ "content": "<s>",
9
+ "lstrip": false,
10
+ "normalized": false,
11
+ "rstrip": false,
12
+ "single_word": false
13
+ },
14
+ "cls_token": {
15
+ "content": "<s>",
16
+ "lstrip": false,
17
+ "normalized": false,
18
+ "rstrip": false,
19
+ "single_word": false
20
+ },
21
+ "eos_token": {
22
+ "content": "</s>",
23
+ "lstrip": false,
24
+ "normalized": false,
25
+ "rstrip": false,
26
+ "single_word": false
27
+ },
28
+ "mask_token": {
29
+ "content": "<mask>",
30
+ "lstrip": true,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false
34
+ },
35
+ "pad_token": {
36
+ "content": "<pad>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false
41
+ },
42
+ "sep_token": {
43
+ "content": "</s>",
44
+ "lstrip": false,
45
+ "normalized": false,
46
+ "rstrip": false,
47
+ "single_word": false
48
+ },
49
+ "unk_token": {
50
+ "content": "<unk>",
51
+ "lstrip": false,
52
+ "normalized": false,
53
+ "rstrip": false,
54
+ "single_word": false
55
+ }
56
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,90 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>NOTUSED",
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>NOTUSED",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "4": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "5": {
36
+ "content": "<s>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ },
43
+ "6": {
44
+ "content": "</s>",
45
+ "lstrip": false,
46
+ "normalized": false,
47
+ "rstrip": false,
48
+ "single_word": false,
49
+ "special": true
50
+ },
51
+ "32004": {
52
+ "content": "<mask>",
53
+ "lstrip": true,
54
+ "normalized": false,
55
+ "rstrip": false,
56
+ "single_word": false,
57
+ "special": true
58
+ },
59
+ "32005": {
60
+ "content": "<unk>NOTUSED",
61
+ "lstrip": false,
62
+ "normalized": false,
63
+ "rstrip": false,
64
+ "single_word": false,
65
+ "special": true
66
+ }
67
+ },
68
+ "additional_special_tokens": [
69
+ "<s>NOTUSED",
70
+ "</s>NOTUSED",
71
+ "<unk>NOTUSED"
72
+ ],
73
+ "bos_token": "<s>",
74
+ "clean_up_tokenization_spaces": true,
75
+ "cls_token": "<s>",
76
+ "eos_token": "</s>",
77
+ "mask_token": "<mask>",
78
+ "max_length": 512,
79
+ "model_max_length": 512,
80
+ "pad_to_multiple_of": null,
81
+ "pad_token": "<pad>",
82
+ "pad_token_type_id": 0,
83
+ "padding_side": "right",
84
+ "sep_token": "</s>",
85
+ "stride": 0,
86
+ "tokenizer_class": "CamembertTokenizer",
87
+ "truncation_side": "right",
88
+ "truncation_strategy": "longest_first",
89
+ "unk_token": "<unk>"
90
+ }