Upload ModernBERT model
Browse files- 1_Pooling/config.json +10 -0
- README.md +518 -0
- added_tokens.json +6 -0
- config.json +48 -0
- config_sentence_transformers.json +10 -0
- merges.txt +0 -0
- modules.json +14 -0
- sentence_bert_config.json +4 -0
- special_tokens_map.json +51 -0
- tokenizer.json +0 -0
- tokenizer_config.json +97 -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,518 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:1736236
|
| 8 |
+
- loss:MultipleNegativesRankingLoss
|
| 9 |
+
base_model: Shuu12121/CodeModernBERT-Owl-1.0
|
| 10 |
+
widget:
|
| 11 |
+
- source_sentence: 'Get all categories for the item
|
| 12 |
+
|
| 13 |
+
|
| 14 |
+
Uses `<atom:category>`, `<category>` or `<dc:subject>`
|
| 15 |
+
|
| 16 |
+
|
| 17 |
+
@since Beta 3
|
| 18 |
+
|
| 19 |
+
@return SimplePie_Category[]|null List of {@see SimplePie_Category} objects'
|
| 20 |
+
sentences:
|
| 21 |
+
- "protected function user()\n {\n if ($this->wrappedObject->security)\
|
| 22 |
+
\ {\n return ' this user\\'s ';\n }\n\n $user = $this->wrappedObject->revisionable()->withTrashed()->first(['first_name',\
|
| 23 |
+
\ 'last_name']);\n\n return ' '.$user->first_name.' '.$user->last_name.'\\\
|
| 24 |
+
's ';\n }"
|
| 25 |
+
- "public function hasArticlesHiddenFromRobots()\n {\n $app = App::getInstance();\n\
|
| 26 |
+
\n $sql = $app['safesql']->query(\n \"SELECT\n COUNT(article_author.article)\n\
|
| 27 |
+
\ FROM `article_author`\n INNER JOIN `article`\n ON article_author.article\
|
| 28 |
+
\ = article.id\n WHERE article_author.`author` = '%s'\n AND article.deleted\
|
| 29 |
+
\ = 0\n AND article_author.deleted = 0\n AND searchable = 0\",\n \
|
| 30 |
+
\ array(\n $this->getUser())\n );\n $result\
|
| 31 |
+
\ = $app['db']->get_var($sql);\n return ($result > 0 ? true: false);\n\
|
| 32 |
+
\ }"
|
| 33 |
+
- "public function get_categories()\n\t{\n\t\t$categories = array();\n\n\t\t$type\
|
| 34 |
+
\ = 'category';\n\t\tforeach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_ATOM_10,\
|
| 35 |
+
\ $type) as $category)\n\t\t{\n\t\t\t$term = null;\n\t\t\t$scheme = null;\n\t\t\
|
| 36 |
+
\t$label = null;\n\t\t\tif (isset($category['attribs']['']['term']))\n\t\t\t{\n\
|
| 37 |
+
\t\t\t\t$term = $this->sanitize($category['attribs']['']['term'], SIMPLEPIE_CONSTRUCT_HTML);\n\
|
| 38 |
+
\t\t\t}\n\t\t\tif (isset($category['attribs']['']['scheme']))\n\t\t\t{\n\t\t\t\
|
| 39 |
+
\t$scheme = $this->sanitize($category['attribs']['']['scheme'], SIMPLEPIE_CONSTRUCT_HTML);\n\
|
| 40 |
+
\t\t\t}\n\t\t\tif (isset($category['attribs']['']['label']))\n\t\t\t{\n\t\t\t\t\
|
| 41 |
+
$label = $this->sanitize($category['attribs']['']['label'], SIMPLEPIE_CONSTRUCT_HTML);\n\
|
| 42 |
+
\t\t\t}\n\t\t\t$categories[] = $this->registry->create('Category', array($term,\
|
| 43 |
+
\ $scheme, $label, $type));\n\t\t}\n\t\tforeach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_RSS_20,\
|
| 44 |
+
\ $type) as $category)\n\t\t{\n\t\t\t// This is really the label, but keep this\
|
| 45 |
+
\ as the term also for BC.\n\t\t\t// Label will also work on retrieving because\
|
| 46 |
+
\ that falls back to term.\n\t\t\t$term = $this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML);\n\
|
| 47 |
+
\t\t\tif (isset($category['attribs']['']['domain']))\n\t\t\t{\n\t\t\t\t$scheme\
|
| 48 |
+
\ = $this->sanitize($category['attribs']['']['domain'], SIMPLEPIE_CONSTRUCT_HTML);\n\
|
| 49 |
+
\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\t$scheme = null;\n\t\t\t}\n\t\t\t$categories[]\
|
| 50 |
+
\ = $this->registry->create('Category', array($term, $scheme, null, $type));\n\
|
| 51 |
+
\t\t}\n\n\t\t$type = 'subject';\n\t\tforeach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_11,\
|
| 52 |
+
\ $type) as $category)\n\t\t{\n\t\t\t$categories[] = $this->registry->create('Category',\
|
| 53 |
+
\ array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null,\
|
| 54 |
+
\ $type));\n\t\t}\n\t\tforeach ((array) $this->get_item_tags(SIMPLEPIE_NAMESPACE_DC_10,\
|
| 55 |
+
\ $type) as $category)\n\t\t{\n\t\t\t$categories[] = $this->registry->create('Category',\
|
| 56 |
+
\ array($this->sanitize($category['data'], SIMPLEPIE_CONSTRUCT_HTML), null, null,\
|
| 57 |
+
\ $type));\n\t\t}\n\n\t\tif (!empty($categories))\n\t\t{\n\t\t\treturn array_unique($categories);\n\
|
| 58 |
+
\t\t}\n\t\telse\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t}"
|
| 59 |
+
- source_sentence: 'Add a single parse mode to the route middleware
|
| 60 |
+
|
| 61 |
+
@param middle
|
| 62 |
+
|
| 63 |
+
@param mode
|
| 64 |
+
|
| 65 |
+
@param settings'
|
| 66 |
+
sentences:
|
| 67 |
+
- "public static int parseUnsignedInt(String s, int radix)\n throws\
|
| 68 |
+
\ NumberFormatException {\n if (s == null) {\n throw new NumberFormatException(\"\
|
| 69 |
+
null\");\n }\n\n int len = s.length();\n if (len > 0) {\n\
|
| 70 |
+
\ char firstChar = s.charAt(0);\n if (firstChar == '-')\
|
| 71 |
+
\ {\n throw new\n NumberFormatException(String.format(\"\
|
| 72 |
+
Illegal leading minus sign \" +\n \
|
| 73 |
+
\ \"on unsigned string %s.\", s));\n } else {\n \
|
| 74 |
+
\ if (len <= 5 || // Integer.MAX_VALUE in Character.MAX_RADIX is 6 digits\n\
|
| 75 |
+
\ (radix == 10 && len <= 9) ) { // Integer.MAX_VALUE in base\
|
| 76 |
+
\ 10 is 10 digits\n return parseInt(s, radix);\n \
|
| 77 |
+
\ } else {\n long ell = Long.parseLong(s, radix);\n \
|
| 78 |
+
\ if ((ell & 0xffff_ffff_0000_0000L) == 0) {\n \
|
| 79 |
+
\ return (int) ell;\n } else {\n \
|
| 80 |
+
\ throw new\n NumberFormatException(String.format(\"\
|
| 81 |
+
String value %s exceeds \" +\n \
|
| 82 |
+
\ \"range of unsigned int.\", s));\n }\n \
|
| 83 |
+
\ }\n }\n } else {\n throw NumberFormatException.forInputString(s);\n\
|
| 84 |
+
\ }\n }"
|
| 85 |
+
- "func (f *Filter) shouldNamePass(key string) bool {\n\tpass := func(f *Filter)\
|
| 86 |
+
\ bool {\n\t\tif f.namePass.Match(key) {\n\t\t\treturn true\n\t\t}\n\t\treturn\
|
| 87 |
+
\ false\n\t}\n\n\tdrop := func(f *Filter) bool {\n\t\tif f.nameDrop.Match(key)\
|
| 88 |
+
\ {\n\t\t\treturn false\n\t\t}\n\t\treturn true\n\t}\n\n\tif f.namePass != nil\
|
| 89 |
+
\ && f.nameDrop != nil {\n\t\treturn pass(f) && drop(f)\n\t} else if f.namePass\
|
| 90 |
+
\ != nil {\n\t\treturn pass(f)\n\t} else if f.nameDrop != nil {\n\t\treturn drop(f)\n\
|
| 91 |
+
\t}\n\n\treturn true\n}"
|
| 92 |
+
- "function addMode(middle, mode, settings) {\n if (!modes.includes(mode)) throw\
|
| 93 |
+
\ `Incorrect bodyparser mode ${mode}`;\n middle.push(bodyParser[mode](settings[mode]));\n\
|
| 94 |
+
}"
|
| 95 |
+
- source_sentence: Convert Bigtable's {@link RowRange} -> guava {@link Range}.
|
| 96 |
+
sentences:
|
| 97 |
+
- "public function getMemoryUsage()\n {\n $size = memory_get_usage(true);\n\
|
| 98 |
+
\ $unit = array('b','kb','mb','gb','tb','pb');\n \n \
|
| 99 |
+
\ return @round($size/pow(1024,($i=floor(log($size,1024)))),2).' '.$unit[$i];\n\
|
| 100 |
+
\ }"
|
| 101 |
+
- "protected function _beforeDispatch(DispatcherContext $context)\n {\n \
|
| 102 |
+
\ // Check if the user has been explicitly authenticated for this request\n\
|
| 103 |
+
\ if (!$this->getUser()->isAuthentic(true))\n {\n foreach($this->__authenticator_queue\
|
| 104 |
+
\ as $authenticator)\n {\n if($authenticator->authenticateRequest($context)\
|
| 105 |
+
\ === true) {\n break;\n }\n }\n\
|
| 106 |
+
\ }\n\n }"
|
| 107 |
+
- "private Range<RowKeyWrapper> rowRangeToRange(RowRange btRange) {\n final BoundType\
|
| 108 |
+
\ startBound;\n final ByteString startKey;\n\n switch (btRange.getStartKeyCase())\
|
| 109 |
+
\ {\n case START_KEY_OPEN:\n startBound = BoundType.OPEN;\n \
|
| 110 |
+
\ startKey = btRange.getStartKeyOpen();\n break;\n case START_KEY_CLOSED:\n\
|
| 111 |
+
\ startBound = BoundType.CLOSED;\n startKey = btRange.getStartKeyClosed();\n\
|
| 112 |
+
\ break;\n case STARTKEY_NOT_SET:\n startBound = BoundType.CLOSED;\n\
|
| 113 |
+
\ startKey = ByteString.EMPTY;\n break;\n default:\n \
|
| 114 |
+
\ throw new IllegalArgumentException(\"Unexpected start key case: \" +\n \
|
| 115 |
+
\ btRange.getStartKeyCase());\n }\n\n final BoundType endBound;\n\
|
| 116 |
+
\ final ByteString endKey;\n switch (btRange.getEndKeyCase()) {\n case\
|
| 117 |
+
\ END_KEY_OPEN:\n endBound = BoundType.OPEN;\n endKey = btRange.getEndKeyOpen();\n\
|
| 118 |
+
\ break;\n case END_KEY_CLOSED:\n endBound = BoundType.CLOSED;\n\
|
| 119 |
+
\ endKey = btRange.getEndKeyClosed();\n break;\n case ENDKEY_NOT_SET:\n\
|
| 120 |
+
\ endBound = BoundType.OPEN;\n endKey = ByteString.EMPTY;\n \
|
| 121 |
+
\ break;\n default:\n throw new IllegalArgumentException(\"Unexpected\
|
| 122 |
+
\ end key case: \" + btRange.getEndKeyCase());\n }\n\n return boundedRange(startBound,\
|
| 123 |
+
\ startKey, endBound, endKey);\n }"
|
| 124 |
+
- source_sentence: // SetConfigurationManager sets the ConfigurationManager field's
|
| 125 |
+
value.
|
| 126 |
+
sentences:
|
| 127 |
+
- "func (s *UpdateStackInput) SetConfigurationManager(v *StackConfigurationManager)\
|
| 128 |
+
\ *UpdateStackInput {\n\ts.ConfigurationManager = v\n\treturn s\n}"
|
| 129 |
+
- "func getAllTolerationPreferNoSchedule(tolerations []v1.Toleration) (tolerationList\
|
| 130 |
+
\ []v1.Toleration) {\n\tfor _, toleration := range tolerations {\n\t\t// Empty\
|
| 131 |
+
\ effect means all effects which includes PreferNoSchedule, so we need to collect\
|
| 132 |
+
\ it as well.\n\t\tif len(toleration.Effect) == 0 || toleration.Effect == v1.TaintEffectPreferNoSchedule\
|
| 133 |
+
\ {\n\t\t\ttolerationList = append(tolerationList, toleration)\n\t\t}\n\t}\n\t\
|
| 134 |
+
return\n}"
|
| 135 |
+
- "protected function getRelationXmlHashFromDB(array $destinationContentIds)\n \
|
| 136 |
+
\ {\n if (empty($destinationContentIds)) {\n return array();\n\
|
| 137 |
+
\ }\n\n $q = $this->db->createSelectQuery();\n $q\n \
|
| 138 |
+
\ ->select(\n $this->db->aliasedColumn($q, 'id', 'ezcontentobject'),\n\
|
| 139 |
+
\ $this->db->aliasedColumn($q, 'remote_id', 'ezcontentobject'),\n\
|
| 140 |
+
\ $this->db->aliasedColumn($q, 'current_version', 'ezcontentobject'),\n\
|
| 141 |
+
\ $this->db->aliasedColumn($q, 'contentclass_id', 'ezcontentobject'),\n\
|
| 142 |
+
\ $this->db->aliasedColumn($q, 'node_id', 'ezcontentobject_tree'),\n\
|
| 143 |
+
\ $this->db->aliasedColumn($q, 'parent_node_id', 'ezcontentobject_tree'),\n\
|
| 144 |
+
\ $this->db->aliasedColumn($q, 'identifier', 'ezcontentclass')\n\
|
| 145 |
+
\ )\n ->from($this->db->quoteTable('ezcontentobject'))\n\
|
| 146 |
+
\ ->leftJoin(\n $this->db->quoteTable('ezcontentobject_tree'),\n\
|
| 147 |
+
\ $q->expr->lAnd(\n $q->expr->eq(\n \
|
| 148 |
+
\ $this->db->quoteColumn('contentobject_id', 'ezcontentobject_tree'),\n\
|
| 149 |
+
\ $this->db->quoteColumn('id', 'ezcontentobject')\n \
|
| 150 |
+
\ ),\n $q->expr->eq(\n \
|
| 151 |
+
\ $this->db->quoteColumn('node_id', 'ezcontentobject_tree'),\n \
|
| 152 |
+
\ $this->db->quoteColumn('main_node_id', 'ezcontentobject_tree')\n\
|
| 153 |
+
\ )\n )\n )\n ->leftJoin(\n\
|
| 154 |
+
\ $this->db->quoteTable('ezcontentclass'),\n $q->expr->lAnd(\n\
|
| 155 |
+
\ $q->expr->eq(\n $this->db->quoteColumn('id',\
|
| 156 |
+
\ 'ezcontentclass'),\n $this->db->quoteColumn('contentclass_id',\
|
| 157 |
+
\ 'ezcontentobject')\n ),\n $q->expr->eq(\n\
|
| 158 |
+
\ $this->db->quoteColumn('version', 'ezcontentclass'),\n\
|
| 159 |
+
\ $q->bindValue(ContentType::STATUS_DEFINED, null, PDO::PARAM_INT)\n\
|
| 160 |
+
\ )\n )\n )\n ->where(\n\
|
| 161 |
+
\ $q->expr->in(\n $this->db->quoteColumn('id',\
|
| 162 |
+
\ 'ezcontentobject'),\n $destinationContentIds\n \
|
| 163 |
+
\ )\n );\n $stmt = $q->prepare();\n $stmt->execute();\n\
|
| 164 |
+
\n return $stmt->fetchAll(PDO::FETCH_ASSOC | PDO::FETCH_GROUP);\n }"
|
| 165 |
+
- source_sentence: '******************************************************************
|
| 166 |
+
|
| 167 |
+
View helpers
|
| 168 |
+
|
| 169 |
+
*****************************************************************
|
| 170 |
+
|
| 171 |
+
|
| 172 |
+
|
| 173 |
+
Find the view for the called method.
|
| 174 |
+
|
| 175 |
+
|
| 176 |
+
@param null|string $view
|
| 177 |
+
|
| 178 |
+
@param null|string $layout
|
| 179 |
+
|
| 180 |
+
|
| 181 |
+
@return $this'
|
| 182 |
+
sentences:
|
| 183 |
+
- "public function view($view = null, $layout = null)\n {\n if (! is_null($layout))\
|
| 184 |
+
\ {\n $this->layoutOptions = [\n 'default' => $layout,\n\
|
| 185 |
+
\ 'ajax' => $layout,\n ];\n }\n\n //\
|
| 186 |
+
\ Set up the default view resolution\n viewBuilder()->setUp($this->layoutOptions,\
|
| 187 |
+
\ $view);\n $this->setupLayout();\n }"
|
| 188 |
+
- "func (c *CognitoIdentityProvider) AdminDeleteUser(input *AdminDeleteUserInput)\
|
| 189 |
+
\ (*AdminDeleteUserOutput, error) {\n\treq, out := c.AdminDeleteUserRequest(input)\n\
|
| 190 |
+
\treturn out, req.Send()\n}"
|
| 191 |
+
- "protected function checkIfPositiveInteger(\n $fieldName,\n $canUseFlexforms,\n\
|
| 192 |
+
\ $sheet,\n $explanation\n ) {\n $value = $this->objectToCheck->getConfValueString($fieldName,\
|
| 193 |
+
\ $sheet);\n $this->checkIfPositiveIntegerValue(\n $value,\n\
|
| 194 |
+
\ $fieldName,\n $canUseFlexforms,\n $explanation\n\
|
| 195 |
+
\ );\n }"
|
| 196 |
+
pipeline_tag: sentence-similarity
|
| 197 |
+
library_name: sentence-transformers
|
| 198 |
+
---
|
| 199 |
+
|
| 200 |
+
# SentenceTransformer based on Shuu12121/CodeModernBERT-Owl-1.0
|
| 201 |
+
|
| 202 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [Shuu12121/CodeModernBERT-Owl-1.0](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-1.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.
|
| 203 |
+
|
| 204 |
+
## Model Details
|
| 205 |
+
|
| 206 |
+
### Model Description
|
| 207 |
+
- **Model Type:** Sentence Transformer
|
| 208 |
+
- **Base model:** [Shuu12121/CodeModernBERT-Owl-1.0](https://huggingface.co/Shuu12121/CodeModernBERT-Owl-1.0) <!-- at revision e76a6056791a4f60962d3f2ce4cc7d94bd719485 -->
|
| 209 |
+
- **Maximum Sequence Length:** 1024 tokens
|
| 210 |
+
- **Output Dimensionality:** 768 dimensions
|
| 211 |
+
- **Similarity Function:** Cosine Similarity
|
| 212 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 213 |
+
<!-- - **Language:** Unknown -->
|
| 214 |
+
<!-- - **License:** Unknown -->
|
| 215 |
+
|
| 216 |
+
### Model Sources
|
| 217 |
+
|
| 218 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 219 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
|
| 220 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 221 |
+
|
| 222 |
+
### Full Model Architecture
|
| 223 |
+
|
| 224 |
+
```
|
| 225 |
+
SentenceTransformer(
|
| 226 |
+
(0): Transformer({'max_seq_length': 1024, 'do_lower_case': False}) with Transformer model: ModernBertModel
|
| 227 |
+
(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})
|
| 228 |
+
)
|
| 229 |
+
```
|
| 230 |
+
|
| 231 |
+
## Usage
|
| 232 |
+
|
| 233 |
+
### Direct Usage (Sentence Transformers)
|
| 234 |
+
|
| 235 |
+
First install the Sentence Transformers library:
|
| 236 |
+
|
| 237 |
+
```bash
|
| 238 |
+
pip install -U sentence-transformers
|
| 239 |
+
```
|
| 240 |
+
|
| 241 |
+
Then you can load this model and run inference.
|
| 242 |
+
```python
|
| 243 |
+
from sentence_transformers import SentenceTransformer
|
| 244 |
+
|
| 245 |
+
# Download from the 🤗 Hub
|
| 246 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 247 |
+
# Run inference
|
| 248 |
+
sentences = [
|
| 249 |
+
'******************************************************************\nView helpers\n*****************************************************************\n\n\nFind the view for the called method.\n\n@param null|string $view\n@param null|string $layout\n\n@return $this',
|
| 250 |
+
"public function view($view = null, $layout = null)\n {\n if (! is_null($layout)) {\n $this->layoutOptions = [\n 'default' => $layout,\n 'ajax' => $layout,\n ];\n }\n\n // Set up the default view resolution\n viewBuilder()->setUp($this->layoutOptions, $view);\n $this->setupLayout();\n }",
|
| 251 |
+
'protected function checkIfPositiveInteger(\n $fieldName,\n $canUseFlexforms,\n $sheet,\n $explanation\n ) {\n $value = $this->objectToCheck->getConfValueString($fieldName, $sheet);\n $this->checkIfPositiveIntegerValue(\n $value,\n $fieldName,\n $canUseFlexforms,\n $explanation\n );\n }',
|
| 252 |
+
]
|
| 253 |
+
embeddings = model.encode(sentences)
|
| 254 |
+
print(embeddings.shape)
|
| 255 |
+
# [3, 768]
|
| 256 |
+
|
| 257 |
+
# Get the similarity scores for the embeddings
|
| 258 |
+
similarities = model.similarity(embeddings, embeddings)
|
| 259 |
+
print(similarities.shape)
|
| 260 |
+
# [3, 3]
|
| 261 |
+
```
|
| 262 |
+
|
| 263 |
+
<!--
|
| 264 |
+
### Direct Usage (Transformers)
|
| 265 |
+
|
| 266 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 267 |
+
|
| 268 |
+
</details>
|
| 269 |
+
-->
|
| 270 |
+
|
| 271 |
+
<!--
|
| 272 |
+
### Downstream Usage (Sentence Transformers)
|
| 273 |
+
|
| 274 |
+
You can finetune this model on your own dataset.
|
| 275 |
+
|
| 276 |
+
<details><summary>Click to expand</summary>
|
| 277 |
+
|
| 278 |
+
</details>
|
| 279 |
+
-->
|
| 280 |
+
|
| 281 |
+
<!--
|
| 282 |
+
### Out-of-Scope Use
|
| 283 |
+
|
| 284 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 285 |
+
-->
|
| 286 |
+
|
| 287 |
+
<!--
|
| 288 |
+
## Bias, Risks and Limitations
|
| 289 |
+
|
| 290 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 291 |
+
-->
|
| 292 |
+
|
| 293 |
+
<!--
|
| 294 |
+
### Recommendations
|
| 295 |
+
|
| 296 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 297 |
+
-->
|
| 298 |
+
|
| 299 |
+
## Training Details
|
| 300 |
+
|
| 301 |
+
### Training Dataset
|
| 302 |
+
|
| 303 |
+
#### Unnamed Dataset
|
| 304 |
+
|
| 305 |
+
* Size: 1,736,236 training samples
|
| 306 |
+
* Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
|
| 307 |
+
* Approximate statistics based on the first 1000 samples:
|
| 308 |
+
| | sentence_0 | sentence_1 | label |
|
| 309 |
+
|:--------|:------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:--------------------------------------------------------------|
|
| 310 |
+
| type | string | string | float |
|
| 311 |
+
| details | <ul><li>min: 3 tokens</li><li>mean: 48.85 tokens</li><li>max: 1024 tokens</li></ul> | <ul><li>min: 30 tokens</li><li>mean: 171.5 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> |
|
| 312 |
+
* Samples:
|
| 313 |
+
| sentence_0 | sentence_1 | label |
|
| 314 |
+
|:--------------------------------------------------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------|
|
| 315 |
+
| <code>// convDataValidationOperatior get excel data validation operator.</code> | <code>func convDataValidationOperatior(o DataValidationOperator) string {<br> typeMap := map[DataValidationOperator]string{<br> DataValidationOperatorBetween: "between",<br> DataValidationOperatorEqual: "equal",<br> DataValidationOperatorGreaterThan: "greaterThan",<br> DataValidationOperatorGreaterThanOrEqual: "greaterThanOrEqual",<br> DataValidationOperatorLessThan: "lessThan",<br> DataValidationOperatorLessThanOrEqual: "lessThanOrEqual",<br> DataValidationOperatorNotBetween: "notBetween",<br> DataValidationOperatorNotEqual: "notEqual",<br> }<br><br> return typeMap[o]<br><br>}</code> | <code>1.0</code> |
|
| 316 |
+
| <code>// Convert_v1_PodSecurityPolicyReview_To_security_PodSecurityPolicyReview is an autogenerated conversion function.</code> | <code>func Convert_v1_PodSecurityPolicyReview_To_security_PodSecurityPolicyReview(in *v1.PodSecurityPolicyReview, out *security.PodSecurityPolicyReview, s conversion.Scope) error {<br> return autoConvert_v1_PodSecurityPolicyReview_To_security_PodSecurityPolicyReview(in, out, s)<br>}</code> | <code>1.0</code> |
|
| 317 |
+
| <code>// Of note, removeSegments() keeps the ordering of the results stable.</code> | <code>func removeSegments(segments []Segment, toRemove []Segment) []Segment {<br> rv := make([]Segment, 0, len(segments)-len(toRemove))<br>OUTER:<br> for _, segment := range segments {<br> for _, r := range toRemove {<br> if segment == r {<br> continue OUTER<br> }<br> }<br> rv = append(rv, segment)<br> }<br> return rv<br>}</code> | <code>1.0</code> |
|
| 318 |
+
* Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
|
| 319 |
+
```json
|
| 320 |
+
{
|
| 321 |
+
"scale": 20.0,
|
| 322 |
+
"similarity_fct": "cos_sim"
|
| 323 |
+
}
|
| 324 |
+
```
|
| 325 |
+
|
| 326 |
+
### Training Hyperparameters
|
| 327 |
+
#### Non-Default Hyperparameters
|
| 328 |
+
|
| 329 |
+
- `per_device_train_batch_size`: 256
|
| 330 |
+
- `per_device_eval_batch_size`: 256
|
| 331 |
+
- `num_train_epochs`: 5
|
| 332 |
+
- `fp16`: True
|
| 333 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 334 |
+
|
| 335 |
+
#### All Hyperparameters
|
| 336 |
+
<details><summary>Click to expand</summary>
|
| 337 |
+
|
| 338 |
+
- `overwrite_output_dir`: False
|
| 339 |
+
- `do_predict`: False
|
| 340 |
+
- `eval_strategy`: no
|
| 341 |
+
- `prediction_loss_only`: True
|
| 342 |
+
- `per_device_train_batch_size`: 256
|
| 343 |
+
- `per_device_eval_batch_size`: 256
|
| 344 |
+
- `per_gpu_train_batch_size`: None
|
| 345 |
+
- `per_gpu_eval_batch_size`: None
|
| 346 |
+
- `gradient_accumulation_steps`: 1
|
| 347 |
+
- `eval_accumulation_steps`: None
|
| 348 |
+
- `torch_empty_cache_steps`: None
|
| 349 |
+
- `learning_rate`: 5e-05
|
| 350 |
+
- `weight_decay`: 0.0
|
| 351 |
+
- `adam_beta1`: 0.9
|
| 352 |
+
- `adam_beta2`: 0.999
|
| 353 |
+
- `adam_epsilon`: 1e-08
|
| 354 |
+
- `max_grad_norm`: 1
|
| 355 |
+
- `num_train_epochs`: 5
|
| 356 |
+
- `max_steps`: -1
|
| 357 |
+
- `lr_scheduler_type`: linear
|
| 358 |
+
- `lr_scheduler_kwargs`: {}
|
| 359 |
+
- `warmup_ratio`: 0.0
|
| 360 |
+
- `warmup_steps`: 0
|
| 361 |
+
- `log_level`: passive
|
| 362 |
+
- `log_level_replica`: warning
|
| 363 |
+
- `log_on_each_node`: True
|
| 364 |
+
- `logging_nan_inf_filter`: True
|
| 365 |
+
- `save_safetensors`: True
|
| 366 |
+
- `save_on_each_node`: False
|
| 367 |
+
- `save_only_model`: False
|
| 368 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 369 |
+
- `no_cuda`: False
|
| 370 |
+
- `use_cpu`: False
|
| 371 |
+
- `use_mps_device`: False
|
| 372 |
+
- `seed`: 42
|
| 373 |
+
- `data_seed`: None
|
| 374 |
+
- `jit_mode_eval`: False
|
| 375 |
+
- `use_ipex`: False
|
| 376 |
+
- `bf16`: False
|
| 377 |
+
- `fp16`: True
|
| 378 |
+
- `fp16_opt_level`: O1
|
| 379 |
+
- `half_precision_backend`: auto
|
| 380 |
+
- `bf16_full_eval`: False
|
| 381 |
+
- `fp16_full_eval`: False
|
| 382 |
+
- `tf32`: None
|
| 383 |
+
- `local_rank`: 0
|
| 384 |
+
- `ddp_backend`: None
|
| 385 |
+
- `tpu_num_cores`: None
|
| 386 |
+
- `tpu_metrics_debug`: False
|
| 387 |
+
- `debug`: []
|
| 388 |
+
- `dataloader_drop_last`: False
|
| 389 |
+
- `dataloader_num_workers`: 0
|
| 390 |
+
- `dataloader_prefetch_factor`: None
|
| 391 |
+
- `past_index`: -1
|
| 392 |
+
- `disable_tqdm`: False
|
| 393 |
+
- `remove_unused_columns`: True
|
| 394 |
+
- `label_names`: None
|
| 395 |
+
- `load_best_model_at_end`: False
|
| 396 |
+
- `ignore_data_skip`: False
|
| 397 |
+
- `fsdp`: []
|
| 398 |
+
- `fsdp_min_num_params`: 0
|
| 399 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 400 |
+
- `tp_size`: 0
|
| 401 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 402 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 403 |
+
- `deepspeed`: None
|
| 404 |
+
- `label_smoothing_factor`: 0.0
|
| 405 |
+
- `optim`: adamw_torch
|
| 406 |
+
- `optim_args`: None
|
| 407 |
+
- `adafactor`: False
|
| 408 |
+
- `group_by_length`: False
|
| 409 |
+
- `length_column_name`: length
|
| 410 |
+
- `ddp_find_unused_parameters`: None
|
| 411 |
+
- `ddp_bucket_cap_mb`: None
|
| 412 |
+
- `ddp_broadcast_buffers`: False
|
| 413 |
+
- `dataloader_pin_memory`: True
|
| 414 |
+
- `dataloader_persistent_workers`: False
|
| 415 |
+
- `skip_memory_metrics`: True
|
| 416 |
+
- `use_legacy_prediction_loop`: False
|
| 417 |
+
- `push_to_hub`: False
|
| 418 |
+
- `resume_from_checkpoint`: None
|
| 419 |
+
- `hub_model_id`: None
|
| 420 |
+
- `hub_strategy`: every_save
|
| 421 |
+
- `hub_private_repo`: None
|
| 422 |
+
- `hub_always_push`: False
|
| 423 |
+
- `gradient_checkpointing`: False
|
| 424 |
+
- `gradient_checkpointing_kwargs`: None
|
| 425 |
+
- `include_inputs_for_metrics`: False
|
| 426 |
+
- `include_for_metrics`: []
|
| 427 |
+
- `eval_do_concat_batches`: True
|
| 428 |
+
- `fp16_backend`: auto
|
| 429 |
+
- `push_to_hub_model_id`: None
|
| 430 |
+
- `push_to_hub_organization`: None
|
| 431 |
+
- `mp_parameters`:
|
| 432 |
+
- `auto_find_batch_size`: False
|
| 433 |
+
- `full_determinism`: False
|
| 434 |
+
- `torchdynamo`: None
|
| 435 |
+
- `ray_scope`: last
|
| 436 |
+
- `ddp_timeout`: 1800
|
| 437 |
+
- `torch_compile`: False
|
| 438 |
+
- `torch_compile_backend`: None
|
| 439 |
+
- `torch_compile_mode`: None
|
| 440 |
+
- `include_tokens_per_second`: False
|
| 441 |
+
- `include_num_input_tokens_seen`: False
|
| 442 |
+
- `neftune_noise_alpha`: None
|
| 443 |
+
- `optim_target_modules`: None
|
| 444 |
+
- `batch_eval_metrics`: False
|
| 445 |
+
- `eval_on_start`: False
|
| 446 |
+
- `use_liger_kernel`: False
|
| 447 |
+
- `eval_use_gather_object`: False
|
| 448 |
+
- `average_tokens_across_devices`: False
|
| 449 |
+
- `prompts`: None
|
| 450 |
+
- `batch_sampler`: batch_sampler
|
| 451 |
+
- `multi_dataset_batch_sampler`: round_robin
|
| 452 |
+
|
| 453 |
+
</details>
|
| 454 |
+
|
| 455 |
+
### Training Logs
|
| 456 |
+
| Epoch | Step | Training Loss |
|
| 457 |
+
|:------:|:----:|:-------------:|
|
| 458 |
+
| 0.0737 | 500 | 0.8902 |
|
| 459 |
+
| 0.1474 | 1000 | 0.1132 |
|
| 460 |
+
| 0.2211 | 1500 | 0.1046 |
|
| 461 |
+
| 0.2949 | 2000 | 0.0988 |
|
| 462 |
+
|
| 463 |
+
|
| 464 |
+
### Framework Versions
|
| 465 |
+
- Python: 3.11.12
|
| 466 |
+
- Sentence Transformers: 3.4.1
|
| 467 |
+
- Transformers: 4.51.3
|
| 468 |
+
- PyTorch: 2.6.0+cu124
|
| 469 |
+
- Accelerate: 1.6.0
|
| 470 |
+
- Datasets: 3.5.1
|
| 471 |
+
- Tokenizers: 0.21.1
|
| 472 |
+
|
| 473 |
+
## Citation
|
| 474 |
+
|
| 475 |
+
### BibTeX
|
| 476 |
+
|
| 477 |
+
#### Sentence Transformers
|
| 478 |
+
```bibtex
|
| 479 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 480 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 481 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 482 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 483 |
+
month = "11",
|
| 484 |
+
year = "2019",
|
| 485 |
+
publisher = "Association for Computational Linguistics",
|
| 486 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 487 |
+
}
|
| 488 |
+
```
|
| 489 |
+
|
| 490 |
+
#### MultipleNegativesRankingLoss
|
| 491 |
+
```bibtex
|
| 492 |
+
@misc{henderson2017efficient,
|
| 493 |
+
title={Efficient Natural Language Response Suggestion for Smart Reply},
|
| 494 |
+
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},
|
| 495 |
+
year={2017},
|
| 496 |
+
eprint={1705.00652},
|
| 497 |
+
archivePrefix={arXiv},
|
| 498 |
+
primaryClass={cs.CL}
|
| 499 |
+
}
|
| 500 |
+
```
|
| 501 |
+
|
| 502 |
+
<!--
|
| 503 |
+
## Glossary
|
| 504 |
+
|
| 505 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 506 |
+
-->
|
| 507 |
+
|
| 508 |
+
<!--
|
| 509 |
+
## Model Card Authors
|
| 510 |
+
|
| 511 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 512 |
+
-->
|
| 513 |
+
|
| 514 |
+
<!--
|
| 515 |
+
## Model Card Contact
|
| 516 |
+
|
| 517 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 518 |
+
-->
|
added_tokens.json
ADDED
|
@@ -0,0 +1,6 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"</s>": 50001,
|
| 3 |
+
"<mask>": 50003,
|
| 4 |
+
"<s>": 50000,
|
| 5 |
+
"<unk>": 50002
|
| 6 |
+
}
|
config.json
ADDED
|
@@ -0,0 +1,48 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"ModernBertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_bias": false,
|
| 6 |
+
"attention_dropout": 0.0,
|
| 7 |
+
"attention_probs_dropout_prob": 0.1,
|
| 8 |
+
"bos_token_id": 50000,
|
| 9 |
+
"classifier_activation": "gelu",
|
| 10 |
+
"classifier_bias": false,
|
| 11 |
+
"classifier_dropout": 0.0,
|
| 12 |
+
"classifier_pooling": "cls",
|
| 13 |
+
"cls_token_id": 50281,
|
| 14 |
+
"decoder_bias": true,
|
| 15 |
+
"deterministic_flash_attn": false,
|
| 16 |
+
"embedding_dropout": 0.0,
|
| 17 |
+
"eos_token_id": 50001,
|
| 18 |
+
"global_attn_every_n_layers": 3,
|
| 19 |
+
"global_rope_theta": 160000.0,
|
| 20 |
+
"hidden_activation": "gelu",
|
| 21 |
+
"hidden_dropout_prob": 0.1,
|
| 22 |
+
"hidden_size": 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": 0,
|
| 39 |
+
"repad_logits_with_grad": false,
|
| 40 |
+
"rope_theta": 160000,
|
| 41 |
+
"sep_token_id": 50282,
|
| 42 |
+
"sparse_pred_ignore_index": -100,
|
| 43 |
+
"sparse_prediction": false,
|
| 44 |
+
"torch_dtype": "float32",
|
| 45 |
+
"transformers_version": "4.51.3",
|
| 46 |
+
"type_vocab_size": 2,
|
| 47 |
+
"vocab_size": 50004
|
| 48 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"sentence_transformers": "3.4.1",
|
| 4 |
+
"transformers": "4.51.3",
|
| 5 |
+
"pytorch": "2.6.0+cu124"
|
| 6 |
+
},
|
| 7 |
+
"prompts": {},
|
| 8 |
+
"default_prompt_name": null,
|
| 9 |
+
"similarity_fn_name": "cosine"
|
| 10 |
+
}
|
merges.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
modules.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.models.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.models.Pooling"
|
| 13 |
+
}
|
| 14 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,4 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"max_seq_length": 1024,
|
| 3 |
+
"do_lower_case": false
|
| 4 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,51 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"bos_token": {
|
| 3 |
+
"content": "<s>",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"cls_token": {
|
| 10 |
+
"content": "<s>",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"eos_token": {
|
| 17 |
+
"content": "</s>",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"mask_token": {
|
| 24 |
+
"content": "<mask>",
|
| 25 |
+
"lstrip": true,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"pad_token": {
|
| 31 |
+
"content": "[PAD]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
},
|
| 37 |
+
"sep_token": {
|
| 38 |
+
"content": "</s>",
|
| 39 |
+
"lstrip": false,
|
| 40 |
+
"normalized": false,
|
| 41 |
+
"rstrip": false,
|
| 42 |
+
"single_word": false
|
| 43 |
+
},
|
| 44 |
+
"unk_token": {
|
| 45 |
+
"content": "<unk>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false
|
| 50 |
+
}
|
| 51 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,97 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"add_prefix_space": false,
|
| 3 |
+
"added_tokens_decoder": {
|
| 4 |
+
"0": {
|
| 5 |
+
"content": "[PAD]",
|
| 6 |
+
"lstrip": false,
|
| 7 |
+
"normalized": false,
|
| 8 |
+
"rstrip": false,
|
| 9 |
+
"single_word": false,
|
| 10 |
+
"special": true
|
| 11 |
+
},
|
| 12 |
+
"1": {
|
| 13 |
+
"content": "[UNK]",
|
| 14 |
+
"lstrip": false,
|
| 15 |
+
"normalized": false,
|
| 16 |
+
"rstrip": false,
|
| 17 |
+
"single_word": false,
|
| 18 |
+
"special": true
|
| 19 |
+
},
|
| 20 |
+
"2": {
|
| 21 |
+
"content": "[CLS]",
|
| 22 |
+
"lstrip": false,
|
| 23 |
+
"normalized": false,
|
| 24 |
+
"rstrip": false,
|
| 25 |
+
"single_word": false,
|
| 26 |
+
"special": true
|
| 27 |
+
},
|
| 28 |
+
"3": {
|
| 29 |
+
"content": "[SEP]",
|
| 30 |
+
"lstrip": false,
|
| 31 |
+
"normalized": false,
|
| 32 |
+
"rstrip": false,
|
| 33 |
+
"single_word": false,
|
| 34 |
+
"special": true
|
| 35 |
+
},
|
| 36 |
+
"4": {
|
| 37 |
+
"content": "[MASK]",
|
| 38 |
+
"lstrip": false,
|
| 39 |
+
"normalized": false,
|
| 40 |
+
"rstrip": false,
|
| 41 |
+
"single_word": false,
|
| 42 |
+
"special": true
|
| 43 |
+
},
|
| 44 |
+
"50000": {
|
| 45 |
+
"content": "<s>",
|
| 46 |
+
"lstrip": false,
|
| 47 |
+
"normalized": false,
|
| 48 |
+
"rstrip": false,
|
| 49 |
+
"single_word": false,
|
| 50 |
+
"special": true
|
| 51 |
+
},
|
| 52 |
+
"50001": {
|
| 53 |
+
"content": "</s>",
|
| 54 |
+
"lstrip": false,
|
| 55 |
+
"normalized": false,
|
| 56 |
+
"rstrip": false,
|
| 57 |
+
"single_word": false,
|
| 58 |
+
"special": true
|
| 59 |
+
},
|
| 60 |
+
"50002": {
|
| 61 |
+
"content": "<unk>",
|
| 62 |
+
"lstrip": false,
|
| 63 |
+
"normalized": false,
|
| 64 |
+
"rstrip": false,
|
| 65 |
+
"single_word": false,
|
| 66 |
+
"special": true
|
| 67 |
+
},
|
| 68 |
+
"50003": {
|
| 69 |
+
"content": "<mask>",
|
| 70 |
+
"lstrip": true,
|
| 71 |
+
"normalized": false,
|
| 72 |
+
"rstrip": false,
|
| 73 |
+
"single_word": false,
|
| 74 |
+
"special": true
|
| 75 |
+
}
|
| 76 |
+
},
|
| 77 |
+
"bos_token": "<s>",
|
| 78 |
+
"clean_up_tokenization_spaces": false,
|
| 79 |
+
"cls_token": "<s>",
|
| 80 |
+
"eos_token": "</s>",
|
| 81 |
+
"errors": "replace",
|
| 82 |
+
"extra_special_tokens": {},
|
| 83 |
+
"mask_token": "<mask>",
|
| 84 |
+
"max_length": null,
|
| 85 |
+
"model_max_length": 1000000000000000019884624838656,
|
| 86 |
+
"pad_to_multiple_of": null,
|
| 87 |
+
"pad_token": "[PAD]",
|
| 88 |
+
"pad_token_type_id": 0,
|
| 89 |
+
"padding_side": "right",
|
| 90 |
+
"sep_token": "</s>",
|
| 91 |
+
"stride": 0,
|
| 92 |
+
"tokenizer_class": "RobertaTokenizer",
|
| 93 |
+
"trim_offsets": true,
|
| 94 |
+
"truncation_side": "right",
|
| 95 |
+
"truncation_strategy": "longest_first",
|
| 96 |
+
"unk_token": "<unk>"
|
| 97 |
+
}
|
vocab.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|