Devy1 commited on
Commit
cdf04d0
·
verified ·
1 Parent(s): d065914

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
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,462 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:9020
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: sentence-transformers/all-MiniLM-L6-v2
11
+ widget:
12
+ - source_sentence: python multiprocessing show cpu count
13
+ sentences:
14
+ - "def unique(seq):\n \"\"\"Return the unique elements of a collection even if\
15
+ \ those elements are\n unhashable and unsortable, like dicts and sets\"\"\
16
+ \"\n cleaned = []\n for each in seq:\n if each not in cleaned:\n\
17
+ \ cleaned.append(each)\n return cleaned"
18
+ - "def is_in(self, point_x, point_y):\n \"\"\" Test if a point is within\
19
+ \ this polygonal region \"\"\"\n\n point_array = array(((point_x, point_y),))\n\
20
+ \ vertices = array(self.points)\n winding = self.inside_rule ==\
21
+ \ \"winding\"\n result = points_in_polygon(point_array, vertices, winding)\n\
22
+ \ return result[0]"
23
+ - "def machine_info():\n \"\"\"Retrieve core and memory information for the current\
24
+ \ machine.\n \"\"\"\n import psutil\n BYTES_IN_GIG = 1073741824.0\n \
25
+ \ free_bytes = psutil.virtual_memory().total\n return [{\"memory\": float(\"\
26
+ %.1f\" % (free_bytes / BYTES_IN_GIG)), \"cores\": multiprocessing.cpu_count(),\n\
27
+ \ \"name\": socket.gethostname()}]"
28
+ - source_sentence: python subplot set the whole title
29
+ sentences:
30
+ - "def set_title(self, title, **kwargs):\n \"\"\"Sets the title on the underlying\
31
+ \ matplotlib AxesSubplot.\"\"\"\n ax = self.get_axes()\n ax.set_title(title,\
32
+ \ **kwargs)"
33
+ - "def moving_average(array, n=3):\n \"\"\"\n Calculates the moving average\
34
+ \ of an array.\n\n Parameters\n ----------\n array : array\n The\
35
+ \ array to have the moving average taken of\n n : int\n The number of\
36
+ \ points of moving average to take\n \n Returns\n -------\n MovingAverageArray\
37
+ \ : array\n The n-point moving average of the input array\n \"\"\"\n\
38
+ \ ret = _np.cumsum(array, dtype=float)\n ret[n:] = ret[n:] - ret[:-n]\n\
39
+ \ return ret[n - 1:] / n"
40
+ - "def to_query_parameters(parameters):\n \"\"\"Converts DB-API parameter values\
41
+ \ into query parameters.\n\n :type parameters: Mapping[str, Any] or Sequence[Any]\n\
42
+ \ :param parameters: A dictionary or sequence of query parameter values.\n\n\
43
+ \ :rtype: List[google.cloud.bigquery.query._AbstractQueryParameter]\n :returns:\
44
+ \ A list of query parameters.\n \"\"\"\n if parameters is None:\n \
45
+ \ return []\n\n if isinstance(parameters, collections_abc.Mapping):\n \
46
+ \ return to_query_parameters_dict(parameters)\n\n return to_query_parameters_list(parameters)"
47
+ - source_sentence: python merge two set to dict
48
+ sentences:
49
+ - "def make_regex(separator):\n \"\"\"Utility function to create regexp for matching\
50
+ \ escaped separators\n in strings.\n\n \"\"\"\n return re.compile(r'(?:'\
51
+ \ + re.escape(separator) + r')?((?:[^' +\n re.escape(separator)\
52
+ \ + r'\\\\]|\\\\.)+)')"
53
+ - "def csvtolist(inputstr):\n \"\"\" converts a csv string into a list \"\"\"\
54
+ \n reader = csv.reader([inputstr], skipinitialspace=True)\n output = []\n\
55
+ \ for r in reader:\n output += r\n return output"
56
+ - "def dict_merge(set1, set2):\n \"\"\"Joins two dictionaries.\"\"\"\n return\
57
+ \ dict(list(set1.items()) + list(set2.items()))"
58
+ - source_sentence: python string % substitution float
59
+ sentences:
60
+ - "def _configure_logger():\n \"\"\"Configure the logging module.\"\"\"\n \
61
+ \ if not app.debug:\n _configure_logger_for_production(logging.getLogger())\n\
62
+ \ elif not app.testing:\n _configure_logger_for_debugging(logging.getLogger())"
63
+ - "def __set__(self, instance, value):\n \"\"\" Set a related object for\
64
+ \ an instance. \"\"\"\n\n self.map[id(instance)] = (weakref.ref(instance),\
65
+ \ value)"
66
+ - "def format_float(value): # not used\n \"\"\"Modified form of the 'g' format\
67
+ \ specifier.\n \"\"\"\n string = \"{:g}\".format(value).replace(\"e+\",\
68
+ \ \"e\")\n string = re.sub(\"e(-?)0*(\\d+)\", r\"e\\1\\2\", string)\n return\
69
+ \ string"
70
+ - source_sentence: bottom 5 rows in python
71
+ sentences:
72
+ - "def refresh(self, document):\n\t\t\"\"\" Load a new copy of a document from the\
73
+ \ database. does not\n\t\t\treplace the old one \"\"\"\n\t\ttry:\n\t\t\told_cache_size\
74
+ \ = self.cache_size\n\t\t\tself.cache_size = 0\n\t\t\tobj = self.query(type(document)).filter_by(mongo_id=document.mongo_id).one()\n\
75
+ \t\tfinally:\n\t\t\tself.cache_size = old_cache_size\n\t\tself.cache_write(obj)\n\
76
+ \t\treturn obj"
77
+ - "def table_top_abs(self):\n \"\"\"Returns the absolute position of table\
78
+ \ top\"\"\"\n table_height = np.array([0, 0, self.table_full_size[2]])\n\
79
+ \ return string_to_array(self.floor.get(\"pos\")) + table_height"
80
+ - "def get_dimension_array(array):\n \"\"\"\n Get dimension of an array getting\
81
+ \ the number of rows and the max num of\n columns.\n \"\"\"\n if all(isinstance(el,\
82
+ \ list) for el in array):\n result = [len(array), len(max([x for x in array],\
83
+ \ key=len,))]\n\n # elif array and isinstance(array, list):\n else:\n \
84
+ \ result = [len(array), 1]\n\n return result"
85
+ pipeline_tag: sentence-similarity
86
+ library_name: sentence-transformers
87
+ ---
88
+
89
+ # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
90
+
91
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
92
+
93
+ ## Model Details
94
+
95
+ ### Model Description
96
+ - **Model Type:** Sentence Transformer
97
+ - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
98
+ - **Maximum Sequence Length:** 256 tokens
99
+ - **Output Dimensionality:** 384 dimensions
100
+ - **Similarity Function:** Cosine Similarity
101
+ <!-- - **Training Dataset:** Unknown -->
102
+ <!-- - **Language:** Unknown -->
103
+ <!-- - **License:** Unknown -->
104
+
105
+ ### Model Sources
106
+
107
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
108
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
109
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
110
+
111
+ ### Full Model Architecture
112
+
113
+ ```
114
+ SentenceTransformer(
115
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
116
+ (1): Pooling({'word_embedding_dimension': 384, '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})
117
+ (2): Normalize()
118
+ )
119
+ ```
120
+
121
+ ## Usage
122
+
123
+ ### Direct Usage (Sentence Transformers)
124
+
125
+ First install the Sentence Transformers library:
126
+
127
+ ```bash
128
+ pip install -U sentence-transformers
129
+ ```
130
+
131
+ Then you can load this model and run inference.
132
+ ```python
133
+ from sentence_transformers import SentenceTransformer
134
+
135
+ # Download from the 🤗 Hub
136
+ model = SentenceTransformer("Devy1/MiniLM-cosqa-512")
137
+ # Run inference
138
+ sentences = [
139
+ 'bottom 5 rows in python',
140
+ 'def table_top_abs(self):\n """Returns the absolute position of table top"""\n table_height = np.array([0, 0, self.table_full_size[2]])\n return string_to_array(self.floor.get("pos")) + table_height',
141
+ 'def refresh(self, document):\n\t\t""" Load a new copy of a document from the database. does not\n\t\t\treplace the old one """\n\t\ttry:\n\t\t\told_cache_size = self.cache_size\n\t\t\tself.cache_size = 0\n\t\t\tobj = self.query(type(document)).filter_by(mongo_id=document.mongo_id).one()\n\t\tfinally:\n\t\t\tself.cache_size = old_cache_size\n\t\tself.cache_write(obj)\n\t\treturn obj',
142
+ ]
143
+ embeddings = model.encode(sentences)
144
+ print(embeddings.shape)
145
+ # [3, 384]
146
+
147
+ # Get the similarity scores for the embeddings
148
+ similarities = model.similarity(embeddings, embeddings)
149
+ print(similarities)
150
+ # tensor([[ 1.0000, 0.4537, -0.0817],
151
+ # [ 0.4537, 1.0000, -0.0463],
152
+ # [-0.0817, -0.0463, 1.0000]])
153
+ ```
154
+
155
+ <!--
156
+ ### Direct Usage (Transformers)
157
+
158
+ <details><summary>Click to see the direct usage in Transformers</summary>
159
+
160
+ </details>
161
+ -->
162
+
163
+ <!--
164
+ ### Downstream Usage (Sentence Transformers)
165
+
166
+ You can finetune this model on your own dataset.
167
+
168
+ <details><summary>Click to expand</summary>
169
+
170
+ </details>
171
+ -->
172
+
173
+ <!--
174
+ ### Out-of-Scope Use
175
+
176
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
177
+ -->
178
+
179
+ <!--
180
+ ## Bias, Risks and Limitations
181
+
182
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
183
+ -->
184
+
185
+ <!--
186
+ ### Recommendations
187
+
188
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
189
+ -->
190
+
191
+ ## Training Details
192
+
193
+ ### Training Dataset
194
+
195
+ #### Unnamed Dataset
196
+
197
+ * Size: 9,020 training samples
198
+ * Columns: <code>anchor</code> and <code>positive</code>
199
+ * Approximate statistics based on the first 1000 samples:
200
+ | | anchor | positive |
201
+ |:--------|:---------------------------------------------------------------------------------|:------------------------------------------------------------------------------------|
202
+ | type | string | string |
203
+ | details | <ul><li>min: 6 tokens</li><li>mean: 9.67 tokens</li><li>max: 21 tokens</li></ul> | <ul><li>min: 40 tokens</li><li>mean: 86.17 tokens</li><li>max: 256 tokens</li></ul> |
204
+ * Samples:
205
+ | anchor | positive |
206
+ |:--------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
207
+ | <code>1d array in char datatype in python</code> | <code>def _convert_to_array(array_like, dtype):<br> """<br> Convert Matrix attributes which are array-like or buffer to array.<br> """<br> if isinstance(array_like, bytes):<br> return np.frombuffer(array_like, dtype=dtype)<br> return np.asarray(array_like, dtype=dtype)</code> |
208
+ | <code>python condition non none</code> | <code>def _not(condition=None, **kwargs):<br> """<br> Return the opposite of input condition.<br><br> :param condition: condition to process.<br><br> :result: not condition.<br> :rtype: bool<br> """<br><br> result = True<br><br> if condition is not None:<br> result = not run(condition, **kwargs)<br><br> return result</code> |
209
+ | <code>accessing a column from a matrix in python</code> | <code>def get_column(self, X, column):<br> """Return a column of the given matrix.<br><br> Args:<br> X: `numpy.ndarray` or `pandas.DataFrame`.<br> column: `int` or `str`.<br><br> Returns:<br> np.ndarray: Selected column.<br> """<br> if isinstance(X, pd.DataFrame):<br> return X[column].values<br><br> return X[:, column]</code> |
210
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
211
+ ```json
212
+ {
213
+ "scale": 20.0,
214
+ "similarity_fct": "cos_sim",
215
+ "gather_across_devices": false
216
+ }
217
+ ```
218
+
219
+ ### Training Hyperparameters
220
+ #### Non-Default Hyperparameters
221
+
222
+ - `per_device_train_batch_size`: 512
223
+ - `fp16`: True
224
+
225
+ #### All Hyperparameters
226
+ <details><summary>Click to expand</summary>
227
+
228
+ - `overwrite_output_dir`: False
229
+ - `do_predict`: False
230
+ - `eval_strategy`: no
231
+ - `prediction_loss_only`: True
232
+ - `per_device_train_batch_size`: 512
233
+ - `per_device_eval_batch_size`: 8
234
+ - `per_gpu_train_batch_size`: None
235
+ - `per_gpu_eval_batch_size`: None
236
+ - `gradient_accumulation_steps`: 1
237
+ - `eval_accumulation_steps`: None
238
+ - `torch_empty_cache_steps`: None
239
+ - `learning_rate`: 5e-05
240
+ - `weight_decay`: 0.0
241
+ - `adam_beta1`: 0.9
242
+ - `adam_beta2`: 0.999
243
+ - `adam_epsilon`: 1e-08
244
+ - `max_grad_norm`: 1.0
245
+ - `num_train_epochs`: 3
246
+ - `max_steps`: -1
247
+ - `lr_scheduler_type`: linear
248
+ - `lr_scheduler_kwargs`: {}
249
+ - `warmup_ratio`: 0.0
250
+ - `warmup_steps`: 0
251
+ - `log_level`: passive
252
+ - `log_level_replica`: warning
253
+ - `log_on_each_node`: True
254
+ - `logging_nan_inf_filter`: True
255
+ - `save_safetensors`: True
256
+ - `save_on_each_node`: False
257
+ - `save_only_model`: False
258
+ - `restore_callback_states_from_checkpoint`: False
259
+ - `no_cuda`: False
260
+ - `use_cpu`: False
261
+ - `use_mps_device`: False
262
+ - `seed`: 42
263
+ - `data_seed`: None
264
+ - `jit_mode_eval`: False
265
+ - `use_ipex`: False
266
+ - `bf16`: False
267
+ - `fp16`: True
268
+ - `fp16_opt_level`: O1
269
+ - `half_precision_backend`: auto
270
+ - `bf16_full_eval`: False
271
+ - `fp16_full_eval`: False
272
+ - `tf32`: None
273
+ - `local_rank`: 0
274
+ - `ddp_backend`: None
275
+ - `tpu_num_cores`: None
276
+ - `tpu_metrics_debug`: False
277
+ - `debug`: []
278
+ - `dataloader_drop_last`: False
279
+ - `dataloader_num_workers`: 0
280
+ - `dataloader_prefetch_factor`: None
281
+ - `past_index`: -1
282
+ - `disable_tqdm`: False
283
+ - `remove_unused_columns`: True
284
+ - `label_names`: None
285
+ - `load_best_model_at_end`: False
286
+ - `ignore_data_skip`: False
287
+ - `fsdp`: []
288
+ - `fsdp_min_num_params`: 0
289
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
290
+ - `fsdp_transformer_layer_cls_to_wrap`: None
291
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
292
+ - `parallelism_config`: None
293
+ - `deepspeed`: None
294
+ - `label_smoothing_factor`: 0.0
295
+ - `optim`: adamw_torch_fused
296
+ - `optim_args`: None
297
+ - `adafactor`: False
298
+ - `group_by_length`: False
299
+ - `length_column_name`: length
300
+ - `ddp_find_unused_parameters`: None
301
+ - `ddp_bucket_cap_mb`: None
302
+ - `ddp_broadcast_buffers`: False
303
+ - `dataloader_pin_memory`: True
304
+ - `dataloader_persistent_workers`: False
305
+ - `skip_memory_metrics`: True
306
+ - `use_legacy_prediction_loop`: False
307
+ - `push_to_hub`: False
308
+ - `resume_from_checkpoint`: None
309
+ - `hub_model_id`: None
310
+ - `hub_strategy`: every_save
311
+ - `hub_private_repo`: None
312
+ - `hub_always_push`: False
313
+ - `hub_revision`: None
314
+ - `gradient_checkpointing`: False
315
+ - `gradient_checkpointing_kwargs`: None
316
+ - `include_inputs_for_metrics`: False
317
+ - `include_for_metrics`: []
318
+ - `eval_do_concat_batches`: True
319
+ - `fp16_backend`: auto
320
+ - `push_to_hub_model_id`: None
321
+ - `push_to_hub_organization`: None
322
+ - `mp_parameters`:
323
+ - `auto_find_batch_size`: False
324
+ - `full_determinism`: False
325
+ - `torchdynamo`: None
326
+ - `ray_scope`: last
327
+ - `ddp_timeout`: 1800
328
+ - `torch_compile`: False
329
+ - `torch_compile_backend`: None
330
+ - `torch_compile_mode`: None
331
+ - `include_tokens_per_second`: False
332
+ - `include_num_input_tokens_seen`: False
333
+ - `neftune_noise_alpha`: None
334
+ - `optim_target_modules`: None
335
+ - `batch_eval_metrics`: False
336
+ - `eval_on_start`: False
337
+ - `use_liger_kernel`: False
338
+ - `liger_kernel_config`: None
339
+ - `eval_use_gather_object`: False
340
+ - `average_tokens_across_devices`: False
341
+ - `prompts`: None
342
+ - `batch_sampler`: batch_sampler
343
+ - `multi_dataset_batch_sampler`: proportional
344
+ - `router_mapping`: {}
345
+ - `learning_rate_mapping`: {}
346
+
347
+ </details>
348
+
349
+ ### Training Logs
350
+ | Epoch | Step | Training Loss |
351
+ |:------:|:----:|:-------------:|
352
+ | 0.0556 | 1 | 1.2259 |
353
+ | 0.1111 | 2 | 1.1589 |
354
+ | 0.1667 | 3 | 0.9588 |
355
+ | 0.2222 | 4 | 1.0265 |
356
+ | 0.2778 | 5 | 0.9783 |
357
+ | 0.3333 | 6 | 0.9464 |
358
+ | 0.3889 | 7 | 0.9527 |
359
+ | 0.4444 | 8 | 0.969 |
360
+ | 0.5 | 9 | 1.0237 |
361
+ | 0.5556 | 10 | 1.0134 |
362
+ | 0.6111 | 11 | 0.9297 |
363
+ | 0.6667 | 12 | 0.9877 |
364
+ | 0.7222 | 13 | 0.9531 |
365
+ | 0.7778 | 14 | 0.9156 |
366
+ | 0.8333 | 15 | 0.8613 |
367
+ | 0.8889 | 16 | 0.83 |
368
+ | 0.9444 | 17 | 0.8991 |
369
+ | 1.0 | 18 | 0.6764 |
370
+ | 1.0556 | 19 | 0.8545 |
371
+ | 1.1111 | 20 | 0.7454 |
372
+ | 1.1667 | 21 | 0.834 |
373
+ | 1.2222 | 22 | 0.7625 |
374
+ | 1.2778 | 23 | 0.7808 |
375
+ | 1.3333 | 24 | 0.817 |
376
+ | 1.3889 | 25 | 0.8032 |
377
+ | 1.4444 | 26 | 0.7854 |
378
+ | 1.5 | 27 | 0.7376 |
379
+ | 1.5556 | 28 | 0.8346 |
380
+ | 1.6111 | 29 | 0.8738 |
381
+ | 1.6667 | 30 | 0.7524 |
382
+ | 1.7222 | 31 | 0.72 |
383
+ | 1.7778 | 32 | 0.711 |
384
+ | 1.8333 | 33 | 0.7498 |
385
+ | 1.8889 | 34 | 0.7597 |
386
+ | 1.9444 | 35 | 0.7883 |
387
+ | 2.0 | 36 | 0.5038 |
388
+ | 2.0556 | 37 | 0.6932 |
389
+ | 2.1111 | 38 | 0.7273 |
390
+ | 2.1667 | 39 | 0.6723 |
391
+ | 2.2222 | 40 | 0.7059 |
392
+ | 2.2778 | 41 | 0.6159 |
393
+ | 2.3333 | 42 | 0.809 |
394
+ | 2.3889 | 43 | 0.6959 |
395
+ | 2.4444 | 44 | 0.7881 |
396
+ | 2.5 | 45 | 0.6861 |
397
+ | 2.5556 | 46 | 0.6545 |
398
+ | 2.6111 | 47 | 0.7235 |
399
+ | 2.6667 | 48 | 0.7031 |
400
+ | 2.7222 | 49 | 0.6679 |
401
+ | 2.7778 | 50 | 0.6835 |
402
+ | 2.8333 | 51 | 0.6773 |
403
+ | 2.8889 | 52 | 0.6972 |
404
+ | 2.9444 | 53 | 0.7043 |
405
+ | 3.0 | 54 | 0.4647 |
406
+
407
+
408
+ ### Framework Versions
409
+ - Python: 3.10.14
410
+ - Sentence Transformers: 5.1.1
411
+ - Transformers: 4.56.2
412
+ - PyTorch: 2.8.0+cu128
413
+ - Accelerate: 1.10.1
414
+ - Datasets: 4.1.1
415
+ - Tokenizers: 0.22.1
416
+
417
+ ## Citation
418
+
419
+ ### BibTeX
420
+
421
+ #### Sentence Transformers
422
+ ```bibtex
423
+ @inproceedings{reimers-2019-sentence-bert,
424
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
425
+ author = "Reimers, Nils and Gurevych, Iryna",
426
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
427
+ month = "11",
428
+ year = "2019",
429
+ publisher = "Association for Computational Linguistics",
430
+ url = "https://arxiv.org/abs/1908.10084",
431
+ }
432
+ ```
433
+
434
+ #### MultipleNegativesRankingLoss
435
+ ```bibtex
436
+ @misc{henderson2017efficient,
437
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
438
+ 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},
439
+ year={2017},
440
+ eprint={1705.00652},
441
+ archivePrefix={arXiv},
442
+ primaryClass={cs.CL}
443
+ }
444
+ ```
445
+
446
+ <!--
447
+ ## Glossary
448
+
449
+ *Clearly define terms in order to be accessible across audiences.*
450
+ -->
451
+
452
+ <!--
453
+ ## Model Card Authors
454
+
455
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
456
+ -->
457
+
458
+ <!--
459
+ ## Model Card Contact
460
+
461
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
462
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "transformers_version": "4.56.2",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.1",
4
+ "transformers": "4.56.2",
5
+ "pytorch": "2.8.0+cu128"
6
+ },
7
+ "model_type": "SentenceTransformer",
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
13
+ "similarity_fn_name": "cosine"
14
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3cc6f61bd9bde7c0dabc2fc5ced1ba617d3b6d15d162273fecb9dd71fda7aad
3
+ size 90864192
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": 256,
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,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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": false,
45
+ "cls_token": "[CLS]",
46
+ "do_basic_tokenize": true,
47
+ "do_lower_case": true,
48
+ "extra_special_tokens": {},
49
+ "mask_token": "[MASK]",
50
+ "max_length": 128,
51
+ "model_max_length": 256,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff