Devy1 commited on
Commit
94219cb
·
verified ·
1 Parent(s): 5488714

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,624 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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-128")
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.4828, -0.0626],
151
+ # [ 0.4828, 1.0000, -0.0528],
152
+ # [-0.0626, -0.0528, 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`: 128
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`: 128
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
+ <details><summary>Click to expand</summary>
351
+
352
+ | Epoch | Step | Training Loss |
353
+ |:------:|:----:|:-------------:|
354
+ | 0.0141 | 1 | 0.6881 |
355
+ | 0.0282 | 2 | 0.4421 |
356
+ | 0.0423 | 3 | 0.3636 |
357
+ | 0.0563 | 4 | 0.4092 |
358
+ | 0.0704 | 5 | 0.4558 |
359
+ | 0.0845 | 6 | 0.5227 |
360
+ | 0.0986 | 7 | 0.6376 |
361
+ | 0.1127 | 8 | 0.4178 |
362
+ | 0.1268 | 9 | 0.2803 |
363
+ | 0.1408 | 10 | 0.3843 |
364
+ | 0.1549 | 11 | 0.3998 |
365
+ | 0.1690 | 12 | 0.3264 |
366
+ | 0.1831 | 13 | 0.4509 |
367
+ | 0.1972 | 14 | 0.4697 |
368
+ | 0.2113 | 15 | 0.3188 |
369
+ | 0.2254 | 16 | 0.5552 |
370
+ | 0.2394 | 17 | 0.3308 |
371
+ | 0.2535 | 18 | 0.4426 |
372
+ | 0.2676 | 19 | 0.3757 |
373
+ | 0.2817 | 20 | 0.2844 |
374
+ | 0.2958 | 21 | 0.3652 |
375
+ | 0.3099 | 22 | 0.341 |
376
+ | 0.3239 | 23 | 0.3956 |
377
+ | 0.3380 | 24 | 0.4095 |
378
+ | 0.3521 | 25 | 0.3498 |
379
+ | 0.3662 | 26 | 0.3957 |
380
+ | 0.3803 | 27 | 0.4788 |
381
+ | 0.3944 | 28 | 0.4238 |
382
+ | 0.4085 | 29 | 0.3866 |
383
+ | 0.4225 | 30 | 0.4671 |
384
+ | 0.4366 | 31 | 0.358 |
385
+ | 0.4507 | 32 | 0.4684 |
386
+ | 0.4648 | 33 | 0.4192 |
387
+ | 0.4789 | 34 | 0.3826 |
388
+ | 0.4930 | 35 | 0.3387 |
389
+ | 0.5070 | 36 | 0.4292 |
390
+ | 0.5211 | 37 | 0.4378 |
391
+ | 0.5352 | 38 | 0.3185 |
392
+ | 0.5493 | 39 | 0.3687 |
393
+ | 0.5634 | 40 | 0.3171 |
394
+ | 0.5775 | 41 | 0.3343 |
395
+ | 0.5915 | 42 | 0.4706 |
396
+ | 0.6056 | 43 | 0.3747 |
397
+ | 0.6197 | 44 | 0.3272 |
398
+ | 0.6338 | 45 | 0.4118 |
399
+ | 0.6479 | 46 | 0.4688 |
400
+ | 0.6620 | 47 | 0.3684 |
401
+ | 0.6761 | 48 | 0.3609 |
402
+ | 0.6901 | 49 | 0.3521 |
403
+ | 0.7042 | 50 | 0.3533 |
404
+ | 0.7183 | 51 | 0.3788 |
405
+ | 0.7324 | 52 | 0.3182 |
406
+ | 0.7465 | 53 | 0.5793 |
407
+ | 0.7606 | 54 | 0.2803 |
408
+ | 0.7746 | 55 | 0.2695 |
409
+ | 0.7887 | 56 | 0.2853 |
410
+ | 0.8028 | 57 | 0.3116 |
411
+ | 0.8169 | 58 | 0.3542 |
412
+ | 0.8310 | 59 | 0.3445 |
413
+ | 0.8451 | 60 | 0.2799 |
414
+ | 0.8592 | 61 | 0.3178 |
415
+ | 0.8732 | 62 | 0.4737 |
416
+ | 0.8873 | 63 | 0.2121 |
417
+ | 0.9014 | 64 | 0.2585 |
418
+ | 0.9155 | 65 | 0.3238 |
419
+ | 0.9296 | 66 | 0.3203 |
420
+ | 0.9437 | 67 | 0.4475 |
421
+ | 0.9577 | 68 | 0.3722 |
422
+ | 0.9718 | 69 | 0.4047 |
423
+ | 0.9859 | 70 | 0.3056 |
424
+ | 1.0 | 71 | 0.316 |
425
+ | 1.0141 | 72 | 0.2711 |
426
+ | 1.0282 | 73 | 0.3488 |
427
+ | 1.0423 | 74 | 0.2413 |
428
+ | 1.0563 | 75 | 0.2434 |
429
+ | 1.0704 | 76 | 0.2602 |
430
+ | 1.0845 | 77 | 0.3006 |
431
+ | 1.0986 | 78 | 0.237 |
432
+ | 1.1127 | 79 | 0.2614 |
433
+ | 1.1268 | 80 | 0.2456 |
434
+ | 1.1408 | 81 | 0.2305 |
435
+ | 1.1549 | 82 | 0.2774 |
436
+ | 1.1690 | 83 | 0.3028 |
437
+ | 1.1831 | 84 | 0.2037 |
438
+ | 1.1972 | 85 | 0.2905 |
439
+ | 1.2113 | 86 | 0.2048 |
440
+ | 1.2254 | 87 | 0.2459 |
441
+ | 1.2394 | 88 | 0.2291 |
442
+ | 1.2535 | 89 | 0.2319 |
443
+ | 1.2676 | 90 | 0.2755 |
444
+ | 1.2817 | 91 | 0.3138 |
445
+ | 1.2958 | 92 | 0.3555 |
446
+ | 1.3099 | 93 | 0.2908 |
447
+ | 1.3239 | 94 | 0.2602 |
448
+ | 1.3380 | 95 | 0.2615 |
449
+ | 1.3521 | 96 | 0.2041 |
450
+ | 1.3662 | 97 | 0.2629 |
451
+ | 1.3803 | 98 | 0.2508 |
452
+ | 1.3944 | 99 | 0.248 |
453
+ | 1.4085 | 100 | 0.2601 |
454
+ | 1.4225 | 101 | 0.3114 |
455
+ | 1.4366 | 102 | 0.3201 |
456
+ | 1.4507 | 103 | 0.2574 |
457
+ | 1.4648 | 104 | 0.2371 |
458
+ | 1.4789 | 105 | 0.2041 |
459
+ | 1.4930 | 106 | 0.2454 |
460
+ | 1.5070 | 107 | 0.3303 |
461
+ | 1.5211 | 108 | 0.29 |
462
+ | 1.5352 | 109 | 0.3327 |
463
+ | 1.5493 | 110 | 0.2741 |
464
+ | 1.5634 | 111 | 0.258 |
465
+ | 1.5775 | 112 | 0.3228 |
466
+ | 1.5915 | 113 | 0.2989 |
467
+ | 1.6056 | 114 | 0.2769 |
468
+ | 1.6197 | 115 | 0.3744 |
469
+ | 1.6338 | 116 | 0.3053 |
470
+ | 1.6479 | 117 | 0.1675 |
471
+ | 1.6620 | 118 | 0.2337 |
472
+ | 1.6761 | 119 | 0.2505 |
473
+ | 1.6901 | 120 | 0.2304 |
474
+ | 1.7042 | 121 | 0.2369 |
475
+ | 1.7183 | 122 | 0.1978 |
476
+ | 1.7324 | 123 | 0.1929 |
477
+ | 1.7465 | 124 | 0.2212 |
478
+ | 1.7606 | 125 | 0.2175 |
479
+ | 1.7746 | 126 | 0.1839 |
480
+ | 1.7887 | 127 | 0.3059 |
481
+ | 1.8028 | 128 | 0.1996 |
482
+ | 1.8169 | 129 | 0.3 |
483
+ | 1.8310 | 130 | 0.3051 |
484
+ | 1.8451 | 131 | 0.2272 |
485
+ | 1.8592 | 132 | 0.2503 |
486
+ | 1.8732 | 133 | 0.3077 |
487
+ | 1.8873 | 134 | 0.1847 |
488
+ | 1.9014 | 135 | 0.2437 |
489
+ | 1.9155 | 136 | 0.2333 |
490
+ | 1.9296 | 137 | 0.2111 |
491
+ | 1.9437 | 138 | 0.162 |
492
+ | 1.9577 | 139 | 0.4412 |
493
+ | 1.9718 | 140 | 0.1282 |
494
+ | 1.9859 | 141 | 0.2651 |
495
+ | 2.0 | 142 | 0.1055 |
496
+ | 2.0141 | 143 | 0.2316 |
497
+ | 2.0282 | 144 | 0.243 |
498
+ | 2.0423 | 145 | 0.1892 |
499
+ | 2.0563 | 146 | 0.19 |
500
+ | 2.0704 | 147 | 0.172 |
501
+ | 2.0845 | 148 | 0.185 |
502
+ | 2.0986 | 149 | 0.2481 |
503
+ | 2.1127 | 150 | 0.2651 |
504
+ | 2.1268 | 151 | 0.2511 |
505
+ | 2.1408 | 152 | 0.1761 |
506
+ | 2.1549 | 153 | 0.2215 |
507
+ | 2.1690 | 154 | 0.2275 |
508
+ | 2.1831 | 155 | 0.2621 |
509
+ | 2.1972 | 156 | 0.2255 |
510
+ | 2.2113 | 157 | 0.201 |
511
+ | 2.2254 | 158 | 0.1372 |
512
+ | 2.2394 | 159 | 0.1941 |
513
+ | 2.2535 | 160 | 0.2225 |
514
+ | 2.2676 | 161 | 0.1713 |
515
+ | 2.2817 | 162 | 0.1045 |
516
+ | 2.2958 | 163 | 0.2273 |
517
+ | 2.3099 | 164 | 0.2474 |
518
+ | 2.3239 | 165 | 0.312 |
519
+ | 2.3380 | 166 | 0.2274 |
520
+ | 2.3521 | 167 | 0.1991 |
521
+ | 2.3662 | 168 | 0.1511 |
522
+ | 2.3803 | 169 | 0.2248 |
523
+ | 2.3944 | 170 | 0.2025 |
524
+ | 2.4085 | 171 | 0.258 |
525
+ | 2.4225 | 172 | 0.2163 |
526
+ | 2.4366 | 173 | 0.4012 |
527
+ | 2.4507 | 174 | 0.2397 |
528
+ | 2.4648 | 175 | 0.1978 |
529
+ | 2.4789 | 176 | 0.2071 |
530
+ | 2.4930 | 177 | 0.147 |
531
+ | 2.5070 | 178 | 0.2424 |
532
+ | 2.5211 | 179 | 0.1345 |
533
+ | 2.5352 | 180 | 0.2506 |
534
+ | 2.5493 | 181 | 0.1275 |
535
+ | 2.5634 | 182 | 0.3284 |
536
+ | 2.5775 | 183 | 0.2063 |
537
+ | 2.5915 | 184 | 0.1483 |
538
+ | 2.6056 | 185 | 0.2051 |
539
+ | 2.6197 | 186 | 0.2439 |
540
+ | 2.6338 | 187 | 0.252 |
541
+ | 2.6479 | 188 | 0.2126 |
542
+ | 2.6620 | 189 | 0.2156 |
543
+ | 2.6761 | 190 | 0.153 |
544
+ | 2.6901 | 191 | 0.2481 |
545
+ | 2.7042 | 192 | 0.2481 |
546
+ | 2.7183 | 193 | 0.1539 |
547
+ | 2.7324 | 194 | 0.1224 |
548
+ | 2.7465 | 195 | 0.1924 |
549
+ | 2.7606 | 196 | 0.196 |
550
+ | 2.7746 | 197 | 0.2172 |
551
+ | 2.7887 | 198 | 0.1999 |
552
+ | 2.8028 | 199 | 0.1932 |
553
+ | 2.8169 | 200 | 0.1758 |
554
+ | 2.8310 | 201 | 0.2173 |
555
+ | 2.8451 | 202 | 0.1792 |
556
+ | 2.8592 | 203 | 0.2228 |
557
+ | 2.8732 | 204 | 0.2013 |
558
+ | 2.8873 | 205 | 0.2197 |
559
+ | 2.9014 | 206 | 0.1942 |
560
+ | 2.9155 | 207 | 0.1798 |
561
+ | 2.9296 | 208 | 0.2064 |
562
+ | 2.9437 | 209 | 0.2901 |
563
+ | 2.9577 | 210 | 0.202 |
564
+ | 2.9718 | 211 | 0.1809 |
565
+ | 2.9859 | 212 | 0.176 |
566
+ | 3.0 | 213 | 0.1733 |
567
+
568
+ </details>
569
+
570
+ ### Framework Versions
571
+ - Python: 3.10.14
572
+ - Sentence Transformers: 5.1.1
573
+ - Transformers: 4.56.2
574
+ - PyTorch: 2.8.0+cu128
575
+ - Accelerate: 1.10.1
576
+ - Datasets: 4.1.1
577
+ - Tokenizers: 0.22.1
578
+
579
+ ## Citation
580
+
581
+ ### BibTeX
582
+
583
+ #### Sentence Transformers
584
+ ```bibtex
585
+ @inproceedings{reimers-2019-sentence-bert,
586
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
587
+ author = "Reimers, Nils and Gurevych, Iryna",
588
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
589
+ month = "11",
590
+ year = "2019",
591
+ publisher = "Association for Computational Linguistics",
592
+ url = "https://arxiv.org/abs/1908.10084",
593
+ }
594
+ ```
595
+
596
+ #### MultipleNegativesRankingLoss
597
+ ```bibtex
598
+ @misc{henderson2017efficient,
599
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
600
+ 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},
601
+ year={2017},
602
+ eprint={1705.00652},
603
+ archivePrefix={arXiv},
604
+ primaryClass={cs.CL}
605
+ }
606
+ ```
607
+
608
+ <!--
609
+ ## Glossary
610
+
611
+ *Clearly define terms in order to be accessible across audiences.*
612
+ -->
613
+
614
+ <!--
615
+ ## Model Card Authors
616
+
617
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
618
+ -->
619
+
620
+ <!--
621
+ ## Model Card Contact
622
+
623
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
624
+ -->
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:77896ab6188336e1aa9d332636cdf7e72173025ab87e4d0aded01ef78ff5cd67
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