Sentence Similarity
sentence-transformers
Safetensors
bert
feature-extraction
Generated from Trainer
dataset_size:200000
loss:MatryoshkaLoss
loss:MultipleNegativesRankingLoss
Eval Results (legacy)
text-embeddings-inference
Instructions to use ArnavKewalram/bge-small-code-v1 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- sentence-transformers
How to use ArnavKewalram/bge-small-code-v1 with sentence-transformers:
from sentence_transformers import SentenceTransformer model = SentenceTransformer("ArnavKewalram/bge-small-code-v1") sentences = [ "Sets the global variables $rects and $origRectSpecs", "def modify_ranking(tournament):\n database = TinyDB('db.json')\n # recuperation de tous les joueurs du tournoi\n players_table = database.table('players')\n list_players = get_player_list(tournament)\n # Modification du rang joueur par joueur\n for player in list_players:\n new_ranking = view.modify_ranking_view(player)\n players_table.update({'Classement': new_ranking}, doc_ids=[player.doc_id])", "function setConstants() {\n const wrapItems = \".image-analysis-wrapper .face-wrap, .image-analysis-wrapper .score-wrap, .image-analysis-wrapper .attribute-wrap, .image-analysis-wrapper .region-block, .image-analysis-wrapper .region-block .word-block .word-wrap\";\n\n $rects = jQuery(\".image-analysis-wrapper .rectangle\");\n\n // Iterate over each rectangle and save the width, height, top position,\n // left position, closest stats block element, and position of the closest\n // stats block element to an object. Each object is then added to the \n // $origRectSpecs array for global use.\n $origRectSpecs = $rects.map(function () {\n closestWrapItems = jQuery(this).siblings(wrapItems);\n\n const stats = closestWrapItems.map(function () {\n return {\n origStatTop: jQuery(this).position().top || parseInt(jQuery(this).css(\"top\")),\n origStatLeft: jQuery(this).position().left || parseInt(jQuery(this).css(\"left\"))\n }\n })\n\n return {\n origRectWidth: jQuery(this).width(),\n origRectHeight: jQuery(this).height(),\n origRectTop: jQuery(this).position().top || parseInt(jQuery(this).css(\"top\")), // if the rect is on a tab that is currently not displayed it has a position of 0, so this check gets the css instead so we don't lose the value\n origRectLeft: jQuery(this).position().left || parseInt(jQuery(this).css(\"left\")),\n statBlock: closestWrapItems[0],\n statPosition: stats[0]\n }\n })\n }", "reset() {\n\n // Set the initial crop to match any given fixed aspect ratio (or\n // default to a square crop 1:1).\n let aspectRatio = this._initialAspectRatio\n\n // Calculate the initial crop size such that it fits within the bounds\n let width = getWidth(this.bounds)\n let height = getWidth(this.bounds) / aspectRatio\n\n if (aspectRatio < width / getHeight(this.bounds)) {\n width = getHeight(this.bounds) * aspectRatio\n height = getHeight(this.bounds)\n }\n\n // Calculate the initial crop position to be central to the bounds\n const x = (getWidth(this.bounds) - width) / 2\n const y = (getHeight(this.bounds) - height) / 2\n\n // Set the region\n this.region = [\n [x, y],\n [x + width, y + height]\n ]\n }" ] embeddings = model.encode(sentences) similarities = model.similarity(embeddings, embeddings) print(similarities.shape) # [4, 4] - Notebooks
- Google Colab
- Kaggle
Upload bge-small-code-v1 trained on CoRNStack
Browse files- 1_Pooling/config.json +5 -0
- README.md +636 -0
- config.json +30 -0
- config_sentence_transformers.json +14 -0
- model.safetensors +3 -0
- modules.json +20 -0
- sentence_bert_config.json +10 -0
- special_tokens_map.json +37 -0
- tokenizer.json +0 -0
- tokenizer_config.json +58 -0
- vocab.txt +0 -0
1_Pooling/config.json
ADDED
|
@@ -0,0 +1,5 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"embedding_dimension": 384,
|
| 3 |
+
"pooling_mode": "cls",
|
| 4 |
+
"include_prompt": true
|
| 5 |
+
}
|
README.md
ADDED
|
@@ -0,0 +1,636 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
tags:
|
| 3 |
+
- sentence-transformers
|
| 4 |
+
- sentence-similarity
|
| 5 |
+
- feature-extraction
|
| 6 |
+
- generated_from_trainer
|
| 7 |
+
- dataset_size:200000
|
| 8 |
+
- loss:MatryoshkaLoss
|
| 9 |
+
- loss:MultipleNegativesRankingLoss
|
| 10 |
+
base_model: BAAI/bge-small-en-v1.5
|
| 11 |
+
widget:
|
| 12 |
+
- source_sentence: Sets the global variables $rects and $origRectSpecs
|
| 13 |
+
sentences:
|
| 14 |
+
- "def modify_ranking(tournament):\n database = TinyDB('db.json')\n # recuperation\
|
| 15 |
+
\ de tous les joueurs du tournoi\n players_table = database.table('players')\n\
|
| 16 |
+
\ list_players = get_player_list(tournament)\n # Modification du rang joueur\
|
| 17 |
+
\ par joueur\n for player in list_players:\n new_ranking = view.modify_ranking_view(player)\n\
|
| 18 |
+
\ players_table.update({'Classement': new_ranking}, doc_ids=[player.doc_id])"
|
| 19 |
+
- "function setConstants() {\n const wrapItems = \".image-analysis-wrapper\
|
| 20 |
+
\ .face-wrap, .image-analysis-wrapper .score-wrap, .image-analysis-wrapper .attribute-wrap,\
|
| 21 |
+
\ .image-analysis-wrapper .region-block, .image-analysis-wrapper .region-block\
|
| 22 |
+
\ .word-block .word-wrap\";\n\n $rects = jQuery(\".image-analysis-wrapper\
|
| 23 |
+
\ .rectangle\");\n\n // Iterate over each rectangle and save the width,\
|
| 24 |
+
\ height, top position,\n // left position, closest stats block element,\
|
| 25 |
+
\ and position of the closest\n // stats block element to an object. Each\
|
| 26 |
+
\ object is then added to the \n // $origRectSpecs array for global use.\n\
|
| 27 |
+
\ $origRectSpecs = $rects.map(function () {\n closestWrapItems\
|
| 28 |
+
\ = jQuery(this).siblings(wrapItems);\n\n const stats = closestWrapItems.map(function\
|
| 29 |
+
\ () {\n return {\n origStatTop: jQuery(this).position().top\
|
| 30 |
+
\ || parseInt(jQuery(this).css(\"top\")),\n origStatLeft: jQuery(this).position().left\
|
| 31 |
+
\ || parseInt(jQuery(this).css(\"left\"))\n }\n })\n\
|
| 32 |
+
\n return {\n origRectWidth: jQuery(this).width(),\n\
|
| 33 |
+
\ origRectHeight: jQuery(this).height(),\n origRectTop:\
|
| 34 |
+
\ jQuery(this).position().top || parseInt(jQuery(this).css(\"top\")), // if the\
|
| 35 |
+
\ rect is on a tab that is currently not displayed it has a position of 0, so\
|
| 36 |
+
\ this check gets the css instead so we don't lose the value\n \
|
| 37 |
+
\ origRectLeft: jQuery(this).position().left || parseInt(jQuery(this).css(\"left\"\
|
| 38 |
+
)),\n statBlock: closestWrapItems[0],\n statPosition:\
|
| 39 |
+
\ stats[0]\n }\n })\n }"
|
| 40 |
+
- "reset() {\n\n // Set the initial crop to match any given fixed aspect\
|
| 41 |
+
\ ratio (or\n // default to a square crop 1:1).\n let aspectRatio\
|
| 42 |
+
\ = this._initialAspectRatio\n\n // Calculate the initial crop size such\
|
| 43 |
+
\ that it fits within the bounds\n let width = getWidth(this.bounds)\n\
|
| 44 |
+
\ let height = getWidth(this.bounds) / aspectRatio\n\n if (aspectRatio\
|
| 45 |
+
\ < width / getHeight(this.bounds)) {\n width = getHeight(this.bounds)\
|
| 46 |
+
\ * aspectRatio\n height = getHeight(this.bounds)\n }\n\n \
|
| 47 |
+
\ // Calculate the initial crop position to be central to the bounds\n \
|
| 48 |
+
\ const x = (getWidth(this.bounds) - width) / 2\n const y = (getHeight(this.bounds)\
|
| 49 |
+
\ - height) / 2\n\n // Set the region\n this.region = [\n \
|
| 50 |
+
\ [x, y],\n [x + width, y + height]\n ]\n }"
|
| 51 |
+
- source_sentence: Returns true if the motor is at its lower limit.
|
| 52 |
+
sentences:
|
| 53 |
+
- "def is_lower_limit(self):\n is_lower = self.get_raw_status() & self.STATUS_LLIM\n\
|
| 54 |
+
\ return bool(is_lower)"
|
| 55 |
+
- "def testLowerBound(self,time,accel):\n\t\tif (time - self.timestamp) > ParserSettings.TIME_DELTA:#tests\
|
| 56 |
+
\ lockout threshold of a flick event\n\t\t\tif accel > self.lower:#tests to see\
|
| 57 |
+
\ if the flick maximum is met yet, relative to the previous magnitude\n\t\t\t\t\
|
| 58 |
+
self.timestamp \t= time#set appropriate values when flick triggered\n\t\t\t\t\
|
| 59 |
+
toReturn \t\t= self.lower\n\t\t\t\tself.lower\t \t= 0#reset flick for next magnitude\
|
| 60 |
+
\ test\n\t\t\t\treturn toReturn\n\t\t\telse:\n\t\t\t\tself.lower = accel#if no\
|
| 61 |
+
\ flick yet, update most recent flick to test\n\t\t\t\treturn 0\n\t\telse:\n\t\
|
| 62 |
+
\t\treturn 0"
|
| 63 |
+
- "function checkVisibility(message)\n{\n\t// Scroll the view down a certain amount\n\
|
| 64 |
+
\t$chatlogs.stop().animate({scrollTop: $chatlogs[0].scrollHeight});\n}"
|
| 65 |
+
- source_sentence: Extracts an object of params the given route cares about from the
|
| 66 |
+
given params object.
|
| 67 |
+
sentences:
|
| 68 |
+
- "function getRouteParams(route, params) {\n\t var routeParams = {};\n\t\n\t \
|
| 69 |
+
\ if (!route.path) return routeParams;\n\t\n\t (0, _PatternUtils.getParamNames)(route.path).forEach(function\
|
| 70 |
+
\ (p) {\n\t if (Object.prototype.hasOwnProperty.call(params, p)) {\n\t \
|
| 71 |
+
\ routeParams[p] = params[p];\n\t }\n\t });\n\t\n\t return routeParams;\n\
|
| 72 |
+
\t}"
|
| 73 |
+
- "public static void initImageLoader(Context context) {\n\t\tFile cacheDir = StorageUtils.getCacheDirectory(context);\n\
|
| 74 |
+
\t\tImageLoaderConfiguration config = new ImageLoaderConfiguration.Builder(context)\n\
|
| 75 |
+
\t\t\t\t.threadPriority(Thread.NORM_PRIORITY - 2)\n\t\t\t\t.denyCacheImageMultipleSizesInMemory()\
|
| 76 |
+
\ \n//\t\t\t\t.discCache(new UnlimitedDiscCache(cacheDir)) // default\n\t\t\t\t\
|
| 77 |
+
.discCacheFileNameGenerator(new Md5FileNameGenerator())\n\t\t\t\t.memoryCache(new\
|
| 78 |
+
\ LruMemoryCache(2 * 1024 * 1024))\n\t\t\t\t.tasksProcessingOrder(QueueProcessingType.LIFO)\n\
|
| 79 |
+
\t\t\t\t.writeDebugLogs() // Remove for release app\t\t\t\t\n\t\t\t\t.build();\n\
|
| 80 |
+
\t\t// Initialize ImageLoader with configuration.\n\t\tImageLoader.getInstance().init(config);\n\
|
| 81 |
+
\t}"
|
| 82 |
+
- "function getRouteParams(route, params) {\n\t var routeParams = {};\n\n\t if\
|
| 83 |
+
\ (!route.path) return routeParams;\n\n\t (0, _PatternUtils.getParamNames)(route.path).forEach(function\
|
| 84 |
+
\ (p) {\n\t if (Object.prototype.hasOwnProperty.call(params, p)) {\n\t \
|
| 85 |
+
\ routeParams[p] = params[p];\n\t }\n\t });\n\n\t return routeParams;\n\t\
|
| 86 |
+
}"
|
| 87 |
+
- source_sentence: select all as they all have a class of "section" return array of
|
| 88 |
+
IDs
|
| 89 |
+
sentences:
|
| 90 |
+
- "func (o *BookBuyOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer)\
|
| 91 |
+
\ {\n\n\trw.WriteHeader(200)\n\tif o.Payload != nil {\n\t\tpayload := o.Payload\n\
|
| 92 |
+
\t\tif err := producer.Produce(rw, payload); err != nil {\n\t\t\tpanic(err) //\
|
| 93 |
+
\ let the recovery middleware deal with this\n\t\t}\n\t}\n}"
|
| 94 |
+
- "function getMenuCLassesIDs()\n {\n let IdsArray = [];\n const\
|
| 95 |
+
\ elements = document.querySelectorAll('.banner,.section');\n for(const\
|
| 96 |
+
\ elm of elements)\n {\n IdsArray.push(elm.id);\n \
|
| 97 |
+
\ }\n \n return IdsArray;\n }"
|
| 98 |
+
- "getAllSectionsForRegion(region) {\n if (!region) {\n return\
|
| 99 |
+
\ null;\n }\n return region.getElementsByClassName(A11yClassNames.SECTION);\n\
|
| 100 |
+
\ }"
|
| 101 |
+
- source_sentence: For component xyz, returns "xyz[]"
|
| 102 |
+
sentences:
|
| 103 |
+
- "public String toString() {\n\t \tif(size == 0) {\n\t \t\treturn \"[]\"\
|
| 104 |
+
;\n\t \t}else {\n\t \t\t\n\t \t\tString result = \"[\" + elementData[0];\n\
|
| 105 |
+
\t \t\tfor(int i = 1; i < size; i++) {\n\t \t\t\tresult += \", \" + elementData[i];\n\
|
| 106 |
+
\t \t\t}\n\t \t\t\n\t \t\tresult += \"]\";\n\t \t\t\n\t \t\treturn\
|
| 107 |
+
\ result;\n\t \t}\n\t }"
|
| 108 |
+
- "def masterPath(self):\n\t\treturn fl.File( self._path + '/master.data' )"
|
| 109 |
+
- "private static final String getArrayTypeName(String typeName) {\n final String\
|
| 110 |
+
\ arrayTypeName = builtInArrayComponentName2ArrayTypeName.get(typeName);\n \
|
| 111 |
+
\ return (null == arrayTypeName) ? typeName + ARRAY_TYPE_SUFFIX : arrayTypeName;\n\
|
| 112 |
+
\ }"
|
| 113 |
+
pipeline_tag: sentence-similarity
|
| 114 |
+
library_name: sentence-transformers
|
| 115 |
+
metrics:
|
| 116 |
+
- cosine_accuracy@1
|
| 117 |
+
- cosine_accuracy@5
|
| 118 |
+
- cosine_accuracy@10
|
| 119 |
+
- cosine_precision@1
|
| 120 |
+
- cosine_precision@3
|
| 121 |
+
- cosine_precision@5
|
| 122 |
+
- cosine_precision@10
|
| 123 |
+
- cosine_recall@1
|
| 124 |
+
- cosine_recall@3
|
| 125 |
+
- cosine_recall@5
|
| 126 |
+
- cosine_recall@10
|
| 127 |
+
- cosine_ndcg@10
|
| 128 |
+
- cosine_mrr@1
|
| 129 |
+
- cosine_mrr@5
|
| 130 |
+
- cosine_mrr@10
|
| 131 |
+
- cosine_map@100
|
| 132 |
+
model-index:
|
| 133 |
+
- name: SentenceTransformer based on BAAI/bge-small-en-v1.5
|
| 134 |
+
results:
|
| 135 |
+
- task:
|
| 136 |
+
type: information-retrieval
|
| 137 |
+
name: Information Retrieval
|
| 138 |
+
dataset:
|
| 139 |
+
name: cornstack eval
|
| 140 |
+
type: cornstack_eval
|
| 141 |
+
metrics:
|
| 142 |
+
- type: cosine_accuracy@1
|
| 143 |
+
value: 0.726
|
| 144 |
+
name: Cosine Accuracy@1
|
| 145 |
+
- type: cosine_accuracy@5
|
| 146 |
+
value: 0.886
|
| 147 |
+
name: Cosine Accuracy@5
|
| 148 |
+
- type: cosine_accuracy@10
|
| 149 |
+
value: 0.918
|
| 150 |
+
name: Cosine Accuracy@10
|
| 151 |
+
- type: cosine_precision@1
|
| 152 |
+
value: 0.726
|
| 153 |
+
name: Cosine Precision@1
|
| 154 |
+
- type: cosine_precision@3
|
| 155 |
+
value: 0.282
|
| 156 |
+
name: Cosine Precision@3
|
| 157 |
+
- type: cosine_precision@5
|
| 158 |
+
value: 0.1772
|
| 159 |
+
name: Cosine Precision@5
|
| 160 |
+
- type: cosine_precision@10
|
| 161 |
+
value: 0.0918
|
| 162 |
+
name: Cosine Precision@10
|
| 163 |
+
- type: cosine_recall@1
|
| 164 |
+
value: 0.726
|
| 165 |
+
name: Cosine Recall@1
|
| 166 |
+
- type: cosine_recall@3
|
| 167 |
+
value: 0.846
|
| 168 |
+
name: Cosine Recall@3
|
| 169 |
+
- type: cosine_recall@5
|
| 170 |
+
value: 0.886
|
| 171 |
+
name: Cosine Recall@5
|
| 172 |
+
- type: cosine_recall@10
|
| 173 |
+
value: 0.918
|
| 174 |
+
name: Cosine Recall@10
|
| 175 |
+
- type: cosine_ndcg@10
|
| 176 |
+
value: 0.8243332358785
|
| 177 |
+
name: Cosine Ndcg@10
|
| 178 |
+
- type: cosine_mrr@1
|
| 179 |
+
value: 0.726
|
| 180 |
+
name: Cosine Mrr@1
|
| 181 |
+
- type: cosine_mrr@5
|
| 182 |
+
value: 0.7892999999999997
|
| 183 |
+
name: Cosine Mrr@5
|
| 184 |
+
- type: cosine_mrr@10
|
| 185 |
+
value: 0.7939428571428567
|
| 186 |
+
name: Cosine Mrr@10
|
| 187 |
+
- type: cosine_map@100
|
| 188 |
+
value: 0.7966106003908411
|
| 189 |
+
name: Cosine Map@100
|
| 190 |
+
---
|
| 191 |
+
|
| 192 |
+
# SentenceTransformer based on BAAI/bge-small-en-v1.5
|
| 193 |
+
|
| 194 |
+
This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for retrieval.
|
| 195 |
+
|
| 196 |
+
## Model Details
|
| 197 |
+
|
| 198 |
+
### Model Description
|
| 199 |
+
- **Model Type:** Sentence Transformer
|
| 200 |
+
- **Base model:** [BAAI/bge-small-en-v1.5](https://huggingface.co/BAAI/bge-small-en-v1.5) <!-- at revision 5c38ec7c405ec4b44b94cc5a9bb96e735b38267a -->
|
| 201 |
+
- **Maximum Sequence Length:** 384 tokens
|
| 202 |
+
- **Output Dimensionality:** 384 dimensions
|
| 203 |
+
- **Similarity Function:** Cosine Similarity
|
| 204 |
+
- **Supported Modality:** Text
|
| 205 |
+
<!-- - **Training Dataset:** Unknown -->
|
| 206 |
+
<!-- - **Language:** Unknown -->
|
| 207 |
+
<!-- - **License:** Unknown -->
|
| 208 |
+
|
| 209 |
+
### Model Sources
|
| 210 |
+
|
| 211 |
+
- **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
|
| 212 |
+
- **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
|
| 213 |
+
- **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
|
| 214 |
+
|
| 215 |
+
### Full Model Architecture
|
| 216 |
+
|
| 217 |
+
```
|
| 218 |
+
SentenceTransformer(
|
| 219 |
+
(0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'})
|
| 220 |
+
(1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'cls', 'include_prompt': True})
|
| 221 |
+
(2): Normalize({})
|
| 222 |
+
)
|
| 223 |
+
```
|
| 224 |
+
|
| 225 |
+
## Usage
|
| 226 |
+
|
| 227 |
+
### Direct Usage (Sentence Transformers)
|
| 228 |
+
|
| 229 |
+
First install the Sentence Transformers library:
|
| 230 |
+
|
| 231 |
+
```bash
|
| 232 |
+
pip install -U sentence-transformers
|
| 233 |
+
```
|
| 234 |
+
Then you can load this model and run inference.
|
| 235 |
+
```python
|
| 236 |
+
from sentence_transformers import SentenceTransformer
|
| 237 |
+
|
| 238 |
+
# Download from the 🤗 Hub
|
| 239 |
+
model = SentenceTransformer("sentence_transformers_model_id")
|
| 240 |
+
# Run inference
|
| 241 |
+
queries = [
|
| 242 |
+
'For component xyz, returns "xyz[]"',
|
| 243 |
+
]
|
| 244 |
+
documents = [
|
| 245 |
+
'private static final String getArrayTypeName(String typeName) {\n final String arrayTypeName = builtInArrayComponentName2ArrayTypeName.get(typeName);\n return (null == arrayTypeName) ? typeName + ARRAY_TYPE_SUFFIX : arrayTypeName;\n }',
|
| 246 |
+
'public String toString() {\n\t \tif(size == 0) {\n\t \t\treturn "[]";\n\t \t}else {\n\t \t\t\n\t \t\tString result = "[" + elementData[0];\n\t \t\tfor(int i = 1; i < size; i++) {\n\t \t\t\tresult += ", " + elementData[i];\n\t \t\t}\n\t \t\t\n\t \t\tresult += "]";\n\t \t\t\n\t \t\treturn result;\n\t \t}\n\t }',
|
| 247 |
+
]
|
| 248 |
+
query_embeddings = model.encode_query(queries)
|
| 249 |
+
document_embeddings = model.encode_document(documents)
|
| 250 |
+
print(query_embeddings.shape, document_embeddings.shape)
|
| 251 |
+
# [1, 384] [2, 384]
|
| 252 |
+
|
| 253 |
+
# Get the similarity scores for the embeddings
|
| 254 |
+
similarities = model.similarity(query_embeddings, document_embeddings)
|
| 255 |
+
print(similarities)
|
| 256 |
+
# tensor([[0.4896, 0.4966]])
|
| 257 |
+
```
|
| 258 |
+
<!--
|
| 259 |
+
### Direct Usage (Transformers)
|
| 260 |
+
|
| 261 |
+
<details><summary>Click to see the direct usage in Transformers</summary>
|
| 262 |
+
|
| 263 |
+
</details>
|
| 264 |
+
-->
|
| 265 |
+
|
| 266 |
+
<!--
|
| 267 |
+
### Downstream Usage (Sentence Transformers)
|
| 268 |
+
|
| 269 |
+
You can finetune this model on your own dataset.
|
| 270 |
+
|
| 271 |
+
<details><summary>Click to expand</summary>
|
| 272 |
+
|
| 273 |
+
</details>
|
| 274 |
+
-->
|
| 275 |
+
|
| 276 |
+
<!--
|
| 277 |
+
### Out-of-Scope Use
|
| 278 |
+
|
| 279 |
+
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
|
| 280 |
+
-->
|
| 281 |
+
|
| 282 |
+
## Evaluation
|
| 283 |
+
|
| 284 |
+
### Metrics
|
| 285 |
+
|
| 286 |
+
#### Information Retrieval
|
| 287 |
+
|
| 288 |
+
* Dataset: `cornstack_eval`
|
| 289 |
+
* Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.sentence_transformer.evaluation.InformationRetrievalEvaluator)
|
| 290 |
+
|
| 291 |
+
| Metric | Value |
|
| 292 |
+
|:--------------------|:-----------|
|
| 293 |
+
| cosine_accuracy@1 | 0.726 |
|
| 294 |
+
| cosine_accuracy@5 | 0.886 |
|
| 295 |
+
| cosine_accuracy@10 | 0.918 |
|
| 296 |
+
| cosine_precision@1 | 0.726 |
|
| 297 |
+
| cosine_precision@3 | 0.282 |
|
| 298 |
+
| cosine_precision@5 | 0.1772 |
|
| 299 |
+
| cosine_precision@10 | 0.0918 |
|
| 300 |
+
| cosine_recall@1 | 0.726 |
|
| 301 |
+
| cosine_recall@3 | 0.846 |
|
| 302 |
+
| cosine_recall@5 | 0.886 |
|
| 303 |
+
| cosine_recall@10 | 0.918 |
|
| 304 |
+
| **cosine_ndcg@10** | **0.8243** |
|
| 305 |
+
| cosine_mrr@1 | 0.726 |
|
| 306 |
+
| cosine_mrr@5 | 0.7893 |
|
| 307 |
+
| cosine_mrr@10 | 0.7939 |
|
| 308 |
+
| cosine_map@100 | 0.7966 |
|
| 309 |
+
|
| 310 |
+
<!--
|
| 311 |
+
## Bias, Risks and Limitations
|
| 312 |
+
|
| 313 |
+
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
|
| 314 |
+
-->
|
| 315 |
+
|
| 316 |
+
<!--
|
| 317 |
+
### Recommendations
|
| 318 |
+
|
| 319 |
+
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
|
| 320 |
+
-->
|
| 321 |
+
|
| 322 |
+
## Training Details
|
| 323 |
+
|
| 324 |
+
### Training Dataset
|
| 325 |
+
|
| 326 |
+
#### Unnamed Dataset
|
| 327 |
+
|
| 328 |
+
* Size: 200,000 training samples
|
| 329 |
+
* Columns: <code>anchor</code>, <code>positive</code>, and <code>negative</code>
|
| 330 |
+
* Approximate statistics based on the first 100 samples:
|
| 331 |
+
| | anchor | positive | negative |
|
| 332 |
+
|:---------|:-----------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------|
|
| 333 |
+
| type | string | string | string |
|
| 334 |
+
| modality | text | text | text |
|
| 335 |
+
| details | <ul><li>min: 6 tokens</li><li>mean: 19.83 tokens</li><li>max: 105 tokens</li></ul> | <ul><li>min: 21 tokens</li><li>mean: 139.33 tokens</li><li>max: 384 tokens</li></ul> | <ul><li>min: 11 tokens</li><li>mean: 100.52 tokens</li><li>max: 384 tokens</li></ul> |
|
| 336 |
+
* Samples:
|
| 337 |
+
| anchor | positive | negative |
|
| 338 |
+
|:--------------------------------------------------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
|
| 339 |
+
| <code>Fades all outputs to the given color and waits for it to complete.</code> | <code>def FadeOutputs(box, color, steps=50):<br> for output in box:<br> output.Fade(color=color, steps=steps)<br> time.sleep(steps / (float(box.frequency) / len(box)))</code> | <code>def _colour_loop(self, colours, seconds=None, milliseconds=None, fade=True):<br> colours = self.convert_to_colour_list(colours) #Forces a list of colours into an actual python list<br> if len(colours)<2:<br> colours.append("#000000") #Blink between black and the specified colour if only one provided<br> <br> #Start with the first colour immediately:<br> if fade:<br> self.fade(colours[0])<br> else:<br> self.set(colours[0])<br> step_time = self.clean_time_in_milliseconds(seconds, milliseconds, default_seconds=1, minimum_milliseconds=50)<br> <br> #Do the loop<br> i = 1 #We're moving to the second colour now<br> total_colours = len(colours)<br> while not self._sequence_stop_signal:<br> #Resolve our colour<br> next_colour = colours[i]<br> i = (i+1) % total_colours #ensures we are never asking for more colours than provided<br> if fade: #Fading is a blocking process, thus we let the fade l...</code> |
|
| 340 |
+
| <code>Sets the additional element count if buffer resize is required, defaults to initialElementCount of factory method.</code> | <code>public void setResizeElementCount(int v) { vboSet.setResizeElementCount(v); }</code> | <code>public int getResizeElementCount() { return vboSet.getResizeElementCount(); }</code> |
|
| 341 |
+
| <code>delete a specific incident</code> | <code>def delete_specific_incident(self, incident_id):<br> self.cursor.execute("""DELETE FROM incidents WHERE incident_id ='%s' AND status='draft'<br> """ %(incident_id))<br> self.commiting()<br> return incident_id</code> | <code>def delete(openstack_resource):<br> openstack_resource.delete()</code> |
|
| 342 |
+
* Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
|
| 343 |
+
```json
|
| 344 |
+
{
|
| 345 |
+
"loss": "MultipleNegativesRankingLoss",
|
| 346 |
+
"matryoshka_dims": [
|
| 347 |
+
384,
|
| 348 |
+
256,
|
| 349 |
+
128,
|
| 350 |
+
64
|
| 351 |
+
],
|
| 352 |
+
"matryoshka_weights": [
|
| 353 |
+
1.0,
|
| 354 |
+
1.0,
|
| 355 |
+
1.0,
|
| 356 |
+
1.0
|
| 357 |
+
],
|
| 358 |
+
"n_dims_per_step": -1
|
| 359 |
+
}
|
| 360 |
+
```
|
| 361 |
+
|
| 362 |
+
### Training Hyperparameters
|
| 363 |
+
#### Non-Default Hyperparameters
|
| 364 |
+
|
| 365 |
+
- `per_device_train_batch_size`: 32
|
| 366 |
+
- `gradient_accumulation_steps`: 2
|
| 367 |
+
- `learning_rate`: 2e-05
|
| 368 |
+
- `num_train_epochs`: 1
|
| 369 |
+
- `warmup_ratio`: 0.05
|
| 370 |
+
- `fp16`: True
|
| 371 |
+
- `batch_sampler`: no_duplicates
|
| 372 |
+
|
| 373 |
+
#### All Hyperparameters
|
| 374 |
+
<details><summary>Click to expand</summary>
|
| 375 |
+
|
| 376 |
+
- `overwrite_output_dir`: False
|
| 377 |
+
- `do_predict`: False
|
| 378 |
+
- `prediction_loss_only`: True
|
| 379 |
+
- `per_device_train_batch_size`: 32
|
| 380 |
+
- `per_device_eval_batch_size`: 8
|
| 381 |
+
- `per_gpu_train_batch_size`: None
|
| 382 |
+
- `per_gpu_eval_batch_size`: None
|
| 383 |
+
- `gradient_accumulation_steps`: 2
|
| 384 |
+
- `eval_accumulation_steps`: None
|
| 385 |
+
- `torch_empty_cache_steps`: None
|
| 386 |
+
- `learning_rate`: 2e-05
|
| 387 |
+
- `weight_decay`: 0.0
|
| 388 |
+
- `adam_beta1`: 0.9
|
| 389 |
+
- `adam_beta2`: 0.999
|
| 390 |
+
- `adam_epsilon`: 1e-08
|
| 391 |
+
- `max_grad_norm`: 1.0
|
| 392 |
+
- `num_train_epochs`: 1
|
| 393 |
+
- `max_steps`: -1
|
| 394 |
+
- `lr_scheduler_type`: linear
|
| 395 |
+
- `lr_scheduler_kwargs`: None
|
| 396 |
+
- `warmup_ratio`: 0.05
|
| 397 |
+
- `warmup_steps`: 0
|
| 398 |
+
- `log_level`: passive
|
| 399 |
+
- `log_level_replica`: warning
|
| 400 |
+
- `log_on_each_node`: True
|
| 401 |
+
- `logging_nan_inf_filter`: True
|
| 402 |
+
- `save_safetensors`: True
|
| 403 |
+
- `save_on_each_node`: False
|
| 404 |
+
- `save_only_model`: False
|
| 405 |
+
- `restore_callback_states_from_checkpoint`: False
|
| 406 |
+
- `no_cuda`: False
|
| 407 |
+
- `use_cpu`: False
|
| 408 |
+
- `use_mps_device`: False
|
| 409 |
+
- `seed`: 42
|
| 410 |
+
- `data_seed`: None
|
| 411 |
+
- `jit_mode_eval`: False
|
| 412 |
+
- `bf16`: False
|
| 413 |
+
- `fp16`: True
|
| 414 |
+
- `fp16_opt_level`: O1
|
| 415 |
+
- `half_precision_backend`: auto
|
| 416 |
+
- `bf16_full_eval`: False
|
| 417 |
+
- `fp16_full_eval`: False
|
| 418 |
+
- `tf32`: None
|
| 419 |
+
- `local_rank`: 0
|
| 420 |
+
- `ddp_backend`: None
|
| 421 |
+
- `tpu_num_cores`: None
|
| 422 |
+
- `tpu_metrics_debug`: False
|
| 423 |
+
- `debug`: []
|
| 424 |
+
- `dataloader_drop_last`: False
|
| 425 |
+
- `dataloader_num_workers`: 0
|
| 426 |
+
- `dataloader_prefetch_factor`: None
|
| 427 |
+
- `past_index`: -1
|
| 428 |
+
- `disable_tqdm`: False
|
| 429 |
+
- `remove_unused_columns`: True
|
| 430 |
+
- `label_names`: None
|
| 431 |
+
- `load_best_model_at_end`: False
|
| 432 |
+
- `ignore_data_skip`: False
|
| 433 |
+
- `fsdp`: []
|
| 434 |
+
- `fsdp_min_num_params`: 0
|
| 435 |
+
- `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
|
| 436 |
+
- `fsdp_transformer_layer_cls_to_wrap`: None
|
| 437 |
+
- `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
|
| 438 |
+
- `parallelism_config`: None
|
| 439 |
+
- `deepspeed`: None
|
| 440 |
+
- `label_smoothing_factor`: 0.0
|
| 441 |
+
- `optim`: adamw_torch_fused
|
| 442 |
+
- `optim_args`: None
|
| 443 |
+
- `adafactor`: False
|
| 444 |
+
- `group_by_length`: False
|
| 445 |
+
- `length_column_name`: length
|
| 446 |
+
- `project`: huggingface
|
| 447 |
+
- `trackio_space_id`: trackio
|
| 448 |
+
- `ddp_find_unused_parameters`: None
|
| 449 |
+
- `ddp_bucket_cap_mb`: None
|
| 450 |
+
- `ddp_broadcast_buffers`: False
|
| 451 |
+
- `dataloader_pin_memory`: True
|
| 452 |
+
- `dataloader_persistent_workers`: False
|
| 453 |
+
- `skip_memory_metrics`: True
|
| 454 |
+
- `use_legacy_prediction_loop`: False
|
| 455 |
+
- `push_to_hub`: False
|
| 456 |
+
- `resume_from_checkpoint`: None
|
| 457 |
+
- `hub_model_id`: None
|
| 458 |
+
- `hub_strategy`: every_save
|
| 459 |
+
- `hub_private_repo`: None
|
| 460 |
+
- `hub_always_push`: False
|
| 461 |
+
- `hub_revision`: None
|
| 462 |
+
- `gradient_checkpointing`: False
|
| 463 |
+
- `gradient_checkpointing_kwargs`: None
|
| 464 |
+
- `include_inputs_for_metrics`: False
|
| 465 |
+
- `include_for_metrics`: []
|
| 466 |
+
- `eval_do_concat_batches`: True
|
| 467 |
+
- `fp16_backend`: auto
|
| 468 |
+
- `push_to_hub_model_id`: None
|
| 469 |
+
- `push_to_hub_organization`: None
|
| 470 |
+
- `mp_parameters`:
|
| 471 |
+
- `auto_find_batch_size`: False
|
| 472 |
+
- `full_determinism`: False
|
| 473 |
+
- `torchdynamo`: None
|
| 474 |
+
- `ray_scope`: last
|
| 475 |
+
- `ddp_timeout`: 1800
|
| 476 |
+
- `torch_compile`: False
|
| 477 |
+
- `torch_compile_backend`: None
|
| 478 |
+
- `torch_compile_mode`: None
|
| 479 |
+
- `include_tokens_per_second`: False
|
| 480 |
+
- `include_num_input_tokens_seen`: no
|
| 481 |
+
- `neftune_noise_alpha`: None
|
| 482 |
+
- `optim_target_modules`: None
|
| 483 |
+
- `batch_eval_metrics`: False
|
| 484 |
+
- `eval_on_start`: False
|
| 485 |
+
- `use_liger_kernel`: False
|
| 486 |
+
- `liger_kernel_config`: None
|
| 487 |
+
- `eval_use_gather_object`: False
|
| 488 |
+
- `average_tokens_across_devices`: True
|
| 489 |
+
- `prompts`: None
|
| 490 |
+
- `batch_sampler`: no_duplicates
|
| 491 |
+
- `multi_dataset_batch_sampler`: proportional
|
| 492 |
+
- `router_mapping`: {}
|
| 493 |
+
- `learning_rate_mapping`: {}
|
| 494 |
+
|
| 495 |
+
</details>
|
| 496 |
+
|
| 497 |
+
### Training Logs
|
| 498 |
+
| Epoch | Step | Training Loss | cornstack_eval_cosine_ndcg@10 |
|
| 499 |
+
|:-----:|:----:|:-------------:|:-----------------------------:|
|
| 500 |
+
| 0.016 | 50 | 6.8957 | - |
|
| 501 |
+
| 0.032 | 100 | 5.8104 | - |
|
| 502 |
+
| 0.048 | 150 | 5.3881 | - |
|
| 503 |
+
| 0.064 | 200 | 5.1643 | - |
|
| 504 |
+
| 0.08 | 250 | 5.1469 | - |
|
| 505 |
+
| 0.096 | 300 | 4.8455 | - |
|
| 506 |
+
| 0.112 | 350 | 4.9429 | - |
|
| 507 |
+
| 0.128 | 400 | 5.0664 | - |
|
| 508 |
+
| 0.144 | 450 | 4.6627 | - |
|
| 509 |
+
| 0.16 | 500 | 4.686 | - |
|
| 510 |
+
| 0.176 | 550 | 4.643 | - |
|
| 511 |
+
| 0.192 | 600 | 4.4053 | - |
|
| 512 |
+
| 0.208 | 650 | 4.5371 | - |
|
| 513 |
+
| 0.224 | 700 | 4.5435 | - |
|
| 514 |
+
| 0.24 | 750 | 4.432 | - |
|
| 515 |
+
| 0.256 | 800 | 4.4243 | - |
|
| 516 |
+
| 0.272 | 850 | 4.2231 | - |
|
| 517 |
+
| 0.288 | 900 | 4.2622 | - |
|
| 518 |
+
| 0.304 | 950 | 4.3597 | - |
|
| 519 |
+
| 0.32 | 1000 | 4.2547 | 0.8176 |
|
| 520 |
+
| 0.336 | 1050 | 4.2443 | - |
|
| 521 |
+
| 0.352 | 1100 | 4.4695 | - |
|
| 522 |
+
| 0.368 | 1150 | 4.3728 | - |
|
| 523 |
+
| 0.384 | 1200 | 4.3351 | - |
|
| 524 |
+
| 0.4 | 1250 | 3.9853 | - |
|
| 525 |
+
| 0.416 | 1300 | 4.2823 | - |
|
| 526 |
+
| 0.432 | 1350 | 4.1293 | - |
|
| 527 |
+
| 0.448 | 1400 | 4.1029 | - |
|
| 528 |
+
| 0.464 | 1450 | 4.1758 | - |
|
| 529 |
+
| 0.48 | 1500 | 4.1655 | - |
|
| 530 |
+
| 0.496 | 1550 | 4.0803 | - |
|
| 531 |
+
| 0.512 | 1600 | 4.1985 | - |
|
| 532 |
+
| 0.528 | 1650 | 4.0523 | - |
|
| 533 |
+
| 0.544 | 1700 | 4.1011 | - |
|
| 534 |
+
| 0.56 | 1750 | 4.2448 | - |
|
| 535 |
+
| 0.576 | 1800 | 4.0936 | - |
|
| 536 |
+
| 0.592 | 1850 | 3.9888 | - |
|
| 537 |
+
| 0.608 | 1900 | 4.1434 | - |
|
| 538 |
+
| 0.624 | 1950 | 3.9789 | - |
|
| 539 |
+
| 0.64 | 2000 | 3.9967 | 0.8271 |
|
| 540 |
+
| 0.656 | 2050 | 4.0894 | - |
|
| 541 |
+
| 0.672 | 2100 | 3.8938 | - |
|
| 542 |
+
| 0.688 | 2150 | 4.0384 | - |
|
| 543 |
+
| 0.704 | 2200 | 4.1308 | - |
|
| 544 |
+
| 0.72 | 2250 | 3.864 | - |
|
| 545 |
+
| 0.736 | 2300 | 4.0325 | - |
|
| 546 |
+
| 0.752 | 2350 | 3.8263 | - |
|
| 547 |
+
| 0.768 | 2400 | 3.9559 | - |
|
| 548 |
+
| 0.784 | 2450 | 3.7323 | - |
|
| 549 |
+
| 0.8 | 2500 | 3.7366 | - |
|
| 550 |
+
| 0.816 | 2550 | 3.9768 | - |
|
| 551 |
+
| 0.832 | 2600 | 3.9144 | - |
|
| 552 |
+
| 0.848 | 2650 | 3.9013 | - |
|
| 553 |
+
| 0.864 | 2700 | 3.9211 | - |
|
| 554 |
+
| 0.88 | 2750 | 3.9616 | - |
|
| 555 |
+
| 0.896 | 2800 | 3.9926 | - |
|
| 556 |
+
| 0.912 | 2850 | 3.9388 | - |
|
| 557 |
+
| 0.928 | 2900 | 3.8664 | - |
|
| 558 |
+
| 0.944 | 2950 | 3.8747 | - |
|
| 559 |
+
| 0.96 | 3000 | 4.0419 | 0.8243 |
|
| 560 |
+
| 0.976 | 3050 | 3.9493 | - |
|
| 561 |
+
| 0.992 | 3100 | 3.8626 | - |
|
| 562 |
+
|
| 563 |
+
|
| 564 |
+
### Training Time
|
| 565 |
+
- **Training**: 28.8 minutes
|
| 566 |
+
- **Evaluation**: 1.7 seconds
|
| 567 |
+
- **Total**: 28.9 minutes
|
| 568 |
+
|
| 569 |
+
### Framework Versions
|
| 570 |
+
- Python: 3.13.7
|
| 571 |
+
- Sentence Transformers: 5.6.0
|
| 572 |
+
- Transformers: 4.57.6
|
| 573 |
+
- PyTorch: 2.12.1+cu126
|
| 574 |
+
- Accelerate: 1.13.0
|
| 575 |
+
- Datasets: 4.8.5
|
| 576 |
+
- Tokenizers: 0.22.2
|
| 577 |
+
|
| 578 |
+
## Citation
|
| 579 |
+
|
| 580 |
+
### BibTeX
|
| 581 |
+
|
| 582 |
+
#### Sentence Transformers
|
| 583 |
+
```bibtex
|
| 584 |
+
@inproceedings{reimers-2019-sentence-bert,
|
| 585 |
+
title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
|
| 586 |
+
author = "Reimers, Nils and Gurevych, Iryna",
|
| 587 |
+
booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
|
| 588 |
+
month = "11",
|
| 589 |
+
year = "2019",
|
| 590 |
+
publisher = "Association for Computational Linguistics",
|
| 591 |
+
url = "https://arxiv.org/abs/1908.10084",
|
| 592 |
+
}
|
| 593 |
+
```
|
| 594 |
+
|
| 595 |
+
#### MatryoshkaLoss
|
| 596 |
+
```bibtex
|
| 597 |
+
@misc{kusupati2024matryoshka,
|
| 598 |
+
title={Matryoshka Representation Learning},
|
| 599 |
+
author={Aditya Kusupati and Gantavya Bhatt and Aniket Rege and Matthew Wallingford and Aditya Sinha and Vivek Ramanujan and William Howard-Snyder and Kaifeng Chen and Sham Kakade and Prateek Jain and Ali Farhadi},
|
| 600 |
+
year={2024},
|
| 601 |
+
eprint={2205.13147},
|
| 602 |
+
archivePrefix={arXiv},
|
| 603 |
+
primaryClass={cs.LG}
|
| 604 |
+
}
|
| 605 |
+
```
|
| 606 |
+
|
| 607 |
+
#### MultipleNegativesRankingLoss
|
| 608 |
+
```bibtex
|
| 609 |
+
@misc{oord2019representationlearningcontrastivepredictive,
|
| 610 |
+
title={Representation Learning with Contrastive Predictive Coding},
|
| 611 |
+
author={Aaron van den Oord and Yazhe Li and Oriol Vinyals},
|
| 612 |
+
year={2019},
|
| 613 |
+
eprint={1807.03748},
|
| 614 |
+
archivePrefix={arXiv},
|
| 615 |
+
primaryClass={cs.LG},
|
| 616 |
+
url={https://arxiv.org/abs/1807.03748},
|
| 617 |
+
}
|
| 618 |
+
```
|
| 619 |
+
|
| 620 |
+
<!--
|
| 621 |
+
## Glossary
|
| 622 |
+
|
| 623 |
+
*Clearly define terms in order to be accessible across audiences.*
|
| 624 |
+
-->
|
| 625 |
+
|
| 626 |
+
<!--
|
| 627 |
+
## Model Card Authors
|
| 628 |
+
|
| 629 |
+
*Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
|
| 630 |
+
-->
|
| 631 |
+
|
| 632 |
+
<!--
|
| 633 |
+
## Model Card Contact
|
| 634 |
+
|
| 635 |
+
*Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
|
| 636 |
+
-->
|
config.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"architectures": [
|
| 3 |
+
"BertModel"
|
| 4 |
+
],
|
| 5 |
+
"attention_probs_dropout_prob": 0.1,
|
| 6 |
+
"classifier_dropout": null,
|
| 7 |
+
"dtype": "float32",
|
| 8 |
+
"hidden_act": "gelu",
|
| 9 |
+
"hidden_dropout_prob": 0.1,
|
| 10 |
+
"hidden_size": 384,
|
| 11 |
+
"id2label": {
|
| 12 |
+
"0": "LABEL_0"
|
| 13 |
+
},
|
| 14 |
+
"initializer_range": 0.02,
|
| 15 |
+
"intermediate_size": 1536,
|
| 16 |
+
"label2id": {
|
| 17 |
+
"LABEL_0": 0
|
| 18 |
+
},
|
| 19 |
+
"layer_norm_eps": 1e-12,
|
| 20 |
+
"max_position_embeddings": 512,
|
| 21 |
+
"model_type": "bert",
|
| 22 |
+
"num_attention_heads": 12,
|
| 23 |
+
"num_hidden_layers": 12,
|
| 24 |
+
"pad_token_id": 0,
|
| 25 |
+
"position_embedding_type": "absolute",
|
| 26 |
+
"transformers_version": "4.57.6",
|
| 27 |
+
"type_vocab_size": 2,
|
| 28 |
+
"use_cache": true,
|
| 29 |
+
"vocab_size": 30522
|
| 30 |
+
}
|
config_sentence_transformers.json
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"__version__": {
|
| 3 |
+
"pytorch": "2.12.1+cu126",
|
| 4 |
+
"sentence_transformers": "5.6.0",
|
| 5 |
+
"transformers": "4.57.6"
|
| 6 |
+
},
|
| 7 |
+
"default_prompt_name": null,
|
| 8 |
+
"model_type": "SentenceTransformer",
|
| 9 |
+
"prompts": {
|
| 10 |
+
"document": "",
|
| 11 |
+
"query": ""
|
| 12 |
+
},
|
| 13 |
+
"similarity_fn_name": "cosine"
|
| 14 |
+
}
|
model.safetensors
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
version https://git-lfs.github.com/spec/v1
|
| 2 |
+
oid sha256:04111955164b477f35283de97552792193325b72852368061c70d0a9861a6e41
|
| 3 |
+
size 133462128
|
modules.json
ADDED
|
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
[
|
| 2 |
+
{
|
| 3 |
+
"idx": 0,
|
| 4 |
+
"name": "0",
|
| 5 |
+
"path": "",
|
| 6 |
+
"type": "sentence_transformers.base.modules.transformer.Transformer"
|
| 7 |
+
},
|
| 8 |
+
{
|
| 9 |
+
"idx": 1,
|
| 10 |
+
"name": "1",
|
| 11 |
+
"path": "1_Pooling",
|
| 12 |
+
"type": "sentence_transformers.sentence_transformer.modules.pooling.Pooling"
|
| 13 |
+
},
|
| 14 |
+
{
|
| 15 |
+
"idx": 2,
|
| 16 |
+
"name": "2",
|
| 17 |
+
"path": "2_Normalize",
|
| 18 |
+
"type": "sentence_transformers.sentence_transformer.modules.normalize.Normalize"
|
| 19 |
+
}
|
| 20 |
+
]
|
sentence_bert_config.json
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"transformer_task": "feature-extraction",
|
| 3 |
+
"modality_config": {
|
| 4 |
+
"text": {
|
| 5 |
+
"method": "forward",
|
| 6 |
+
"method_output_name": "last_hidden_state"
|
| 7 |
+
}
|
| 8 |
+
},
|
| 9 |
+
"module_output_name": "token_embeddings"
|
| 10 |
+
}
|
special_tokens_map.json
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"cls_token": {
|
| 3 |
+
"content": "[CLS]",
|
| 4 |
+
"lstrip": false,
|
| 5 |
+
"normalized": false,
|
| 6 |
+
"rstrip": false,
|
| 7 |
+
"single_word": false
|
| 8 |
+
},
|
| 9 |
+
"mask_token": {
|
| 10 |
+
"content": "[MASK]",
|
| 11 |
+
"lstrip": false,
|
| 12 |
+
"normalized": false,
|
| 13 |
+
"rstrip": false,
|
| 14 |
+
"single_word": false
|
| 15 |
+
},
|
| 16 |
+
"pad_token": {
|
| 17 |
+
"content": "[PAD]",
|
| 18 |
+
"lstrip": false,
|
| 19 |
+
"normalized": false,
|
| 20 |
+
"rstrip": false,
|
| 21 |
+
"single_word": false
|
| 22 |
+
},
|
| 23 |
+
"sep_token": {
|
| 24 |
+
"content": "[SEP]",
|
| 25 |
+
"lstrip": false,
|
| 26 |
+
"normalized": false,
|
| 27 |
+
"rstrip": false,
|
| 28 |
+
"single_word": false
|
| 29 |
+
},
|
| 30 |
+
"unk_token": {
|
| 31 |
+
"content": "[UNK]",
|
| 32 |
+
"lstrip": false,
|
| 33 |
+
"normalized": false,
|
| 34 |
+
"rstrip": false,
|
| 35 |
+
"single_word": false
|
| 36 |
+
}
|
| 37 |
+
}
|
tokenizer.json
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|
tokenizer_config.json
ADDED
|
@@ -0,0 +1,58 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"added_tokens_decoder": {
|
| 3 |
+
"0": {
|
| 4 |
+
"content": "[PAD]",
|
| 5 |
+
"lstrip": false,
|
| 6 |
+
"normalized": false,
|
| 7 |
+
"rstrip": false,
|
| 8 |
+
"single_word": false,
|
| 9 |
+
"special": true
|
| 10 |
+
},
|
| 11 |
+
"100": {
|
| 12 |
+
"content": "[UNK]",
|
| 13 |
+
"lstrip": false,
|
| 14 |
+
"normalized": false,
|
| 15 |
+
"rstrip": false,
|
| 16 |
+
"single_word": false,
|
| 17 |
+
"special": true
|
| 18 |
+
},
|
| 19 |
+
"101": {
|
| 20 |
+
"content": "[CLS]",
|
| 21 |
+
"lstrip": false,
|
| 22 |
+
"normalized": false,
|
| 23 |
+
"rstrip": false,
|
| 24 |
+
"single_word": false,
|
| 25 |
+
"special": true
|
| 26 |
+
},
|
| 27 |
+
"102": {
|
| 28 |
+
"content": "[SEP]",
|
| 29 |
+
"lstrip": false,
|
| 30 |
+
"normalized": false,
|
| 31 |
+
"rstrip": false,
|
| 32 |
+
"single_word": false,
|
| 33 |
+
"special": true
|
| 34 |
+
},
|
| 35 |
+
"103": {
|
| 36 |
+
"content": "[MASK]",
|
| 37 |
+
"lstrip": false,
|
| 38 |
+
"normalized": false,
|
| 39 |
+
"rstrip": false,
|
| 40 |
+
"single_word": false,
|
| 41 |
+
"special": true
|
| 42 |
+
}
|
| 43 |
+
},
|
| 44 |
+
"clean_up_tokenization_spaces": true,
|
| 45 |
+
"cls_token": "[CLS]",
|
| 46 |
+
"do_basic_tokenize": true,
|
| 47 |
+
"do_lower_case": true,
|
| 48 |
+
"extra_special_tokens": {},
|
| 49 |
+
"mask_token": "[MASK]",
|
| 50 |
+
"model_max_length": 384,
|
| 51 |
+
"never_split": null,
|
| 52 |
+
"pad_token": "[PAD]",
|
| 53 |
+
"sep_token": "[SEP]",
|
| 54 |
+
"strip_accents": null,
|
| 55 |
+
"tokenize_chinese_chars": true,
|
| 56 |
+
"tokenizer_class": "BertTokenizer",
|
| 57 |
+
"unk_token": "[UNK]"
|
| 58 |
+
}
|
vocab.txt
ADDED
|
The diff for this file is too large to render.
See raw diff
|
|
|