Upload ModernBERT model
Browse files- 1_Pooling/config.json +10 -0
- README.md +577 -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,577 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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arity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:2732400
|
| 8 |
+
- loss:MultipleNegativesRankingLoss
|
| 9 |
+
base_model: Shuu12121/CodeModernBERT-Owl-2.0
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: 'put string value.
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
@param body _.
|
| 15 |
+
|
| 16 |
+
@throws IllegalArgumentException thrown if parameters fail the validation.
|
| 17 |
+
|
| 18 |
+
@throws HttpResponseException thrown if the service returns an error.
|
| 19 |
+
|
| 20 |
+
@throws RuntimeException all other wrapped checked exceptions if the request fails
|
| 21 |
+
to be sent.'
|
| 22 |
+
sentences:
|
| 23 |
+
- "func ComposeSSHCloneURL(doer *user_model.User, ownerName, repoName string) string\
|
| 24 |
+
\ {\n\tsshUser := setting.SSH.User\n\tsshDomain := setting.SSH.Domain\n\n\tif\
|
| 25 |
+
\ sshUser == \"(DOER_USERNAME)\" {\n\t\t// Some users use SSH reverse-proxy and\
|
| 26 |
+
\ need to use the current signed-in username as the SSH user\n\t\t// to make the\
|
| 27 |
+
\ SSH reverse-proxy could prepare the user's public keys ahead.\n\t\t// For most\
|
| 28 |
+
\ cases we have the correct \"doer\", then use it as the SSH user.\n\t\t// If\
|
| 29 |
+
\ we can't get the doer, then use the built-in SSH user.\n\t\tif doer != nil {\n\
|
| 30 |
+
\t\t\tsshUser = doer.Name\n\t\t} else {\n\t\t\tsshUser = setting.SSH.BuiltinServerUser\n\
|
| 31 |
+
\t\t}\n\t}\n\n\t// non-standard port, it must use full URI\n\tif setting.SSH.Port\
|
| 32 |
+
\ != 22 {\n\t\tsshHost := net.JoinHostPort(sshDomain, strconv.Itoa(setting.SSH.Port))\n\
|
| 33 |
+
\t\treturn fmt.Sprintf(\"ssh://%s@%s/%s/%s.git\", sshUser, sshHost, url.PathEscape(ownerName),\
|
| 34 |
+
\ url.PathEscape(repoName))\n\t}\n\n\t// for standard port, it can use a shorter\
|
| 35 |
+
\ URI (without the port)\n\tsshHost := sshDomain\n\tif ip := net.ParseIP(sshHost);\
|
| 36 |
+
\ ip != nil && ip.To4() == nil {\n\t\tsshHost = \"[\" + sshHost + \"]\" // for\
|
| 37 |
+
\ IPv6 address, wrap it with brackets\n\t}\n\tif setting.Repository.UseCompatSSHURI\
|
| 38 |
+
\ {\n\t\treturn fmt.Sprintf(\"ssh://%s@%s/%s/%s.git\", sshUser, sshHost, url.PathEscape(ownerName),\
|
| 39 |
+
\ url.PathEscape(repoName))\n\t}\n\treturn fmt.Sprintf(\"%s@%s:%s/%s.git\", sshUser,\
|
| 40 |
+
\ sshHost, url.PathEscape(ownerName), url.PathEscape(repoName))\n}"
|
| 41 |
+
- "@java.lang.Override\n public boolean hasFieldExtractionMetadata() {\n return\
|
| 42 |
+
\ ((bitField0_ & 0x00000001) != 0);\n }"
|
| 43 |
+
- "@Metadata(properties = { MetadataProperties.GENERATED })\n @ServiceMethod(returns\
|
| 44 |
+
\ = ReturnType.SINGLE)\n public void put(String body) {\n this.serviceClient.put(body);\n\
|
| 45 |
+
\ }"
|
| 46 |
+
- source_sentence: 'Optional. User specified ID for the notebook runtime.
|
| 47 |
+
|
| 48 |
+
|
| 49 |
+
Generated from protobuf field <code>string notebook_runtime_id = 4 [(.google.api.field_behavior)
|
| 50 |
+
= OPTIONAL];</code>
|
| 51 |
+
|
| 52 |
+
@return string'
|
| 53 |
+
sentences:
|
| 54 |
+
- "public function getNotebookRuntimeId()\n {\n return $this->notebook_runtime_id;\n\
|
| 55 |
+
\ }"
|
| 56 |
+
- "func (client *BlobContainersClient) BeginObjectLevelWorm(ctx context.Context,\
|
| 57 |
+
\ resourceGroupName string, accountName string, containerName string, options\
|
| 58 |
+
\ *BlobContainersClientBeginObjectLevelWormOptions) (*runtime.Poller[BlobContainersClientObjectLevelWormResponse],\
|
| 59 |
+
\ error) {\n\tif options == nil || options.ResumeToken == \"\" {\n\t\tresp, err\
|
| 60 |
+
\ := client.objectLevelWorm(ctx, resourceGroupName, accountName, containerName,\
|
| 61 |
+
\ options)\n\t\tif err != nil {\n\t\t\treturn nil, err\n\t\t}\n\t\tpoller, err\
|
| 62 |
+
\ := runtime.NewPoller(resp, client.internal.Pipeline(), &runtime.NewPollerOptions[BlobContainersClientObjectLevelWormResponse]{\n\
|
| 63 |
+
\t\t\tFinalStateVia: runtime.FinalStateViaLocation,\n\t\t\tTracer: client.internal.Tracer(),\n\
|
| 64 |
+
\t\t})\n\t\treturn poller, err\n\t} else {\n\t\treturn runtime.NewPollerFromResumeToken(options.ResumeToken,\
|
| 65 |
+
\ client.internal.Pipeline(), &runtime.NewPollerFromResumeTokenOptions[BlobContainersClientObjectLevelWormResponse]{\n\
|
| 66 |
+
\t\t\tTracer: client.internal.Tracer(),\n\t\t})\n\t}\n}"
|
| 67 |
+
- "def version(self) -> Union[int, str]:\n \n if self._version is\
|
| 68 |
+
\ None:\n self._version = self._get_next_version()\n return\
|
| 69 |
+
\ self._version"
|
| 70 |
+
- source_sentence: '<pre>
|
| 71 |
+
|
| 72 |
+
Output only. An email message received in reply to the case.
|
| 73 |
+
|
| 74 |
+
</pre>
|
| 75 |
+
|
| 76 |
+
|
| 77 |
+
<code>
|
| 78 |
+
|
| 79 |
+
.google.cloud.support.v2beta.EmailMessage email_message = 102 [(.google.api.field_behavior)
|
| 80 |
+
= OUTPUT_ONLY];
|
| 81 |
+
|
| 82 |
+
</code>
|
| 83 |
+
|
| 84 |
+
|
| 85 |
+
@return The emailMessage.'
|
| 86 |
+
sentences:
|
| 87 |
+
- "@java.lang.Override\n public com.google.cloud.support.v2beta.EmailMessage getEmailMessage()\
|
| 88 |
+
\ {\n if (eventObjectCase_ == 102) {\n return (com.google.cloud.support.v2beta.EmailMessage)\
|
| 89 |
+
\ eventObject_;\n }\n return com.google.cloud.support.v2beta.EmailMessage.getDefaultInstance();\n\
|
| 90 |
+
\ }"
|
| 91 |
+
- "def df_isin(df, values):\n \n if is_list_like(values) and not isinstance(values,\
|
| 92 |
+
\ dict):\n values = list(values)\n elif not isinstance(\n values,\
|
| 93 |
+
\ (SERIES_TYPE, DATAFRAME_TYPE, TENSOR_TYPE, INDEX_TYPE, dict)\n ):\n \
|
| 94 |
+
\ raise TypeError(\n \"only list-like objects or dict are allowed\
|
| 95 |
+
\ to be passed to isin(), \"\n f\"you passed a [{type(values)}]\"\n\
|
| 96 |
+
\ )\n op = DataFrameIsin(values=values)\n return op(df)"
|
| 97 |
+
- "public function getModelDeploymentMonitoringJobs()\n {\n return $this->model_deployment_monitoring_jobs;\n\
|
| 98 |
+
\ }"
|
| 99 |
+
- source_sentence: Compute the maximum violation of KKT conditions.
|
| 100 |
+
sentences:
|
| 101 |
+
- "def with_url(self,raw_url: str) -> SearchesRequestBuilder:\n \n \
|
| 102 |
+
\ if raw_url is None:\n raise TypeError(\"raw_url cannot be null.\"\
|
| 103 |
+
)\n return SearchesRequestBuilder(self.request_adapter, raw_url)"
|
| 104 |
+
- "def get_subscription\n # Create a client object. The client can be reused for\
|
| 105 |
+
\ multiple calls.\n client = Google::Apps::Events::Subscriptions::V1::SubscriptionsService::Client.new\n\
|
| 106 |
+
\n # Create a request. To set request fields, pass in keyword arguments.\n request\
|
| 107 |
+
\ = Google::Apps::Events::Subscriptions::V1::GetSubscriptionRequest.new\n\n #\
|
| 108 |
+
\ Call the get_subscription method.\n result = client.get_subscription request\n\
|
| 109 |
+
\n # The returned object is of type Google::Apps::Events::Subscriptions::V1::Subscription.\n\
|
| 110 |
+
\ p result\nend"
|
| 111 |
+
- "def compute_kkt_optimality(g, on_bound):\n \n g_kkt = g * on_bound\n \
|
| 112 |
+
\ free_set = on_bound == 0\n g_kkt[free_set] = np.abs(g[free_set])\n return\
|
| 113 |
+
\ np.max(g_kkt)"
|
| 114 |
+
- source_sentence: 'Creates a unary expression NEGATIVE
|
| 115 |
+
|
| 116 |
+
|
| 117 |
+
# Errors
|
| 118 |
+
|
| 119 |
+
|
| 120 |
+
This function errors when the argument''s type is not signed numeric'
|
| 121 |
+
sentences:
|
| 122 |
+
- "public function searchItemAction()\n {\n return $this->searchBase(\"\
|
| 123 |
+
ifgroupentry\", ['ifname', 'descr', 'members', 'sequence'], \"ifname\");\n \
|
| 124 |
+
\ }"
|
| 125 |
+
- "pub fn poller(self) -> impl lro::Poller<(), crate::model::DeleteSitemapMetadata>\
|
| 126 |
+
\ {\n type Operation =\n lro::internal::Operation<wkt::Empty,\
|
| 127 |
+
\ crate::model::DeleteSitemapMetadata>;\n let polling_error_policy\
|
| 128 |
+
\ = self.0.stub.get_polling_error_policy(&self.0.options);\n let polling_backoff_policy\
|
| 129 |
+
\ = self.0.stub.get_polling_backoff_policy(&self.0.options);\n\n let\
|
| 130 |
+
\ stub = self.0.stub.clone();\n let mut options = self.0.options.clone();\n\
|
| 131 |
+
\ options.set_retry_policy(gax::retry_policy::NeverRetry);\n \
|
| 132 |
+
\ let query = move |name| {\n let stub = stub.clone();\n \
|
| 133 |
+
\ let options = options.clone();\n async {\n \
|
| 134 |
+
\ let op = GetOperation::new(stub)\n .set_name(name)\n\
|
| 135 |
+
\ .with_options(options)\n .send()\n\
|
| 136 |
+
\ .await?;\n Ok(Operation::new(op))\n\
|
| 137 |
+
\ }\n };\n\n let start = move || async {\n\
|
| 138 |
+
\ let op = self.send().await?;\n Ok(Operation::new(op))\n\
|
| 139 |
+
\ };\n\n lro::internal::new_unit_response_poller(\n \
|
| 140 |
+
\ polling_error_policy,\n polling_backoff_policy,\n\
|
| 141 |
+
\ start,\n query,\n )\n }"
|
| 142 |
+
- "pub fn negative(\n arg: Arc<dyn PhysicalExpr>,\n input_schema: &Schema,\n\
|
| 143 |
+
) -> Result<Arc<dyn PhysicalExpr>> {\n let data_type = arg.data_type(input_schema)?;\n\
|
| 144 |
+
\ if !coercion::is_signed_numeric(&data_type) {\n Err(DataFusionError::Internal(\n\
|
| 145 |
+
\ format!(\n \"(- '{:?}') can't be evaluated because\
|
| 146 |
+
\ the expression's type is {:?}, not signed numeric\",\n arg, data_type,\n\
|
| 147 |
+
\ ),\n ))\n } else {\n Ok(Arc::new(NegativeExpr::new(arg)))\n\
|
| 148 |
+
\ }\n}"
|
| 149 |
+
pipeline_tag: sentence-similarity
|
| 150 |
+
library_name: sentence-transformers
|
| 151 |
+
---
|
| 152 |
+
|
| 153 |
+
# SentenceTransformer based on Shuu12121/CodeModernBERT-Owl-2.0
|
| 154 |
+
|
| 155 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Shuu12121/CodeModernBERT-Owl-2.0](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-2.0). 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.
|
| 156 |
+
|
| 157 |
+
## Model Details
|
| 158 |
+
|
| 159 |
+
### Model Description
|
| 160 |
+
- **Model Type:** Sentence Transformer
|
| 161 |
+
- **Base model:** [Shuu12121/CodeModernBERT-Owl-2.0](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-2.0) <!-- at revision a6f43b644188b4e7fe211f38003c7742218607c0 -->
|
| 162 |
+
- **Maximum Sequence Length:** 1024 tokens
|
| 163 |
+
- **Output Dimensionality:** 768 dimensions
|
| 164 |
+
- **Similarity Function:** Cosine Similarity
|
| 165 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 166 |
+
<!-- - **Language:** Unknown -->
|
| 167 |
+
<!-- - **License:** Unknown -->
|
| 168 |
+
|
| 169 |
+
### Model Sources
|
| 170 |
+
|
| 171 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 172 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 173 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 174 |
+
|
| 175 |
+
### Full Model Architecture
|
| 176 |
+
|
| 177 |
+
```
|
| 178 |
+
SentenceTransformer(
|
| 179 |
+
(0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: ModernBertModel
|
| 180 |
+
(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})
|
| 181 |
+
)
|
| 182 |
+
```
|
| 183 |
+
|
| 184 |
+
## Usage
|
| 185 |
+
|
| 186 |
+
### Direct Usage (Sentence Transformers)
|
| 187 |
+
|
| 188 |
+
First install the Sentence Transformers library:
|
| 189 |
+
|
| 190 |
+
```bash
|
| 191 |
+
pip install -U sentence-transformers
|
| 192 |
+
```
|
| 193 |
+
|
| 194 |
+
Then you can load this model and run inference.
|
| 195 |
+
```python
|
| 196 |
+
from sentence_transformers import SentenceTransformer
|
| 197 |
+
|
| 198 |
+
# Download from the 🤗 Hub
|
| 199 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 200 |
+
# Run inference
|
| 201 |
+
sentences = [
|
| 202 |
+
"Creates a unary expression NEGATIVE\n\n# Errors\n\nThis function errors when the argument's type is not signed numeric",
|
| 203 |
+
'pub fn negative(\n arg: Arc<dyn PhysicalExpr>,\n input_schema: &Schema,\n) -> Result<Arc<dyn PhysicalExpr>> {\n let data_type = arg.data_type(input_schema)?;\n if !coercion::is_signed_numeric(&data_type) {\n Err(DataFusionError::Internal(\n format!(\n "(- \'{:?}\') can\'t be evaluated because the expression\'s type is {:?}, not signed numeric",\n arg, data_type,\n ),\n ))\n } else {\n Ok(Arc::new(NegativeExpr::new(arg)))\n }\n}',
|
| 204 |
+
'public function searchItemAction()\n {\n return $this->searchBase("ifgroupentry", [\'ifname\', \'descr\', \'members\', \'sequence\'], "ifname");\n }',
|
| 205 |
+
]
|
| 206 |
+
embeddings = model.encode(sentences)
|
| 207 |
+
print(embeddings.shape)
|
| 208 |
+
# [3, 768]
|
| 209 |
+
|
| 210 |
+
# Get the similarity scores for the embeddings
|
| 211 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 212 |
+
print(similarities.shape)
|
| 213 |
+
# [3, 3]
|
| 214 |
+
```
|
| 215 |
+
|
| 216 |
+
<!--
|
| 217 |
+
### Direct Usage (Transformers)
|
| 218 |
+
|
| 219 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 220 |
+
|
| 221 |
+
</details>
|
| 222 |
+
-->
|
| 223 |
+
|
| 224 |
+
<!--
|
| 225 |
+
### Downstream Usage (Sentence Transformers)
|
| 226 |
+
|
| 227 |
+
You can finetune this model on your own dataset.
|
| 228 |
+
|
| 229 |
+
<details><summary>Click to expand</summary>
|
| 230 |
+
|
| 231 |
+
</details>
|
| 232 |
+
-->
|
| 233 |
+
|
| 234 |
+
<!--
|
| 235 |
+
### Out-of-Scope Use
|
| 236 |
+
|
| 237 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 238 |
+
-->
|
| 239 |
+
|
| 240 |
+
<!--
|
| 241 |
+
## Bias, Risks and Limitations
|
| 242 |
+
|
| 243 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 244 |
+
-->
|
| 245 |
+
|
| 246 |
+
<!--
|
| 247 |
+
### Recommendations
|
| 248 |
+
|
| 249 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 250 |
+
-->
|
| 251 |
+
|
| 252 |
+
## Training Details
|
| 253 |
+
|
| 254 |
+
### Training Dataset
|
| 255 |
+
|
| 256 |
+
#### Unnamed Dataset
|
| 257 |
+
|
| 258 |
+
* Size: 2,732,400 training samples
|
| 259 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 260 |
+
* Approximate statistics based on the first 1000 samples:
|
| 261 |
+
| | sentence_0 | sentence_1 | label |
|
| 262 |
+
|:--------|:--------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
| 263 |
+
| type | string | string | float |
|
| 264 |
+
| details | <ul><li>min: 13 tokens</li><li>mean: 109.22 tokens</li><li>max: 1024 tokens</li></ul> | <ul><li>min: 6 tokens</li><li>mean: 250.01 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> |
|
| 265 |
+
* Samples:
|
| 266 |
+
| sentence_0 | sentence_1 | label |
|
| 267 |
+
|:----------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 268 |
+
| <code>Prints the specified `pkg`.<br><br>If `is_main` is not set, nested package notation is used.</code> | <code>pub fn print_package(<br> &mut self,<br> resolve: &Resolve,<br> pkg: PackageId,<br> is_main: bool,<br> ) -> Result<()> {<br> let pkg = &resolve.packages[pkg];<br> self.print_package_outer(pkg)?;<br><br> if is_main {<br> self.output.semicolon();<br> self.output.newline();<br> } else {<br> self.output.indent_start();<br> }<br><br> for (name, id) in pkg.interfaces.iter() {<br> self.print_interface_outer(resolve, *id, name)?;<br> self.output.indent_start();<br> self.print_interface(resolve, *id)?;<br> self.output.indent_end();<br> if is_main {<br> self.output.newline();<br> }<br> }<br><br> for (name, id) in pkg.worlds.iter() {<br> self.print_docs(&resolve.worlds[*id].docs);<br> self.print_stability(&resolve.worlds[*id].stability);<br> self.output.keyword("world");<br> self.output.str(" ");<br> self.print_name_type(name, TypeKind:...</code> | <code>1.0</code> |
|
| 269 |
+
| <code><p>An alternative descriptive name for the user.</p></code> | <code>pub fn nick_name(mut self, input: impl ::std::convert::Into<::std::string::String>) -> Self {<br> self.nick_name = ::std::option::Option::Some(input.into());<br> self<br> }</code> | <code>1.0</code> |
|
| 270 |
+
| <code><p>Indicates whether the match is case sensitive.</p></code> | <code>pub fn case_sensitive(mut self, input: bool) -> Self {<br> self.case_sensitive = ::std::option::Option::Some(input);<br> self<br> }</code> | <code>1.0</code> |
|
| 271 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 272 |
+
```json
|
| 273 |
+
{
|
| 274 |
+
"scale": 20.0,
|
| 275 |
+
"similarity_fct": "cos_sim"
|
| 276 |
+
}
|
| 277 |
+
```
|
| 278 |
+
|
| 279 |
+
### Training Hyperparameters
|
| 280 |
+
#### Non-Default Hyperparameters
|
| 281 |
+
|
| 282 |
+
- `per_device_train_batch_size`: 150
|
| 283 |
+
- `per_device_eval_batch_size`: 150
|
| 284 |
+
- `fp16`: True
|
| 285 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 286 |
+
|
| 287 |
+
#### All Hyperparameters
|
| 288 |
+
<details><summary>Click to expand</summary>
|
| 289 |
+
|
| 290 |
+
- `overwrite_output_dir`: False
|
| 291 |
+
- `do_predict`: False
|
| 292 |
+
- `eval_strategy`: no
|
| 293 |
+
- `prediction_loss_only`: True
|
| 294 |
+
- `per_device_train_batch_size`: 150
|
| 295 |
+
- `per_device_eval_batch_size`: 150
|
| 296 |
+
- `per_gpu_train_batch_size`: None
|
| 297 |
+
- `per_gpu_eval_batch_size`: None
|
| 298 |
+
- `gradient_accumulation_steps`: 1
|
| 299 |
+
- `eval_accumulation_steps`: None
|
| 300 |
+
- `torch_empty_cache_steps`: None
|
| 301 |
+
- `learning_rate`: 5e-05
|
| 302 |
+
- `weight_decay`: 0.0
|
| 303 |
+
- `adam_beta1`: 0.9
|
| 304 |
+
- `adam_beta2`: 0.999
|
| 305 |
+
- `adam_epsilon`: 1e-08
|
| 306 |
+
- `max_grad_norm`: 1
|
| 307 |
+
- `num_train_epochs`: 3
|
| 308 |
+
- `max_steps`: -1
|
| 309 |
+
- `lr_scheduler_type`: linear
|
| 310 |
+
- `lr_scheduler_kwargs`: {}
|
| 311 |
+
- `warmup_ratio`: 0.0
|
| 312 |
+
- `warmup_steps`: 0
|
| 313 |
+
- `log_level`: passive
|
| 314 |
+
- `log_level_replica`: warning
|
| 315 |
+
- `log_on_each_node`: True
|
| 316 |
+
- `logging_nan_inf_filter`: True
|
| 317 |
+
- `save_safetensors`: True
|
| 318 |
+
- `save_on_each_node`: False
|
| 319 |
+
- `save_only_model`: False
|
| 320 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 321 |
+
- `no_cuda`: False
|
| 322 |
+
- `use_cpu`: False
|
| 323 |
+
- `use_mps_device`: False
|
| 324 |
+
- `seed`: 42
|
| 325 |
+
- `data_seed`: None
|
| 326 |
+
- `jit_mode_eval`: False
|
| 327 |
+
- `use_ipex`: False
|
| 328 |
+
- `bf16`: False
|
| 329 |
+
- `fp16`: True
|
| 330 |
+
- `fp16_opt_level`: O1
|
| 331 |
+
- `half_precision_backend`: auto
|
| 332 |
+
- `bf16_full_eval`: False
|
| 333 |
+
- `fp16_full_eval`: False
|
| 334 |
+
- `tf32`: None
|
| 335 |
+
- `local_rank`: 0
|
| 336 |
+
- `ddp_backend`: None
|
| 337 |
+
- `tpu_num_cores`: None
|
| 338 |
+
- `tpu_metrics_debug`: False
|
| 339 |
+
- `debug`: []
|
| 340 |
+
- `dataloader_drop_last`: False
|
| 341 |
+
- `dataloader_num_workers`: 0
|
| 342 |
+
- `dataloader_prefetch_factor`: None
|
| 343 |
+
- `past_index`: -1
|
| 344 |
+
- `disable_tqdm`: False
|
| 345 |
+
- `remove_unused_columns`: True
|
| 346 |
+
- `label_names`: None
|
| 347 |
+
- `load_best_model_at_end`: False
|
| 348 |
+
- `ignore_data_skip`: False
|
| 349 |
+
- `fsdp`: []
|
| 350 |
+
- `fsdp_min_num_params`: 0
|
| 351 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 352 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 353 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 354 |
+
- `deepspeed`: None
|
| 355 |
+
- `label_smoothing_factor`: 0.0
|
| 356 |
+
- `optim`: adamw_torch
|
| 357 |
+
- `optim_args`: None
|
| 358 |
+
- `adafactor`: False
|
| 359 |
+
- `group_by_length`: False
|
| 360 |
+
- `length_column_name`: length
|
| 361 |
+
- `ddp_find_unused_parameters`: None
|
| 362 |
+
- `ddp_bucket_cap_mb`: None
|
| 363 |
+
- `ddp_broadcast_buffers`: False
|
| 364 |
+
- `dataloader_pin_memory`: True
|
| 365 |
+
- `dataloader_persistent_workers`: False
|
| 366 |
+
- `skip_memory_metrics`: True
|
| 367 |
+
- `use_legacy_prediction_loop`: False
|
| 368 |
+
- `push_to_hub`: False
|
| 369 |
+
- `resume_from_checkpoint`: None
|
| 370 |
+
- `hub_model_id`: None
|
| 371 |
+
- `hub_strategy`: every_save
|
| 372 |
+
- `hub_private_repo`: None
|
| 373 |
+
- `hub_always_push`: False
|
| 374 |
+
- `gradient_checkpointing`: False
|
| 375 |
+
- `gradient_checkpointing_kwargs`: None
|
| 376 |
+
- `include_inputs_for_metrics`: False
|
| 377 |
+
- `include_for_metrics`: []
|
| 378 |
+
- `eval_do_concat_batches`: True
|
| 379 |
+
- `fp16_backend`: auto
|
| 380 |
+
- `push_to_hub_model_id`: None
|
| 381 |
+
- `push_to_hub_organization`: None
|
| 382 |
+
- `mp_parameters`:
|
| 383 |
+
- `auto_find_batch_size`: False
|
| 384 |
+
- `full_determinism`: False
|
| 385 |
+
- `torchdynamo`: None
|
| 386 |
+
- `ray_scope`: last
|
| 387 |
+
- `ddp_timeout`: 1800
|
| 388 |
+
- `torch_compile`: False
|
| 389 |
+
- `torch_compile_backend`: None
|
| 390 |
+
- `torch_compile_mode`: None
|
| 391 |
+
- `include_tokens_per_second`: False
|
| 392 |
+
- `include_num_input_tokens_seen`: False
|
| 393 |
+
- `neftune_noise_alpha`: None
|
| 394 |
+
- `optim_target_modules`: None
|
| 395 |
+
- `batch_eval_metrics`: False
|
| 396 |
+
- `eval_on_start`: False
|
| 397 |
+
- `use_liger_kernel`: False
|
| 398 |
+
- `eval_use_gather_object`: False
|
| 399 |
+
- `average_tokens_across_devices`: False
|
| 400 |
+
- `prompts`: None
|
| 401 |
+
- `batch_sampler`: batch_sampler
|
| 402 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 403 |
+
|
| 404 |
+
</details>
|
| 405 |
+
|
| 406 |
+
### Training Logs
|
| 407 |
+
<details><summary>Click to expand</summary>
|
| 408 |
+
|
| 409 |
+
| Epoch | Step | Training Loss |
|
| 410 |
+
|:------:|:-----:|:-------------:|
|
| 411 |
+
| 0.0274 | 500 | 0.8232 |
|
| 412 |
+
| 0.0549 | 1000 | 0.1248 |
|
| 413 |
+
| 0.0823 | 1500 | 0.1102 |
|
| 414 |
+
| 0.1098 | 2000 | 0.1008 |
|
| 415 |
+
| 0.1372 | 2500 | 0.0962 |
|
| 416 |
+
| 0.1647 | 3000 | 0.0928 |
|
| 417 |
+
| 0.1921 | 3500 | 0.0878 |
|
| 418 |
+
| 0.2196 | 4000 | 0.0827 |
|
| 419 |
+
| 0.2470 | 4500 | 0.078 |
|
| 420 |
+
| 0.2745 | 5000 | 0.0763 |
|
| 421 |
+
| 0.3019 | 5500 | 0.075 |
|
| 422 |
+
| 0.3294 | 6000 | 0.0716 |
|
| 423 |
+
| 0.3568 | 6500 | 0.0691 |
|
| 424 |
+
| 0.3843 | 7000 | 0.0673 |
|
| 425 |
+
| 0.4117 | 7500 | 0.065 |
|
| 426 |
+
| 0.4392 | 8000 | 0.0668 |
|
| 427 |
+
| 0.4666 | 8500 | 0.0609 |
|
| 428 |
+
| 0.4941 | 9000 | 0.0613 |
|
| 429 |
+
| 0.5215 | 9500 | 0.0596 |
|
| 430 |
+
| 0.5490 | 10000 | 0.0596 |
|
| 431 |
+
| 0.5764 | 10500 | 0.058 |
|
| 432 |
+
| 0.6039 | 11000 | 0.0527 |
|
| 433 |
+
| 0.6313 | 11500 | 0.0521 |
|
| 434 |
+
| 0.6588 | 12000 | 0.0521 |
|
| 435 |
+
| 0.6862 | 12500 | 0.049 |
|
| 436 |
+
| 0.7137 | 13000 | 0.0481 |
|
| 437 |
+
| 0.7411 | 13500 | 0.0484 |
|
| 438 |
+
| 0.7686 | 14000 | 0.049 |
|
| 439 |
+
| 0.7960 | 14500 | 0.0482 |
|
| 440 |
+
| 0.8235 | 15000 | 0.045 |
|
| 441 |
+
| 0.8509 | 15500 | 0.0423 |
|
| 442 |
+
| 0.8783 | 16000 | 0.0425 |
|
| 443 |
+
| 0.9058 | 16500 | 0.04 |
|
| 444 |
+
| 0.9332 | 17000 | 0.0406 |
|
| 445 |
+
| 0.9607 | 17500 | 0.0374 |
|
| 446 |
+
| 0.9881 | 18000 | 0.038 |
|
| 447 |
+
| 1.0156 | 18500 | 0.0257 |
|
| 448 |
+
| 1.0430 | 19000 | 0.0154 |
|
| 449 |
+
| 1.0705 | 19500 | 0.015 |
|
| 450 |
+
| 1.0979 | 20000 | 0.0157 |
|
| 451 |
+
| 1.1254 | 20500 | 0.0144 |
|
| 452 |
+
| 1.1528 | 21000 | 0.0148 |
|
| 453 |
+
| 1.1803 | 21500 | 0.0152 |
|
| 454 |
+
| 1.2077 | 22000 | 0.0154 |
|
| 455 |
+
| 1.2352 | 22500 | 0.0161 |
|
| 456 |
+
| 1.2626 | 23000 | 0.0155 |
|
| 457 |
+
| 1.2901 | 23500 | 0.0148 |
|
| 458 |
+
| 1.3175 | 24000 | 0.0152 |
|
| 459 |
+
| 1.3450 | 24500 | 0.015 |
|
| 460 |
+
| 1.3724 | 25000 | 0.0148 |
|
| 461 |
+
| 1.3999 | 25500 | 0.0151 |
|
| 462 |
+
| 1.4273 | 26000 | 0.0144 |
|
| 463 |
+
| 1.4548 | 26500 | 0.0147 |
|
| 464 |
+
| 1.4822 | 27000 | 0.0143 |
|
| 465 |
+
| 1.5097 | 27500 | 0.0148 |
|
| 466 |
+
| 1.5371 | 28000 | 0.0147 |
|
| 467 |
+
| 1.5646 | 28500 | 0.0145 |
|
| 468 |
+
| 1.5920 | 29000 | 0.0137 |
|
| 469 |
+
| 1.6195 | 29500 | 0.0134 |
|
| 470 |
+
| 1.6469 | 30000 | 0.0137 |
|
| 471 |
+
| 1.6744 | 30500 | 0.0133 |
|
| 472 |
+
| 1.7018 | 31000 | 0.0137 |
|
| 473 |
+
| 1.7292 | 31500 | 0.0132 |
|
| 474 |
+
| 1.7567 | 32000 | 0.0132 |
|
| 475 |
+
| 1.7841 | 32500 | 0.0124 |
|
| 476 |
+
| 1.8116 | 33000 | 0.0133 |
|
| 477 |
+
| 1.8390 | 33500 | 0.0118 |
|
| 478 |
+
| 1.8665 | 34000 | 0.0122 |
|
| 479 |
+
| 1.8939 | 34500 | 0.0114 |
|
| 480 |
+
| 1.9214 | 35000 | 0.0116 |
|
| 481 |
+
| 1.9488 | 35500 | 0.0113 |
|
| 482 |
+
| 1.9763 | 36000 | 0.0115 |
|
| 483 |
+
| 2.0037 | 36500 | 0.0105 |
|
| 484 |
+
| 2.0312 | 37000 | 0.0056 |
|
| 485 |
+
| 2.0586 | 37500 | 0.0056 |
|
| 486 |
+
| 2.0861 | 38000 | 0.0051 |
|
| 487 |
+
| 2.1135 | 38500 | 0.0053 |
|
| 488 |
+
| 2.1410 | 39000 | 0.0054 |
|
| 489 |
+
| 2.1684 | 39500 | 0.0052 |
|
| 490 |
+
| 2.1959 | 40000 | 0.0053 |
|
| 491 |
+
| 2.2233 | 40500 | 0.0054 |
|
| 492 |
+
| 2.2508 | 41000 | 0.0051 |
|
| 493 |
+
| 2.2782 | 41500 | 0.0052 |
|
| 494 |
+
| 2.3057 | 42000 | 0.0052 |
|
| 495 |
+
| 2.3331 | 42500 | 0.0046 |
|
| 496 |
+
| 2.3606 | 43000 | 0.0048 |
|
| 497 |
+
| 2.3880 | 43500 | 0.0051 |
|
| 498 |
+
| 2.4155 | 44000 | 0.0049 |
|
| 499 |
+
| 2.4429 | 44500 | 0.0047 |
|
| 500 |
+
| 2.4704 | 45000 | 0.0047 |
|
| 501 |
+
| 2.4978 | 45500 | 0.0048 |
|
| 502 |
+
| 2.5253 | 46000 | 0.005 |
|
| 503 |
+
| 2.5527 | 46500 | 0.0049 |
|
| 504 |
+
| 2.5801 | 47000 | 0.0047 |
|
| 505 |
+
| 2.6076 | 47500 | 0.0046 |
|
| 506 |
+
| 2.6350 | 48000 | 0.0048 |
|
| 507 |
+
| 2.6625 | 48500 | 0.0045 |
|
| 508 |
+
| 2.6899 | 49000 | 0.0043 |
|
| 509 |
+
| 2.7174 | 49500 | 0.0047 |
|
| 510 |
+
| 2.7448 | 50000 | 0.0045 |
|
| 511 |
+
| 2.7723 | 50500 | 0.0046 |
|
| 512 |
+
| 2.7997 | 51000 | 0.0046 |
|
| 513 |
+
| 2.8272 | 51500 | 0.0044 |
|
| 514 |
+
| 2.8546 | 52000 | 0.0042 |
|
| 515 |
+
| 2.8821 | 52500 | 0.0045 |
|
| 516 |
+
| 2.9095 | 53000 | 0.0045 |
|
| 517 |
+
| 2.9370 | 53500 | 0.0043 |
|
| 518 |
+
| 2.9644 | 54000 | 0.0044 |
|
| 519 |
+
| 2.9919 | 54500 | 0.0043 |
|
| 520 |
+
|
| 521 |
+
</details>
|
| 522 |
+
|
| 523 |
+
### Framework Versions
|
| 524 |
+
- Python: 3.11.12
|
| 525 |
+
- Sentence Transformers: 4.1.0
|
| 526 |
+
- Transformers: 4.52.3
|
| 527 |
+
- PyTorch: 2.6.0+cu124
|
| 528 |
+
- Accelerate: 1.6.0
|
| 529 |
+
- Datasets: 3.6.0
|
| 530 |
+
- Tokenizers: 0.21.1
|
| 531 |
+
|
| 532 |
+
## Citation
|
| 533 |
+
|
| 534 |
+
### BibTeX
|
| 535 |
+
|
| 536 |
+
#### Sentence Transformers
|
| 537 |
+
```bibtex
|
| 538 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 539 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 540 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 541 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 542 |
+
month = "11",
|
| 543 |
+
year = "2019",
|
| 544 |
+
publisher = "Association for Computational Linguistics",
|
| 545 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 546 |
+
}
|
| 547 |
+
```
|
| 548 |
+
|
| 549 |
+
#### MultipleNegativesRankingLoss
|
| 550 |
+
```bibtex
|
| 551 |
+
@misc{henderson2017efficient,
|
| 552 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 553 |
+
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},
|
| 554 |
+
year={2017},
|
| 555 |
+
eprint={1705.00652},
|
| 556 |
+
archivePrefix={arXiv},
|
| 557 |
+
primaryClass={cs.CL}
|
| 558 |
+
}
|
| 559 |
+
```
|
| 560 |
+
|
| 561 |
+
<!--
|
| 562 |
+
## Glossary
|
| 563 |
+
|
| 564 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 565 |
+
-->
|
| 566 |
+
|
| 567 |
+
<!--
|
| 568 |
+
## Model Card Authors
|
| 569 |
+
|
| 570 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 571 |
+
-->
|
| 572 |
+
|
| 573 |
+
<!--
|
| 574 |
+
## Model Card Contact
|
| 575 |
+
|
| 576 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 577 |
+
-->
|
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.52.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": "4.1.0",
|
| 4 |
+
"transformers": "4.52.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:f8d709d4b2dfc3f5debe0bde61197d37aee5b0ce909442ad9cb3649403b47f8a
|
| 3 |
+
size 606681112
|
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
|
|
|