Upload ModernBERT model
Browse files- 1_Pooling/config.json +10 -0
- README.md +650 -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 +74 -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,650 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:7059200
|
| 8 |
+
- loss:MultipleNegativesRankingLoss
|
| 9 |
+
base_model: Shuu12121/CodeModernBERT-Owl-3.0
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: 'The maximum value of the slider. (default 0) <P>
|
| 12 |
+
|
| 13 |
+
@return Returns the value of the attribute, or 0, if it hasn''t been set by the
|
| 14 |
+
JSF file.'
|
| 15 |
+
sentences:
|
| 16 |
+
- "@Override\n public UpdateSmsChannelResult updateSmsChannel(UpdateSmsChannelRequest\
|
| 17 |
+
\ request) {\n request = beforeClientExecution(request);\n return\
|
| 18 |
+
\ executeUpdateSmsChannel(request);\n }"
|
| 19 |
+
- "async function isValidOrigin(origin, sourceOrigin) {\n // This will fetch\
|
| 20 |
+
\ the caches from https://cdn.ampproject.org/caches.json the first time it's\n\
|
| 21 |
+
\ // called. Subsequent calls will receive a cached version.\n const officialCacheList\
|
| 22 |
+
\ = await caches.list();\n // Calculate the cache specific origin\n const\
|
| 23 |
+
\ cacheSubdomain = `https://${await createCacheSubdomain(sourceOrigin)}.`;\n \
|
| 24 |
+
\ // Check all caches listed on ampproject.org\n for (const cache of officialCacheList)\
|
| 25 |
+
\ {\n const cachedOrigin = cacheSubdomain + cache.cacheDomain;\n if\
|
| 26 |
+
\ (origin === cachedOrigin) {\n return true;\n }\n }\n return\
|
| 27 |
+
\ false;\n }"
|
| 28 |
+
- "public java.lang.Object getMin() {\n\t\treturn (java.lang.Object) getStateHelper().eval(PropertyKeys.min,\
|
| 29 |
+
\ 0);\n\t}"
|
| 30 |
+
- source_sentence: 'The Method from the Date.getMinutes is deprecated. This is a helper-Method.
|
| 31 |
+
|
| 32 |
+
|
| 33 |
+
@param date
|
| 34 |
+
|
| 35 |
+
The Date-object to get the minutes.
|
| 36 |
+
|
| 37 |
+
@return The minutes from the Date-object.'
|
| 38 |
+
sentences:
|
| 39 |
+
- "public static int getMinutes(final Date date)\n\t{\n\t\tfinal Calendar calendar\
|
| 40 |
+
\ = Calendar.getInstance();\n\t\tcalendar.setTime(date);\n\t\treturn calendar.get(Calendar.MINUTE);\n\
|
| 41 |
+
\t}"
|
| 42 |
+
- "func (opts BeeOptions) Bind(name string, dst interface{}) error {\n\tv := opts.Value(name)\n\
|
| 43 |
+
\tif v == nil {\n\t\treturn errors.New(\"Option with name \" + name + \" not found\"\
|
| 44 |
+
)\n\t}\n\n\treturn ConvertValue(v, dst)\n}"
|
| 45 |
+
- "public function createFor(Customer $customer, array $options = [], array $filters\
|
| 46 |
+
\ = [])\n {\n $this->parentId = $customer->id;\n\n return parent::rest_create($options,\
|
| 47 |
+
\ $filters);\n }"
|
| 48 |
+
- source_sentence: "Return a list of all dates from 11/12/2015 to the present.\n\n\
|
| 49 |
+
\ Args:\n boo: if true, list contains Numbers (20151230); if false, list contains\
|
| 50 |
+
\ Strings (\"2015-12-30\")\n Returns:\n list of either Numbers or Strings"
|
| 51 |
+
sentences:
|
| 52 |
+
- "def all_days(boo):\n \n earliest = datetime.strptime(('2015-11-12').replace('-',\
|
| 53 |
+
\ ' '), '%Y %m %d')\n latest = datetime.strptime(datetime.today().date().isoformat().replace('-',\
|
| 54 |
+
\ ' '), '%Y %m %d')\n num_days = (latest - earliest).days + 1\n all_days = [latest\
|
| 55 |
+
\ - timedelta(days=x) for x in range(num_days)]\n all_days.reverse()\n\n output\
|
| 56 |
+
\ = []\n\n if boo:\n # Return as Integer, yyyymmdd\n for d in all_days:\n\
|
| 57 |
+
\ output.append(int(str(d).replace('-', '')[:8]))\n else:\n # Return\
|
| 58 |
+
\ as String, yyyy-mm-dd\n for d in all_days:\n output.append(str(d)[:10])\n\
|
| 59 |
+
\ return output"
|
| 60 |
+
- "public void setColSize3(Integer newColSize3) {\n\t\tInteger oldColSize3 = colSize3;\n\
|
| 61 |
+
\t\tcolSize3 = newColSize3;\n\t\tif (eNotificationRequired())\n\t\t\teNotify(new\
|
| 62 |
+
\ ENotificationImpl(this, Notification.SET, AfplibPackage.COLOR_SPECIFICATION__COL_SIZE3,\
|
| 63 |
+
\ oldColSize3, colSize3));\n\t}"
|
| 64 |
+
- "public function deleteCompanyBusinessUnitStoreAddress(CompanyBusinessUnitStoreAddressTransfer\
|
| 65 |
+
\ $companyBusinessUnitStoreAddressTransfer): void\n {\n $this->getFactory()\n\
|
| 66 |
+
\ ->createFosCompanyBusinessUnitStoreAddressQuery()\n ->findOneByIdCompanyBusinessUnitStoreAddress($companyBusinessUnitStoreAddressTransfer->getIdCompanyBusinessUnitStoreAddress())\n\
|
| 67 |
+
\ ->delete();\n }"
|
| 68 |
+
- source_sentence: 'Returns array of basket oxarticle objects
|
| 69 |
+
|
| 70 |
+
|
| 71 |
+
@return array'
|
| 72 |
+
sentences:
|
| 73 |
+
- "public function visit(NodeVisitorInterface $visitor)\n {\n foreach\
|
| 74 |
+
\ ($this->children as $child)\n {\n $child->visit($visitor);\n\
|
| 75 |
+
\ }\n }"
|
| 76 |
+
- "func GetColDefaultValue(ctx sessionctx.Context, col *model.ColumnInfo) (types.Datum,\
|
| 77 |
+
\ error) {\n\treturn getColDefaultValue(ctx, col, col.GetDefaultValue())\n}"
|
| 78 |
+
- "public function getBasketArticles()\n {\n $aBasketArticles = [];\n\
|
| 79 |
+
\ /** @var \\oxBasketItem $oBasketItem */\n foreach ($this->_aBasketContents\
|
| 80 |
+
\ as $sItemKey => $oBasketItem) {\n try {\n $oProduct\
|
| 81 |
+
\ = $oBasketItem->getArticle(true);\n\n if (\\OxidEsales\\Eshop\\\
|
| 82 |
+
Core\\Registry::getConfig()->getConfigParam('bl_perfLoadSelectLists')) {\n \
|
| 83 |
+
\ // marking chosen select list\n $aSelList\
|
| 84 |
+
\ = $oBasketItem->getSelList();\n if (is_array($aSelList) &&\
|
| 85 |
+
\ ($aSelectlist = $oProduct->getSelectLists($sItemKey))) {\n \
|
| 86 |
+
\ reset($aSelList);\n foreach ($aSelList as $conkey\
|
| 87 |
+
\ => $iSel) {\n $aSelectlist[$conkey][$iSel]->selected\
|
| 88 |
+
\ = 1;\n }\n $oProduct->setSelectlist($aSelectlist);\n\
|
| 89 |
+
\ }\n }\n } catch (\\OxidEsales\\\
|
| 90 |
+
Eshop\\Core\\Exception\\NoArticleException $oEx) {\n \\OxidEsales\\\
|
| 91 |
+
Eshop\\Core\\Registry::getUtilsView()->addErrorToDisplay($oEx);\n \
|
| 92 |
+
\ $this->removeItem($sItemKey);\n $this->calculateBasket(true);\n\
|
| 93 |
+
\ continue;\n } catch (\\OxidEsales\\Eshop\\Core\\Exception\\\
|
| 94 |
+
ArticleInputException $oEx) {\n \\OxidEsales\\Eshop\\Core\\Registry::getUtilsView()->addErrorToDisplay($oEx);\n\
|
| 95 |
+
\ $this->removeItem($sItemKey);\n $this->calculateBasket(true);\n\
|
| 96 |
+
\ continue;\n }\n\n $aBasketArticles[$sItemKey]\
|
| 97 |
+
\ = $oProduct;\n }\n\n return $aBasketArticles;\n }"
|
| 98 |
+
- source_sentence: get test root
|
| 99 |
+
sentences:
|
| 100 |
+
- "@CheckReturnValue\n @SchedulerSupport(SchedulerSupport.NONE)\n public final\
|
| 101 |
+
\ Maybe<T> doOnDispose(Action onDispose) {\n return RxJavaPlugins.onAssembly(new\
|
| 102 |
+
\ MaybePeek<T>(this,\n Functions.emptyConsumer(), // onSubscribe\n\
|
| 103 |
+
\ Functions.emptyConsumer(), // onSuccess\n Functions.emptyConsumer(),\
|
| 104 |
+
\ // onError\n Functions.EMPTY_ACTION, // onComplete\n \
|
| 105 |
+
\ Functions.EMPTY_ACTION, // (onSuccess | onError | onComplete) after\n\
|
| 106 |
+
\ ObjectHelper.requireNonNull(onDispose, \"onDispose is null\"\
|
| 107 |
+
)\n ));\n }"
|
| 108 |
+
- "protected Object parseKeyElement(Element keyEle, BeanDefinition bd, String defaultKeyTypeName)\
|
| 109 |
+
\ {\n NodeList nl = keyEle.getChildNodes();\n Element subElement = null;\n\
|
| 110 |
+
\ for (int i = 0; i < nl.getLength(); i++) {\n Node node = nl.item(i);\n\
|
| 111 |
+
\ if (node instanceof Element) {\n // Child element is what we're\
|
| 112 |
+
\ looking for.\n if (subElement != null)\n error(\"<key> element\
|
| 113 |
+
\ must not contain more than one value sub-element\", keyEle);\n else subElement\
|
| 114 |
+
\ = (Element) node;\n }\n }\n return parsePropertySubElement(subElement,\
|
| 115 |
+
\ bd, defaultKeyTypeName);\n }"
|
| 116 |
+
- "function getRootPath(){\n var rootPath = path.resolve('.');\n while(rootPath){\n\
|
| 117 |
+
\ if(fs.existsSync(rootPath + '/config.json')){\n break;\n \
|
| 118 |
+
\ }\n rootPath = rootPath.substring(0, rootPath.lastIndexOf(path.sep));\n\
|
| 119 |
+
\ }\n return rootPath;\n}"
|
| 120 |
+
pipeline_tag: sentence-similarity
|
| 121 |
+
library_name: sentence-transformers
|
| 122 |
+
---
|
| 123 |
+
|
| 124 |
+
# SentenceTransformer based on Shuu12121/CodeModernBERT-Owl-3.0
|
| 125 |
+
|
| 126 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Shuu12121/CodeModernBERT-Owl-3.0](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-3.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.
|
| 127 |
+
|
| 128 |
+
## Model Details
|
| 129 |
+
|
| 130 |
+
### Model Description
|
| 131 |
+
- **Model Type:** Sentence Transformer
|
| 132 |
+
- **Base model:** [Shuu12121/CodeModernBERT-Owl-3.0](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-3.0) <!-- at revision a6beebbd776ae122f34f875dfa731557a1f70d8f -->
|
| 133 |
+
- **Maximum Sequence Length:** 1024 tokens
|
| 134 |
+
- **Output Dimensionality:** 768 dimensions
|
| 135 |
+
- **Similarity Function:** Cosine Similarity
|
| 136 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 137 |
+
<!-- - **Language:** Unknown -->
|
| 138 |
+
<!-- - **License:** Unknown -->
|
| 139 |
+
|
| 140 |
+
### Model Sources
|
| 141 |
+
|
| 142 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 143 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 144 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 145 |
+
|
| 146 |
+
### Full Model Architecture
|
| 147 |
+
|
| 148 |
+
```
|
| 149 |
+
SentenceTransformer(
|
| 150 |
+
(0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: ModernBertModel
|
| 151 |
+
(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})
|
| 152 |
+
)
|
| 153 |
+
```
|
| 154 |
+
|
| 155 |
+
## Usage
|
| 156 |
+
|
| 157 |
+
### Direct Usage (Sentence Transformers)
|
| 158 |
+
|
| 159 |
+
First install the Sentence Transformers library:
|
| 160 |
+
|
| 161 |
+
```bash
|
| 162 |
+
pip install -U sentence-transformers
|
| 163 |
+
```
|
| 164 |
+
|
| 165 |
+
Then you can load this model and run inference.
|
| 166 |
+
```python
|
| 167 |
+
from sentence_transformers import SentenceTransformer
|
| 168 |
+
|
| 169 |
+
# Download from the 🤗 Hub
|
| 170 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 171 |
+
# Run inference
|
| 172 |
+
sentences = [
|
| 173 |
+
'get test root',
|
| 174 |
+
"function getRootPath(){\n var rootPath = path.resolve('.');\n while(rootPath){\n if(fs.existsSync(rootPath + '/config.json')){\n break;\n }\n rootPath = rootPath.substring(0, rootPath.lastIndexOf(path.sep));\n }\n return rootPath;\n}",
|
| 175 |
+
'protected Object parseKeyElement(Element keyEle, BeanDefinition bd, String defaultKeyTypeName) {\n NodeList nl = keyEle.getChildNodes();\n Element subElement = null;\n for (int i = 0; i < nl.getLength(); i++) {\n Node node = nl.item(i);\n if (node instanceof Element) {\n // Child element is what we\'re looking for.\n if (subElement != null)\n error("<key> element must not contain more than one value sub-element", keyEle);\n else subElement = (Element) node;\n }\n }\n return parsePropertySubElement(subElement, bd, defaultKeyTypeName);\n }',
|
| 176 |
+
]
|
| 177 |
+
embeddings = model.encode(sentences)
|
| 178 |
+
print(embeddings.shape)
|
| 179 |
+
# [3, 768]
|
| 180 |
+
|
| 181 |
+
# Get the similarity scores for the embeddings
|
| 182 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 183 |
+
print(similarities.shape)
|
| 184 |
+
# [3, 3]
|
| 185 |
+
```
|
| 186 |
+
|
| 187 |
+
<!--
|
| 188 |
+
### Direct Usage (Transformers)
|
| 189 |
+
|
| 190 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 191 |
+
|
| 192 |
+
</details>
|
| 193 |
+
-->
|
| 194 |
+
|
| 195 |
+
<!--
|
| 196 |
+
### Downstream Usage (Sentence Transformers)
|
| 197 |
+
|
| 198 |
+
You can finetune this model on your own dataset.
|
| 199 |
+
|
| 200 |
+
<details><summary>Click to expand</summary>
|
| 201 |
+
|
| 202 |
+
</details>
|
| 203 |
+
-->
|
| 204 |
+
|
| 205 |
+
<!--
|
| 206 |
+
### Out-of-Scope Use
|
| 207 |
+
|
| 208 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 209 |
+
-->
|
| 210 |
+
|
| 211 |
+
<!--
|
| 212 |
+
## Bias, Risks and Limitations
|
| 213 |
+
|
| 214 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 215 |
+
-->
|
| 216 |
+
|
| 217 |
+
<!--
|
| 218 |
+
### Recommendations
|
| 219 |
+
|
| 220 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 221 |
+
-->
|
| 222 |
+
|
| 223 |
+
## Training Details
|
| 224 |
+
|
| 225 |
+
### Training Dataset
|
| 226 |
+
|
| 227 |
+
#### Unnamed Dataset
|
| 228 |
+
|
| 229 |
+
* Size: 7,059,200 training samples
|
| 230 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 231 |
+
* Approximate statistics based on the first 1000 samples:
|
| 232 |
+
| | sentence_0 | sentence_1 | label |
|
| 233 |
+
|:--------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
| 234 |
+
| type | string | string | float |
|
| 235 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 51.42 tokens</li><li>max: 974 tokens</li></ul> | <ul><li>min: 29 tokens</li><li>mean: 162.71 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> |
|
| 236 |
+
* Samples:
|
| 237 |
+
| sentence_0 | sentence_1 | label |
|
| 238 |
+
|:---------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 239 |
+
| <code>// SetDefaultVersionId sets the DefaultVersionId field's value.</code> | <code>func (s *Policy) SetDefaultVersionId(v string) *Policy {<br> s.DefaultVersionId = &v<br> return s<br>}</code> | <code>1.0</code> |
|
| 240 |
+
| <code>// SetNextPageToken sets the NextPageToken field's value.</code> | <code>func (s *ListBudgetsForResourceOutput) SetNextPageToken(v string) *ListBudgetsForResourceOutput {<br> s.NextPageToken = &v<br> return s<br>}</code> | <code>1.0</code> |
|
| 241 |
+
| <code>// SetHealthyThresholdCount sets the HealthyThresholdCount field's value.</code> | <code>func (s *TargetGroup) SetHealthyThresholdCount(v int64) *TargetGroup {<br> s.HealthyThresholdCount = &v<br> return s<br>}</code> | <code>1.0</code> |
|
| 242 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 243 |
+
```json
|
| 244 |
+
{
|
| 245 |
+
"scale": 20.0,
|
| 246 |
+
"similarity_fct": "cos_sim"
|
| 247 |
+
}
|
| 248 |
+
```
|
| 249 |
+
|
| 250 |
+
### Training Hyperparameters
|
| 251 |
+
#### Non-Default Hyperparameters
|
| 252 |
+
|
| 253 |
+
- `per_device_train_batch_size`: 200
|
| 254 |
+
- `per_device_eval_batch_size`: 200
|
| 255 |
+
- `fp16`: True
|
| 256 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 257 |
+
|
| 258 |
+
#### All Hyperparameters
|
| 259 |
+
<details><summary>Click to expand</summary>
|
| 260 |
+
|
| 261 |
+
- `overwrite_output_dir`: False
|
| 262 |
+
- `do_predict`: False
|
| 263 |
+
- `eval_strategy`: no
|
| 264 |
+
- `prediction_loss_only`: True
|
| 265 |
+
- `per_device_train_batch_size`: 200
|
| 266 |
+
- `per_device_eval_batch_size`: 200
|
| 267 |
+
- `per_gpu_train_batch_size`: None
|
| 268 |
+
- `per_gpu_eval_batch_size`: None
|
| 269 |
+
- `gradient_accumulation_steps`: 1
|
| 270 |
+
- `eval_accumulation_steps`: None
|
| 271 |
+
- `torch_empty_cache_steps`: None
|
| 272 |
+
- `learning_rate`: 5e-05
|
| 273 |
+
- `weight_decay`: 0.0
|
| 274 |
+
- `adam_beta1`: 0.9
|
| 275 |
+
- `adam_beta2`: 0.999
|
| 276 |
+
- `adam_epsilon`: 1e-08
|
| 277 |
+
- `max_grad_norm`: 1
|
| 278 |
+
- `num_train_epochs`: 3
|
| 279 |
+
- `max_steps`: -1
|
| 280 |
+
- `lr_scheduler_type`: linear
|
| 281 |
+
- `lr_scheduler_kwargs`: {}
|
| 282 |
+
- `warmup_ratio`: 0.0
|
| 283 |
+
- `warmup_steps`: 0
|
| 284 |
+
- `log_level`: passive
|
| 285 |
+
- `log_level_replica`: warning
|
| 286 |
+
- `log_on_each_node`: True
|
| 287 |
+
- `logging_nan_inf_filter`: True
|
| 288 |
+
- `save_safetensors`: True
|
| 289 |
+
- `save_on_each_node`: False
|
| 290 |
+
- `save_only_model`: False
|
| 291 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 292 |
+
- `no_cuda`: False
|
| 293 |
+
- `use_cpu`: False
|
| 294 |
+
- `use_mps_device`: False
|
| 295 |
+
- `seed`: 42
|
| 296 |
+
- `data_seed`: None
|
| 297 |
+
- `jit_mode_eval`: False
|
| 298 |
+
- `use_ipex`: False
|
| 299 |
+
- `bf16`: False
|
| 300 |
+
- `fp16`: True
|
| 301 |
+
- `fp16_opt_level`: O1
|
| 302 |
+
- `half_precision_backend`: auto
|
| 303 |
+
- `bf16_full_eval`: False
|
| 304 |
+
- `fp16_full_eval`: False
|
| 305 |
+
- `tf32`: None
|
| 306 |
+
- `local_rank`: 0
|
| 307 |
+
- `ddp_backend`: None
|
| 308 |
+
- `tpu_num_cores`: None
|
| 309 |
+
- `tpu_metrics_debug`: False
|
| 310 |
+
- `debug`: []
|
| 311 |
+
- `dataloader_drop_last`: False
|
| 312 |
+
- `dataloader_num_workers`: 0
|
| 313 |
+
- `dataloader_prefetch_factor`: None
|
| 314 |
+
- `past_index`: -1
|
| 315 |
+
- `disable_tqdm`: False
|
| 316 |
+
- `remove_unused_columns`: True
|
| 317 |
+
- `label_names`: None
|
| 318 |
+
- `load_best_model_at_end`: False
|
| 319 |
+
- `ignore_data_skip`: False
|
| 320 |
+
- `fsdp`: []
|
| 321 |
+
- `fsdp_min_num_params`: 0
|
| 322 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 323 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 324 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 325 |
+
- `deepspeed`: None
|
| 326 |
+
- `label_smoothing_factor`: 0.0
|
| 327 |
+
- `optim`: adamw_torch
|
| 328 |
+
- `optim_args`: None
|
| 329 |
+
- `adafactor`: False
|
| 330 |
+
- `group_by_length`: False
|
| 331 |
+
- `length_column_name`: length
|
| 332 |
+
- `ddp_find_unused_parameters`: None
|
| 333 |
+
- `ddp_bucket_cap_mb`: None
|
| 334 |
+
- `ddp_broadcast_buffers`: False
|
| 335 |
+
- `dataloader_pin_memory`: True
|
| 336 |
+
- `dataloader_persistent_workers`: False
|
| 337 |
+
- `skip_memory_metrics`: True
|
| 338 |
+
- `use_legacy_prediction_loop`: False
|
| 339 |
+
- `push_to_hub`: False
|
| 340 |
+
- `resume_from_checkpoint`: None
|
| 341 |
+
- `hub_model_id`: None
|
| 342 |
+
- `hub_strategy`: every_save
|
| 343 |
+
- `hub_private_repo`: None
|
| 344 |
+
- `hub_always_push`: False
|
| 345 |
+
- `gradient_checkpointing`: False
|
| 346 |
+
- `gradient_checkpointing_kwargs`: None
|
| 347 |
+
- `include_inputs_for_metrics`: False
|
| 348 |
+
- `include_for_metrics`: []
|
| 349 |
+
- `eval_do_concat_batches`: True
|
| 350 |
+
- `fp16_backend`: auto
|
| 351 |
+
- `push_to_hub_model_id`: None
|
| 352 |
+
- `push_to_hub_organization`: None
|
| 353 |
+
- `mp_parameters`:
|
| 354 |
+
- `auto_find_batch_size`: False
|
| 355 |
+
- `full_determinism`: False
|
| 356 |
+
- `torchdynamo`: None
|
| 357 |
+
- `ray_scope`: last
|
| 358 |
+
- `ddp_timeout`: 1800
|
| 359 |
+
- `torch_compile`: False
|
| 360 |
+
- `torch_compile_backend`: None
|
| 361 |
+
- `torch_compile_mode`: None
|
| 362 |
+
- `include_tokens_per_second`: False
|
| 363 |
+
- `include_num_input_tokens_seen`: False
|
| 364 |
+
- `neftune_noise_alpha`: None
|
| 365 |
+
- `optim_target_modules`: None
|
| 366 |
+
- `batch_eval_metrics`: False
|
| 367 |
+
- `eval_on_start`: False
|
| 368 |
+
- `use_liger_kernel`: False
|
| 369 |
+
- `eval_use_gather_object`: False
|
| 370 |
+
- `average_tokens_across_devices`: False
|
| 371 |
+
- `prompts`: None
|
| 372 |
+
- `batch_sampler`: batch_sampler
|
| 373 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 374 |
+
|
| 375 |
+
</details>
|
| 376 |
+
|
| 377 |
+
### Training Logs
|
| 378 |
+
<details><summary>Click to expand</summary>
|
| 379 |
+
|
| 380 |
+
| Epoch | Step | Training Loss |
|
| 381 |
+
|:------:|:------:|:-------------:|
|
| 382 |
+
| 0.0142 | 500 | 1.1661 |
|
| 383 |
+
| 0.0283 | 1000 | 0.1176 |
|
| 384 |
+
| 0.0425 | 1500 | 0.1096 |
|
| 385 |
+
| 0.0567 | 2000 | 0.1013 |
|
| 386 |
+
| 0.0708 | 2500 | 0.0967 |
|
| 387 |
+
| 0.0850 | 3000 | 0.0912 |
|
| 388 |
+
| 0.0992 | 3500 | 0.0886 |
|
| 389 |
+
| 0.1133 | 4000 | 0.0799 |
|
| 390 |
+
| 0.1275 | 4500 | 0.0776 |
|
| 391 |
+
| 0.1417 | 5000 | 0.0757 |
|
| 392 |
+
| 0.1558 | 5500 | 0.0751 |
|
| 393 |
+
| 0.1700 | 6000 | 0.0714 |
|
| 394 |
+
| 0.1842 | 6500 | 0.0703 |
|
| 395 |
+
| 0.1983 | 7000 | 0.0667 |
|
| 396 |
+
| 0.2125 | 7500 | 0.0674 |
|
| 397 |
+
| 0.2267 | 8000 | 0.0625 |
|
| 398 |
+
| 0.2408 | 8500 | 0.0598 |
|
| 399 |
+
| 0.2550 | 9000 | 0.0597 |
|
| 400 |
+
| 0.2692 | 9500 | 0.0585 |
|
| 401 |
+
| 0.2833 | 10000 | 0.0568 |
|
| 402 |
+
| 0.2975 | 10500 | 0.055 |
|
| 403 |
+
| 0.3117 | 11000 | 0.0554 |
|
| 404 |
+
| 0.3258 | 11500 | 0.0529 |
|
| 405 |
+
| 0.3400 | 12000 | 0.0516 |
|
| 406 |
+
| 0.3541 | 12500 | 0.0506 |
|
| 407 |
+
| 0.3683 | 13000 | 0.05 |
|
| 408 |
+
| 0.3825 | 13500 | 0.0484 |
|
| 409 |
+
| 0.3966 | 14000 | 0.0472 |
|
| 410 |
+
| 0.4108 | 14500 | 0.0468 |
|
| 411 |
+
| 0.4250 | 15000 | 0.045 |
|
| 412 |
+
| 0.4391 | 15500 | 0.046 |
|
| 413 |
+
| 0.4533 | 16000 | 0.0452 |
|
| 414 |
+
| 0.4675 | 16500 | 0.0428 |
|
| 415 |
+
| 0.4816 | 17000 | 0.0424 |
|
| 416 |
+
| 0.4958 | 17500 | 0.04 |
|
| 417 |
+
| 0.5100 | 18000 | 0.0402 |
|
| 418 |
+
| 0.5241 | 18500 | 0.0391 |
|
| 419 |
+
| 0.5383 | 19000 | 0.0389 |
|
| 420 |
+
| 0.5525 | 19500 | 0.0385 |
|
| 421 |
+
| 0.5666 | 20000 | 0.0357 |
|
| 422 |
+
| 0.5808 | 20500 | 0.0362 |
|
| 423 |
+
| 0.5950 | 21000 | 0.0369 |
|
| 424 |
+
| 0.6091 | 21500 | 0.0372 |
|
| 425 |
+
| 0.6233 | 22000 | 0.0351 |
|
| 426 |
+
| 0.6375 | 22500 | 0.034 |
|
| 427 |
+
| 0.6516 | 23000 | 0.0364 |
|
| 428 |
+
| 0.6658 | 23500 | 0.033 |
|
| 429 |
+
| 0.6800 | 24000 | 0.0336 |
|
| 430 |
+
| 0.6941 | 24500 | 0.0302 |
|
| 431 |
+
| 0.7083 | 25000 | 0.0309 |
|
| 432 |
+
| 0.7225 | 25500 | 0.0306 |
|
| 433 |
+
| 0.7366 | 26000 | 0.0316 |
|
| 434 |
+
| 0.7508 | 26500 | 0.0306 |
|
| 435 |
+
| 0.7650 | 27000 | 0.0307 |
|
| 436 |
+
| 0.7791 | 27500 | 0.0303 |
|
| 437 |
+
| 0.7933 | 28000 | 0.028 |
|
| 438 |
+
| 0.8075 | 28500 | 0.0289 |
|
| 439 |
+
| 0.8216 | 29000 | 0.0297 |
|
| 440 |
+
| 0.8358 | 29500 | 0.0281 |
|
| 441 |
+
| 0.8500 | 30000 | 0.029 |
|
| 442 |
+
| 0.8641 | 30500 | 0.027 |
|
| 443 |
+
| 0.8783 | 31000 | 0.0282 |
|
| 444 |
+
| 0.8925 | 31500 | 0.0264 |
|
| 445 |
+
| 0.9066 | 32000 | 0.027 |
|
| 446 |
+
| 0.9208 | 32500 | 0.0259 |
|
| 447 |
+
| 0.9350 | 33000 | 0.0272 |
|
| 448 |
+
| 0.9491 | 33500 | 0.0275 |
|
| 449 |
+
| 0.9633 | 34000 | 0.0244 |
|
| 450 |
+
| 0.9774 | 34500 | 0.0254 |
|
| 451 |
+
| 0.9916 | 35000 | 0.0261 |
|
| 452 |
+
| 1.0058 | 35500 | 0.0189 |
|
| 453 |
+
| 1.0199 | 36000 | 0.0118 |
|
| 454 |
+
| 1.0341 | 36500 | 0.012 |
|
| 455 |
+
| 1.0483 | 37000 | 0.0118 |
|
| 456 |
+
| 1.0624 | 37500 | 0.0109 |
|
| 457 |
+
| 1.0766 | 38000 | 0.0123 |
|
| 458 |
+
| 1.0908 | 38500 | 0.0122 |
|
| 459 |
+
| 1.1049 | 39000 | 0.0122 |
|
| 460 |
+
| 1.1191 | 39500 | 0.0123 |
|
| 461 |
+
| 1.1333 | 40000 | 0.0117 |
|
| 462 |
+
| 1.1474 | 40500 | 0.0115 |
|
| 463 |
+
| 1.1616 | 41000 | 0.0122 |
|
| 464 |
+
| 1.1758 | 41500 | 0.0117 |
|
| 465 |
+
| 1.1899 | 42000 | 0.0119 |
|
| 466 |
+
| 1.2041 | 42500 | 0.0112 |
|
| 467 |
+
| 1.2183 | 43000 | 0.0122 |
|
| 468 |
+
| 1.2324 | 43500 | 0.0116 |
|
| 469 |
+
| 1.2466 | 44000 | 0.0107 |
|
| 470 |
+
| 1.2608 | 44500 | 0.0126 |
|
| 471 |
+
| 1.2749 | 45000 | 0.0114 |
|
| 472 |
+
| 1.2891 | 45500 | 0.011 |
|
| 473 |
+
| 1.3033 | 46000 | 0.0116 |
|
| 474 |
+
| 1.3174 | 46500 | 0.0114 |
|
| 475 |
+
| 1.3316 | 47000 | 0.0111 |
|
| 476 |
+
| 1.3458 | 47500 | 0.0112 |
|
| 477 |
+
| 1.3599 | 48000 | 0.0112 |
|
| 478 |
+
| 1.3741 | 48500 | 0.0115 |
|
| 479 |
+
| 1.3883 | 49000 | 0.0104 |
|
| 480 |
+
| 1.4024 | 49500 | 0.0109 |
|
| 481 |
+
| 1.4166 | 50000 | 0.0113 |
|
| 482 |
+
| 1.4308 | 50500 | 0.0115 |
|
| 483 |
+
| 1.4449 | 51000 | 0.0103 |
|
| 484 |
+
| 1.4591 | 51500 | 0.0114 |
|
| 485 |
+
| 1.4733 | 52000 | 0.0104 |
|
| 486 |
+
| 1.4874 | 52500 | 0.0106 |
|
| 487 |
+
| 1.5016 | 53000 | 0.0103 |
|
| 488 |
+
| 1.5158 | 53500 | 0.0102 |
|
| 489 |
+
| 1.5299 | 54000 | 0.0101 |
|
| 490 |
+
| 1.5441 | 54500 | 0.0104 |
|
| 491 |
+
| 1.5583 | 55000 | 0.011 |
|
| 492 |
+
| 1.5724 | 55500 | 0.0107 |
|
| 493 |
+
| 1.5866 | 56000 | 0.0097 |
|
| 494 |
+
| 1.6007 | 56500 | 0.0099 |
|
| 495 |
+
| 1.6149 | 57000 | 0.0102 |
|
| 496 |
+
| 1.6291 | 57500 | 0.0098 |
|
| 497 |
+
| 1.6432 | 58000 | 0.01 |
|
| 498 |
+
| 1.6574 | 58500 | 0.0096 |
|
| 499 |
+
| 1.6716 | 59000 | 0.0099 |
|
| 500 |
+
| 1.6857 | 59500 | 0.0103 |
|
| 501 |
+
| 1.6999 | 60000 | 0.0098 |
|
| 502 |
+
| 1.7141 | 60500 | 0.0097 |
|
| 503 |
+
| 1.7282 | 61000 | 0.0094 |
|
| 504 |
+
| 1.7424 | 61500 | 0.0093 |
|
| 505 |
+
| 1.7566 | 62000 | 0.0102 |
|
| 506 |
+
| 1.7707 | 62500 | 0.0099 |
|
| 507 |
+
| 1.7849 | 63000 | 0.0098 |
|
| 508 |
+
| 1.7991 | 63500 | 0.009 |
|
| 509 |
+
| 1.8132 | 64000 | 0.0097 |
|
| 510 |
+
| 1.8274 | 64500 | 0.009 |
|
| 511 |
+
| 1.8416 | 65000 | 0.0093 |
|
| 512 |
+
| 1.8557 | 65500 | 0.0092 |
|
| 513 |
+
| 1.8699 | 66000 | 0.0095 |
|
| 514 |
+
| 1.8841 | 66500 | 0.0093 |
|
| 515 |
+
| 1.8982 | 67000 | 0.0094 |
|
| 516 |
+
| 1.9124 | 67500 | 0.0089 |
|
| 517 |
+
| 1.9266 | 68000 | 0.0091 |
|
| 518 |
+
| 1.9407 | 68500 | 0.0089 |
|
| 519 |
+
| 1.9549 | 69000 | 0.0084 |
|
| 520 |
+
| 1.9691 | 69500 | 0.0087 |
|
| 521 |
+
| 1.9832 | 70000 | 0.0094 |
|
| 522 |
+
| 1.9974 | 70500 | 0.0085 |
|
| 523 |
+
| 2.0116 | 71000 | 0.0049 |
|
| 524 |
+
| 2.0257 | 71500 | 0.0041 |
|
| 525 |
+
| 2.0399 | 72000 | 0.0039 |
|
| 526 |
+
| 2.0541 | 72500 | 0.0038 |
|
| 527 |
+
| 2.0682 | 73000 | 0.004 |
|
| 528 |
+
| 2.0824 | 73500 | 0.0039 |
|
| 529 |
+
| 2.0966 | 74000 | 0.0038 |
|
| 530 |
+
| 2.1107 | 74500 | 0.0041 |
|
| 531 |
+
| 2.1249 | 75000 | 0.0037 |
|
| 532 |
+
| 2.1391 | 75500 | 0.0038 |
|
| 533 |
+
| 2.1532 | 76000 | 0.0041 |
|
| 534 |
+
| 2.1674 | 76500 | 0.0036 |
|
| 535 |
+
| 2.1816 | 77000 | 0.0039 |
|
| 536 |
+
| 2.1957 | 77500 | 0.0039 |
|
| 537 |
+
| 2.2099 | 78000 | 0.0038 |
|
| 538 |
+
| 2.2240 | 78500 | 0.0038 |
|
| 539 |
+
| 2.2382 | 79000 | 0.0037 |
|
| 540 |
+
| 2.2524 | 79500 | 0.0037 |
|
| 541 |
+
| 2.2665 | 80000 | 0.0036 |
|
| 542 |
+
| 2.2807 | 80500 | 0.0038 |
|
| 543 |
+
| 2.2949 | 81000 | 0.0037 |
|
| 544 |
+
| 2.3090 | 81500 | 0.0036 |
|
| 545 |
+
| 2.3232 | 82000 | 0.0036 |
|
| 546 |
+
| 2.3374 | 82500 | 0.0038 |
|
| 547 |
+
| 2.3515 | 83000 | 0.0037 |
|
| 548 |
+
| 2.3657 | 83500 | 0.0037 |
|
| 549 |
+
| 2.3799 | 84000 | 0.0038 |
|
| 550 |
+
| 2.3940 | 84500 | 0.0037 |
|
| 551 |
+
| 2.4082 | 85000 | 0.0036 |
|
| 552 |
+
| 2.4224 | 85500 | 0.0034 |
|
| 553 |
+
| 2.4365 | 86000 | 0.0035 |
|
| 554 |
+
| 2.4507 | 86500 | 0.0033 |
|
| 555 |
+
| 2.4649 | 87000 | 0.0036 |
|
| 556 |
+
| 2.4790 | 87500 | 0.0035 |
|
| 557 |
+
| 2.4932 | 88000 | 0.0034 |
|
| 558 |
+
| 2.5074 | 88500 | 0.0034 |
|
| 559 |
+
| 2.5215 | 89000 | 0.0034 |
|
| 560 |
+
| 2.5357 | 89500 | 0.0031 |
|
| 561 |
+
| 2.5499 | 90000 | 0.0033 |
|
| 562 |
+
| 2.5640 | 90500 | 0.0033 |
|
| 563 |
+
| 2.5782 | 91000 | 0.0035 |
|
| 564 |
+
| 2.5924 | 91500 | 0.0033 |
|
| 565 |
+
| 2.6065 | 92000 | 0.0032 |
|
| 566 |
+
| 2.6207 | 92500 | 0.0034 |
|
| 567 |
+
| 2.6349 | 93000 | 0.0031 |
|
| 568 |
+
| 2.6490 | 93500 | 0.0032 |
|
| 569 |
+
| 2.6632 | 94000 | 0.0032 |
|
| 570 |
+
| 2.6774 | 94500 | 0.0033 |
|
| 571 |
+
| 2.6915 | 95000 | 0.0032 |
|
| 572 |
+
| 2.7057 | 95500 | 0.003 |
|
| 573 |
+
| 2.7199 | 96000 | 0.0032 |
|
| 574 |
+
| 2.7340 | 96500 | 0.0032 |
|
| 575 |
+
| 2.7482 | 97000 | 0.003 |
|
| 576 |
+
| 2.7624 | 97500 | 0.0032 |
|
| 577 |
+
| 2.7765 | 98000 | 0.0033 |
|
| 578 |
+
| 2.7907 | 98500 | 0.003 |
|
| 579 |
+
| 2.8049 | 99000 | 0.003 |
|
| 580 |
+
| 2.8190 | 99500 | 0.0031 |
|
| 581 |
+
| 2.8332 | 100000 | 0.0031 |
|
| 582 |
+
| 2.8473 | 100500 | 0.003 |
|
| 583 |
+
| 2.8615 | 101000 | 0.003 |
|
| 584 |
+
| 2.8757 | 101500 | 0.003 |
|
| 585 |
+
| 2.8898 | 102000 | 0.003 |
|
| 586 |
+
| 2.9040 | 102500 | 0.003 |
|
| 587 |
+
| 2.9182 | 103000 | 0.003 |
|
| 588 |
+
| 2.9323 | 103500 | 0.003 |
|
| 589 |
+
| 2.9465 | 104000 | 0.0033 |
|
| 590 |
+
| 2.9607 | 104500 | 0.0029 |
|
| 591 |
+
| 2.9748 | 105000 | 0.003 |
|
| 592 |
+
| 2.9890 | 105500 | 0.0028 |
|
| 593 |
+
|
| 594 |
+
</details>
|
| 595 |
+
|
| 596 |
+
### Framework Versions
|
| 597 |
+
- Python: 3.11.13
|
| 598 |
+
- Sentence Transformers: 4.1.0
|
| 599 |
+
- Transformers: 4.52.4
|
| 600 |
+
- PyTorch: 2.6.0+cu124
|
| 601 |
+
- Accelerate: 1.7.0
|
| 602 |
+
- Datasets: 3.6.0
|
| 603 |
+
- Tokenizers: 0.21.1
|
| 604 |
+
|
| 605 |
+
## Citation
|
| 606 |
+
|
| 607 |
+
### BibTeX
|
| 608 |
+
|
| 609 |
+
#### Sentence Transformers
|
| 610 |
+
```bibtex
|
| 611 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 612 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 613 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 614 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 615 |
+
month = "11",
|
| 616 |
+
year = "2019",
|
| 617 |
+
publisher = "Association for Computational Linguistics",
|
| 618 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 619 |
+
}
|
| 620 |
+
```
|
| 621 |
+
|
| 622 |
+
#### MultipleNegativesRankingLoss
|
| 623 |
+
```bibtex
|
| 624 |
+
@misc{henderson2017efficient,
|
| 625 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 626 |
+
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},
|
| 627 |
+
year={2017},
|
| 628 |
+
eprint={1705.00652},
|
| 629 |
+
archivePrefix={arXiv},
|
| 630 |
+
primaryClass={cs.CL}
|
| 631 |
+
}
|
| 632 |
+
```
|
| 633 |
+
|
| 634 |
+
<!--
|
| 635 |
+
## Glossary
|
| 636 |
+
|
| 637 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 638 |
+
-->
|
| 639 |
+
|
| 640 |
+
<!--
|
| 641 |
+
## Model Card Authors
|
| 642 |
+
|
| 643 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 644 |
+
-->
|
| 645 |
+
|
| 646 |
+
<!--
|
| 647 |
+
## Model Card Contact
|
| 648 |
+
|
| 649 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 650 |
+
-->
|
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.4",
|
| 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.52.4",
|
| 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:fddee72b9599d5ff528951f5cb0affb9988f2ed784612a01fe2790a2690ef131
|
| 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,74 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 69 |
+
"pad_token": "[PAD]",
|
| 70 |
+
"sep_token": "[SEP]",
|
| 71 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 72 |
+
"trim_offsets": true,
|
| 73 |
+
"unk_token": "[UNK]"
|
| 74 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|