hreyulog commited on
Commit
ae6cdf5
·
verified ·
1 Parent(s): e797ce1

Upload 13 files

Browse files
.gitattributes CHANGED
@@ -33,3 +33,4 @@ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
 
 
33
  *.zip filter=lfs diff=lfs merge=lfs -text
34
  *.zst filter=lfs diff=lfs merge=lfs -text
35
  *tfevents* filter=lfs diff=lfs merge=lfs -text
36
+ tokenizer.json filter=lfs diff=lfs merge=lfs -text
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 768,
3
+ "pooling_mode_cls_token": false,
4
+ "pooling_mode_mean_tokens": true,
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
+ }
2_Dense/config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "in_features": 768,
3
+ "out_features": 3072,
4
+ "bias": false,
5
+ "activation_function": "torch.nn.modules.linear.Identity"
6
+ }
2_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b05e8eec2e91af5ffdd9ebf007b5ee85a9db2c92ac69c5ceb72b5221a6bff1a9
3
+ size 9437272
3_Dense/config.json ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ {
2
+ "in_features": 3072,
3
+ "out_features": 768,
4
+ "bias": false,
5
+ "activation_function": "torch.nn.modules.linear.Identity"
6
+ }
3_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:1ac02b4a543b6f1208ef78cc2032784b67ba06a6ef9864fbc2aede4003ec4853
3
+ size 9437272
README.md ADDED
@@ -0,0 +1,432 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:39122
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: google/embeddinggemma-300m
11
+ widget:
12
+ - source_sentence: 组件即将出现时加载收藏商家数据
13
+ sentences:
14
+ - "static async delete(key: string, preferenceName: string = defaultPreferenceName)\
15
+ \ {\n let preferences = await this.getPreferences(preferenceName)\n return\
16
+ \ await preferences.delete(key)\n }"
17
+ - "async aboutToAppear(): Promise<void> {\n await this.loadFavoriteMerchants();\n\
18
+ \ }"
19
+ - 'Copyright (c) 2022 Huawei Device Co., Ltd.
20
+
21
+ Licensed under the Apache License,Version 2.0 (the "License");
22
+
23
+ you may not use this file except in compliance with the License.
24
+
25
+ You may obtain a copy of the License at
26
+
27
+
28
+ http://www.apache.org/licenses/LICENSE-2.0
29
+
30
+
31
+ Unless required by applicable law or agreed to in writing, software
32
+
33
+ distributed under the License is distributed on an "AS IS" BASIS,
34
+
35
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
36
+
37
+ See the License for the specific language governing permissions and
38
+
39
+ limitations under the License.'
40
+ - source_sentence: "@Builder\n buildBottomNavigation() {\n Tabs({ index: this.currentTabIndex\
41
+ \ }) {\n TabContent() {\n // 首页内容在主区域显示\n }\n .tabBar(this.buildTabBarItem('首页',\
42
+ \ $r('app.media.ic_home'), 0))\n \n TabContent() {\n // 联系人内容在主区域显示\n\
43
+ \ }\n .tabBar(this.buildTabBarItem('联系人', $r('app.media.ic_contacts'),\
44
+ \ 1))\n \n TabContent() {\n // 日历内容在主区域显示\n }\n .tabBar(this.buildTabBarItem('日历',\
45
+ \ $r('app.media.ic_calendar'), 2))\n \n TabContent() {\n // 祝福语内容在主区域显示\n\
46
+ \ }\n .tabBar(this.buildTabBarItem('祝福语', $r('app.media.ic_greetings'),\
47
+ \ 3))\n \n TabContent() {\n // 设置内容在主区域显示\n }\n .tabBar(this.buildTabBarItem('设置',\
48
+ \ $r('app.media.ic_settings'), 4))\n }\n .onChange((index: number) => {\n\
49
+ \ this.onTabChange(index);\n })\n .barPosition(BarPosition.End)\n \
50
+ \ .barBackgroundColor('#ffffff')\n .barHeight(60)\n }"
51
+ sentences:
52
+ - 定义List的builder方法
53
+ - 错误相关常量
54
+ - 构建底部导航栏
55
+ - source_sentence: 插入数据库
56
+ sentences:
57
+ - "static dateToTimestamp(date: Date): number {\n return date.getTime();\n }"
58
+ - "public async insertData(context: common.Context, Contact: Contact): Promise<void>\
59
+ \ {\n logger.info(TAG, 'insert begin');\n if (!context) {\n logger.info(TAG,\
60
+ \ 'context is null or undefined');\n }\n\n const predicates = new rdb.RdbPredicates(TABLE_NAME);\n\
61
+ \ if (predicates === null || predicates === undefined) {\n logger.info(TAG,\
62
+ \ 'predicates is null or undefined');\n }\n\n this.rdbStore = await rdb.getRdbStore(context,\
63
+ \ STORE_CONFIG);\n\n let value1 = Contact.name;\n let value2 = Contact.phone;\n\
64
+ \ let value3 = Contact.email;\n let value4 = Contact.address;\n let value5\
65
+ \ = Contact.avatar;\n let value6 = Contact.category;\n\n const valueBucket:\
66
+ \ ValuesBucket = {\n 'name': value1,\n 'phone': value2,\n 'email':\
67
+ \ value3,\n 'address': value4,\n 'avatar': value5,\n 'category':\
68
+ \ value6\n }\n\n if (this.rdbStore != undefined) {\n this.rdbStore.insert(TABLE_NAME,\
69
+ \ valueBucket, rdb.ConflictResolution.ON_CONFLICT_REPLACE,\n (err: BusinessError,\
70
+ \ rows: number) => {\n if (err) {\n logger.info(TAG, \"Insert\
71
+ \ failed, err: \" + err)\n return\n }\n logger.info(TAG,\
72
+ \ `insert done:${rows}`);\n promptAction.showToast({\n message:\
73
+ \ $r('app.string.operate_rdb_in_taskpool_add_prompt_text', Contact.name),\n \
74
+ \ duration: CommonConstants.PROMPT_DURATION_TIME\n });\n \
75
+ \ })\n }\n }"
76
+ - 日历日期的代办事项
77
+ - source_sentence: "private recordOperation(\n type: 'create' | 'update' | 'delete'\
78
+ \ | 'complete' | 'cancel',\n todoId: string,\n changes?: ChangeRecord,\n\
79
+ \ description?: string\n ): void {\n try {\n const record: TodoOperationRecord\
80
+ \ = {\n id: this.generateId(),\n type,\n todoId,\n \
81
+ \ changes,\n timestamp: new Date().toISOString(),\n description\n\
82
+ \ };\n\n this.operationRecords.unshift(record);\n \n // 只保留最近100条记录\n\
83
+ \ if (this.operationRecords.length > 100) {\n this.operationRecords\
84
+ \ = this.operationRecords.slice(0, 100);\n }\n\n hilog.info(LogConstants.DOMAIN_APP,\
85
+ \ LogConstants.TAG_APP, `Recorded operation: ${type} for todo ${todoId}`);\n \
86
+ \ } catch (error) {\n hilog.error(LogConstants.DOMAIN_APP, LogConstants.TAG_APP,\
87
+ \ `Failed to record operation: ${error}`);\n }\n }"
88
+ sentences:
89
+ - 记录操作
90
+ - "export interface DataConfig {\n autoBackup: AutoBackupConfig;\n dataRetention:\
91
+ \ DataRetentionConfig;\n syncConfig: SyncConfig;\n}"
92
+ - "@Builder\n ExamSwitchModule() {\n Row() {\n Text('切换题库:')\n .fontSize(14)\n\
93
+ \ Text( this.guideService.guideData.licenseType !== undefined?licenseTypeName[this.guideService.guideData.licenseType]:'')\n\
94
+ \ .fontSize(14)\n .fontColor('#64BB5C')\n Image($r('app.media.right_triangle'))\n\
95
+ \ .width(16)\n .height(16)\n .fillColor('rgba(0,0,0,0.9)')\n\
96
+ \ }\n .width('100%')\n .justifyContent(FlexAlign.Start)\n .onClick(()\
97
+ \ => {\n this.vm.navStack.pushPathByName('guidePage', true)\n })\n }"
98
+ - source_sentence: 'resize(size: number): void;'
99
+ sentences:
100
+ - "Resize the bitVector's length.\n\n@param { number } size - The new size for bitVector.\
101
+ \ If count is greater than the current size of bitVector,\nthe additional bit\
102
+ \ elements are set to 0.\n@throws { BusinessError } 401 - Parameter error. Possible\
103
+ \ causes:\n1.Mandatory parameters are left unspecified.\n2.Incorrect parameter\
104
+ \ types.\n@throws { BusinessError } 10200011 - The resize method cannot be bound.\n\
105
+ @throws { BusinessError } 10200201 - Concurrent modification error.\n@syscap SystemCapability.Utils.Lang\n\
106
+ @atomicservice\n@since 12\n \nResize the bitVector's length.\n\n@param { number\
107
+ \ } size - The new size for bitVector. If count is greater than the current size\
108
+ \ of bitVector,\nthe additional bit elements are set to 0.\n@throws { BusinessError\
109
+ \ } 401 - Parameter error. Possible causes:\n1.Mandatory parameters are left unspecified.\n\
110
+ 2.Incorrect parameter types.\n@throws { BusinessError } 10200011 - The resize\
111
+ \ method cannot be bound.\n@throws { BusinessError } 10200201 - Concurrent modification\
112
+ \ error.\n@syscap SystemCapability.Utils.Lang\n@crossplatform\n@atomicservice\n\
113
+ @since 18"
114
+ - "makeNode(uiContext: UIContext): FrameNode {\n this.rootNode = new FrameNode(uiContext);\n\
115
+ \ if (this.rootNode !== null) {\n this.rootRenderNode = this.rootNode.getRenderNode();\n\
116
+ \ }\n return this.rootNode;\n }"
117
+ - "export interface OnlineLunarYear {\n year: number;\n zodiac: string;\n ganzhi:\
118
+ \ string;\n leapMonth: number;\n isLeapYear: boolean;\n leapMonthDays?: number;\n\
119
+ \ solarTerms: SolarTermInfo[];\n festivals: LunarFestival[];\n}"
120
+ pipeline_tag: sentence-similarity
121
+ library_name: sentence-transformers
122
+ ---
123
+
124
+ # SentenceTransformer based on google/embeddinggemma-300m
125
+
126
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m). 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:** [google/embeddinggemma-300m](https://huggingface.co/google/embeddinggemma-300m) <!-- at revision 57c266a740f537b4dc058e1b0cda161fd15afa75 -->
133
+ - **Maximum Sequence Length:** 512 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/huggingface/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': 512, 'do_lower_case': False, 'architecture': 'Gemma3TextModel'})
151
+ (1): Pooling({'word_embedding_dimension': 768, 'pooling_mode_cls_token': False, 'pooling_mode_mean_tokens': True, '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
+ (2): Dense({'in_features': 768, 'out_features': 3072, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
153
+ (3): Dense({'in_features': 3072, 'out_features': 768, 'bias': False, 'activation_function': 'torch.nn.modules.linear.Identity'})
154
+ (4): Normalize()
155
+ )
156
+ ```
157
+
158
+ ## Usage
159
+
160
+ ### Direct Usage (Sentence Transformers)
161
+
162
+ First install the Sentence Transformers library:
163
+
164
+ ```bash
165
+ pip install -U sentence-transformers
166
+ ```
167
+
168
+ Then you can load this model and run inference.
169
+ ```python
170
+ from sentence_transformers import SentenceTransformer
171
+
172
+ # Download from the 🤗 Hub
173
+ model = SentenceTransformer("sentence_transformers_model_id")
174
+ # Run inference
175
+ queries = [
176
+ "resize(size: number): void;",
177
+ ]
178
+ documents = [
179
+ "Resize the bitVector's length.\n\n@param { number } size - The new size for bitVector. If count is greater than the current size of bitVector,\nthe additional bit elements are set to 0.\n@throws { BusinessError } 401 - Parameter error. Possible causes:\n1.Mandatory parameters are left unspecified.\n2.Incorrect parameter types.\n@throws { BusinessError } 10200011 - The resize method cannot be bound.\n@throws { BusinessError } 10200201 - Concurrent modification error.\n@syscap SystemCapability.Utils.Lang\n@atomicservice\n@since 12\n \nResize the bitVector's length.\n\n@param { number } size - The new size for bitVector. If count is greater than the current size of bitVector,\nthe additional bit elements are set to 0.\n@throws { BusinessError } 401 - Parameter error. Possible causes:\n1.Mandatory parameters are left unspecified.\n2.Incorrect parameter types.\n@throws { BusinessError } 10200011 - The resize method cannot be bound.\n@throws { BusinessError } 10200201 - Concurrent modification error.\n@syscap SystemCapability.Utils.Lang\n@crossplatform\n@atomicservice\n@since 18",
180
+ 'makeNode(uiContext: UIContext): FrameNode {\n this.rootNode = new FrameNode(uiContext);\n if (this.rootNode !== null) {\n this.rootRenderNode = this.rootNode.getRenderNode();\n }\n return this.rootNode;\n }',
181
+ 'export interface OnlineLunarYear {\n year: number;\n zodiac: string;\n ganzhi: string;\n leapMonth: number;\n isLeapYear: boolean;\n leapMonthDays?: number;\n solarTerms: SolarTermInfo[];\n festivals: LunarFestival[];\n}',
182
+ ]
183
+ query_embeddings = model.encode_query(queries)
184
+ document_embeddings = model.encode_document(documents)
185
+ print(query_embeddings.shape, document_embeddings.shape)
186
+ # [1, 768] [3, 768]
187
+
188
+ # Get the similarity scores for the embeddings
189
+ similarities = model.similarity(query_embeddings, document_embeddings)
190
+ print(similarities)
191
+ # tensor([[ 0.8923, 0.0264, -0.0212]])
192
+ ```
193
+
194
+ <!--
195
+ ### Direct Usage (Transformers)
196
+
197
+ <details><summary>Click to see the direct usage in Transformers</summary>
198
+
199
+ </details>
200
+ -->
201
+
202
+ <!--
203
+ ### Downstream Usage (Sentence Transformers)
204
+
205
+ You can finetune this model on your own dataset.
206
+
207
+ <details><summary>Click to expand</summary>
208
+
209
+ </details>
210
+ -->
211
+
212
+ <!--
213
+ ### Out-of-Scope Use
214
+
215
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
216
+ -->
217
+
218
+ <!--
219
+ ## Bias, Risks and Limitations
220
+
221
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
222
+ -->
223
+
224
+ <!--
225
+ ### Recommendations
226
+
227
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
228
+ -->
229
+
230
+ ## Training Details
231
+
232
+ ### Training Dataset
233
+
234
+ #### Unnamed Dataset
235
+
236
+ * Size: 39,122 training samples
237
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
238
+ * Approximate statistics based on the first 1000 samples:
239
+ | | sentence_0 | sentence_1 |
240
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
241
+ | type | string | string |
242
+ | details | <ul><li>min: 3 tokens</li><li>mean: 97.17 tokens</li><li>max: 512 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 94.4 tokens</li><li>max: 512 tokens</li></ul> |
243
+ * Samples:
244
+ | sentence_0 | sentence_1 |
245
+ |:---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
246
+ | <code>static showToast(options: ShowToastOptions): void;</code> | <code>Displays the notification text.<br><br>@param { ShowToastOptions } options - Options.<br>@syscap SystemCapability.ArkUI.ArkUI.Full<br>@since 3<br> <br>Displays the notification text.<br><br>@param { ShowToastOptions } options - Options.<br>@syscap SystemCapability.ArkUI.ArkUI.Full<br>@atomicservice<br>@since 11</code> |
247
+ | <code>PUT请求</code> | <code>static put<T = Object>(url: string, data?: Object, config: RequestConfig = {}): Promise<HttpResponse<T>> {<br> const putConfig: RequestConfig = {<br> method: http.RequestMethod.PUT,<br> headers: config.headers,<br> timeout: config.timeout,<br> data: data<br> };<br> return HttpUtil.request<T>(url, putConfig);<br> }</code> |
248
+ | <code>protected init(): void {<br> super.init();<br><br> if (this.mAnimator) {<br> this.mRenderer = new PieChartRenderer(this, this.mAnimator, this.mViewPortHandler);<br> }<br> this.mXAxis = null;<br><br> this.mHighlighter = new PieHighlighter(this);<br> }</code> | <code>@Override</code> |
249
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
250
+ ```json
251
+ {
252
+ "scale": 20.0,
253
+ "similarity_fct": "cos_sim",
254
+ "gather_across_devices": false
255
+ }
256
+ ```
257
+
258
+ ### Training Hyperparameters
259
+ #### Non-Default Hyperparameters
260
+
261
+ - `per_device_train_batch_size`: 32
262
+ - `per_device_eval_batch_size`: 32
263
+ - `num_train_epochs`: 2
264
+ - `multi_dataset_batch_sampler`: round_robin
265
+
266
+ #### All Hyperparameters
267
+ <details><summary>Click to expand</summary>
268
+
269
+ - `do_predict`: False
270
+ - `eval_strategy`: no
271
+ - `prediction_loss_only`: True
272
+ - `per_device_train_batch_size`: 32
273
+ - `per_device_eval_batch_size`: 32
274
+ - `gradient_accumulation_steps`: 1
275
+ - `eval_accumulation_steps`: None
276
+ - `torch_empty_cache_steps`: None
277
+ - `learning_rate`: 5e-05
278
+ - `weight_decay`: 0.0
279
+ - `adam_beta1`: 0.9
280
+ - `adam_beta2`: 0.999
281
+ - `adam_epsilon`: 1e-08
282
+ - `max_grad_norm`: 1
283
+ - `num_train_epochs`: 2
284
+ - `max_steps`: -1
285
+ - `lr_scheduler_type`: linear
286
+ - `lr_scheduler_kwargs`: None
287
+ - `warmup_ratio`: None
288
+ - `warmup_steps`: 0
289
+ - `log_level`: passive
290
+ - `log_level_replica`: warning
291
+ - `log_on_each_node`: True
292
+ - `logging_nan_inf_filter`: True
293
+ - `enable_jit_checkpoint`: False
294
+ - `save_on_each_node`: False
295
+ - `save_only_model`: False
296
+ - `restore_callback_states_from_checkpoint`: False
297
+ - `use_cpu`: False
298
+ - `seed`: 42
299
+ - `data_seed`: None
300
+ - `bf16`: False
301
+ - `fp16`: False
302
+ - `bf16_full_eval`: False
303
+ - `fp16_full_eval`: False
304
+ - `tf32`: None
305
+ - `local_rank`: -1
306
+ - `ddp_backend`: None
307
+ - `debug`: []
308
+ - `dataloader_drop_last`: False
309
+ - `dataloader_num_workers`: 0
310
+ - `dataloader_prefetch_factor`: None
311
+ - `disable_tqdm`: False
312
+ - `remove_unused_columns`: True
313
+ - `label_names`: None
314
+ - `load_best_model_at_end`: False
315
+ - `ignore_data_skip`: False
316
+ - `fsdp`: []
317
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
318
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
319
+ - `parallelism_config`: None
320
+ - `deepspeed`: None
321
+ - `label_smoothing_factor`: 0.0
322
+ - `optim`: adamw_torch_fused
323
+ - `optim_args`: None
324
+ - `group_by_length`: False
325
+ - `length_column_name`: length
326
+ - `project`: huggingface
327
+ - `trackio_space_id`: trackio
328
+ - `ddp_find_unused_parameters`: None
329
+ - `ddp_bucket_cap_mb`: None
330
+ - `ddp_broadcast_buffers`: False
331
+ - `dataloader_pin_memory`: True
332
+ - `dataloader_persistent_workers`: False
333
+ - `skip_memory_metrics`: True
334
+ - `push_to_hub`: False
335
+ - `resume_from_checkpoint`: None
336
+ - `hub_model_id`: None
337
+ - `hub_strategy`: every_save
338
+ - `hub_private_repo`: None
339
+ - `hub_always_push`: False
340
+ - `hub_revision`: None
341
+ - `gradient_checkpointing`: False
342
+ - `gradient_checkpointing_kwargs`: None
343
+ - `include_for_metrics`: []
344
+ - `eval_do_concat_batches`: True
345
+ - `auto_find_batch_size`: False
346
+ - `full_determinism`: False
347
+ - `ddp_timeout`: 1800
348
+ - `torch_compile`: False
349
+ - `torch_compile_backend`: None
350
+ - `torch_compile_mode`: None
351
+ - `include_num_input_tokens_seen`: no
352
+ - `neftune_noise_alpha`: None
353
+ - `optim_target_modules`: None
354
+ - `batch_eval_metrics`: False
355
+ - `eval_on_start`: False
356
+ - `use_liger_kernel`: False
357
+ - `liger_kernel_config`: None
358
+ - `eval_use_gather_object`: False
359
+ - `average_tokens_across_devices`: True
360
+ - `use_cache`: False
361
+ - `prompts`: None
362
+ - `batch_sampler`: batch_sampler
363
+ - `multi_dataset_batch_sampler`: round_robin
364
+ - `router_mapping`: {}
365
+ - `learning_rate_mapping`: {}
366
+
367
+ </details>
368
+
369
+ ### Training Logs
370
+ | Epoch | Step | Training Loss |
371
+ |:------:|:----:|:-------------:|
372
+ | 0.4088 | 500 | 0.3798 |
373
+ | 0.8177 | 1000 | 0.2489 |
374
+ | 1.2265 | 1500 | 0.1308 |
375
+ | 1.6353 | 2000 | 0.0877 |
376
+
377
+
378
+ ### Framework Versions
379
+ - Python: 3.10.19
380
+ - Sentence Transformers: 5.2.2
381
+ - Transformers: 5.0.0
382
+ - PyTorch: 2.9.1
383
+ - Accelerate: 1.12.0
384
+ - Datasets: 4.5.0
385
+ - Tokenizers: 0.22.2
386
+
387
+ ## Citation
388
+
389
+ ### BibTeX
390
+
391
+ #### Sentence Transformers
392
+ ```bibtex
393
+ @inproceedings{reimers-2019-sentence-bert,
394
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
395
+ author = "Reimers, Nils and Gurevych, Iryna",
396
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
397
+ month = "11",
398
+ year = "2019",
399
+ publisher = "Association for Computational Linguistics",
400
+ url = "https://arxiv.org/abs/1908.10084",
401
+ }
402
+ ```
403
+
404
+ #### MultipleNegativesRankingLoss
405
+ ```bibtex
406
+ @misc{henderson2017efficient,
407
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
408
+ 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},
409
+ year={2017},
410
+ eprint={1705.00652},
411
+ archivePrefix={arXiv},
412
+ primaryClass={cs.CL}
413
+ }
414
+ ```
415
+
416
+ <!--
417
+ ## Glossary
418
+
419
+ *Clearly define terms in order to be accessible across audiences.*
420
+ -->
421
+
422
+ <!--
423
+ ## Model Card Authors
424
+
425
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
426
+ -->
427
+
428
+ <!--
429
+ ## Model Card Contact
430
+
431
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
432
+ -->
config.json ADDED
@@ -0,0 +1,68 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_sliding_window_pattern": 6,
3
+ "architectures": [
4
+ "Gemma3TextModel"
5
+ ],
6
+ "attention_bias": false,
7
+ "attention_dropout": 0.0,
8
+ "attn_logit_softcapping": null,
9
+ "bos_token_id": 2,
10
+ "dtype": "float32",
11
+ "eos_token_id": 1,
12
+ "final_logit_softcapping": null,
13
+ "head_dim": 256,
14
+ "hidden_activation": "gelu_pytorch_tanh",
15
+ "hidden_size": 768,
16
+ "initializer_range": 0.02,
17
+ "intermediate_size": 1152,
18
+ "layer_types": [
19
+ "sliding_attention",
20
+ "sliding_attention",
21
+ "sliding_attention",
22
+ "sliding_attention",
23
+ "sliding_attention",
24
+ "full_attention",
25
+ "sliding_attention",
26
+ "sliding_attention",
27
+ "sliding_attention",
28
+ "sliding_attention",
29
+ "sliding_attention",
30
+ "full_attention",
31
+ "sliding_attention",
32
+ "sliding_attention",
33
+ "sliding_attention",
34
+ "sliding_attention",
35
+ "sliding_attention",
36
+ "full_attention",
37
+ "sliding_attention",
38
+ "sliding_attention",
39
+ "sliding_attention",
40
+ "sliding_attention",
41
+ "sliding_attention",
42
+ "full_attention"
43
+ ],
44
+ "max_position_embeddings": 2048,
45
+ "model_type": "gemma3_text",
46
+ "num_attention_heads": 3,
47
+ "num_hidden_layers": 24,
48
+ "num_key_value_heads": 1,
49
+ "pad_token_id": 0,
50
+ "query_pre_attn_scalar": 256,
51
+ "rms_norm_eps": 1e-06,
52
+ "rope_parameters": {
53
+ "full_attention": {
54
+ "rope_theta": 1000000.0,
55
+ "rope_type": "default"
56
+ },
57
+ "sliding_attention": {
58
+ "rope_theta": 10000.0,
59
+ "rope_type": "default"
60
+ }
61
+ },
62
+ "sliding_window": 257,
63
+ "tie_word_embeddings": true,
64
+ "transformers_version": "5.0.0",
65
+ "use_bidirectional_attention": true,
66
+ "use_cache": true,
67
+ "vocab_size": 262144
68
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,26 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "model_type": "SentenceTransformer",
3
+ "__version__": {
4
+ "sentence_transformers": "5.2.2",
5
+ "transformers": "5.0.0",
6
+ "pytorch": "2.9.1"
7
+ },
8
+ "prompts": {
9
+ "query": "task: search result | query: ",
10
+ "document": "title: none | text: ",
11
+ "BitextMining": "task: search result | query: ",
12
+ "Clustering": "task: clustering | query: ",
13
+ "Classification": "task: classification | query: ",
14
+ "InstructionRetrieval": "task: code retrieval | query: ",
15
+ "MultilabelClassification": "task: classification | query: ",
16
+ "PairClassification": "task: sentence similarity | query: ",
17
+ "Reranking": "task: search result | query: ",
18
+ "Retrieval": "task: search result | query: ",
19
+ "Retrieval-query": "task: search result | query: ",
20
+ "Retrieval-document": "title: none | text: ",
21
+ "STS": "task: sentence similarity | query: ",
22
+ "Summarization": "task: summarization | query: "
23
+ },
24
+ "default_prompt_name": null,
25
+ "similarity_fn_name": "cosine"
26
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b38e821a403a1f61bf9db48539d0d36a3e8a7884d2bff70752ea8484f0412e74
3
+ size 1211486072
modules.json ADDED
@@ -0,0 +1,32 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ {
15
+ "idx": 2,
16
+ "name": "2",
17
+ "path": "2_Dense",
18
+ "type": "sentence_transformers.models.Dense"
19
+ },
20
+ {
21
+ "idx": 3,
22
+ "name": "3",
23
+ "path": "3_Dense",
24
+ "type": "sentence_transformers.models.Dense"
25
+ },
26
+ {
27
+ "idx": 4,
28
+ "name": "4",
29
+ "path": "4_Normalize",
30
+ "type": "sentence_transformers.models.Normalize"
31
+ }
32
+ ]
sentence_bert_config.json ADDED
@@ -0,0 +1,4 @@
 
 
 
 
 
1
+ {
2
+ "max_seq_length": 512,
3
+ "do_lower_case": false
4
+ }
tokenizer.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d4931b1e84e7d009cb767e3f2ef1e35e1b1c14a535aeec93c1c0a90075623d33
3
+ size 33385136
tokenizer_config.json ADDED
@@ -0,0 +1,24 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "backend": "tokenizers",
3
+ "boi_token": "<start_of_image>",
4
+ "bos_token": "<bos>",
5
+ "clean_up_tokenization_spaces": false,
6
+ "eoi_token": "<end_of_image>",
7
+ "eos_token": "<eos>",
8
+ "image_token": "<image_soft_token>",
9
+ "is_local": false,
10
+ "mask_token": "<mask>",
11
+ "model_max_length": 2048,
12
+ "model_specific_special_tokens": {
13
+ "boi_token": "<start_of_image>",
14
+ "eoi_token": "<end_of_image>",
15
+ "image_token": "<image_soft_token>"
16
+ },
17
+ "pad_token": "<pad>",
18
+ "padding_side": "right",
19
+ "sp_model_kwargs": null,
20
+ "spaces_between_special_tokens": false,
21
+ "tokenizer_class": "GemmaTokenizer",
22
+ "unk_token": "<unk>",
23
+ "use_default_system_prompt": false
24
+ }