manuel-couto-pintos commited on
Commit
eda33d2
1 Parent(s): e6b2d8a

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,520 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: microsoft/mpnet-base
3
+ datasets:
4
+ - sentence-transformers/all-nli
5
+ language:
6
+ - en
7
+ library_name: sentence-transformers
8
+ metrics:
9
+ - pearson_cosine
10
+ - spearman_cosine
11
+ - pearson_manhattan
12
+ - spearman_manhattan
13
+ - pearson_euclidean
14
+ - spearman_euclidean
15
+ - pearson_dot
16
+ - spearman_dot
17
+ - pearson_max
18
+ - spearman_max
19
+ pipeline_tag: sentence-similarity
20
+ tags:
21
+ - sentence-transformers
22
+ - sentence-similarity
23
+ - feature-extraction
24
+ - generated_from_trainer
25
+ - dataset_size:10000
26
+ - loss:MultipleNegativesRankingLoss
27
+ widget:
28
+ - source_sentence: A man dressed in yellow rescue gear walks in a field.
29
+ sentences:
30
+ - A person messes with some papers.
31
+ - The man is outdoors.
32
+ - The man is bowling.
33
+ - source_sentence: A young woman tennis player dressed in black carries many tennis
34
+ balls on her racket.
35
+ sentences:
36
+ - A young woman tennis player have many tennis balls.
37
+ - Two men are fishing.
38
+ - A young woman never wears white dress.
39
+ - source_sentence: An older gentleman enjoys a scenic stroll through the countryside.
40
+ sentences:
41
+ - A pirate boards the spaceship.
42
+ - A man walks the countryside.
43
+ - Girls standing at a whiteboard in front of class.
44
+ - source_sentence: A kid in a red and black coat is laying on his back in the snow
45
+ with his arm in the air and a red sled is next to him.
46
+ sentences:
47
+ - It is a cold day.
48
+ - A girl with her hands in a tub.
49
+ - The kid is on a sugar high.
50
+ - source_sentence: A young boy playing in the grass.
51
+ sentences:
52
+ - A woman in a restaurant.
53
+ - The boy is in the sand.
54
+ - There is a child in the grass.
55
+ model-index:
56
+ - name: SentenceTransformer based on microsoft/mpnet-base
57
+ results:
58
+ - task:
59
+ type: semantic-similarity
60
+ name: Semantic Similarity
61
+ dataset:
62
+ name: sts dev
63
+ type: sts-dev
64
+ metrics:
65
+ - type: pearson_cosine
66
+ value: 0.8037115824193053
67
+ name: Pearson Cosine
68
+ - type: spearman_cosine
69
+ value: 0.8280034834882098
70
+ name: Spearman Cosine
71
+ - type: pearson_manhattan
72
+ value: 0.8246115594820148
73
+ name: Pearson Manhattan
74
+ - type: spearman_manhattan
75
+ value: 0.8246698532463935
76
+ name: Spearman Manhattan
77
+ - type: pearson_euclidean
78
+ value: 0.8269079166689298
79
+ name: Pearson Euclidean
80
+ - type: spearman_euclidean
81
+ value: 0.8265033797728895
82
+ name: Spearman Euclidean
83
+ - type: pearson_dot
84
+ value: 0.7864251532602605
85
+ name: Pearson Dot
86
+ - type: spearman_dot
87
+ value: 0.7996406955949785
88
+ name: Spearman Dot
89
+ - type: pearson_max
90
+ value: 0.8269079166689298
91
+ name: Pearson Max
92
+ - type: spearman_max
93
+ value: 0.8280034834882098
94
+ name: Spearman Max
95
+ - task:
96
+ type: semantic-similarity
97
+ name: Semantic Similarity
98
+ dataset:
99
+ name: sts test
100
+ type: sts-test
101
+ metrics:
102
+ - type: pearson_cosine
103
+ value: 0.7555884394670088
104
+ name: Pearson Cosine
105
+ - type: spearman_cosine
106
+ value: 0.7629008268135758
107
+ name: Spearman Cosine
108
+ - type: pearson_manhattan
109
+ value: 0.7748676335047628
110
+ name: Pearson Manhattan
111
+ - type: spearman_manhattan
112
+ value: 0.7596079881029025
113
+ name: Spearman Manhattan
114
+ - type: pearson_euclidean
115
+ value: 0.7763712683425394
116
+ name: Pearson Euclidean
117
+ - type: spearman_euclidean
118
+ value: 0.7608569856209585
119
+ name: Spearman Euclidean
120
+ - type: pearson_dot
121
+ value: 0.735478302248904
122
+ name: Pearson Dot
123
+ - type: spearman_dot
124
+ value: 0.729962390312057
125
+ name: Spearman Dot
126
+ - type: pearson_max
127
+ value: 0.7763712683425394
128
+ name: Pearson Max
129
+ - type: spearman_max
130
+ value: 0.7629008268135758
131
+ name: Spearman Max
132
+ ---
133
+
134
+ # SentenceTransformer based on microsoft/mpnet-base
135
+
136
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) on the [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli) 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.
137
+
138
+ ## Model Details
139
+
140
+ ### Model Description
141
+ - **Model Type:** Sentence Transformer
142
+ - **Base model:** [microsoft/mpnet-base](https://huggingface.co/microsoft/mpnet-base) <!-- at revision 6996ce1e91bd2a9c7d7f61daec37463394f73f09 -->
143
+ - **Maximum Sequence Length:** 512 tokens
144
+ - **Output Dimensionality:** 768 tokens
145
+ - **Similarity Function:** Cosine Similarity
146
+ - **Training Dataset:**
147
+ - [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
148
+ - **Language:** en
149
+ <!-- - **License:** Unknown -->
150
+
151
+ ### Model Sources
152
+
153
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
154
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
155
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
156
+
157
+ ### Full Model Architecture
158
+
159
+ ```
160
+ SentenceTransformer(
161
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': False}) with Transformer model: MPNetModel
162
+ (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})
163
+ )
164
+ ```
165
+
166
+ ## Usage
167
+
168
+ ### Direct Usage (Sentence Transformers)
169
+
170
+ First install the Sentence Transformers library:
171
+
172
+ ```bash
173
+ pip install -U sentence-transformers
174
+ ```
175
+
176
+ Then you can load this model and run inference.
177
+ ```python
178
+ from sentence_transformers import SentenceTransformer
179
+
180
+ # Download from the 🤗 Hub
181
+ model = SentenceTransformer("manuel-couto-pintos/mpnet-base-nli-v2")
182
+ # Run inference
183
+ sentences = [
184
+ 'A young boy playing in the grass.',
185
+ 'There is a child in the grass.',
186
+ 'The boy is in the sand.',
187
+ ]
188
+ embeddings = model.encode(sentences)
189
+ print(embeddings.shape)
190
+ # [3, 768]
191
+
192
+ # Get the similarity scores for the embeddings
193
+ similarities = model.similarity(embeddings, embeddings)
194
+ print(similarities.shape)
195
+ # [3, 3]
196
+ ```
197
+
198
+ <!--
199
+ ### Direct Usage (Transformers)
200
+
201
+ <details><summary>Click to see the direct usage in Transformers</summary>
202
+
203
+ </details>
204
+ -->
205
+
206
+ <!--
207
+ ### Downstream Usage (Sentence Transformers)
208
+
209
+ You can finetune this model on your own dataset.
210
+
211
+ <details><summary>Click to expand</summary>
212
+
213
+ </details>
214
+ -->
215
+
216
+ <!--
217
+ ### Out-of-Scope Use
218
+
219
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
220
+ -->
221
+
222
+ ## Evaluation
223
+
224
+ ### Metrics
225
+
226
+ #### Semantic Similarity
227
+ * Dataset: `sts-dev`
228
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
229
+
230
+ | Metric | Value |
231
+ |:--------------------|:----------|
232
+ | pearson_cosine | 0.8037 |
233
+ | **spearman_cosine** | **0.828** |
234
+ | pearson_manhattan | 0.8246 |
235
+ | spearman_manhattan | 0.8247 |
236
+ | pearson_euclidean | 0.8269 |
237
+ | spearman_euclidean | 0.8265 |
238
+ | pearson_dot | 0.7864 |
239
+ | spearman_dot | 0.7996 |
240
+ | pearson_max | 0.8269 |
241
+ | spearman_max | 0.828 |
242
+
243
+ #### Semantic Similarity
244
+ * Dataset: `sts-test`
245
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
246
+
247
+ | Metric | Value |
248
+ |:--------------------|:-----------|
249
+ | pearson_cosine | 0.7556 |
250
+ | **spearman_cosine** | **0.7629** |
251
+ | pearson_manhattan | 0.7749 |
252
+ | spearman_manhattan | 0.7596 |
253
+ | pearson_euclidean | 0.7764 |
254
+ | spearman_euclidean | 0.7609 |
255
+ | pearson_dot | 0.7355 |
256
+ | spearman_dot | 0.73 |
257
+ | pearson_max | 0.7764 |
258
+ | spearman_max | 0.7629 |
259
+
260
+ <!--
261
+ ## Bias, Risks and Limitations
262
+
263
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
264
+ -->
265
+
266
+ <!--
267
+ ### Recommendations
268
+
269
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
270
+ -->
271
+
272
+ ## Training Details
273
+
274
+ ### Training Dataset
275
+
276
+ #### sentence-transformers/all-nli
277
+
278
+ * Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
279
+ * Size: 10,000 training samples
280
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
281
+ * Approximate statistics based on the first 1000 samples:
282
+ | | anchor | positive | negative |
283
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|
284
+ | type | string | string | string |
285
+ | details | <ul><li>min: 7 tokens</li><li>mean: 10.46 tokens</li><li>max: 46 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 12.81 tokens</li><li>max: 40 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 13.4 tokens</li><li>max: 50 tokens</li></ul> |
286
+ * Samples:
287
+ | anchor | positive | negative |
288
+ |:---------------------------------------------------------------------------|:-------------------------------------------------|:-----------------------------------------------------------|
289
+ | <code>A person on a horse jumps over a broken down airplane.</code> | <code>A person is outdoors, on a horse.</code> | <code>A person is at a diner, ordering an omelette.</code> |
290
+ | <code>Children smiling and waving at camera</code> | <code>There are children present</code> | <code>The kids are frowning</code> |
291
+ | <code>A boy is jumping on skateboard in the middle of a red bridge.</code> | <code>The boy does a skateboarding trick.</code> | <code>The boy skates down the sidewalk.</code> |
292
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
293
+ ```json
294
+ {
295
+ "scale": 20.0,
296
+ "similarity_fct": "cos_sim"
297
+ }
298
+ ```
299
+
300
+ ### Evaluation Dataset
301
+
302
+ #### sentence-transformers/all-nli
303
+
304
+ * Dataset: [sentence-transformers/all-nli](https://huggingface.co/datasets/sentence-transformers/all-nli)
305
+ * Size: 1,000 evaluation samples
306
+ * Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
307
+ * Approximate statistics based on the first 1000 samples:
308
+ | | anchor | positive | negative |
309
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
310
+ | type | string | string | string |
311
+ | details | <ul><li>min: 6 tokens</li><li>mean: 17.95 tokens</li><li>max: 63 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.78 tokens</li><li>max: 29 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.35 tokens</li><li>max: 29 tokens</li></ul> |
312
+ * Samples:
313
+ | anchor | positive | negative |
314
+ |:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------|:--------------------------------------------------------|
315
+ | <code>Two women are embracing while holding to go packages.</code> | <code>Two woman are holding packages.</code> | <code>The men are fighting outside a deli.</code> |
316
+ | <code>Two young children in blue jerseys, one with the number 9 and one with the number 2 are standing on wooden steps in a bathroom and washing their hands in a sink.</code> | <code>Two kids in numbered jerseys wash their hands.</code> | <code>Two kids in jackets walk to school.</code> |
317
+ | <code>A man selling donuts to a customer during a world exhibition event held in the city of Angeles</code> | <code>A man selling donuts to a customer.</code> | <code>A woman drinks her coffee in a small cafe.</code> |
318
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
319
+ ```json
320
+ {
321
+ "scale": 20.0,
322
+ "similarity_fct": "cos_sim"
323
+ }
324
+ ```
325
+
326
+ ### Training Hyperparameters
327
+ #### Non-Default Hyperparameters
328
+
329
+ - `eval_strategy`: steps
330
+ - `per_device_train_batch_size`: 128
331
+ - `per_device_eval_batch_size`: 128
332
+ - `num_train_epochs`: 1
333
+ - `warmup_ratio`: 0.1
334
+ - `fp16`: True
335
+ - `batch_sampler`: no_duplicates
336
+
337
+ #### All Hyperparameters
338
+ <details><summary>Click to expand</summary>
339
+
340
+ - `overwrite_output_dir`: False
341
+ - `do_predict`: False
342
+ - `eval_strategy`: steps
343
+ - `prediction_loss_only`: True
344
+ - `per_device_train_batch_size`: 128
345
+ - `per_device_eval_batch_size`: 128
346
+ - `per_gpu_train_batch_size`: None
347
+ - `per_gpu_eval_batch_size`: None
348
+ - `gradient_accumulation_steps`: 1
349
+ - `eval_accumulation_steps`: None
350
+ - `learning_rate`: 5e-05
351
+ - `weight_decay`: 0.0
352
+ - `adam_beta1`: 0.9
353
+ - `adam_beta2`: 0.999
354
+ - `adam_epsilon`: 1e-08
355
+ - `max_grad_norm`: 1.0
356
+ - `num_train_epochs`: 1
357
+ - `max_steps`: -1
358
+ - `lr_scheduler_type`: linear
359
+ - `lr_scheduler_kwargs`: {}
360
+ - `warmup_ratio`: 0.1
361
+ - `warmup_steps`: 0
362
+ - `log_level`: passive
363
+ - `log_level_replica`: warning
364
+ - `log_on_each_node`: True
365
+ - `logging_nan_inf_filter`: True
366
+ - `save_safetensors`: True
367
+ - `save_on_each_node`: False
368
+ - `save_only_model`: False
369
+ - `restore_callback_states_from_checkpoint`: False
370
+ - `no_cuda`: False
371
+ - `use_cpu`: False
372
+ - `use_mps_device`: False
373
+ - `seed`: 42
374
+ - `data_seed`: None
375
+ - `jit_mode_eval`: False
376
+ - `use_ipex`: False
377
+ - `bf16`: False
378
+ - `fp16`: True
379
+ - `fp16_opt_level`: O1
380
+ - `half_precision_backend`: auto
381
+ - `bf16_full_eval`: False
382
+ - `fp16_full_eval`: False
383
+ - `tf32`: None
384
+ - `local_rank`: 0
385
+ - `ddp_backend`: None
386
+ - `tpu_num_cores`: None
387
+ - `tpu_metrics_debug`: False
388
+ - `debug`: []
389
+ - `dataloader_drop_last`: False
390
+ - `dataloader_num_workers`: 0
391
+ - `dataloader_prefetch_factor`: None
392
+ - `past_index`: -1
393
+ - `disable_tqdm`: False
394
+ - `remove_unused_columns`: True
395
+ - `label_names`: None
396
+ - `load_best_model_at_end`: False
397
+ - `ignore_data_skip`: False
398
+ - `fsdp`: []
399
+ - `fsdp_min_num_params`: 0
400
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
401
+ - `fsdp_transformer_layer_cls_to_wrap`: None
402
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
403
+ - `deepspeed`: None
404
+ - `label_smoothing_factor`: 0.0
405
+ - `optim`: adamw_torch
406
+ - `optim_args`: None
407
+ - `adafactor`: False
408
+ - `group_by_length`: False
409
+ - `length_column_name`: length
410
+ - `ddp_find_unused_parameters`: None
411
+ - `ddp_bucket_cap_mb`: None
412
+ - `ddp_broadcast_buffers`: False
413
+ - `dataloader_pin_memory`: True
414
+ - `dataloader_persistent_workers`: False
415
+ - `skip_memory_metrics`: True
416
+ - `use_legacy_prediction_loop`: False
417
+ - `push_to_hub`: False
418
+ - `resume_from_checkpoint`: None
419
+ - `hub_model_id`: None
420
+ - `hub_strategy`: every_save
421
+ - `hub_private_repo`: False
422
+ - `hub_always_push`: False
423
+ - `gradient_checkpointing`: False
424
+ - `gradient_checkpointing_kwargs`: None
425
+ - `include_inputs_for_metrics`: False
426
+ - `eval_do_concat_batches`: True
427
+ - `fp16_backend`: auto
428
+ - `push_to_hub_model_id`: None
429
+ - `push_to_hub_organization`: None
430
+ - `mp_parameters`:
431
+ - `auto_find_batch_size`: False
432
+ - `full_determinism`: False
433
+ - `torchdynamo`: None
434
+ - `ray_scope`: last
435
+ - `ddp_timeout`: 1800
436
+ - `torch_compile`: False
437
+ - `torch_compile_backend`: None
438
+ - `torch_compile_mode`: None
439
+ - `dispatch_batches`: None
440
+ - `split_batches`: None
441
+ - `include_tokens_per_second`: False
442
+ - `include_num_input_tokens_seen`: False
443
+ - `neftune_noise_alpha`: None
444
+ - `optim_target_modules`: None
445
+ - `batch_eval_metrics`: False
446
+ - `eval_on_start`: False
447
+ - `batch_sampler`: no_duplicates
448
+ - `multi_dataset_batch_sampler`: proportional
449
+
450
+ </details>
451
+
452
+ ### Training Logs
453
+ | Epoch | Step | loss | sts-dev_spearman_cosine | sts-test_spearman_cosine |
454
+ |:------:|:----:|:------:|:-----------------------:|:------------------------:|
455
+ | 0 | 0 | - | 0.6320 | - |
456
+ | 0.1266 | 10 | 3.9540 | 0.7586 | - |
457
+ | 0.2532 | 20 | 1.4977 | 0.8334 | - |
458
+ | 0.3797 | 30 | 1.3551 | 0.8398 | - |
459
+ | 0.5063 | 40 | 1.5181 | 0.8434 | - |
460
+ | 0.6329 | 50 | 1.4927 | 0.8335 | - |
461
+ | 0.7595 | 60 | 1.5868 | 0.8287 | - |
462
+ | 0.8861 | 70 | 1.5348 | 0.8280 | - |
463
+ | 1.0 | 79 | - | - | 0.7629 |
464
+
465
+
466
+ ### Framework Versions
467
+ - Python: 3.10.13
468
+ - Sentence Transformers: 3.0.1
469
+ - Transformers: 4.42.1
470
+ - PyTorch: 2.0.1+cu117
471
+ - Accelerate: 0.34.0
472
+ - Datasets: 2.15.0
473
+ - Tokenizers: 0.19.1
474
+
475
+ ## Citation
476
+
477
+ ### BibTeX
478
+
479
+ #### Sentence Transformers
480
+ ```bibtex
481
+ @inproceedings{reimers-2019-sentence-bert,
482
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
483
+ author = "Reimers, Nils and Gurevych, Iryna",
484
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
485
+ month = "11",
486
+ year = "2019",
487
+ publisher = "Association for Computational Linguistics",
488
+ url = "https://arxiv.org/abs/1908.10084",
489
+ }
490
+ ```
491
+
492
+ #### MultipleNegativesRankingLoss
493
+ ```bibtex
494
+ @misc{henderson2017efficient,
495
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
496
+ author={Matthew Henderson and Rami Al-Rfou and Brian Strope and Yun-hsuan Sung and Laszlo Lukacs and Ruiqi Guo and Sanjiv Kumar and Balint Miklos and Ray Kurzweil},
497
+ year={2017},
498
+ eprint={1705.00652},
499
+ archivePrefix={arXiv},
500
+ primaryClass={cs.CL}
501
+ }
502
+ ```
503
+
504
+ <!--
505
+ ## Glossary
506
+
507
+ *Clearly define terms in order to be accessible across audiences.*
508
+ -->
509
+
510
+ <!--
511
+ ## Model Card Authors
512
+
513
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
514
+ -->
515
+
516
+ <!--
517
+ ## Model Card Contact
518
+
519
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
520
+ -->
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.42.1",
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.42.1",
5
+ "pytorch": "2.0.1+cu117"
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:3fc297e71e130333436776514ab20c370e0c766897ff93e9671fd3941c427b2c
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