ostoveland commited on
Commit
7da27d4
1 Parent(s): 3686d3a

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,497 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ base_model: NbAiLab/nb-sbert-base
3
+ datasets: []
4
+ language: []
5
+ library_name: sentence-transformers
6
+ metrics:
7
+ - cosine_accuracy
8
+ - dot_accuracy
9
+ - manhattan_accuracy
10
+ - euclidean_accuracy
11
+ - max_accuracy
12
+ pipeline_tag: sentence-similarity
13
+ tags:
14
+ - sentence-transformers
15
+ - sentence-similarity
16
+ - feature-extraction
17
+ - generated_from_trainer
18
+ - dataset_size:96724
19
+ - loss:TripletLoss
20
+ - loss:MultipleNegativesRankingLoss
21
+ - loss:CoSENTLoss
22
+ widget:
23
+ - source_sentence: Fjerne 60 cm snø fra enebolig på 100 kvadratmeter
24
+ sentences:
25
+ - 'query: montere solskjerming inne'
26
+ - 'query: 150 meter grøfting'
27
+ - 'query: Snømåking på enebolig, 100 kvadratmeter'
28
+ - source_sentence: Renovering av bad
29
+ sentences:
30
+ - Asfaltere innkjørsel
31
+ - Nye garasjeporter m/åpner
32
+ - Totalrenovering av lite bad i Lillestrøm
33
+ - source_sentence: Lite tilbygg til eksisterende bolig
34
+ sentences:
35
+ - Renovere bolig
36
+ - Vi skal pusse opp kjøkken
37
+ - Bygge tilbygg
38
+ - source_sentence: Gulvlegging 6 kvm gang
39
+ sentences:
40
+ - Installere gulvvarme
41
+ - Montering av 8 spotlights brannsikre (4stk. på kjøket) og (2 stk i gangen)
42
+ - Legge parkett i gang
43
+ - source_sentence: Fullføre utvendig forefallent arbeid
44
+ sentences:
45
+ - Bytte av vinduer i hus
46
+ - elektriker på bolig på 120kvm
47
+ - Renovere bad
48
+ model-index:
49
+ - name: SentenceTransformer based on NbAiLab/nb-sbert-base
50
+ results:
51
+ - task:
52
+ type: triplet
53
+ name: Triplet
54
+ dataset:
55
+ name: test triplet evaluation
56
+ type: test-triplet-evaluation
57
+ metrics:
58
+ - type: cosine_accuracy
59
+ value: 0.9859055673009162
60
+ name: Cosine Accuracy
61
+ - type: dot_accuracy
62
+ value: 0.016913319238900635
63
+ name: Dot Accuracy
64
+ - type: manhattan_accuracy
65
+ value: 0.9844961240310077
66
+ name: Manhattan Accuracy
67
+ - type: euclidean_accuracy
68
+ value: 0.9837914023960536
69
+ name: Euclidean Accuracy
70
+ - type: max_accuracy
71
+ value: 0.9859055673009162
72
+ name: Max Accuracy
73
+ ---
74
+
75
+ # SentenceTransformer based on NbAiLab/nb-sbert-base
76
+
77
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [NbAiLab/nb-sbert-base](https://huggingface.co/NbAiLab/nb-sbert-base). 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.
78
+
79
+ ## Model Details
80
+
81
+ ### Model Description
82
+ - **Model Type:** Sentence Transformer
83
+ - **Base model:** [NbAiLab/nb-sbert-base](https://huggingface.co/NbAiLab/nb-sbert-base) <!-- at revision 56ae460305b0787432b6498e5adc17447e66fe66 -->
84
+ - **Maximum Sequence Length:** 75 tokens
85
+ - **Output Dimensionality:** 768 tokens
86
+ - **Similarity Function:** Cosine Similarity
87
+ <!-- - **Training Dataset:** Unknown -->
88
+ <!-- - **Language:** Unknown -->
89
+ <!-- - **License:** Unknown -->
90
+
91
+ ### Model Sources
92
+
93
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
94
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
95
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
96
+
97
+ ### Full Model Architecture
98
+
99
+ ```
100
+ SentenceTransformer(
101
+ (0): Transformer({'max_seq_length': 75, 'do_lower_case': False}) with Transformer model: BertModel
102
+ (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})
103
+ )
104
+ ```
105
+
106
+ ## Usage
107
+
108
+ ### Direct Usage (Sentence Transformers)
109
+
110
+ First install the Sentence Transformers library:
111
+
112
+ ```bash
113
+ pip install -U sentence-transformers
114
+ ```
115
+
116
+ Then you can load this model and run inference.
117
+ ```python
118
+ from sentence_transformers import SentenceTransformer
119
+
120
+ # Download from the 🤗 Hub
121
+ model = SentenceTransformer("ostoveland/SBertBaseMittanbudver1")
122
+ # Run inference
123
+ sentences = [
124
+ 'Fullføre utvendig forefallent arbeid',
125
+ 'elektriker på bolig på 120kvm',
126
+ 'Renovere bad',
127
+ ]
128
+ embeddings = model.encode(sentences)
129
+ print(embeddings.shape)
130
+ # [3, 768]
131
+
132
+ # Get the similarity scores for the embeddings
133
+ similarities = model.similarity(embeddings, embeddings)
134
+ print(similarities.shape)
135
+ # [3, 3]
136
+ ```
137
+
138
+ <!--
139
+ ### Direct Usage (Transformers)
140
+
141
+ <details><summary>Click to see the direct usage in Transformers</summary>
142
+
143
+ </details>
144
+ -->
145
+
146
+ <!--
147
+ ### Downstream Usage (Sentence Transformers)
148
+
149
+ You can finetune this model on your own dataset.
150
+
151
+ <details><summary>Click to expand</summary>
152
+
153
+ </details>
154
+ -->
155
+
156
+ <!--
157
+ ### Out-of-Scope Use
158
+
159
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
160
+ -->
161
+
162
+ ## Evaluation
163
+
164
+ ### Metrics
165
+
166
+ #### Triplet
167
+ * Dataset: `test-triplet-evaluation`
168
+ * Evaluated with [<code>TripletEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.TripletEvaluator)
169
+
170
+ | Metric | Value |
171
+ |:-------------------|:-----------|
172
+ | cosine_accuracy | 0.9859 |
173
+ | dot_accuracy | 0.0169 |
174
+ | manhattan_accuracy | 0.9845 |
175
+ | euclidean_accuracy | 0.9838 |
176
+ | **max_accuracy** | **0.9859** |
177
+
178
+ <!--
179
+ ## Bias, Risks and Limitations
180
+
181
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
182
+ -->
183
+
184
+ <!--
185
+ ### Recommendations
186
+
187
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
188
+ -->
189
+
190
+ ## Training Details
191
+
192
+ ### Training Datasets
193
+
194
+ #### Unnamed Dataset
195
+
196
+
197
+ * Size: 55,426 training samples
198
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
199
+ * Approximate statistics based on the first 1000 samples:
200
+ | | sentence_0 | sentence_1 | sentence_2 |
201
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
202
+ | type | string | string | string |
203
+ | details | <ul><li>min: 3 tokens</li><li>mean: 11.65 tokens</li><li>max: 44 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 10.92 tokens</li><li>max: 31 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 10.49 tokens</li><li>max: 35 tokens</li></ul> |
204
+ * Samples:
205
+ | sentence_0 | sentence_1 | sentence_2 |
206
+ |:----------------------------------------|:------------------------------------------|:-----------------------------------------------------------------|
207
+ | <code>Bygge støttemur</code> | <code>Støttemur</code> | <code>Bytte lås på dörr</code> |
208
+ | <code>Understell bord i stål</code> | <code>Lage stålunderstell til bord</code> | <code>Bygge trebord</code> |
209
+ | <code>Reparasjon vannbåren varme</code> | <code>Vannbåren varme til enebolig</code> | <code>* Fortsatt ledig: ombygning av eksisterende kjeller</code> |
210
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
211
+ ```json
212
+ {
213
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
214
+ "triplet_margin": 5
215
+ }
216
+ ```
217
+
218
+ #### Unnamed Dataset
219
+
220
+
221
+ * Size: 22,563 training samples
222
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
223
+ * Approximate statistics based on the first 1000 samples:
224
+ | | sentence_0 | sentence_1 |
225
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
226
+ | type | string | string |
227
+ | details | <ul><li>min: 4 tokens</li><li>mean: 11.09 tokens</li><li>max: 37 tokens</li></ul> | <ul><li>min: 8 tokens</li><li>mean: 12.94 tokens</li><li>max: 30 tokens</li></ul> |
228
+ * Samples:
229
+ | sentence_0 | sentence_1 |
230
+ |:-------------------------------------------------------------------------------------------|:----------------------------------------|
231
+ | <code>utforing av gavlvegg</code> | <code>query: utforing av vegg</code> |
232
+ | <code>Montere kjøkken</code> | <code>query: kjøkkenmontering</code> |
233
+ | <code>Sette opp lettvegg med skyvedør, bygge bod i carport, forlenge tak på carport</code> | <code>query: bygge bod i carport</code> |
234
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
235
+ ```json
236
+ {
237
+ "scale": 20.0,
238
+ "similarity_fct": "cos_sim"
239
+ }
240
+ ```
241
+
242
+ #### Unnamed Dataset
243
+
244
+
245
+ * Size: 18,735 training samples
246
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
247
+ * Approximate statistics based on the first 1000 samples:
248
+ | | sentence_0 | sentence_1 | label |
249
+ |:--------|:----------------------------------------------------------------------------------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------|
250
+ | type | string | string | float |
251
+ | details | <ul><li>min: 3 tokens</li><li>mean: 13.08 tokens</li><li>max: 46 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 9.52 tokens</li><li>max: 27 tokens</li></ul> | <ul><li>min: 0.05</li><li>mean: 0.51</li><li>max: 0.95</li></ul> |
252
+ * Samples:
253
+ | sentence_0 | sentence_1 | label |
254
+ |:---------------------------------------------------------|:-------------------------------------------|:------------------|
255
+ | <code>Renovering av hus - plantegninger og fasade</code> | <code>elektriker på bolig på 120kvm</code> | <code>0.15</code> |
256
+ | <code>Blending av innvendig dør</code> | <code>Tette igjen døråpning</code> | <code>0.75</code> |
257
+ | <code>Fortsatt ledig: Kappe teglstein på pipeløp</code> | <code>Murearbeid</code> | <code>0.45</code> |
258
+ * Loss: [<code>CoSENTLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#cosentloss) with these parameters:
259
+ ```json
260
+ {
261
+ "scale": 20.0,
262
+ "similarity_fct": "pairwise_cos_sim"
263
+ }
264
+ ```
265
+
266
+ ### Training Hyperparameters
267
+ #### Non-Default Hyperparameters
268
+
269
+ - `per_device_train_batch_size`: 32
270
+ - `per_device_eval_batch_size`: 32
271
+ - `num_train_epochs`: 6
272
+ - `multi_dataset_batch_sampler`: round_robin
273
+
274
+ #### All Hyperparameters
275
+ <details><summary>Click to expand</summary>
276
+
277
+ - `overwrite_output_dir`: False
278
+ - `do_predict`: False
279
+ - `eval_strategy`: no
280
+ - `prediction_loss_only`: True
281
+ - `per_device_train_batch_size`: 32
282
+ - `per_device_eval_batch_size`: 32
283
+ - `per_gpu_train_batch_size`: None
284
+ - `per_gpu_eval_batch_size`: None
285
+ - `gradient_accumulation_steps`: 1
286
+ - `eval_accumulation_steps`: None
287
+ - `learning_rate`: 5e-05
288
+ - `weight_decay`: 0.0
289
+ - `adam_beta1`: 0.9
290
+ - `adam_beta2`: 0.999
291
+ - `adam_epsilon`: 1e-08
292
+ - `max_grad_norm`: 1
293
+ - `num_train_epochs`: 6
294
+ - `max_steps`: -1
295
+ - `lr_scheduler_type`: linear
296
+ - `lr_scheduler_kwargs`: {}
297
+ - `warmup_ratio`: 0.0
298
+ - `warmup_steps`: 0
299
+ - `log_level`: passive
300
+ - `log_level_replica`: warning
301
+ - `log_on_each_node`: True
302
+ - `logging_nan_inf_filter`: True
303
+ - `save_safetensors`: True
304
+ - `save_on_each_node`: False
305
+ - `save_only_model`: False
306
+ - `restore_callback_states_from_checkpoint`: False
307
+ - `no_cuda`: False
308
+ - `use_cpu`: False
309
+ - `use_mps_device`: False
310
+ - `seed`: 42
311
+ - `data_seed`: None
312
+ - `jit_mode_eval`: False
313
+ - `use_ipex`: False
314
+ - `bf16`: False
315
+ - `fp16`: False
316
+ - `fp16_opt_level`: O1
317
+ - `half_precision_backend`: auto
318
+ - `bf16_full_eval`: False
319
+ - `fp16_full_eval`: False
320
+ - `tf32`: None
321
+ - `local_rank`: 0
322
+ - `ddp_backend`: None
323
+ - `tpu_num_cores`: None
324
+ - `tpu_metrics_debug`: False
325
+ - `debug`: []
326
+ - `dataloader_drop_last`: False
327
+ - `dataloader_num_workers`: 0
328
+ - `dataloader_prefetch_factor`: None
329
+ - `past_index`: -1
330
+ - `disable_tqdm`: False
331
+ - `remove_unused_columns`: True
332
+ - `label_names`: None
333
+ - `load_best_model_at_end`: False
334
+ - `ignore_data_skip`: False
335
+ - `fsdp`: []
336
+ - `fsdp_min_num_params`: 0
337
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
338
+ - `fsdp_transformer_layer_cls_to_wrap`: None
339
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
340
+ - `deepspeed`: None
341
+ - `label_smoothing_factor`: 0.0
342
+ - `optim`: adamw_torch
343
+ - `optim_args`: None
344
+ - `adafactor`: False
345
+ - `group_by_length`: False
346
+ - `length_column_name`: length
347
+ - `ddp_find_unused_parameters`: None
348
+ - `ddp_bucket_cap_mb`: None
349
+ - `ddp_broadcast_buffers`: False
350
+ - `dataloader_pin_memory`: True
351
+ - `dataloader_persistent_workers`: False
352
+ - `skip_memory_metrics`: True
353
+ - `use_legacy_prediction_loop`: False
354
+ - `push_to_hub`: False
355
+ - `resume_from_checkpoint`: None
356
+ - `hub_model_id`: None
357
+ - `hub_strategy`: every_save
358
+ - `hub_private_repo`: False
359
+ - `hub_always_push`: False
360
+ - `gradient_checkpointing`: False
361
+ - `gradient_checkpointing_kwargs`: None
362
+ - `include_inputs_for_metrics`: False
363
+ - `eval_do_concat_batches`: True
364
+ - `fp16_backend`: auto
365
+ - `push_to_hub_model_id`: None
366
+ - `push_to_hub_organization`: None
367
+ - `mp_parameters`:
368
+ - `auto_find_batch_size`: False
369
+ - `full_determinism`: False
370
+ - `torchdynamo`: None
371
+ - `ray_scope`: last
372
+ - `ddp_timeout`: 1800
373
+ - `torch_compile`: False
374
+ - `torch_compile_backend`: None
375
+ - `torch_compile_mode`: None
376
+ - `dispatch_batches`: None
377
+ - `split_batches`: None
378
+ - `include_tokens_per_second`: False
379
+ - `include_num_input_tokens_seen`: False
380
+ - `neftune_noise_alpha`: None
381
+ - `optim_target_modules`: None
382
+ - `batch_eval_metrics`: False
383
+ - `batch_sampler`: batch_sampler
384
+ - `multi_dataset_batch_sampler`: round_robin
385
+
386
+ </details>
387
+
388
+ ### Training Logs
389
+ | Epoch | Step | Training Loss | test-triplet-evaluation_max_accuracy |
390
+ |:------:|:-----:|:-------------:|:------------------------------------:|
391
+ | 0.2844 | 500 | 3.6092 | - |
392
+ | 0.5688 | 1000 | 2.9852 | - |
393
+ | 0.8532 | 1500 | 2.7542 | - |
394
+ | 1.0011 | 1760 | - | 0.9831 |
395
+ | 1.1365 | 2000 | 2.5467 | - |
396
+ | 1.4209 | 2500 | 2.3263 | - |
397
+ | 1.7053 | 3000 | 2.2608 | - |
398
+ | 1.9898 | 3500 | 2.2042 | - |
399
+ | 2.0011 | 3520 | - | 0.9859 |
400
+ | 2.2730 | 4000 | 2.1615 | - |
401
+ | 2.5575 | 4500 | 2.0934 | - |
402
+ | 2.8419 | 5000 | 2.1226 | - |
403
+ | 3.0011 | 5280 | - | 0.9859 |
404
+ | 3.1251 | 5500 | 2.1977 | - |
405
+ | 3.4096 | 6000 | 2.1209 | - |
406
+ | 3.6940 | 6500 | 2.1006 | - |
407
+ | 3.9784 | 7000 | 2.1495 | - |
408
+ | 4.0011 | 7040 | - | 0.9859 |
409
+ | 4.2617 | 7500 | 2.1792 | - |
410
+ | 4.5461 | 8000 | 2.0958 | - |
411
+ | 4.8305 | 8500 | 2.1065 | - |
412
+ | 5.0011 | 8800 | - | 0.9859 |
413
+ | 5.1138 | 9000 | 2.1762 | - |
414
+ | 5.3982 | 9500 | 2.1347 | - |
415
+ | 5.6826 | 10000 | 2.1198 | - |
416
+ | 5.9670 | 10500 | 2.1251 | - |
417
+ | 5.9943 | 10548 | - | 0.9859 |
418
+
419
+
420
+ ### Framework Versions
421
+ - Python: 3.10.12
422
+ - Sentence Transformers: 3.0.1
423
+ - Transformers: 4.41.2
424
+ - PyTorch: 2.3.0+cu121
425
+ - Accelerate: 0.31.0
426
+ - Datasets: 2.20.0
427
+ - Tokenizers: 0.19.1
428
+
429
+ ## Citation
430
+
431
+ ### BibTeX
432
+
433
+ #### Sentence Transformers
434
+ ```bibtex
435
+ @inproceedings{reimers-2019-sentence-bert,
436
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
437
+ author = "Reimers, Nils and Gurevych, Iryna",
438
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
439
+ month = "11",
440
+ year = "2019",
441
+ publisher = "Association for Computational Linguistics",
442
+ url = "https://arxiv.org/abs/1908.10084",
443
+ }
444
+ ```
445
+
446
+ #### TripletLoss
447
+ ```bibtex
448
+ @misc{hermans2017defense,
449
+ title={In Defense of the Triplet Loss for Person Re-Identification},
450
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
451
+ year={2017},
452
+ eprint={1703.07737},
453
+ archivePrefix={arXiv},
454
+ primaryClass={cs.CV}
455
+ }
456
+ ```
457
+
458
+ #### MultipleNegativesRankingLoss
459
+ ```bibtex
460
+ @misc{henderson2017efficient,
461
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
462
+ 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},
463
+ year={2017},
464
+ eprint={1705.00652},
465
+ archivePrefix={arXiv},
466
+ primaryClass={cs.CL}
467
+ }
468
+ ```
469
+
470
+ #### CoSENTLoss
471
+ ```bibtex
472
+ @online{kexuefm-8847,
473
+ title={CoSENT: A more efficient sentence vector scheme than Sentence-BERT},
474
+ author={Su Jianlin},
475
+ year={2022},
476
+ month={Jan},
477
+ url={https://kexue.fm/archives/8847},
478
+ }
479
+ ```
480
+
481
+ <!--
482
+ ## Glossary
483
+
484
+ *Clearly define terms in order to be accessible across audiences.*
485
+ -->
486
+
487
+ <!--
488
+ ## Model Card Authors
489
+
490
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
491
+ -->
492
+
493
+ <!--
494
+ ## Model Card Contact
495
+
496
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
497
+ -->
config.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "NbAiLab/nb-sbert-base",
3
+ "architectures": [
4
+ "BertModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "classifier_dropout": null,
8
+ "directionality": "bidi",
9
+ "gradient_checkpointing": false,
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-12,
16
+ "max_position_embeddings": 512,
17
+ "model_type": "bert",
18
+ "num_attention_heads": 12,
19
+ "num_hidden_layers": 12,
20
+ "pad_token_id": 0,
21
+ "pooler_fc_size": 768,
22
+ "pooler_num_attention_heads": 12,
23
+ "pooler_num_fc_layers": 3,
24
+ "pooler_size_per_head": 128,
25
+ "pooler_type": "first_token_transform",
26
+ "position_embedding_type": "absolute",
27
+ "torch_dtype": "float32",
28
+ "transformers_version": "4.41.2",
29
+ "type_vocab_size": 2,
30
+ "use_cache": true,
31
+ "vocab_size": 119547
32
+ }
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
+ }
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
+ ]
pytorch_model.bin ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b6dcb7ea1adbe8fe668ce4846d4f85ecba37ad4789ad0750397d737d019fb162
3
+ size 711480934
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 75,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,37 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "cls_token": {
3
+ "content": "[CLS]",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "mask_token": {
10
+ "content": "[MASK]",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "pad_token": {
17
+ "content": "[PAD]",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "sep_token": {
24
+ "content": "[SEP]",
25
+ "lstrip": false,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "unk_token": {
31
+ "content": "[UNK]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ }
37
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,64 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "[PAD]",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "100": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "101": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "102": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "103": {
36
+ "content": "[MASK]",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "clean_up_tokenization_spaces": true,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": false,
48
+ "mask_token": "[MASK]",
49
+ "max_length": 75,
50
+ "model_max_length": 1000000000000000019884624838656,
51
+ "never_split": null,
52
+ "pad_to_multiple_of": null,
53
+ "pad_token": "[PAD]",
54
+ "pad_token_type_id": 0,
55
+ "padding_side": "right",
56
+ "sep_token": "[SEP]",
57
+ "stride": 0,
58
+ "strip_accents": null,
59
+ "tokenize_chinese_chars": true,
60
+ "tokenizer_class": "BertTokenizer",
61
+ "truncation_side": "right",
62
+ "truncation_strategy": "longest_first",
63
+ "unk_token": "[UNK]"
64
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff