Shuu12121 commited on
Commit
a08936c
·
verified ·
1 Parent(s): 794fa0a

Upload ModernBERT model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 512,
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,500 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:1761750
8
+ - loss:MultipleNegativesRankingLoss
9
+ base_model: Shuu12121/CodeModernBERT-Snake
10
+ widget:
11
+ - source_sentence: // MiddlewareHeaders adds headers to a handler
12
+ sentences:
13
+ - "function create(options) {\n console.log('Creating app: ', options.name);\n\n\
14
+ \ if (!options.status)\n options.status = (code, msg) => {\n console.log(msg);\n\
15
+ \ };\n if (!options.type) options.type = 'rekit-react';\n\n const prjDir\
16
+ \ = path.join(options.location || process.cwd(), options.name);\n return new\
17
+ \ Promise(async (resolve, reject) => {\n try {\n if (fs.existsSync(prjDir))\
18
+ \ {\n reject('FOLDER_EXISTS');\n return;\n }\n fs.mkdirSync(prjDir);\n\
19
+ \ let gitRepo;\n if (options.source) {\n if (/^https?:/.test(options.source))\
20
+ \ {\n // It's a git repo\n gitRepo = options.source;\n \
21
+ \ } else {\n // It's a local folder\n const srcDir = path.isAbsolute(options.source)\n\
22
+ \ ? options.source\n : path.join(process.cwd(), options.source);\n\
23
+ \ options.status('CREATE_APP_COPY_FILES', `Copy files from ${srcDir}...`);\n\
24
+ \ await fs.copy(srcDir, prjDir, {\n filter: src => !/\\/(\\\
25
+ .git|node_modules\\/|node_modules$)/.test(src) || path.basename(src) === '.gitignore',\n\
26
+ \ });\n }\n } else if (options.type) {\n // Get gitRepo\n\
27
+ \ options.status(\n 'QUERY_APP_TYPES_GIT_REPO',\n `Looking\
28
+ \ for the git repo for app type ${options.type}...`,\n );\n const\
29
+ \ appTypes = await getAppTypes();\n const appType = _.find(appTypes, {\
30
+ \ id: options.type });\n if (!appType) reject('APP_TYPE_NOT_SUPPORTED');\n\
31
+ \ gitRepo = appType.repo;\n } else {\n await fs.remove(prjDir);\n\
32
+ \ reject('NO_SOURCE_OR_APP_TYPE');\n }\n\n if (gitRepo) {\n \
33
+ \ options.status('CLONE_PROJECT', `Downloading project from ${gitRepo}...`);\n\
34
+ \ await cloneRepo(gitRepo, prjDir);\n }\n\n postCreate(prjDir,\
35
+ \ options);\n options.status('CREATION_SUCCESS', '\U0001F603App creation\
36
+ \ success.');\n resolve();\n } catch (err) {\n console.log('Failed\
37
+ \ to create project.');\n fs.removeSync(prjDir);\n reject(err);\n \
38
+ \ }\n });\n}"
39
+ - "@Override\n\tpublic void setFrameworkID(Option<Protos.FrameworkID> frameworkID)\
40
+ \ throws Exception {\n\t\tsynchronized (startStopLock) {\n\t\t\tverifyIsRunning();\n\
41
+ \n\t\t\tbyte[] value = frameworkID.isDefined() ? frameworkID.get().getValue().getBytes(ConfigConstants.DEFAULT_CHARSET)\
42
+ \ :\n\t\t\t\tnew byte[0];\n\t\t\tframeworkIdInZooKeeper.setValue(value);\n\t\t\
43
+ }\n\t}"
44
+ - "func MiddlewareHeaders(vs map[string]string) Middleware {\n\treturn func(h http.Handler)\
45
+ \ http.Handler {\n\t\treturn http.HandlerFunc(func(rw http.ResponseWriter, r *http.Request)\
46
+ \ {\n\t\t\t// Add headers\n\t\t\thandleHeaders(vs, rw)\n\n\t\t\t// Next handler\n\
47
+ \t\t\th.ServeHTTP(rw, r)\n\t\t})\n\t}\n}"
48
+ - source_sentence: 'Parses a Plist XML string. Returns an Object.
49
+
50
+
51
+ @param {String} xml - the XML String to decode
52
+
53
+ @param {Function} callback - callback function
54
+
55
+ @returns {Mixed} the decoded value from the Plist XML
56
+
57
+ @api public
58
+
59
+ @deprecated use parse() instead'
60
+ sentences:
61
+ - "function parseStringSync (xml) {\n var doc = new DOMParser().parseFromString(xml);\n\
62
+ \ var plist;\n if (doc.documentElement.nodeName !== 'plist') {\n throw new\
63
+ \ Error('malformed document. First element should be <plist>');\n }\n plist\
64
+ \ = parsePlistXML(doc.documentElement);\n\n // if the plist is an array with\
65
+ \ 1 element, pull it out of the array\n if (plist.length == 1) {\n plist =\
66
+ \ plist[0];\n }\n return plist;\n}"
67
+ - "func GetCallStringArgsValues(n ast.Node, ctx *Context) []string {\n\tvalues :=\
68
+ \ []string{}\n\tswitch node := n.(type) {\n\tcase *ast.CallExpr:\n\t\tfor _, arg\
69
+ \ := range node.Args {\n\t\t\tswitch param := arg.(type) {\n\t\t\tcase *ast.BasicLit:\n\
70
+ \t\t\t\tvalue, err := GetString(param)\n\t\t\t\tif err == nil {\n\t\t\t\t\tvalues\
71
+ \ = append(values, value)\n\t\t\t\t}\n\t\t\tcase *ast.Ident:\n\t\t\t\tvalues =\
72
+ \ append(values, GetIdentStringValues(param)...)\n\t\t\t}\n\t\t}\n\t}\n\treturn\
73
+ \ values\n}"
74
+ - "public static Date beginOfYear(@NotNull final Date date) {\n\t\treturn DateUtils.truncate(date,\
75
+ \ Calendar.YEAR);\n\t}"
76
+ - source_sentence: '// forbiddenImportsFor determines all of the forbidden
77
+
78
+ // imports for a package given the import restrictions
79
+
80
+ // and returns a deduplicated list of them'
81
+ sentences:
82
+ - "func (i *ImportRestriction) forbiddenImportsFor(pkg Package) []string {\n\tforbiddenImportSet\
83
+ \ := map[string]struct{}{}\n\timports := pkg.Imports\n\tif !i.ExcludeTests {\n\
84
+ \t\timports = append(imports, append(pkg.TestImports, pkg.XTestImports...)...)\n\
85
+ \t}\n\tfor _, imp := range imports {\n\t\tpath := extractVendorPath(imp)\n\t\t\
86
+ if i.isForbidden(path) {\n\t\t\tforbiddenImportSet[path] = struct{}{}\n\t\t}\n\
87
+ \t}\n\n\tvar forbiddenImports []string\n\tfor imp := range forbiddenImportSet\
88
+ \ {\n\t\tforbiddenImports = append(forbiddenImports, imp)\n\t}\n\treturn forbiddenImports\n\
89
+ }"
90
+ - "function pick(o, props = []) {\n return props.reduce((acc, k) => {\n \
91
+ \ if (o.hasOwnProperty(k)) {\n acc[k] = o[k];\n }\n\n \
92
+ \ return acc;\n }, {});\n}"
93
+ - "func (s *PutTraceSegmentsOutput) SetUnprocessedTraceSegments(v []*UnprocessedTraceSegment)\
94
+ \ *PutTraceSegmentsOutput {\n\ts.UnprocessedTraceSegments = v\n\treturn s\n}"
95
+ - source_sentence: 'Validates whether the specified template is syntactically correct
96
+ and will be accepted by Azure Resource Manager..
97
+
98
+
99
+ @param resourceGroupName The name of the resource group the template will be deployed
100
+ to. The name is case insensitive.
101
+
102
+ @param deploymentName The name of the deployment.
103
+
104
+ @param properties The deployment properties.
105
+
106
+ @param serviceCallback the async ServiceCallback to handle successful and failed
107
+ responses.
108
+
109
+ @throws IllegalArgumentException thrown if parameters fail the validation
110
+
111
+ @return the {@link ServiceFuture} object'
112
+ sentences:
113
+ - "func Execute(v string) {\n\tversion = v\n\tif err := rootCmd.Execute(); err !=\
114
+ \ nil {\n\t\tlog.Fatal(err)\n\t}\n}"
115
+ - "function( otherPath )\r\n\t{\r\n\t\tvar thisElements = this.elements;\r\n\t\t\
116
+ var otherElements = otherPath && otherPath.elements;\r\n\r\n\t\tif ( !otherElements\
117
+ \ || thisElements.length != otherElements.length )\r\n\t\t\treturn false;\r\n\r\
118
+ \n\t\tfor ( var i = 0 ; i < thisElements.length ; i++ )\r\n\t\t{\r\n\t\t\tif (\
119
+ \ !thisElements[ i ].equals( otherElements[ i ] ) )\r\n\t\t\t\treturn false;\r\
120
+ \n\t\t}\r\n\r\n\t\treturn true;\r\n\t}"
121
+ - "public ServiceFuture<DeploymentValidateResultInner> validateAsync(String resourceGroupName,\
122
+ \ String deploymentName, DeploymentProperties properties, final ServiceCallback<DeploymentValidateResultInner>\
123
+ \ serviceCallback) {\n return ServiceFuture.fromResponse(validateWithServiceResponseAsync(resourceGroupName,\
124
+ \ deploymentName, properties), serviceCallback);\n }"
125
+ - source_sentence: This method calculates the turn weight separately.
126
+ sentences:
127
+ - "private SingleType parseSingleType() throws TTXPathException {\n\n final\
128
+ \ String atomicType = parseAtomicType();\n final boolean intero = is(TokenType.INTERROGATION,\
129
+ \ true);\n return new SingleType(atomicType, intero);\n }"
130
+ - "public void putAllWriteable(BeanMap<T> map) {\n map.types.keySet().stream().filter(key\
131
+ \ -> getWriteInvoker(key) != null).forEach(key -> this.put(key, map.get(key)));\n\
132
+ \ }"
133
+ - "public double calcTurnWeight(int edgeFrom, int nodeVia, int edgeTo) {\n \
134
+ \ long turnFlags = turnCostExt.getTurnCostFlags(edgeFrom, nodeVia, edgeTo);\n\
135
+ \ if (turnCostEncoder.isTurnRestricted(turnFlags))\n return\
136
+ \ Double.POSITIVE_INFINITY;\n\n return turnCostEncoder.getTurnCost(turnFlags);\n\
137
+ \ }"
138
+ pipeline_tag: sentence-similarity
139
+ library_name: sentence-transformers
140
+ ---
141
+
142
+ # SentenceTransformer based on Shuu12121/CodeModernBERT-Snake
143
+
144
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Shuu12121/CodeModernBERT-Snake](https://huggingface.co/Shuu12121/CodeModernBERT-Snake). It maps sentences & paragraphs to a 512-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
145
+
146
+ ## Model Details
147
+
148
+ ### Model Description
149
+ - **Model Type:** Sentence Transformer
150
+ - **Base model:** [Shuu12121/CodeModernBERT-Snake](https://huggingface.co/Shuu12121/CodeModernBERT-Snake) <!-- at revision 73927b7c029b82e13135c02a1d4c5b50564d1e0d -->
151
+ - **Maximum Sequence Length:** 1024 tokens
152
+ - **Output Dimensionality:** 512 dimensions
153
+ - **Similarity Function:** Cosine Similarity
154
+ <!-- - **Training Dataset:** Unknown -->
155
+ <!-- - **Language:** Unknown -->
156
+ <!-- - **License:** Unknown -->
157
+
158
+ ### Model Sources
159
+
160
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
161
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
162
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
163
+
164
+ ### Full Model Architecture
165
+
166
+ ```
167
+ SentenceTransformer(
168
+ (0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: ModernBertModel
169
+ (1): Pooling({'word_embedding_dimension': 512, '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})
170
+ )
171
+ ```
172
+
173
+ ## Usage
174
+
175
+ ### Direct Usage (Sentence Transformers)
176
+
177
+ First install the Sentence Transformers library:
178
+
179
+ ```bash
180
+ pip install -U sentence-transformers
181
+ ```
182
+
183
+ Then you can load this model and run inference.
184
+ ```python
185
+ from sentence_transformers import SentenceTransformer
186
+
187
+ # Download from the 🤗 Hub
188
+ model = SentenceTransformer("sentence_transformers_model_id")
189
+ # Run inference
190
+ sentences = [
191
+ 'This method calculates the turn weight separately.',
192
+ 'public double calcTurnWeight(int edgeFrom, int nodeVia, int edgeTo) {\n long turnFlags = turnCostExt.getTurnCostFlags(edgeFrom, nodeVia, edgeTo);\n if (turnCostEncoder.isTurnRestricted(turnFlags))\n return Double.POSITIVE_INFINITY;\n\n return turnCostEncoder.getTurnCost(turnFlags);\n }',
193
+ 'public void putAllWriteable(BeanMap<T> map) {\n map.types.keySet().stream().filter(key -> getWriteInvoker(key) != null).forEach(key -> this.put(key, map.get(key)));\n }',
194
+ ]
195
+ embeddings = model.encode(sentences)
196
+ print(embeddings.shape)
197
+ # [3, 512]
198
+
199
+ # Get the similarity scores for the embeddings
200
+ similarities = model.similarity(embeddings, embeddings)
201
+ print(similarities.shape)
202
+ # [3, 3]
203
+ ```
204
+
205
+ <!--
206
+ ### Direct Usage (Transformers)
207
+
208
+ <details><summary>Click to see the direct usage in Transformers</summary>
209
+
210
+ </details>
211
+ -->
212
+
213
+ <!--
214
+ ### Downstream Usage (Sentence Transformers)
215
+
216
+ You can finetune this model on your own dataset.
217
+
218
+ <details><summary>Click to expand</summary>
219
+
220
+ </details>
221
+ -->
222
+
223
+ <!--
224
+ ### Out-of-Scope Use
225
+
226
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
227
+ -->
228
+
229
+ <!--
230
+ ## Bias, Risks and Limitations
231
+
232
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
233
+ -->
234
+
235
+ <!--
236
+ ### Recommendations
237
+
238
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
239
+ -->
240
+
241
+ ## Training Details
242
+
243
+ ### Training Dataset
244
+
245
+ #### Unnamed Dataset
246
+
247
+ * Size: 1,761,750 training samples
248
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
249
+ * Approximate statistics based on the first 1000 samples:
250
+ | | sentence_0 | sentence_1 | label |
251
+ |:--------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------|
252
+ | type | string | string | float |
253
+ | details | <ul><li>min: 3 tokens</li><li>mean: 47.87 tokens</li><li>max: 633 tokens</li></ul> | <ul><li>min: 28 tokens</li><li>mean: 164.44 tokens</li><li>max: 1024 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
254
+ * Samples:
255
+ | sentence_0 | sentence_1 | label |
256
+ |:-----------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
257
+ | <code>// Read reads from serial port.<br>// It is blocked until data received or timeout after p.timeout.</code> | <code>func (p *port) Read(b []byte) (n int, err error) {<br> var done uint32<br> if err = syscall.ReadFile(p.handle, b, &done, nil); err != nil {<br> return<br> }<br> if done == 0 {<br> err = ErrTimeout<br> return<br> }<br> n = int(done)<br> return<br>}</code> | <code>1.0</code> |
258
+ | <code>// _NET_WM_STRUT_PARTIAL set</code> | <code>func WmStrutPartialSet(xu *xgbutil.XUtil, win xproto.Window,<br> struts *WmStrutPartial) error {<br><br> rawStruts := make([]uint, 12)<br> rawStruts[0] = struts.Left<br> rawStruts[1] = struts.Right<br> rawStruts[2] = struts.Top<br> rawStruts[3] = struts.Bottom<br> rawStruts[4] = struts.LeftStartY<br> rawStruts[5] = struts.LeftEndY<br> rawStruts[6] = struts.RightStartY<br> rawStruts[7] = struts.RightEndY<br> rawStruts[8] = struts.TopStartX<br> rawStruts[9] = struts.TopEndX<br> rawStruts[10] = struts.BottomStartX<br> rawStruts[11] = struts.BottomEndX<br><br> return xprop.ChangeProp32(xu, win, "_NET_WM_STRUT_PARTIAL", "CARDINAL",<br> rawStruts...)<br>}</code> | <code>1.0</code> |
259
+ | <code>// Union returns a new geometry representing all points in this geometry and the<br>// other.</code> | <code>func (g *Geometry) Union(other *Geometry) (*Geometry, error) {<br> return g.binaryTopo("Union", cGEOSUnion, other)<br>}</code> | <code>1.0</code> |
260
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
261
+ ```json
262
+ {
263
+ "scale": 20.0,
264
+ "similarity_fct": "cos_sim"
265
+ }
266
+ ```
267
+
268
+ ### Training Hyperparameters
269
+ #### Non-Default Hyperparameters
270
+
271
+ - `per_device_train_batch_size`: 400
272
+ - `per_device_eval_batch_size`: 400
273
+ - `num_train_epochs`: 5
274
+ - `fp16`: True
275
+ - `multi_dataset_batch_sampler`: round_robin
276
+
277
+ #### All Hyperparameters
278
+ <details><summary>Click to expand</summary>
279
+
280
+ - `overwrite_output_dir`: False
281
+ - `do_predict`: False
282
+ - `eval_strategy`: no
283
+ - `prediction_loss_only`: True
284
+ - `per_device_train_batch_size`: 400
285
+ - `per_device_eval_batch_size`: 400
286
+ - `per_gpu_train_batch_size`: None
287
+ - `per_gpu_eval_batch_size`: None
288
+ - `gradient_accumulation_steps`: 1
289
+ - `eval_accumulation_steps`: None
290
+ - `torch_empty_cache_steps`: None
291
+ - `learning_rate`: 5e-05
292
+ - `weight_decay`: 0.0
293
+ - `adam_beta1`: 0.9
294
+ - `adam_beta2`: 0.999
295
+ - `adam_epsilon`: 1e-08
296
+ - `max_grad_norm`: 1
297
+ - `num_train_epochs`: 5
298
+ - `max_steps`: -1
299
+ - `lr_scheduler_type`: linear
300
+ - `lr_scheduler_kwargs`: {}
301
+ - `warmup_ratio`: 0.0
302
+ - `warmup_steps`: 0
303
+ - `log_level`: passive
304
+ - `log_level_replica`: warning
305
+ - `log_on_each_node`: True
306
+ - `logging_nan_inf_filter`: True
307
+ - `save_safetensors`: True
308
+ - `save_on_each_node`: False
309
+ - `save_only_model`: False
310
+ - `restore_callback_states_from_checkpoint`: False
311
+ - `no_cuda`: False
312
+ - `use_cpu`: False
313
+ - `use_mps_device`: False
314
+ - `seed`: 42
315
+ - `data_seed`: None
316
+ - `jit_mode_eval`: False
317
+ - `use_ipex`: False
318
+ - `bf16`: False
319
+ - `fp16`: True
320
+ - `fp16_opt_level`: O1
321
+ - `half_precision_backend`: auto
322
+ - `bf16_full_eval`: False
323
+ - `fp16_full_eval`: False
324
+ - `tf32`: None
325
+ - `local_rank`: 0
326
+ - `ddp_backend`: None
327
+ - `tpu_num_cores`: None
328
+ - `tpu_metrics_debug`: False
329
+ - `debug`: []
330
+ - `dataloader_drop_last`: False
331
+ - `dataloader_num_workers`: 0
332
+ - `dataloader_prefetch_factor`: None
333
+ - `past_index`: -1
334
+ - `disable_tqdm`: False
335
+ - `remove_unused_columns`: True
336
+ - `label_names`: None
337
+ - `load_best_model_at_end`: False
338
+ - `ignore_data_skip`: False
339
+ - `fsdp`: []
340
+ - `fsdp_min_num_params`: 0
341
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
342
+ - `tp_size`: 0
343
+ - `fsdp_transformer_layer_cls_to_wrap`: None
344
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
345
+ - `deepspeed`: None
346
+ - `label_smoothing_factor`: 0.0
347
+ - `optim`: adamw_torch
348
+ - `optim_args`: None
349
+ - `adafactor`: False
350
+ - `group_by_length`: False
351
+ - `length_column_name`: length
352
+ - `ddp_find_unused_parameters`: None
353
+ - `ddp_bucket_cap_mb`: None
354
+ - `ddp_broadcast_buffers`: False
355
+ - `dataloader_pin_memory`: True
356
+ - `dataloader_persistent_workers`: False
357
+ - `skip_memory_metrics`: True
358
+ - `use_legacy_prediction_loop`: False
359
+ - `push_to_hub`: False
360
+ - `resume_from_checkpoint`: None
361
+ - `hub_model_id`: None
362
+ - `hub_strategy`: every_save
363
+ - `hub_private_repo`: None
364
+ - `hub_always_push`: False
365
+ - `gradient_checkpointing`: False
366
+ - `gradient_checkpointing_kwargs`: None
367
+ - `include_inputs_for_metrics`: False
368
+ - `include_for_metrics`: []
369
+ - `eval_do_concat_batches`: True
370
+ - `fp16_backend`: auto
371
+ - `push_to_hub_model_id`: None
372
+ - `push_to_hub_organization`: None
373
+ - `mp_parameters`:
374
+ - `auto_find_batch_size`: False
375
+ - `full_determinism`: False
376
+ - `torchdynamo`: None
377
+ - `ray_scope`: last
378
+ - `ddp_timeout`: 1800
379
+ - `torch_compile`: False
380
+ - `torch_compile_backend`: None
381
+ - `torch_compile_mode`: None
382
+ - `include_tokens_per_second`: False
383
+ - `include_num_input_tokens_seen`: False
384
+ - `neftune_noise_alpha`: None
385
+ - `optim_target_modules`: None
386
+ - `batch_eval_metrics`: False
387
+ - `eval_on_start`: False
388
+ - `use_liger_kernel`: False
389
+ - `eval_use_gather_object`: False
390
+ - `average_tokens_across_devices`: False
391
+ - `prompts`: None
392
+ - `batch_sampler`: batch_sampler
393
+ - `multi_dataset_batch_sampler`: round_robin
394
+
395
+ </details>
396
+
397
+ ### Training Logs
398
+ | Epoch | Step | Training Loss |
399
+ |:------:|:-----:|:-------------:|
400
+ | 0.1135 | 500 | 1.0064 |
401
+ | 0.2270 | 1000 | 0.1985 |
402
+ | 0.3405 | 1500 | 0.1802 |
403
+ | 0.4540 | 2000 | 0.1659 |
404
+ | 0.5675 | 2500 | 0.1583 |
405
+ | 0.6810 | 3000 | 0.153 |
406
+ | 0.7946 | 3500 | 0.1478 |
407
+ | 0.9081 | 4000 | 0.1425 |
408
+ | 1.0216 | 4500 | 0.132 |
409
+ | 1.1351 | 5000 | 0.097 |
410
+ | 1.2486 | 5500 | 0.1 |
411
+ | 1.3621 | 6000 | 0.0972 |
412
+ | 1.4756 | 6500 | 0.0958 |
413
+ | 1.5891 | 7000 | 0.0968 |
414
+ | 1.7026 | 7500 | 0.0945 |
415
+ | 1.8161 | 8000 | 0.0943 |
416
+ | 1.9296 | 8500 | 0.0938 |
417
+ | 2.0431 | 9000 | 0.0831 |
418
+ | 2.1566 | 9500 | 0.0634 |
419
+ | 2.2701 | 10000 | 0.0642 |
420
+ | 2.3837 | 10500 | 0.0639 |
421
+ | 2.4972 | 11000 | 0.0646 |
422
+ | 2.6107 | 11500 | 0.065 |
423
+ | 2.7242 | 12000 | 0.0637 |
424
+ | 2.8377 | 12500 | 0.062 |
425
+ | 2.9512 | 13000 | 0.0626 |
426
+ | 3.0647 | 13500 | 0.0522 |
427
+ | 3.1782 | 14000 | 0.0443 |
428
+ | 3.2917 | 14500 | 0.0435 |
429
+ | 3.4052 | 15000 | 0.0447 |
430
+ | 3.5187 | 15500 | 0.0441 |
431
+ | 3.6322 | 16000 | 0.045 |
432
+ | 3.7457 | 16500 | 0.0443 |
433
+ | 3.8593 | 17000 | 0.0441 |
434
+ | 3.9728 | 17500 | 0.0433 |
435
+ | 4.0863 | 18000 | 0.0368 |
436
+ | 4.1998 | 18500 | 0.0333 |
437
+ | 4.3133 | 19000 | 0.0332 |
438
+ | 4.4268 | 19500 | 0.0335 |
439
+ | 4.5403 | 20000 | 0.033 |
440
+ | 4.6538 | 20500 | 0.0334 |
441
+ | 4.7673 | 21000 | 0.0325 |
442
+ | 4.8808 | 21500 | 0.0342 |
443
+ | 4.9943 | 22000 | 0.0341 |
444
+
445
+
446
+ ### Framework Versions
447
+ - Python: 3.11.12
448
+ - Sentence Transformers: 3.4.1
449
+ - Transformers: 4.51.3
450
+ - PyTorch: 2.6.0+cu124
451
+ - Accelerate: 1.5.2
452
+ - Datasets: 3.5.0
453
+ - Tokenizers: 0.21.1
454
+
455
+ ## Citation
456
+
457
+ ### BibTeX
458
+
459
+ #### Sentence Transformers
460
+ ```bibtex
461
+ @inproceedings{reimers-2019-sentence-bert,
462
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
463
+ author = "Reimers, Nils and Gurevych, Iryna",
464
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
465
+ month = "11",
466
+ year = "2019",
467
+ publisher = "Association for Computational Linguistics",
468
+ url = "https://arxiv.org/abs/1908.10084",
469
+ }
470
+ ```
471
+
472
+ #### MultipleNegativesRankingLoss
473
+ ```bibtex
474
+ @misc{henderson2017efficient,
475
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
476
+ 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},
477
+ year={2017},
478
+ eprint={1705.00652},
479
+ archivePrefix={arXiv},
480
+ primaryClass={cs.CL}
481
+ }
482
+ ```
483
+
484
+ <!--
485
+ ## Glossary
486
+
487
+ *Clearly define terms in order to be accessible across audiences.*
488
+ -->
489
+
490
+ <!--
491
+ ## Model Card Authors
492
+
493
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
494
+ -->
495
+
496
+ <!--
497
+ ## Model Card Contact
498
+
499
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
500
+ -->
added_tokens.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "</s>": 50001,
3
+ "<mask>": 50003,
4
+ "<s>": 50000,
5
+ "<unk>": 50002
6
+ }
config.json ADDED
@@ -0,0 +1,48 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "ModernBertModel"
4
+ ],
5
+ "attention_bias": false,
6
+ "attention_dropout": 0.0,
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "bos_token_id": 50000,
9
+ "classifier_activation": "gelu",
10
+ "classifier_bias": false,
11
+ "classifier_dropout": 0.0,
12
+ "classifier_pooling": "cls",
13
+ "cls_token_id": 50281,
14
+ "decoder_bias": true,
15
+ "deterministic_flash_attn": false,
16
+ "embedding_dropout": 0.0,
17
+ "eos_token_id": 50001,
18
+ "global_attn_every_n_layers": 3,
19
+ "global_rope_theta": 160000.0,
20
+ "hidden_activation": "gelu",
21
+ "hidden_dropout_prob": 0.1,
22
+ "hidden_size": 512,
23
+ "initializer_cutoff_factor": 2.0,
24
+ "initializer_range": 0.02,
25
+ "intermediate_size": 2048,
26
+ "local_attention": 128,
27
+ "local_attention_rope_theta": 10000,
28
+ "local_attention_window": 128,
29
+ "local_rope_theta": 10000.0,
30
+ "max_position_embeddings": 8192,
31
+ "mlp_bias": false,
32
+ "mlp_dropout": 0.0,
33
+ "model_type": "modernbert",
34
+ "norm_bias": false,
35
+ "norm_eps": 1e-05,
36
+ "num_attention_heads": 8,
37
+ "num_hidden_layers": 12,
38
+ "pad_token_id": 0,
39
+ "repad_logits_with_grad": false,
40
+ "rope_theta": 160000,
41
+ "sep_token_id": 50282,
42
+ "sparse_pred_ignore_index": -100,
43
+ "sparse_prediction": false,
44
+ "torch_dtype": "float32",
45
+ "transformers_version": "4.51.3",
46
+ "type_vocab_size": 2,
47
+ "vocab_size": 50004
48
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.1",
4
+ "transformers": "4.51.3",
5
+ "pytorch": "2.6.0+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
merges.txt ADDED
The diff for this file is too large to render. See raw diff
 
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c842f6cfef5c72cfe06132e4b74d012ab7573b6be2d78a0709c7aaf5f30998c9
3
+ size 303793176
modules.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ [
2
+ {
3
+ "idx": 0,
4
+ "name": "0",
5
+ "path": "",
6
+ "type": "sentence_transformers.models.Transformer"
7
+ },
8
+ {
9
+ "idx": 1,
10
+ "name": "1",
11
+ "path": "1_Pooling",
12
+ "type": "sentence_transformers.models.Pooling"
13
+ }
14
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 1024,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,51 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": {
3
+ "content": "<s>",
4
+ "lstrip": false,
5
+ "normalized": false,
6
+ "rstrip": false,
7
+ "single_word": false
8
+ },
9
+ "cls_token": {
10
+ "content": "<s>",
11
+ "lstrip": false,
12
+ "normalized": false,
13
+ "rstrip": false,
14
+ "single_word": false
15
+ },
16
+ "eos_token": {
17
+ "content": "</s>",
18
+ "lstrip": false,
19
+ "normalized": false,
20
+ "rstrip": false,
21
+ "single_word": false
22
+ },
23
+ "mask_token": {
24
+ "content": "<mask>",
25
+ "lstrip": true,
26
+ "normalized": false,
27
+ "rstrip": false,
28
+ "single_word": false
29
+ },
30
+ "pad_token": {
31
+ "content": "[PAD]",
32
+ "lstrip": false,
33
+ "normalized": false,
34
+ "rstrip": false,
35
+ "single_word": false
36
+ },
37
+ "sep_token": {
38
+ "content": "</s>",
39
+ "lstrip": false,
40
+ "normalized": false,
41
+ "rstrip": false,
42
+ "single_word": false
43
+ },
44
+ "unk_token": {
45
+ "content": "<unk>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false
50
+ }
51
+ }
tokenizer.json ADDED
The diff for this file is too large to render. See raw diff
 
tokenizer_config.json ADDED
@@ -0,0 +1,97 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "add_prefix_space": false,
3
+ "added_tokens_decoder": {
4
+ "0": {
5
+ "content": "[PAD]",
6
+ "lstrip": false,
7
+ "normalized": false,
8
+ "rstrip": false,
9
+ "single_word": false,
10
+ "special": true
11
+ },
12
+ "1": {
13
+ "content": "[UNK]",
14
+ "lstrip": false,
15
+ "normalized": false,
16
+ "rstrip": false,
17
+ "single_word": false,
18
+ "special": true
19
+ },
20
+ "2": {
21
+ "content": "[CLS]",
22
+ "lstrip": false,
23
+ "normalized": false,
24
+ "rstrip": false,
25
+ "single_word": false,
26
+ "special": true
27
+ },
28
+ "3": {
29
+ "content": "[SEP]",
30
+ "lstrip": false,
31
+ "normalized": false,
32
+ "rstrip": false,
33
+ "single_word": false,
34
+ "special": true
35
+ },
36
+ "4": {
37
+ "content": "[MASK]",
38
+ "lstrip": false,
39
+ "normalized": false,
40
+ "rstrip": false,
41
+ "single_word": false,
42
+ "special": true
43
+ },
44
+ "50000": {
45
+ "content": "<s>",
46
+ "lstrip": false,
47
+ "normalized": false,
48
+ "rstrip": false,
49
+ "single_word": false,
50
+ "special": true
51
+ },
52
+ "50001": {
53
+ "content": "</s>",
54
+ "lstrip": false,
55
+ "normalized": false,
56
+ "rstrip": false,
57
+ "single_word": false,
58
+ "special": true
59
+ },
60
+ "50002": {
61
+ "content": "<unk>",
62
+ "lstrip": false,
63
+ "normalized": false,
64
+ "rstrip": false,
65
+ "single_word": false,
66
+ "special": true
67
+ },
68
+ "50003": {
69
+ "content": "<mask>",
70
+ "lstrip": true,
71
+ "normalized": false,
72
+ "rstrip": false,
73
+ "single_word": false,
74
+ "special": true
75
+ }
76
+ },
77
+ "bos_token": "<s>",
78
+ "clean_up_tokenization_spaces": false,
79
+ "cls_token": "<s>",
80
+ "eos_token": "</s>",
81
+ "errors": "replace",
82
+ "extra_special_tokens": {},
83
+ "mask_token": "<mask>",
84
+ "max_length": null,
85
+ "model_max_length": 1000000000000000019884624838656,
86
+ "pad_to_multiple_of": null,
87
+ "pad_token": "[PAD]",
88
+ "pad_token_type_id": 0,
89
+ "padding_side": "right",
90
+ "sep_token": "</s>",
91
+ "stride": 0,
92
+ "tokenizer_class": "RobertaTokenizer",
93
+ "trim_offsets": true,
94
+ "truncation_side": "right",
95
+ "truncation_strategy": "longest_first",
96
+ "unk_token": "<unk>"
97
+ }
vocab.json ADDED
The diff for this file is too large to render. See raw diff