Upload ModernBERT model
Browse files- 1_Pooling/config.json +10 -0
- README.md +657 -0
- added_tokens.json +4 -0
- config.json +48 -0
- config_sentence_transformers.json +10 -0
- merges.txt +0 -0
- model.safetensors +3 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +78 -0
- vocab.json +0 -0
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,657 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:6960000
|
| 8 |
+
- loss:MultipleNegativesRankingLoss
|
| 9 |
+
base_model: Shuu12121/CodeModernBERT-Owl-4.1
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: Create a function to call with simple and hard types This is done
|
| 12 |
+
so simple types don't need to check for hard types
|
| 13 |
+
sentences:
|
| 14 |
+
- "function copyHead(headHtml, doc) {\n var head = doc.getElementsByTagName('head')[0];\n\
|
| 15 |
+
\n if (head.innerHTML == headHtml) {\n // the content is already\
|
| 16 |
+
\ correct\n return;\n }\n\n jQuery.init(head).empty();\n\
|
| 17 |
+
\n appendHTML(headHtml, head);\n }"
|
| 18 |
+
- "func compress(value float64) int16 {\n\ti := int16(precision*math.Log(1.0+math.Abs(value))\
|
| 19 |
+
\ + 0.5)\n\tif value < 0 {\n\t\treturn -1 * i\n\t}\n\treturn i\n}"
|
| 20 |
+
- "function (types, hard) {\n for (var t in types) {\n \
|
| 21 |
+
\ if (types.hasOwnProperty(t)) {\n (function (prop) {\n \
|
| 22 |
+
\ Object.defineProperty(props, prop, {\n \
|
| 23 |
+
\ get: function () {\n for (var i =\
|
| 24 |
+
\ 0; i < inputs.length; ++i) {\n if (!checkType(prop,\
|
| 25 |
+
\ inputs[i], hard)) {\n return false;\n\
|
| 26 |
+
\ }\n }\n \
|
| 27 |
+
\ return true;\n }\n \
|
| 28 |
+
\ });\n }(t));\n }\n \
|
| 29 |
+
\ }\n }"
|
| 30 |
+
- source_sentence: 'Takes an array of promises and returns a promise that is fulfilled
|
| 31 |
+
once all
|
| 32 |
+
|
| 33 |
+
the promises in the array are fulfilled
|
| 34 |
+
|
| 35 |
+
|
| 36 |
+
@param {Array} array The array of promises
|
| 37 |
+
|
| 38 |
+
@return {Promise} the promise that is fulfilled when all the array is fulfilled,
|
| 39 |
+
resolved to the array of results'
|
| 40 |
+
sentences:
|
| 41 |
+
- "public static List<DockerImage> getDockerImagesFromAgents(final int buildInfoId,\
|
| 42 |
+
\ TaskListener listener) throws IOException, InterruptedException {\n List<DockerImage>\
|
| 43 |
+
\ dockerImages = new ArrayList<DockerImage>();\n\n // Collect images from\
|
| 44 |
+
\ the master:\n dockerImages.addAll(getAndDiscardImagesByBuildId(buildInfoId));\n\
|
| 45 |
+
\n // Collect images from all the agents:\n List<Node> nodes = Jenkins.getInstance().getNodes();\n\
|
| 46 |
+
\ for (Node node : nodes) {\n if (node == null || node.getChannel()\
|
| 47 |
+
\ == null) {\n continue;\n }\n try {\n \
|
| 48 |
+
\ List<DockerImage> partialDockerImages = node.getChannel().call(new\
|
| 49 |
+
\ MasterToSlaveCallable<List<DockerImage>, IOException>() {\n \
|
| 50 |
+
\ public List<DockerImage> call() throws IOException {\n \
|
| 51 |
+
\ List<DockerImage> dockerImages = new ArrayList<DockerImage>();\n \
|
| 52 |
+
\ dockerImages.addAll(getAndDiscardImagesByBuildId(buildInfoId));\n\
|
| 53 |
+
\ return dockerImages;\n }\n \
|
| 54 |
+
\ });\n dockerImages.addAll(partialDockerImages);\n \
|
| 55 |
+
\ } catch (Exception e) {\n listener.getLogger().println(\"\
|
| 56 |
+
Could not collect docker images from Jenkins node '\" + node.getDisplayName()\
|
| 57 |
+
\ + \"' due to: \" + e.getMessage());\n }\n }\n return\
|
| 58 |
+
\ dockerImages;\n }"
|
| 59 |
+
- "public function findUnitByStart(Token $token) {\n\t\tforeach ($this->collection\
|
| 60 |
+
\ as $unit) {\n\t\t\tif ($unit->start === $token) {\n\t\t\t\treturn $unit;\n\t\
|
| 61 |
+
\t\t}\n\t\t}\n\n\t\treturn null;\n\t}"
|
| 62 |
+
- "function (array) {\n var self = this,\n deferred =\
|
| 63 |
+
\ new Deferred(),\n fulfilled = 0,\n length,\n \
|
| 64 |
+
\ results = [],\n hasError = false;\n\n \
|
| 65 |
+
\ if (!isArray(array)) {\n array = slice.call(arguments);\n \
|
| 66 |
+
\ }\n length = array.length;\n\n if (length ===\
|
| 67 |
+
\ 0) {\n deferred.emitSuccess(results);\n } else {\n\
|
| 68 |
+
\ array.forEach(function (promise, index) {\n\n \
|
| 69 |
+
\ self.when(promise,\n //Success\n \
|
| 70 |
+
\ function (value) {\n results[index] = value;\n\
|
| 71 |
+
\ fulfilled += 1;\n if (fulfilled\
|
| 72 |
+
\ === length) {\n\n if (hasError) {\n \
|
| 73 |
+
\ deferred.emitError(results);\n \
|
| 74 |
+
\ } else {\n deferred.emitSuccess(results);\n\
|
| 75 |
+
\ }\n }\n \
|
| 76 |
+
\ },\n //Error\n function\
|
| 77 |
+
\ (error) {\n results[index] = error;\n \
|
| 78 |
+
\ hasError = true;\n fulfilled += 1;\n\
|
| 79 |
+
\ if (fulfilled === length) {\n \
|
| 80 |
+
\ deferred.emitError(results);\n }\n \
|
| 81 |
+
\ }\n );\n });\n \
|
| 82 |
+
\ }\n return deferred.getPromise();\n }"
|
| 83 |
+
- source_sentence: 'Create and return a MBeanInfo instance for the supplied object.
|
| 84 |
+
|
| 85 |
+
|
| 86 |
+
@param object Supplied object to inspect.
|
| 87 |
+
|
| 88 |
+
@param classIntrospector ClassIntrospector to use.
|
| 89 |
+
|
| 90 |
+
|
| 91 |
+
@return a MBeanInfo instance for the supplied object.
|
| 92 |
+
|
| 93 |
+
|
| 94 |
+
@throws IntrospectionException If failed to create Info object
|
| 95 |
+
|
| 96 |
+
@throws IllegalArgumentException'
|
| 97 |
+
sentences:
|
| 98 |
+
- "function toggleShepherdModalClass(currentElement) {\n const shepherdModal =\
|
| 99 |
+
\ document.querySelector(`${classNames.modalTarget}`);\n\n if (shepherdModal)\
|
| 100 |
+
\ {\n shepherdModal.classList.remove(classNames.modalTarget);\n }\n\n currentElement.classList.add(classNames.modalTarget);\n\
|
| 101 |
+
}"
|
| 102 |
+
- "public function handle(): void\n {\n $directory = $this->argument('directory');\n\
|
| 103 |
+
\n if (!is_dir($directory)) {\n $this->error(\n \
|
| 104 |
+
\ sprintf('The directory \"%1$s\" does not exist. Run `resume make --output=%1$s`.',\
|
| 105 |
+
\ $directory)\n );\n\n exit(1);\n }\n\n chdir($directory);\n\
|
| 106 |
+
\n $this->info(\n sprintf('Resume preview started: http://%s:%s',\
|
| 107 |
+
\ $this->host(), $this->port())\n );\n $this->info('Stop the server\
|
| 108 |
+
\ with CTRL+C.');\n\n passthru($this->command($this->host(), $this->port()),\
|
| 109 |
+
\ $exitCode);\n\n exit($exitCode);\n }"
|
| 110 |
+
- "private MBeanInfo getInfo(Object object, ClassIntrospector classIntrospector)\
|
| 111 |
+
\ throws IntrospectionException {\n JmxBean jmxBean = AnnotationUtils.getAnnotation(object.getClass(),\
|
| 112 |
+
\ JmxBean.class);\n \n MBeanInfo beanInfo = new MBeanInfo(object.getClass().getName(),\
|
| 113 |
+
\ \n jmxBean.description(), \n \
|
| 114 |
+
\ getAttributes(classIntrospector), \n \
|
| 115 |
+
\ getConstructors(classIntrospector),\
|
| 116 |
+
\ \n getOperations(classIntrospector),\
|
| 117 |
+
\ \n getNotifications(object));\n \
|
| 118 |
+
\ return beanInfo;\n }"
|
| 119 |
+
- source_sentence: 'Adds a collaborator to this folder.
|
| 120 |
+
|
| 121 |
+
|
| 122 |
+
@param collaborator the collaborator to add.
|
| 123 |
+
|
| 124 |
+
@param role the role of the collaborator.
|
| 125 |
+
|
| 126 |
+
@return info about the new collaboration.'
|
| 127 |
+
sentences:
|
| 128 |
+
- "final public function readUInt32()\n {\n if (PHP_INT_SIZE < 8) {\n\
|
| 129 |
+
\ // @codeCoverageIgnoreStart\n if ($this->isLittleEndian())\
|
| 130 |
+
\ {\n list(, $lo, $hi) = unpack('S*', $this->read(4));\n \
|
| 131 |
+
\ } else {\n list(, $hi, $lo) = unpack('S*', $this->read(4));\n\
|
| 132 |
+
\ }\n return $hi * (0xffff+1) + $lo; // eq $hi << 16 | $lo\n\
|
| 133 |
+
\ // @codeCoverageIgnoreEnd\n } else {\n list(, $int)\
|
| 134 |
+
\ = unpack('L*', $this->read(4)) + array(0, 0);\n return $int;\n \
|
| 135 |
+
\ }\n }"
|
| 136 |
+
- "public function add_on_empty($attribute, $msg)\n\t{\n\t\tif (empty($msg))\n\t\
|
| 137 |
+
\t\t$msg = self::$DEFAULT_ERROR_MESSAGES['empty'];\n\n\t\tif (empty($this->model->$attribute))\n\
|
| 138 |
+
\t\t\t$this->add($attribute, $msg);\n\t}"
|
| 139 |
+
- "public BoxCollaboration.Info collaborate(BoxCollaborator collaborator, BoxCollaboration.Role\
|
| 140 |
+
\ role) {\n JsonObject accessibleByField = new JsonObject();\n accessibleByField.add(\"\
|
| 141 |
+
id\", collaborator.getID());\n\n if (collaborator instanceof BoxUser) {\n\
|
| 142 |
+
\ accessibleByField.add(\"type\", \"user\");\n } else if (collaborator\
|
| 143 |
+
\ instanceof BoxGroup) {\n accessibleByField.add(\"type\", \"group\"\
|
| 144 |
+
);\n } else {\n throw new IllegalArgumentException(\"The given\
|
| 145 |
+
\ collaborator is of an unknown type.\");\n }\n\n return this.collaborate(accessibleByField,\
|
| 146 |
+
\ role, null, null);\n }"
|
| 147 |
+
- source_sentence: 'Register the router instance.
|
| 148 |
+
|
| 149 |
+
|
| 150 |
+
@return void'
|
| 151 |
+
sentences:
|
| 152 |
+
- "protected function registerRouter()\n\t{\n\t\t$this->app['router'] = $this->app->share(function($app)\n\
|
| 153 |
+
\t\t{\n\t\t\treturn new Router($app['events'], $app);\n\t\t});\n\t}"
|
| 154 |
+
- "@Override\n @Nullable\n public Long apply(@Nonnull Long partialAccountNumber)\
|
| 155 |
+
\ {\n checkNotNull(partialAccountNumber, \"partialAccountNumber can't be\
|
| 156 |
+
\ null\");\n boolean isEven = true;\n int total = 0;\n Long\
|
| 157 |
+
\ temp = partialAccountNumber;\n\n while (temp > 0) {\n long\
|
| 158 |
+
\ digit = temp % 10;\n if (isEven) {\n long multipliedDigit\
|
| 159 |
+
\ = digit * 2;\n total += isTwoDigit(multipliedDigit) ? sumUpDigits(multipliedDigit)\
|
| 160 |
+
\ : multipliedDigit;\n } else {\n total += digit;\n\
|
| 161 |
+
\ }\n temp /= 10;\n isEven = !isEven;\n \
|
| 162 |
+
\ }\n\n int check = total * 9 % 10;\n\n return partialAccountNumber\
|
| 163 |
+
\ * 10 + check;\n }"
|
| 164 |
+
- "func (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string,\
|
| 165 |
+
\ parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error)\
|
| 166 |
+
\ {\n\tif d.useNaiveDiff() || !d.isParent(id, parent) {\n\t\treturn d.naiveDiff.DiffSize(id,\
|
| 167 |
+
\ idMappings, parent, parentMappings, mountLabel)\n\t}\n\treturn directory.Size(d.getDiffPath(id))\n\
|
| 168 |
+
}"
|
| 169 |
+
pipeline_tag: sentence-similarity
|
| 170 |
+
library_name: sentence-transformers
|
| 171 |
+
---
|
| 172 |
+
|
| 173 |
+
# SentenceTransformer based on Shuu12121/CodeModernBERT-Owl-4.1
|
| 174 |
+
|
| 175 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Shuu12121/CodeModernBERT-Owl-4.1](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-4.1). 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.
|
| 176 |
+
|
| 177 |
+
## Model Details
|
| 178 |
+
|
| 179 |
+
### Model Description
|
| 180 |
+
- **Model Type:** Sentence Transformer
|
| 181 |
+
- **Base model:** [Shuu12121/CodeModernBERT-Owl-4.1](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-4.1) <!-- at revision 1daade193254e92a8593c9fe97fc80e2cb742df4 -->
|
| 182 |
+
- **Maximum Sequence Length:** 1024 tokens
|
| 183 |
+
- **Output Dimensionality:** 768 dimensions
|
| 184 |
+
- **Similarity Function:** Cosine Similarity
|
| 185 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 186 |
+
<!-- - **Language:** Unknown -->
|
| 187 |
+
<!-- - **License:** Unknown -->
|
| 188 |
+
|
| 189 |
+
### Model Sources
|
| 190 |
+
|
| 191 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 192 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 193 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 194 |
+
|
| 195 |
+
### Full Model Architecture
|
| 196 |
+
|
| 197 |
+
```
|
| 198 |
+
SentenceTransformer(
|
| 199 |
+
(0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: ModernBertModel
|
| 200 |
+
(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})
|
| 201 |
+
)
|
| 202 |
+
```
|
| 203 |
+
|
| 204 |
+
## Usage
|
| 205 |
+
|
| 206 |
+
### Direct Usage (Sentence Transformers)
|
| 207 |
+
|
| 208 |
+
First install the Sentence Transformers library:
|
| 209 |
+
|
| 210 |
+
```bash
|
| 211 |
+
pip install -U sentence-transformers
|
| 212 |
+
```
|
| 213 |
+
|
| 214 |
+
Then you can load this model and run inference.
|
| 215 |
+
```python
|
| 216 |
+
from sentence_transformers import SentenceTransformer
|
| 217 |
+
|
| 218 |
+
# Download from the 🤗 Hub
|
| 219 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 220 |
+
# Run inference
|
| 221 |
+
sentences = [
|
| 222 |
+
'Register the router instance.\n\n@return void',
|
| 223 |
+
"protected function registerRouter()\n\t{\n\t\t$this->app['router'] = $this->app->share(function($app)\n\t\t{\n\t\t\treturn new Router($app['events'], $app);\n\t\t});\n\t}",
|
| 224 |
+
'func (d *Driver) DiffSize(id string, idMappings *idtools.IDMappings, parent string, parentMappings *idtools.IDMappings, mountLabel string) (size int64, err error) {\n\tif d.useNaiveDiff() || !d.isParent(id, parent) {\n\t\treturn d.naiveDiff.DiffSize(id, idMappings, parent, parentMappings, mountLabel)\n\t}\n\treturn directory.Size(d.getDiffPath(id))\n}',
|
| 225 |
+
]
|
| 226 |
+
embeddings = model.encode(sentences)
|
| 227 |
+
print(embeddings.shape)
|
| 228 |
+
# [3, 768]
|
| 229 |
+
|
| 230 |
+
# Get the similarity scores for the embeddings
|
| 231 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 232 |
+
print(similarities.shape)
|
| 233 |
+
# [3, 3]
|
| 234 |
+
```
|
| 235 |
+
|
| 236 |
+
<!--
|
| 237 |
+
### Direct Usage (Transformers)
|
| 238 |
+
|
| 239 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 240 |
+
|
| 241 |
+
</details>
|
| 242 |
+
-->
|
| 243 |
+
|
| 244 |
+
<!--
|
| 245 |
+
### Downstream Usage (Sentence Transformers)
|
| 246 |
+
|
| 247 |
+
You can finetune this model on your own dataset.
|
| 248 |
+
|
| 249 |
+
<details><summary>Click to expand</summary>
|
| 250 |
+
|
| 251 |
+
</details>
|
| 252 |
+
-->
|
| 253 |
+
|
| 254 |
+
<!--
|
| 255 |
+
### Out-of-Scope Use
|
| 256 |
+
|
| 257 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 258 |
+
-->
|
| 259 |
+
|
| 260 |
+
<!--
|
| 261 |
+
## Bias, Risks and Limitations
|
| 262 |
+
|
| 263 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 264 |
+
-->
|
| 265 |
+
|
| 266 |
+
<!--
|
| 267 |
+
### Recommendations
|
| 268 |
+
|
| 269 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 270 |
+
-->
|
| 271 |
+
|
| 272 |
+
## Training Details
|
| 273 |
+
|
| 274 |
+
### Training Dataset
|
| 275 |
+
|
| 276 |
+
#### Unnamed Dataset
|
| 277 |
+
|
| 278 |
+
* Size: 6,960,000 training samples
|
| 279 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 280 |
+
* Approximate statistics based on the first 1000 samples:
|
| 281 |
+
| | sentence_0 | sentence_1 | label |
|
| 282 |
+
|:--------|:------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
| 283 |
+
| type | string | string | float |
|
| 284 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 50.31 tokens</li><li>max: 1024 tokens</li></ul> | <ul><li>min: 28 tokens</li><li>mean: 164.73 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> |
|
| 285 |
+
* Samples:
|
| 286 |
+
| sentence_0 | sentence_1 | label |
|
| 287 |
+
|:-------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 288 |
+
| <code>// GetNodeID returns the NodeID field if it's non-nil, zero value otherwise.</code> | <code>func (a *App) GetNodeID() string {<br> if a == nil || a.NodeID == nil {<br> return ""<br> }<br> return *a.NodeID<br>}</code> | <code>1.0</code> |
|
| 289 |
+
| <code>// SignVote signs a canonical representation of the vote, along with the<br>// chainID. Implements PrivValidator.</code> | <code>func (pv *FilePV) SignVote(chainID string, vote *types.Vote) error {<br> if err := pv.signVote(chainID, vote); err != nil {<br> return fmt.Errorf("error signing vote: %v", err)<br> }<br> return nil<br>}</code> | <code>1.0</code> |
|
| 290 |
+
| <code>//GetQyAccessToken 获取access_token</code> | <code>func (ctx *Context) GetQyAccessToken() (accessToken string, err error) {<br> ctx.accessTokenLock.Lock()<br> defer ctx.accessTokenLock.Unlock()<br><br> accessTokenCacheKey := fmt.Sprintf("qy_access_token_%s", ctx.AppID)<br> val := ctx.Cache.Get(accessTokenCacheKey)<br> if val != nil {<br> accessToken = val.(string)<br> return<br> }<br><br> //从微信服务器获取<br> var resQyAccessToken ResQyAccessToken<br> resQyAccessToken, err = ctx.GetQyAccessTokenFromServer()<br> if err != nil {<br> return<br> }<br><br> accessToken = resQyAccessToken.AccessToken<br> return<br>}</code> | <code>1.0</code> |
|
| 291 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 292 |
+
```json
|
| 293 |
+
{
|
| 294 |
+
"scale": 20.0,
|
| 295 |
+
"similarity_fct": "cos_sim"
|
| 296 |
+
}
|
| 297 |
+
```
|
| 298 |
+
|
| 299 |
+
### Training Hyperparameters
|
| 300 |
+
#### Non-Default Hyperparameters
|
| 301 |
+
|
| 302 |
+
- `per_device_train_batch_size`: 250
|
| 303 |
+
- `per_device_eval_batch_size`: 250
|
| 304 |
+
- `fp16`: True
|
| 305 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 306 |
+
|
| 307 |
+
#### All Hyperparameters
|
| 308 |
+
<details><summary>Click to expand</summary>
|
| 309 |
+
|
| 310 |
+
- `overwrite_output_dir`: False
|
| 311 |
+
- `do_predict`: False
|
| 312 |
+
- `eval_strategy`: no
|
| 313 |
+
- `prediction_loss_only`: True
|
| 314 |
+
- `per_device_train_batch_size`: 250
|
| 315 |
+
- `per_device_eval_batch_size`: 250
|
| 316 |
+
- `per_gpu_train_batch_size`: None
|
| 317 |
+
- `per_gpu_eval_batch_size`: None
|
| 318 |
+
- `gradient_accumulation_steps`: 1
|
| 319 |
+
- `eval_accumulation_steps`: None
|
| 320 |
+
- `torch_empty_cache_steps`: None
|
| 321 |
+
- `learning_rate`: 5e-05
|
| 322 |
+
- `weight_decay`: 0.0
|
| 323 |
+
- `adam_beta1`: 0.9
|
| 324 |
+
- `adam_beta2`: 0.999
|
| 325 |
+
- `adam_epsilon`: 1e-08
|
| 326 |
+
- `max_grad_norm`: 1
|
| 327 |
+
- `num_train_epochs`: 3
|
| 328 |
+
- `max_steps`: -1
|
| 329 |
+
- `lr_scheduler_type`: linear
|
| 330 |
+
- `lr_scheduler_kwargs`: {}
|
| 331 |
+
- `warmup_ratio`: 0.0
|
| 332 |
+
- `warmup_steps`: 0
|
| 333 |
+
- `log_level`: passive
|
| 334 |
+
- `log_level_replica`: warning
|
| 335 |
+
- `log_on_each_node`: True
|
| 336 |
+
- `logging_nan_inf_filter`: True
|
| 337 |
+
- `save_safetensors`: True
|
| 338 |
+
- `save_on_each_node`: False
|
| 339 |
+
- `save_only_model`: False
|
| 340 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 341 |
+
- `no_cuda`: False
|
| 342 |
+
- `use_cpu`: False
|
| 343 |
+
- `use_mps_device`: False
|
| 344 |
+
- `seed`: 42
|
| 345 |
+
- `data_seed`: None
|
| 346 |
+
- `jit_mode_eval`: False
|
| 347 |
+
- `use_ipex`: False
|
| 348 |
+
- `bf16`: False
|
| 349 |
+
- `fp16`: True
|
| 350 |
+
- `fp16_opt_level`: O1
|
| 351 |
+
- `half_precision_backend`: auto
|
| 352 |
+
- `bf16_full_eval`: False
|
| 353 |
+
- `fp16_full_eval`: False
|
| 354 |
+
- `tf32`: None
|
| 355 |
+
- `local_rank`: 0
|
| 356 |
+
- `ddp_backend`: None
|
| 357 |
+
- `tpu_num_cores`: None
|
| 358 |
+
- `tpu_metrics_debug`: False
|
| 359 |
+
- `debug`: []
|
| 360 |
+
- `dataloader_drop_last`: False
|
| 361 |
+
- `dataloader_num_workers`: 0
|
| 362 |
+
- `dataloader_prefetch_factor`: None
|
| 363 |
+
- `past_index`: -1
|
| 364 |
+
- `disable_tqdm`: False
|
| 365 |
+
- `remove_unused_columns`: True
|
| 366 |
+
- `label_names`: None
|
| 367 |
+
- `load_best_model_at_end`: False
|
| 368 |
+
- `ignore_data_skip`: False
|
| 369 |
+
- `fsdp`: []
|
| 370 |
+
- `fsdp_min_num_params`: 0
|
| 371 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 372 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 373 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 374 |
+
- `deepspeed`: None
|
| 375 |
+
- `label_smoothing_factor`: 0.0
|
| 376 |
+
- `optim`: adamw_torch
|
| 377 |
+
- `optim_args`: None
|
| 378 |
+
- `adafactor`: False
|
| 379 |
+
- `group_by_length`: False
|
| 380 |
+
- `length_column_name`: length
|
| 381 |
+
- `ddp_find_unused_parameters`: None
|
| 382 |
+
- `ddp_bucket_cap_mb`: None
|
| 383 |
+
- `ddp_broadcast_buffers`: False
|
| 384 |
+
- `dataloader_pin_memory`: True
|
| 385 |
+
- `dataloader_persistent_workers`: False
|
| 386 |
+
- `skip_memory_metrics`: True
|
| 387 |
+
- `use_legacy_prediction_loop`: False
|
| 388 |
+
- `push_to_hub`: False
|
| 389 |
+
- `resume_from_checkpoint`: None
|
| 390 |
+
- `hub_model_id`: None
|
| 391 |
+
- `hub_strategy`: every_save
|
| 392 |
+
- `hub_private_repo`: None
|
| 393 |
+
- `hub_always_push`: False
|
| 394 |
+
- `hub_revision`: None
|
| 395 |
+
- `gradient_checkpointing`: False
|
| 396 |
+
- `gradient_checkpointing_kwargs`: None
|
| 397 |
+
- `include_inputs_for_metrics`: False
|
| 398 |
+
- `include_for_metrics`: []
|
| 399 |
+
- `eval_do_concat_batches`: True
|
| 400 |
+
- `fp16_backend`: auto
|
| 401 |
+
- `push_to_hub_model_id`: None
|
| 402 |
+
- `push_to_hub_organization`: None
|
| 403 |
+
- `mp_parameters`:
|
| 404 |
+
- `auto_find_batch_size`: False
|
| 405 |
+
- `full_determinism`: False
|
| 406 |
+
- `torchdynamo`: None
|
| 407 |
+
- `ray_scope`: last
|
| 408 |
+
- `ddp_timeout`: 1800
|
| 409 |
+
- `torch_compile`: False
|
| 410 |
+
- `torch_compile_backend`: None
|
| 411 |
+
- `torch_compile_mode`: None
|
| 412 |
+
- `include_tokens_per_second`: False
|
| 413 |
+
- `include_num_input_tokens_seen`: False
|
| 414 |
+
- `neftune_noise_alpha`: None
|
| 415 |
+
- `optim_target_modules`: None
|
| 416 |
+
- `batch_eval_metrics`: False
|
| 417 |
+
- `eval_on_start`: False
|
| 418 |
+
- `use_liger_kernel`: False
|
| 419 |
+
- `liger_kernel_config`: None
|
| 420 |
+
- `eval_use_gather_object`: False
|
| 421 |
+
- `average_tokens_across_devices`: False
|
| 422 |
+
- `prompts`: None
|
| 423 |
+
- `batch_sampler`: batch_sampler
|
| 424 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 425 |
+
|
| 426 |
+
</details>
|
| 427 |
+
|
| 428 |
+
### Training Logs
|
| 429 |
+
<details><summary>Click to expand</summary>
|
| 430 |
+
|
| 431 |
+
| Epoch | Step | Training Loss |
|
| 432 |
+
|:------:|:-----:|:-------------:|
|
| 433 |
+
| 0.0180 | 500 | 0.9746 |
|
| 434 |
+
| 0.0359 | 1000 | 0.1636 |
|
| 435 |
+
| 0.0539 | 1500 | 0.1502 |
|
| 436 |
+
| 0.0718 | 2000 | 0.1374 |
|
| 437 |
+
| 0.0898 | 2500 | 0.1314 |
|
| 438 |
+
| 0.1078 | 3000 | 0.1241 |
|
| 439 |
+
| 0.1257 | 3500 | 0.1152 |
|
| 440 |
+
| 0.1437 | 4000 | 0.1146 |
|
| 441 |
+
| 0.1616 | 4500 | 0.1065 |
|
| 442 |
+
| 0.1796 | 5000 | 0.1014 |
|
| 443 |
+
| 0.1976 | 5500 | 0.0983 |
|
| 444 |
+
| 0.2155 | 6000 | 0.0987 |
|
| 445 |
+
| 0.2335 | 6500 | 0.0917 |
|
| 446 |
+
| 0.2514 | 7000 | 0.0912 |
|
| 447 |
+
| 0.2694 | 7500 | 0.0896 |
|
| 448 |
+
| 0.2874 | 8000 | 0.086 |
|
| 449 |
+
| 0.3053 | 8500 | 0.0811 |
|
| 450 |
+
| 0.3233 | 9000 | 0.0813 |
|
| 451 |
+
| 0.3412 | 9500 | 0.082 |
|
| 452 |
+
| 0.3592 | 10000 | 0.0759 |
|
| 453 |
+
| 0.3772 | 10500 | 0.0753 |
|
| 454 |
+
| 0.3951 | 11000 | 0.0722 |
|
| 455 |
+
| 0.4131 | 11500 | 0.0707 |
|
| 456 |
+
| 0.4310 | 12000 | 0.0699 |
|
| 457 |
+
| 0.4490 | 12500 | 0.0698 |
|
| 458 |
+
| 0.4670 | 13000 | 0.0679 |
|
| 459 |
+
| 0.4849 | 13500 | 0.0653 |
|
| 460 |
+
| 0.5029 | 14000 | 0.0641 |
|
| 461 |
+
| 0.5208 | 14500 | 0.063 |
|
| 462 |
+
| 0.5388 | 15000 | 0.0621 |
|
| 463 |
+
| 0.5568 | 15500 | 0.061 |
|
| 464 |
+
| 0.5747 | 16000 | 0.0581 |
|
| 465 |
+
| 0.5927 | 16500 | 0.0555 |
|
| 466 |
+
| 0.6106 | 17000 | 0.0552 |
|
| 467 |
+
| 0.6286 | 17500 | 0.0551 |
|
| 468 |
+
| 0.6466 | 18000 | 0.0533 |
|
| 469 |
+
| 0.6645 | 18500 | 0.0521 |
|
| 470 |
+
| 0.6825 | 19000 | 0.051 |
|
| 471 |
+
| 0.7004 | 19500 | 0.0509 |
|
| 472 |
+
| 0.7184 | 20000 | 0.0499 |
|
| 473 |
+
| 0.7364 | 20500 | 0.0468 |
|
| 474 |
+
| 0.7543 | 21000 | 0.0484 |
|
| 475 |
+
| 0.7723 | 21500 | 0.0466 |
|
| 476 |
+
| 0.7902 | 22000 | 0.0446 |
|
| 477 |
+
| 0.8082 | 22500 | 0.0453 |
|
| 478 |
+
| 0.8261 | 23000 | 0.0442 |
|
| 479 |
+
| 0.8441 | 23500 | 0.0424 |
|
| 480 |
+
| 0.8621 | 24000 | 0.0434 |
|
| 481 |
+
| 0.8800 | 24500 | 0.0416 |
|
| 482 |
+
| 0.8980 | 25000 | 0.0406 |
|
| 483 |
+
| 0.9159 | 25500 | 0.0404 |
|
| 484 |
+
| 0.9339 | 26000 | 0.0398 |
|
| 485 |
+
| 0.9519 | 26500 | 0.0406 |
|
| 486 |
+
| 0.9698 | 27000 | 0.0387 |
|
| 487 |
+
| 0.9878 | 27500 | 0.0386 |
|
| 488 |
+
| 1.0057 | 28000 | 0.0311 |
|
| 489 |
+
| 1.0237 | 28500 | 0.0193 |
|
| 490 |
+
| 1.0417 | 29000 | 0.0197 |
|
| 491 |
+
| 1.0596 | 29500 | 0.0186 |
|
| 492 |
+
| 1.0776 | 30000 | 0.0192 |
|
| 493 |
+
| 1.0955 | 30500 | 0.0194 |
|
| 494 |
+
| 1.1135 | 31000 | 0.0196 |
|
| 495 |
+
| 1.1315 | 31500 | 0.0198 |
|
| 496 |
+
| 1.1494 | 32000 | 0.0203 |
|
| 497 |
+
| 1.1674 | 32500 | 0.02 |
|
| 498 |
+
| 1.1853 | 33000 | 0.0184 |
|
| 499 |
+
| 1.2033 | 33500 | 0.0181 |
|
| 500 |
+
| 1.2213 | 34000 | 0.0195 |
|
| 501 |
+
| 1.2392 | 34500 | 0.0186 |
|
| 502 |
+
| 1.2572 | 35000 | 0.0184 |
|
| 503 |
+
| 1.2751 | 35500 | 0.0184 |
|
| 504 |
+
| 1.2931 | 36000 | 0.0194 |
|
| 505 |
+
| 1.3111 | 36500 | 0.0191 |
|
| 506 |
+
| 1.3290 | 37000 | 0.0183 |
|
| 507 |
+
| 1.3470 | 37500 | 0.0179 |
|
| 508 |
+
| 1.3649 | 38000 | 0.0179 |
|
| 509 |
+
| 1.3829 | 38500 | 0.0178 |
|
| 510 |
+
| 1.4009 | 39000 | 0.018 |
|
| 511 |
+
| 1.4188 | 39500 | 0.0182 |
|
| 512 |
+
| 1.4368 | 40000 | 0.0188 |
|
| 513 |
+
| 1.4547 | 40500 | 0.0172 |
|
| 514 |
+
| 1.4727 | 41000 | 0.0169 |
|
| 515 |
+
| 1.4907 | 41500 | 0.0173 |
|
| 516 |
+
| 1.5086 | 42000 | 0.0166 |
|
| 517 |
+
| 1.5266 | 42500 | 0.0157 |
|
| 518 |
+
| 1.5445 | 43000 | 0.0168 |
|
| 519 |
+
| 1.5625 | 43500 | 0.0158 |
|
| 520 |
+
| 1.5805 | 44000 | 0.016 |
|
| 521 |
+
| 1.5984 | 44500 | 0.0166 |
|
| 522 |
+
| 1.6164 | 45000 | 0.0168 |
|
| 523 |
+
| 1.6343 | 45500 | 0.0162 |
|
| 524 |
+
| 1.6523 | 46000 | 0.0153 |
|
| 525 |
+
| 1.6703 | 46500 | 0.0149 |
|
| 526 |
+
| 1.6882 | 47000 | 0.0158 |
|
| 527 |
+
| 1.7062 | 47500 | 0.0152 |
|
| 528 |
+
| 1.7241 | 48000 | 0.0147 |
|
| 529 |
+
| 1.7421 | 48500 | 0.0146 |
|
| 530 |
+
| 1.7601 | 49000 | 0.0145 |
|
| 531 |
+
| 1.7780 | 49500 | 0.0148 |
|
| 532 |
+
| 1.7960 | 50000 | 0.015 |
|
| 533 |
+
| 1.8139 | 50500 | 0.0145 |
|
| 534 |
+
| 1.8319 | 51000 | 0.0142 |
|
| 535 |
+
| 1.8499 | 51500 | 0.014 |
|
| 536 |
+
| 1.8678 | 52000 | 0.0139 |
|
| 537 |
+
| 1.8858 | 52500 | 0.0133 |
|
| 538 |
+
| 1.9037 | 53000 | 0.0135 |
|
| 539 |
+
| 1.9217 | 53500 | 0.0131 |
|
| 540 |
+
| 1.9397 | 54000 | 0.0134 |
|
| 541 |
+
| 1.9576 | 54500 | 0.013 |
|
| 542 |
+
| 1.9756 | 55000 | 0.0132 |
|
| 543 |
+
| 1.9935 | 55500 | 0.0122 |
|
| 544 |
+
| 2.0115 | 56000 | 0.0089 |
|
| 545 |
+
| 2.0295 | 56500 | 0.0061 |
|
| 546 |
+
| 2.0474 | 57000 | 0.0061 |
|
| 547 |
+
| 2.0654 | 57500 | 0.006 |
|
| 548 |
+
| 2.0833 | 58000 | 0.0062 |
|
| 549 |
+
| 2.1013 | 58500 | 0.0058 |
|
| 550 |
+
| 2.1193 | 59000 | 0.0059 |
|
| 551 |
+
| 2.1372 | 59500 | 0.0059 |
|
| 552 |
+
| 2.1552 | 60000 | 0.0059 |
|
| 553 |
+
| 2.1731 | 60500 | 0.0058 |
|
| 554 |
+
| 2.1911 | 61000 | 0.0059 |
|
| 555 |
+
| 2.2091 | 61500 | 0.0058 |
|
| 556 |
+
| 2.2270 | 62000 | 0.0059 |
|
| 557 |
+
| 2.2450 | 62500 | 0.0058 |
|
| 558 |
+
| 2.2629 | 63000 | 0.0057 |
|
| 559 |
+
| 2.2809 | 63500 | 0.0055 |
|
| 560 |
+
| 2.2989 | 64000 | 0.0056 |
|
| 561 |
+
| 2.3168 | 64500 | 0.0056 |
|
| 562 |
+
| 2.3348 | 65000 | 0.0056 |
|
| 563 |
+
| 2.3527 | 65500 | 0.0057 |
|
| 564 |
+
| 2.3707 | 66000 | 0.0055 |
|
| 565 |
+
| 2.3886 | 66500 | 0.0056 |
|
| 566 |
+
| 2.4066 | 67000 | 0.0054 |
|
| 567 |
+
| 2.4246 | 67500 | 0.0055 |
|
| 568 |
+
| 2.4425 | 68000 | 0.0052 |
|
| 569 |
+
| 2.4605 | 68500 | 0.0053 |
|
| 570 |
+
| 2.4784 | 69000 | 0.0052 |
|
| 571 |
+
| 2.4964 | 69500 | 0.0053 |
|
| 572 |
+
| 2.5144 | 70000 | 0.0052 |
|
| 573 |
+
| 2.5323 | 70500 | 0.0052 |
|
| 574 |
+
| 2.5503 | 71000 | 0.0051 |
|
| 575 |
+
| 2.5682 | 71500 | 0.0049 |
|
| 576 |
+
| 2.5862 | 72000 | 0.005 |
|
| 577 |
+
| 2.6042 | 72500 | 0.0047 |
|
| 578 |
+
| 2.6221 | 73000 | 0.0048 |
|
| 579 |
+
| 2.6401 | 73500 | 0.0047 |
|
| 580 |
+
| 2.6580 | 74000 | 0.0048 |
|
| 581 |
+
| 2.6760 | 74500 | 0.0048 |
|
| 582 |
+
| 2.6940 | 75000 | 0.0048 |
|
| 583 |
+
| 2.7119 | 75500 | 0.0047 |
|
| 584 |
+
| 2.7299 | 76000 | 0.0047 |
|
| 585 |
+
| 2.7478 | 76500 | 0.0046 |
|
| 586 |
+
| 2.7658 | 77000 | 0.0046 |
|
| 587 |
+
| 2.7838 | 77500 | 0.0044 |
|
| 588 |
+
| 2.8017 | 78000 | 0.0046 |
|
| 589 |
+
| 2.8197 | 78500 | 0.0047 |
|
| 590 |
+
| 2.8376 | 79000 | 0.0045 |
|
| 591 |
+
| 2.8556 | 79500 | 0.0043 |
|
| 592 |
+
| 2.8736 | 80000 | 0.0045 |
|
| 593 |
+
| 2.8915 | 80500 | 0.0044 |
|
| 594 |
+
| 2.9095 | 81000 | 0.0045 |
|
| 595 |
+
| 2.9274 | 81500 | 0.0045 |
|
| 596 |
+
| 2.9454 | 82000 | 0.0043 |
|
| 597 |
+
| 2.9634 | 82500 | 0.0042 |
|
| 598 |
+
| 2.9813 | 83000 | 0.0041 |
|
| 599 |
+
| 2.9993 | 83500 | 0.0044 |
|
| 600 |
+
|
| 601 |
+
</details>
|
| 602 |
+
|
| 603 |
+
### Framework Versions
|
| 604 |
+
- Python: 3.11.13
|
| 605 |
+
- Sentence Transformers: 4.1.0
|
| 606 |
+
- Transformers: 4.53.0
|
| 607 |
+
- PyTorch: 2.6.0+cu124
|
| 608 |
+
- Accelerate: 1.8.1
|
| 609 |
+
- Datasets: 3.6.0
|
| 610 |
+
- Tokenizers: 0.21.2
|
| 611 |
+
|
| 612 |
+
## Citation
|
| 613 |
+
|
| 614 |
+
### BibTeX
|
| 615 |
+
|
| 616 |
+
#### Sentence Transformers
|
| 617 |
+
```bibtex
|
| 618 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 619 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 620 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 621 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 622 |
+
month = "11",
|
| 623 |
+
year = "2019",
|
| 624 |
+
publisher = "Association for Computational Linguistics",
|
| 625 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 626 |
+
}
|
| 627 |
+
```
|
| 628 |
+
|
| 629 |
+
#### MultipleNegativesRankingLoss
|
| 630 |
+
```bibtex
|
| 631 |
+
@misc{henderson2017efficient,
|
| 632 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 633 |
+
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},
|
| 634 |
+
year={2017},
|
| 635 |
+
eprint={1705.00652},
|
| 636 |
+
archivePrefix={arXiv},
|
| 637 |
+
primaryClass={cs.CL}
|
| 638 |
+
}
|
| 639 |
+
```
|
| 640 |
+
|
| 641 |
+
<!--
|
| 642 |
+
## Glossary
|
| 643 |
+
|
| 644 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 645 |
+
-->
|
| 646 |
+
|
| 647 |
+
<!--
|
| 648 |
+
## Model Card Authors
|
| 649 |
+
|
| 650 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 651 |
+
-->
|
| 652 |
+
|
| 653 |
+
<!--
|
| 654 |
+
## Model Card Contact
|
| 655 |
+
|
| 656 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 657 |
+
-->
|
added_tokens.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</s>": 50001,
|
| 3 |
+
"<s>": 50000
|
| 4 |
+
}
|
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": 768,
|
| 23 |
+
"initializer_cutoff_factor": 2.0,
|
| 24 |
+
"initializer_range": 0.02,
|
| 25 |
+
"intermediate_size": 3072,
|
| 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": 12,
|
| 37 |
+
"num_hidden_layers": 12,
|
| 38 |
+
"pad_token_id": 1,
|
| 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.53.0",
|
| 46 |
+
"type_vocab_size": 2,
|
| 47 |
+
"vocab_size": 50005
|
| 48 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "4.1.0",
|
| 4 |
+
"transformers": "4.53.0",
|
| 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:dfa9e6096d18fe6a5dff8337873d833e0e6a59c836dee08b57683f885c9270a0
|
| 3 |
+
size 606684184
|
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": true,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "[CLS]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": true,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": true,
|
| 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": true,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "[SEP]",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": true,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "[UNK]",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": true,
|
| 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,78 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "[UNK]",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": true,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "[PAD]",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": true,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "[CLS]",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": true,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "[SEP]",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": true,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"4": {
|
| 37 |
+
"content": "[MASK]",
|
| 38 |
+
"lstrip": true,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
},
|
| 44 |
+
"50000": {
|
| 45 |
+
"content": "<s>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": true,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false,
|
| 50 |
+
"special": true
|
| 51 |
+
},
|
| 52 |
+
"50001": {
|
| 53 |
+
"content": "</s>",
|
| 54 |
+
"lstrip": false,
|
| 55 |
+
"normalized": true,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"single_word": false,
|
| 58 |
+
"special": true
|
| 59 |
+
}
|
| 60 |
+
},
|
| 61 |
+
"bos_token": "<s>",
|
| 62 |
+
"clean_up_tokenization_spaces": false,
|
| 63 |
+
"cls_token": "[CLS]",
|
| 64 |
+
"eos_token": "</s>",
|
| 65 |
+
"errors": "replace",
|
| 66 |
+
"extra_special_tokens": {},
|
| 67 |
+
"mask_token": "[MASK]",
|
| 68 |
+
"max_length": 256,
|
| 69 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 70 |
+
"pad_token": "[PAD]",
|
| 71 |
+
"sep_token": "[SEP]",
|
| 72 |
+
"stride": 0,
|
| 73 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 74 |
+
"trim_offsets": true,
|
| 75 |
+
"truncation_side": "right",
|
| 76 |
+
"truncation_strategy": "longest_first",
|
| 77 |
+
"unk_token": "[UNK]"
|
| 78 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|