robwhelan commited on
Commit
98e495c
·
verified ·
1 Parent(s): cbc8fc5

Upload fine-tuned BGE embeddings model for nuclear licensing search

Browse files
.ipynb_checkpoints/README-checkpoint.md ADDED
@@ -0,0 +1,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # bge-nuclear-finetuned
2
+
3
+ Fine-tuned version of `BAAI/bge-base-en-v1.5` on nuclear licensing search queries using triplet loss.
4
+
5
+ ## Use
6
+ ```python
7
+ from sentence_transformers import SentenceTransformer
8
+ model = SentenceTransformer("your-username/bge-nuclear-finetuned")
9
+ embeddings = model.encode(["aircraft impact rule"])
10
+
11
+
12
+ ---
13
+ tags:
14
+ - sentence-transformers
15
+ - sentence-similarity
16
+ - feature-extraction
17
+ - generated_from_trainer
18
+ - dataset_size:3
19
+ - loss:TripletLoss
20
+ base_model: BAAI/bge-base-en-v1.5
21
+ pipeline_tag: sentence-similarity
22
+ library_name: sentence-transformers
23
+ ---
24
+
25
+ # SentenceTransformer based on BAAI/bge-base-en-v1.5
26
+
27
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). 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.
28
+
29
+ ## Model Details
30
+
31
+ ### Model Description
32
+ - **Model Type:** Sentence Transformer
33
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
34
+ - **Maximum Sequence Length:** 512 tokens
35
+ - **Output Dimensionality:** 768 dimensions
36
+ - **Similarity Function:** Cosine Similarity
37
+ <!-- - **Training Dataset:** Unknown -->
38
+ <!-- - **Language:** Unknown -->
39
+ <!-- - **License:** Unknown -->
40
+
41
+ ### Model Sources
42
+
43
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
44
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
45
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
46
+
47
+ ### Full Model Architecture
48
+
49
+ ```
50
+ SentenceTransformer(
51
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
52
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
53
+ (2): Normalize()
54
+ )
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ### Direct Usage (Sentence Transformers)
60
+
61
+ First install the Sentence Transformers library:
62
+
63
+ ```bash
64
+ pip install -U sentence-transformers
65
+ ```
66
+
67
+ Then you can load this model and run inference.
68
+ ```python
69
+ from sentence_transformers import SentenceTransformer
70
+
71
+ # Download from the 🤗 Hub
72
+ model = SentenceTransformer("sentence_transformers_model_id")
73
+ # Run inference
74
+ sentences = [
75
+ 'The weather is lovely today.',
76
+ "It's so sunny outside!",
77
+ 'He drove to the stadium.',
78
+ ]
79
+ embeddings = model.encode(sentences)
80
+ print(embeddings.shape)
81
+ # [3, 768]
82
+
83
+ # Get the similarity scores for the embeddings
84
+ similarities = model.similarity(embeddings, embeddings)
85
+ print(similarities.shape)
86
+ # [3, 3]
87
+ ```
88
+
89
+ <!--
90
+ ### Direct Usage (Transformers)
91
+
92
+ <details><summary>Click to see the direct usage in Transformers</summary>
93
+
94
+ </details>
95
+ -->
96
+
97
+ <!--
98
+ ### Downstream Usage (Sentence Transformers)
99
+
100
+ You can finetune this model on your own dataset.
101
+
102
+ <details><summary>Click to expand</summary>
103
+
104
+ </details>
105
+ -->
106
+
107
+ <!--
108
+ ### Out-of-Scope Use
109
+
110
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
111
+ -->
112
+
113
+ <!--
114
+ ## Bias, Risks and Limitations
115
+
116
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
117
+ -->
118
+
119
+ <!--
120
+ ### Recommendations
121
+
122
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
123
+ -->
124
+
125
+ ## Training Details
126
+
127
+ ### Training Dataset
128
+
129
+ #### Unnamed Dataset
130
+
131
+ * Size: 3 training samples
132
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
133
+ * Approximate statistics based on the first 3 samples:
134
+ | | sentence_0 | sentence_1 | sentence_2 |
135
+ |:--------|:--------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
136
+ | type | string | string | string |
137
+ | details | <ul><li>min: 5 tokens</li><li>mean: 5.67 tokens</li><li>max: 7 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 13.67 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 11.0 tokens</li><li>max: 13 tokens</li></ul> |
138
+ * Samples:
139
+ | sentence_0 | sentence_1 | sentence_2 |
140
+ |:--------------------------------------|:--------------------------------------------------------------------------|:---------------------------------------------------------------------------|
141
+ | <code>aircraft impact rule</code> | <code>Applicants must evaluate potential aircraft crashes...</code> | <code>Applicants must monitor meteorological conditions...</code> |
142
+ | <code>aircraft impact rule</code> | <code>Applicants must evaluate potential aircraft crashes...</code> | <code>Applicants must monitor meteorological conditions...</code> |
143
+ | <code>loss of coolant accident</code> | <code>A LOCA scenario assumes rupture of a primary coolant pipe...</code> | <code>The applicant must demonstrate the availability of parking...</code> |
144
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
145
+ ```json
146
+ {
147
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
148
+ "triplet_margin": 5
149
+ }
150
+ ```
151
+
152
+ ### Training Hyperparameters
153
+ #### Non-Default Hyperparameters
154
+
155
+ - `per_device_train_batch_size`: 16
156
+ - `per_device_eval_batch_size`: 16
157
+ - `num_train_epochs`: 2
158
+ - `multi_dataset_batch_sampler`: round_robin
159
+
160
+ #### All Hyperparameters
161
+ <details><summary>Click to expand</summary>
162
+
163
+ - `overwrite_output_dir`: False
164
+ - `do_predict`: False
165
+ - `eval_strategy`: no
166
+ - `prediction_loss_only`: True
167
+ - `per_device_train_batch_size`: 16
168
+ - `per_device_eval_batch_size`: 16
169
+ - `per_gpu_train_batch_size`: None
170
+ - `per_gpu_eval_batch_size`: None
171
+ - `gradient_accumulation_steps`: 1
172
+ - `eval_accumulation_steps`: None
173
+ - `torch_empty_cache_steps`: None
174
+ - `learning_rate`: 5e-05
175
+ - `weight_decay`: 0.0
176
+ - `adam_beta1`: 0.9
177
+ - `adam_beta2`: 0.999
178
+ - `adam_epsilon`: 1e-08
179
+ - `max_grad_norm`: 1
180
+ - `num_train_epochs`: 2
181
+ - `max_steps`: -1
182
+ - `lr_scheduler_type`: linear
183
+ - `lr_scheduler_kwargs`: {}
184
+ - `warmup_ratio`: 0.0
185
+ - `warmup_steps`: 0
186
+ - `log_level`: passive
187
+ - `log_level_replica`: warning
188
+ - `log_on_each_node`: True
189
+ - `logging_nan_inf_filter`: True
190
+ - `save_safetensors`: True
191
+ - `save_on_each_node`: False
192
+ - `save_only_model`: False
193
+ - `restore_callback_states_from_checkpoint`: False
194
+ - `no_cuda`: False
195
+ - `use_cpu`: False
196
+ - `use_mps_device`: False
197
+ - `seed`: 42
198
+ - `data_seed`: None
199
+ - `jit_mode_eval`: False
200
+ - `use_ipex`: False
201
+ - `bf16`: False
202
+ - `fp16`: False
203
+ - `fp16_opt_level`: O1
204
+ - `half_precision_backend`: auto
205
+ - `bf16_full_eval`: False
206
+ - `fp16_full_eval`: False
207
+ - `tf32`: None
208
+ - `local_rank`: 0
209
+ - `ddp_backend`: None
210
+ - `tpu_num_cores`: None
211
+ - `tpu_metrics_debug`: False
212
+ - `debug`: []
213
+ - `dataloader_drop_last`: False
214
+ - `dataloader_num_workers`: 0
215
+ - `dataloader_prefetch_factor`: None
216
+ - `past_index`: -1
217
+ - `disable_tqdm`: False
218
+ - `remove_unused_columns`: True
219
+ - `label_names`: None
220
+ - `load_best_model_at_end`: False
221
+ - `ignore_data_skip`: False
222
+ - `fsdp`: []
223
+ - `fsdp_min_num_params`: 0
224
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
225
+ - `tp_size`: 0
226
+ - `fsdp_transformer_layer_cls_to_wrap`: None
227
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
228
+ - `deepspeed`: None
229
+ - `label_smoothing_factor`: 0.0
230
+ - `optim`: adamw_torch
231
+ - `optim_args`: None
232
+ - `adafactor`: False
233
+ - `group_by_length`: False
234
+ - `length_column_name`: length
235
+ - `ddp_find_unused_parameters`: None
236
+ - `ddp_bucket_cap_mb`: None
237
+ - `ddp_broadcast_buffers`: False
238
+ - `dataloader_pin_memory`: True
239
+ - `dataloader_persistent_workers`: False
240
+ - `skip_memory_metrics`: True
241
+ - `use_legacy_prediction_loop`: False
242
+ - `push_to_hub`: False
243
+ - `resume_from_checkpoint`: None
244
+ - `hub_model_id`: None
245
+ - `hub_strategy`: every_save
246
+ - `hub_private_repo`: None
247
+ - `hub_always_push`: False
248
+ - `gradient_checkpointing`: False
249
+ - `gradient_checkpointing_kwargs`: None
250
+ - `include_inputs_for_metrics`: False
251
+ - `include_for_metrics`: []
252
+ - `eval_do_concat_batches`: True
253
+ - `fp16_backend`: auto
254
+ - `push_to_hub_model_id`: None
255
+ - `push_to_hub_organization`: None
256
+ - `mp_parameters`:
257
+ - `auto_find_batch_size`: False
258
+ - `full_determinism`: False
259
+ - `torchdynamo`: None
260
+ - `ray_scope`: last
261
+ - `ddp_timeout`: 1800
262
+ - `torch_compile`: False
263
+ - `torch_compile_backend`: None
264
+ - `torch_compile_mode`: None
265
+ - `include_tokens_per_second`: False
266
+ - `include_num_input_tokens_seen`: False
267
+ - `neftune_noise_alpha`: None
268
+ - `optim_target_modules`: None
269
+ - `batch_eval_metrics`: False
270
+ - `eval_on_start`: False
271
+ - `use_liger_kernel`: False
272
+ - `eval_use_gather_object`: False
273
+ - `average_tokens_across_devices`: False
274
+ - `prompts`: None
275
+ - `batch_sampler`: batch_sampler
276
+ - `multi_dataset_batch_sampler`: round_robin
277
+
278
+ </details>
279
+
280
+ ### Framework Versions
281
+ - Python: 3.10.14
282
+ - Sentence Transformers: 4.0.2
283
+ - Transformers: 4.51.2
284
+ - PyTorch: 2.2.2
285
+ - Accelerate: 1.6.0
286
+ - Datasets: 3.5.0
287
+ - Tokenizers: 0.21.1
288
+
289
+ ## Citation
290
+
291
+ ### BibTeX
292
+
293
+ #### Sentence Transformers
294
+ ```bibtex
295
+ @inproceedings{reimers-2019-sentence-bert,
296
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
297
+ author = "Reimers, Nils and Gurevych, Iryna",
298
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
299
+ month = "11",
300
+ year = "2019",
301
+ publisher = "Association for Computational Linguistics",
302
+ url = "https://arxiv.org/abs/1908.10084",
303
+ }
304
+ ```
305
+
306
+ #### TripletLoss
307
+ ```bibtex
308
+ @misc{hermans2017defense,
309
+ title={In Defense of the Triplet Loss for Person Re-Identification},
310
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
311
+ year={2017},
312
+ eprint={1703.07737},
313
+ archivePrefix={arXiv},
314
+ primaryClass={cs.CV}
315
+ }
316
+ ```
317
+
318
+ <!--
319
+ ## Glossary
320
+
321
+ *Clearly define terms in order to be accessible across audiences.*
322
+ -->
323
+
324
+ <!--
325
+ ## Model Card Authors
326
+
327
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
328
+ -->
329
+
330
+ <!--
331
+ ## Model Card Contact
332
+
333
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
334
+ -->
.ipynb_checkpoints/config-checkpoint.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "gradient_checkpointing": false,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.51.2",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": true,
4
+ "pooling_mode_mean_tokens": false,
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,334 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ # bge-nuclear-finetuned
2
+
3
+ Fine-tuned version of `BAAI/bge-base-en-v1.5` on nuclear licensing search queries using triplet loss.
4
+
5
+ ## Use
6
+ ```python
7
+ from sentence_transformers import SentenceTransformer
8
+ model = SentenceTransformer("your-username/bge-nuclear-finetuned")
9
+ embeddings = model.encode(["aircraft impact rule"])
10
+
11
+
12
+ ---
13
+ tags:
14
+ - sentence-transformers
15
+ - sentence-similarity
16
+ - feature-extraction
17
+ - generated_from_trainer
18
+ - dataset_size:3
19
+ - loss:TripletLoss
20
+ base_model: BAAI/bge-base-en-v1.5
21
+ pipeline_tag: sentence-similarity
22
+ library_name: sentence-transformers
23
+ ---
24
+
25
+ # SentenceTransformer based on BAAI/bge-base-en-v1.5
26
+
27
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5). 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.
28
+
29
+ ## Model Details
30
+
31
+ ### Model Description
32
+ - **Model Type:** Sentence Transformer
33
+ - **Base model:** [BAAI/bge-base-en-v1.5](https://huggingface.co/BAAI/bge-base-en-v1.5) <!-- at revision a5beb1e3e68b9ab74eb54cfd186867f64f240e1a -->
34
+ - **Maximum Sequence Length:** 512 tokens
35
+ - **Output Dimensionality:** 768 dimensions
36
+ - **Similarity Function:** Cosine Similarity
37
+ <!-- - **Training Dataset:** Unknown -->
38
+ <!-- - **Language:** Unknown -->
39
+ <!-- - **License:** Unknown -->
40
+
41
+ ### Model Sources
42
+
43
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
44
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
45
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
46
+
47
+ ### Full Model Architecture
48
+
49
+ ```
50
+ SentenceTransformer(
51
+ (0): Transformer({'max_seq_length': 512, 'do_lower_case': True}) with Transformer model: BertModel
52
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': True, 'pooling_mode_mean_tokens': False, 'pooling_mode_max_tokens': False, 'pooling_mode_mean_sqrt_len_tokens': False, 'pooling_mode_weightedmean_tokens': False, 'pooling_mode_lasttoken': False, 'include_prompt': True})
53
+ (2): Normalize()
54
+ )
55
+ ```
56
+
57
+ ## Usage
58
+
59
+ ### Direct Usage (Sentence Transformers)
60
+
61
+ First install the Sentence Transformers library:
62
+
63
+ ```bash
64
+ pip install -U sentence-transformers
65
+ ```
66
+
67
+ Then you can load this model and run inference.
68
+ ```python
69
+ from sentence_transformers import SentenceTransformer
70
+
71
+ # Download from the 🤗 Hub
72
+ model = SentenceTransformer("sentence_transformers_model_id")
73
+ # Run inference
74
+ sentences = [
75
+ 'The weather is lovely today.',
76
+ "It's so sunny outside!",
77
+ 'He drove to the stadium.',
78
+ ]
79
+ embeddings = model.encode(sentences)
80
+ print(embeddings.shape)
81
+ # [3, 768]
82
+
83
+ # Get the similarity scores for the embeddings
84
+ similarities = model.similarity(embeddings, embeddings)
85
+ print(similarities.shape)
86
+ # [3, 3]
87
+ ```
88
+
89
+ <!--
90
+ ### Direct Usage (Transformers)
91
+
92
+ <details><summary>Click to see the direct usage in Transformers</summary>
93
+
94
+ </details>
95
+ -->
96
+
97
+ <!--
98
+ ### Downstream Usage (Sentence Transformers)
99
+
100
+ You can finetune this model on your own dataset.
101
+
102
+ <details><summary>Click to expand</summary>
103
+
104
+ </details>
105
+ -->
106
+
107
+ <!--
108
+ ### Out-of-Scope Use
109
+
110
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
111
+ -->
112
+
113
+ <!--
114
+ ## Bias, Risks and Limitations
115
+
116
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
117
+ -->
118
+
119
+ <!--
120
+ ### Recommendations
121
+
122
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
123
+ -->
124
+
125
+ ## Training Details
126
+
127
+ ### Training Dataset
128
+
129
+ #### Unnamed Dataset
130
+
131
+ * Size: 3 training samples
132
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>sentence_2</code>
133
+ * Approximate statistics based on the first 3 samples:
134
+ | | sentence_0 | sentence_1 | sentence_2 |
135
+ |:--------|:--------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
136
+ | type | string | string | string |
137
+ | details | <ul><li>min: 5 tokens</li><li>mean: 5.67 tokens</li><li>max: 7 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 13.67 tokens</li><li>max: 19 tokens</li></ul> | <ul><li>min: 10 tokens</li><li>mean: 11.0 tokens</li><li>max: 13 tokens</li></ul> |
138
+ * Samples:
139
+ | sentence_0 | sentence_1 | sentence_2 |
140
+ |:--------------------------------------|:--------------------------------------------------------------------------|:---------------------------------------------------------------------------|
141
+ | <code>aircraft impact rule</code> | <code>Applicants must evaluate potential aircraft crashes...</code> | <code>Applicants must monitor meteorological conditions...</code> |
142
+ | <code>aircraft impact rule</code> | <code>Applicants must evaluate potential aircraft crashes...</code> | <code>Applicants must monitor meteorological conditions...</code> |
143
+ | <code>loss of coolant accident</code> | <code>A LOCA scenario assumes rupture of a primary coolant pipe...</code> | <code>The applicant must demonstrate the availability of parking...</code> |
144
+ * Loss: [<code>TripletLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#tripletloss) with these parameters:
145
+ ```json
146
+ {
147
+ "distance_metric": "TripletDistanceMetric.EUCLIDEAN",
148
+ "triplet_margin": 5
149
+ }
150
+ ```
151
+
152
+ ### Training Hyperparameters
153
+ #### Non-Default Hyperparameters
154
+
155
+ - `per_device_train_batch_size`: 16
156
+ - `per_device_eval_batch_size`: 16
157
+ - `num_train_epochs`: 2
158
+ - `multi_dataset_batch_sampler`: round_robin
159
+
160
+ #### All Hyperparameters
161
+ <details><summary>Click to expand</summary>
162
+
163
+ - `overwrite_output_dir`: False
164
+ - `do_predict`: False
165
+ - `eval_strategy`: no
166
+ - `prediction_loss_only`: True
167
+ - `per_device_train_batch_size`: 16
168
+ - `per_device_eval_batch_size`: 16
169
+ - `per_gpu_train_batch_size`: None
170
+ - `per_gpu_eval_batch_size`: None
171
+ - `gradient_accumulation_steps`: 1
172
+ - `eval_accumulation_steps`: None
173
+ - `torch_empty_cache_steps`: None
174
+ - `learning_rate`: 5e-05
175
+ - `weight_decay`: 0.0
176
+ - `adam_beta1`: 0.9
177
+ - `adam_beta2`: 0.999
178
+ - `adam_epsilon`: 1e-08
179
+ - `max_grad_norm`: 1
180
+ - `num_train_epochs`: 2
181
+ - `max_steps`: -1
182
+ - `lr_scheduler_type`: linear
183
+ - `lr_scheduler_kwargs`: {}
184
+ - `warmup_ratio`: 0.0
185
+ - `warmup_steps`: 0
186
+ - `log_level`: passive
187
+ - `log_level_replica`: warning
188
+ - `log_on_each_node`: True
189
+ - `logging_nan_inf_filter`: True
190
+ - `save_safetensors`: True
191
+ - `save_on_each_node`: False
192
+ - `save_only_model`: False
193
+ - `restore_callback_states_from_checkpoint`: False
194
+ - `no_cuda`: False
195
+ - `use_cpu`: False
196
+ - `use_mps_device`: False
197
+ - `seed`: 42
198
+ - `data_seed`: None
199
+ - `jit_mode_eval`: False
200
+ - `use_ipex`: False
201
+ - `bf16`: False
202
+ - `fp16`: False
203
+ - `fp16_opt_level`: O1
204
+ - `half_precision_backend`: auto
205
+ - `bf16_full_eval`: False
206
+ - `fp16_full_eval`: False
207
+ - `tf32`: None
208
+ - `local_rank`: 0
209
+ - `ddp_backend`: None
210
+ - `tpu_num_cores`: None
211
+ - `tpu_metrics_debug`: False
212
+ - `debug`: []
213
+ - `dataloader_drop_last`: False
214
+ - `dataloader_num_workers`: 0
215
+ - `dataloader_prefetch_factor`: None
216
+ - `past_index`: -1
217
+ - `disable_tqdm`: False
218
+ - `remove_unused_columns`: True
219
+ - `label_names`: None
220
+ - `load_best_model_at_end`: False
221
+ - `ignore_data_skip`: False
222
+ - `fsdp`: []
223
+ - `fsdp_min_num_params`: 0
224
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
225
+ - `tp_size`: 0
226
+ - `fsdp_transformer_layer_cls_to_wrap`: None
227
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
228
+ - `deepspeed`: None
229
+ - `label_smoothing_factor`: 0.0
230
+ - `optim`: adamw_torch
231
+ - `optim_args`: None
232
+ - `adafactor`: False
233
+ - `group_by_length`: False
234
+ - `length_column_name`: length
235
+ - `ddp_find_unused_parameters`: None
236
+ - `ddp_bucket_cap_mb`: None
237
+ - `ddp_broadcast_buffers`: False
238
+ - `dataloader_pin_memory`: True
239
+ - `dataloader_persistent_workers`: False
240
+ - `skip_memory_metrics`: True
241
+ - `use_legacy_prediction_loop`: False
242
+ - `push_to_hub`: False
243
+ - `resume_from_checkpoint`: None
244
+ - `hub_model_id`: None
245
+ - `hub_strategy`: every_save
246
+ - `hub_private_repo`: None
247
+ - `hub_always_push`: False
248
+ - `gradient_checkpointing`: False
249
+ - `gradient_checkpointing_kwargs`: None
250
+ - `include_inputs_for_metrics`: False
251
+ - `include_for_metrics`: []
252
+ - `eval_do_concat_batches`: True
253
+ - `fp16_backend`: auto
254
+ - `push_to_hub_model_id`: None
255
+ - `push_to_hub_organization`: None
256
+ - `mp_parameters`:
257
+ - `auto_find_batch_size`: False
258
+ - `full_determinism`: False
259
+ - `torchdynamo`: None
260
+ - `ray_scope`: last
261
+ - `ddp_timeout`: 1800
262
+ - `torch_compile`: False
263
+ - `torch_compile_backend`: None
264
+ - `torch_compile_mode`: None
265
+ - `include_tokens_per_second`: False
266
+ - `include_num_input_tokens_seen`: False
267
+ - `neftune_noise_alpha`: None
268
+ - `optim_target_modules`: None
269
+ - `batch_eval_metrics`: False
270
+ - `eval_on_start`: False
271
+ - `use_liger_kernel`: False
272
+ - `eval_use_gather_object`: False
273
+ - `average_tokens_across_devices`: False
274
+ - `prompts`: None
275
+ - `batch_sampler`: batch_sampler
276
+ - `multi_dataset_batch_sampler`: round_robin
277
+
278
+ </details>
279
+
280
+ ### Framework Versions
281
+ - Python: 3.10.14
282
+ - Sentence Transformers: 4.0.2
283
+ - Transformers: 4.51.2
284
+ - PyTorch: 2.2.2
285
+ - Accelerate: 1.6.0
286
+ - Datasets: 3.5.0
287
+ - Tokenizers: 0.21.1
288
+
289
+ ## Citation
290
+
291
+ ### BibTeX
292
+
293
+ #### Sentence Transformers
294
+ ```bibtex
295
+ @inproceedings{reimers-2019-sentence-bert,
296
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
297
+ author = "Reimers, Nils and Gurevych, Iryna",
298
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
299
+ month = "11",
300
+ year = "2019",
301
+ publisher = "Association for Computational Linguistics",
302
+ url = "https://arxiv.org/abs/1908.10084",
303
+ }
304
+ ```
305
+
306
+ #### TripletLoss
307
+ ```bibtex
308
+ @misc{hermans2017defense,
309
+ title={In Defense of the Triplet Loss for Person Re-Identification},
310
+ author={Alexander Hermans and Lucas Beyer and Bastian Leibe},
311
+ year={2017},
312
+ eprint={1703.07737},
313
+ archivePrefix={arXiv},
314
+ primaryClass={cs.CV}
315
+ }
316
+ ```
317
+
318
+ <!--
319
+ ## Glossary
320
+
321
+ *Clearly define terms in order to be accessible across audiences.*
322
+ -->
323
+
324
+ <!--
325
+ ## Model Card Authors
326
+
327
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
328
+ -->
329
+
330
+ <!--
331
+ ## Model Card Contact
332
+
333
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
334
+ -->
config.json ADDED
@@ -0,0 +1,31 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "gradient_checkpointing": false,
8
+ "hidden_act": "gelu",
9
+ "hidden_dropout_prob": 0.1,
10
+ "hidden_size": 768,
11
+ "id2label": {
12
+ "0": "LABEL_0"
13
+ },
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "label2id": {
17
+ "LABEL_0": 0
18
+ },
19
+ "layer_norm_eps": 1e-12,
20
+ "max_position_embeddings": 512,
21
+ "model_type": "bert",
22
+ "num_attention_heads": 12,
23
+ "num_hidden_layers": 12,
24
+ "pad_token_id": 0,
25
+ "position_embedding_type": "absolute",
26
+ "torch_dtype": "float32",
27
+ "transformers_version": "4.51.2",
28
+ "type_vocab_size": 2,
29
+ "use_cache": true,
30
+ "vocab_size": 30522
31
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "4.0.2",
4
+ "transformers": "4.51.2",
5
+ "pytorch": "2.2.2"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:4ee2aa8c0f10e330253e0c58b804c3859c05b7e14796be8dc7953e7f9ee340f2
3
+ size 437951328
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": true
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,58 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "model_max_length": 512,
51
+ "never_split": null,
52
+ "pad_token": "[PAD]",
53
+ "sep_token": "[SEP]",
54
+ "strip_accents": null,
55
+ "tokenize_chinese_chars": true,
56
+ "tokenizer_class": "BertTokenizer",
57
+ "unk_token": "[UNK]"
58
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff