zxcvo commited on
Commit
5f40be9
·
verified ·
1 Parent(s): 419a877

Add new SentenceTransformer model

Browse files
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
+ }
README.md ADDED
@@ -0,0 +1,701 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:288
8
+ - loss:MatryoshkaLoss
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: keepitreal/vietnamese-sbert
11
+ widget:
12
+ - source_sentence: SIEM giúp tổ chức đáp ứng các yêu cầu tuân thủ bằng cách thu thập
13
+ và phân tích dữ liệu sự kiện bảo mật, tạo ra các báo cáo và cung cấp bằng chứng
14
+ cho các cuộc kiểm toán bảo mật, đảm bảo tuân thủ các quy định và tiêu chuẩn bảo
15
+ mật.
16
+ sentences:
17
+ - Tại sao ISOC cần hợp tác với CNTT và Kinh doanh?
18
+ - Lợi ích của việc sử dụng Xác thực Hai Yếu tố (2FA) là gì?
19
+ - SIEM giúp tổ chức đáp ứng các yêu cầu tuân thủ như thế nào?
20
+ - source_sentence: VPN bảo vệ dữ liệu khi truy cập từ xa vào mạng nội bộ của tổ chức
21
+ bằng cách mã hóa dữ liệu truyền tải, ngăn chặn việc chặn hoặc giả mạo dữ liệu
22
+ và bảo vệ thông tin nhạy cảm khỏi các mối đe dọa mạng.
23
+ sentences:
24
+ - Mạng Lừa đảo (Decoy Network) giúp bảo vệ hệ thống CNTT như thế nào?
25
+ - Tình báo Mối đe dọa (CTI) giúp tổ chức phòng ngừa tấn công như thế nào?
26
+ - VPN bảo vệ dữ liệu như thế nào khi truy cập từ xa vào mạng nội bộ của tổ chức?
27
+ - source_sentence: Honeypots cung cấp thông tin về các cuộc tấn công tiềm năng bằng
28
+ cách ghi nhận các hoạt động khi kẻ tấn công tương tác với hệ thống, giúp quản
29
+ trị viên hiểu rõ hơn về chiến thuật của kẻ tấn công.
30
+ sentences:
31
+ - Honeypots có thể cung cấp thông tin gì cho quản trị viên bảo mật?
32
+ - Phân tích Tương quan Sự kiện trong SIEM giúp gì cho quá trình giám sát bảo mật?
33
+ - Tường lửa Ứng dụng Web (WAF) bảo vệ ứng dụng như thế nào?
34
+ - source_sentence: Tường lửa bảo vệ hệ thống mạng bằng cách kiểm soát và lọc lưu lượng
35
+ truy cập dựa trên các quy tắc bảo mật, ngăn chặn truy cập không mong muốn từ bên
36
+ ngoài và bảo vệ hệ thống khỏi các cuộc tấn công mạng.
37
+ sentences:
38
+ - Tường lửa bảo vệ hệ thống mạng khỏi các mối đe dọa như thế nào?
39
+ - Phân tích dữ liệu bảo mật trong ISOC gồm những bước nào?
40
+ - SIEM có vai trò gì trong việc phát hiện và phản ứng với các sự cố bảo mật?
41
+ - source_sentence: Vận hành một chương trình bảo mật yêu cầu các công cụ hỗ trợ kiểm
42
+ soát thay đổi và theo dõi tài sản dựa trên khung phân loại tài sản.
43
+ sentences:
44
+ - Điều gì là quan trọng nhất khi vận hành một chương trình bảo mật trong một tổ
45
+ chức?
46
+ - Pháp y Kỹ thuật số trong ISOC có vai trò gì?
47
+ - Vì sao Bảo mật Điểm cuối quan trọng?
48
+ pipeline_tag: sentence-similarity
49
+ library_name: sentence-transformers
50
+ metrics:
51
+ - cosine_accuracy@1
52
+ - cosine_accuracy@3
53
+ - cosine_accuracy@5
54
+ - cosine_accuracy@10
55
+ - cosine_precision@1
56
+ - cosine_precision@3
57
+ - cosine_precision@5
58
+ - cosine_precision@10
59
+ - cosine_recall@1
60
+ - cosine_recall@3
61
+ - cosine_recall@5
62
+ - cosine_recall@10
63
+ - cosine_ndcg@10
64
+ - cosine_mrr@10
65
+ - cosine_map@100
66
+ model-index:
67
+ - name: SentenceTransformer based on keepitreal/vietnamese-sbert
68
+ results:
69
+ - task:
70
+ type: information-retrieval
71
+ name: Information Retrieval
72
+ dataset:
73
+ name: dim 768
74
+ type: dim_768
75
+ metrics:
76
+ - type: cosine_accuracy@1
77
+ value: 0.375
78
+ name: Cosine Accuracy@1
79
+ - type: cosine_accuracy@3
80
+ value: 0.625
81
+ name: Cosine Accuracy@3
82
+ - type: cosine_accuracy@5
83
+ value: 0.65625
84
+ name: Cosine Accuracy@5
85
+ - type: cosine_accuracy@10
86
+ value: 0.875
87
+ name: Cosine Accuracy@10
88
+ - type: cosine_precision@1
89
+ value: 0.375
90
+ name: Cosine Precision@1
91
+ - type: cosine_precision@3
92
+ value: 0.20833333333333331
93
+ name: Cosine Precision@3
94
+ - type: cosine_precision@5
95
+ value: 0.13125
96
+ name: Cosine Precision@5
97
+ - type: cosine_precision@10
98
+ value: 0.08750000000000001
99
+ name: Cosine Precision@10
100
+ - type: cosine_recall@1
101
+ value: 0.375
102
+ name: Cosine Recall@1
103
+ - type: cosine_recall@3
104
+ value: 0.625
105
+ name: Cosine Recall@3
106
+ - type: cosine_recall@5
107
+ value: 0.65625
108
+ name: Cosine Recall@5
109
+ - type: cosine_recall@10
110
+ value: 0.875
111
+ name: Cosine Recall@10
112
+ - type: cosine_ndcg@10
113
+ value: 0.5929177719706241
114
+ name: Cosine Ndcg@10
115
+ - type: cosine_mrr@10
116
+ value: 0.5072048611111111
117
+ name: Cosine Mrr@10
118
+ - type: cosine_map@100
119
+ value: 0.5138391033496732
120
+ name: Cosine Map@100
121
+ - task:
122
+ type: information-retrieval
123
+ name: Information Retrieval
124
+ dataset:
125
+ name: dim 512
126
+ type: dim_512
127
+ metrics:
128
+ - type: cosine_accuracy@1
129
+ value: 0.28125
130
+ name: Cosine Accuracy@1
131
+ - type: cosine_accuracy@3
132
+ value: 0.625
133
+ name: Cosine Accuracy@3
134
+ - type: cosine_accuracy@5
135
+ value: 0.6875
136
+ name: Cosine Accuracy@5
137
+ - type: cosine_accuracy@10
138
+ value: 0.8125
139
+ name: Cosine Accuracy@10
140
+ - type: cosine_precision@1
141
+ value: 0.28125
142
+ name: Cosine Precision@1
143
+ - type: cosine_precision@3
144
+ value: 0.20833333333333331
145
+ name: Cosine Precision@3
146
+ - type: cosine_precision@5
147
+ value: 0.1375
148
+ name: Cosine Precision@5
149
+ - type: cosine_precision@10
150
+ value: 0.08125000000000002
151
+ name: Cosine Precision@10
152
+ - type: cosine_recall@1
153
+ value: 0.28125
154
+ name: Cosine Recall@1
155
+ - type: cosine_recall@3
156
+ value: 0.625
157
+ name: Cosine Recall@3
158
+ - type: cosine_recall@5
159
+ value: 0.6875
160
+ name: Cosine Recall@5
161
+ - type: cosine_recall@10
162
+ value: 0.8125
163
+ name: Cosine Recall@10
164
+ - type: cosine_ndcg@10
165
+ value: 0.5413930380770813
166
+ name: Cosine Ndcg@10
167
+ - type: cosine_mrr@10
168
+ value: 0.45533234126984123
169
+ name: Cosine Mrr@10
170
+ - type: cosine_map@100
171
+ value: 0.4680133795942619
172
+ name: Cosine Map@100
173
+ - task:
174
+ type: information-retrieval
175
+ name: Information Retrieval
176
+ dataset:
177
+ name: dim 256
178
+ type: dim_256
179
+ metrics:
180
+ - type: cosine_accuracy@1
181
+ value: 0.28125
182
+ name: Cosine Accuracy@1
183
+ - type: cosine_accuracy@3
184
+ value: 0.5
185
+ name: Cosine Accuracy@3
186
+ - type: cosine_accuracy@5
187
+ value: 0.71875
188
+ name: Cosine Accuracy@5
189
+ - type: cosine_accuracy@10
190
+ value: 0.8125
191
+ name: Cosine Accuracy@10
192
+ - type: cosine_precision@1
193
+ value: 0.28125
194
+ name: Cosine Precision@1
195
+ - type: cosine_precision@3
196
+ value: 0.16666666666666666
197
+ name: Cosine Precision@3
198
+ - type: cosine_precision@5
199
+ value: 0.14375000000000002
200
+ name: Cosine Precision@5
201
+ - type: cosine_precision@10
202
+ value: 0.08125000000000002
203
+ name: Cosine Precision@10
204
+ - type: cosine_recall@1
205
+ value: 0.28125
206
+ name: Cosine Recall@1
207
+ - type: cosine_recall@3
208
+ value: 0.5
209
+ name: Cosine Recall@3
210
+ - type: cosine_recall@5
211
+ value: 0.71875
212
+ name: Cosine Recall@5
213
+ - type: cosine_recall@10
214
+ value: 0.8125
215
+ name: Cosine Recall@10
216
+ - type: cosine_ndcg@10
217
+ value: 0.5245808772737306
218
+ name: Cosine Ndcg@10
219
+ - type: cosine_mrr@10
220
+ value: 0.4344990079365079
221
+ name: Cosine Mrr@10
222
+ - type: cosine_map@100
223
+ value: 0.4442545090828397
224
+ name: Cosine Map@100
225
+ - task:
226
+ type: information-retrieval
227
+ name: Information Retrieval
228
+ dataset:
229
+ name: dim 128
230
+ type: dim_128
231
+ metrics:
232
+ - type: cosine_accuracy@1
233
+ value: 0.3125
234
+ name: Cosine Accuracy@1
235
+ - type: cosine_accuracy@3
236
+ value: 0.59375
237
+ name: Cosine Accuracy@3
238
+ - type: cosine_accuracy@5
239
+ value: 0.65625
240
+ name: Cosine Accuracy@5
241
+ - type: cosine_accuracy@10
242
+ value: 0.78125
243
+ name: Cosine Accuracy@10
244
+ - type: cosine_precision@1
245
+ value: 0.3125
246
+ name: Cosine Precision@1
247
+ - type: cosine_precision@3
248
+ value: 0.19791666666666666
249
+ name: Cosine Precision@3
250
+ - type: cosine_precision@5
251
+ value: 0.13125
252
+ name: Cosine Precision@5
253
+ - type: cosine_precision@10
254
+ value: 0.07812500000000001
255
+ name: Cosine Precision@10
256
+ - type: cosine_recall@1
257
+ value: 0.3125
258
+ name: Cosine Recall@1
259
+ - type: cosine_recall@3
260
+ value: 0.59375
261
+ name: Cosine Recall@3
262
+ - type: cosine_recall@5
263
+ value: 0.65625
264
+ name: Cosine Recall@5
265
+ - type: cosine_recall@10
266
+ value: 0.78125
267
+ name: Cosine Recall@10
268
+ - type: cosine_ndcg@10
269
+ value: 0.5316647680749005
270
+ name: Cosine Ndcg@10
271
+ - type: cosine_mrr@10
272
+ value: 0.4527281746031746
273
+ name: Cosine Mrr@10
274
+ - type: cosine_map@100
275
+ value: 0.4609525339930285
276
+ name: Cosine Map@100
277
+ - task:
278
+ type: information-retrieval
279
+ name: Information Retrieval
280
+ dataset:
281
+ name: dim 64
282
+ type: dim_64
283
+ metrics:
284
+ - type: cosine_accuracy@1
285
+ value: 0.28125
286
+ name: Cosine Accuracy@1
287
+ - type: cosine_accuracy@3
288
+ value: 0.5
289
+ name: Cosine Accuracy@3
290
+ - type: cosine_accuracy@5
291
+ value: 0.625
292
+ name: Cosine Accuracy@5
293
+ - type: cosine_accuracy@10
294
+ value: 0.75
295
+ name: Cosine Accuracy@10
296
+ - type: cosine_precision@1
297
+ value: 0.28125
298
+ name: Cosine Precision@1
299
+ - type: cosine_precision@3
300
+ value: 0.16666666666666666
301
+ name: Cosine Precision@3
302
+ - type: cosine_precision@5
303
+ value: 0.125
304
+ name: Cosine Precision@5
305
+ - type: cosine_precision@10
306
+ value: 0.07500000000000001
307
+ name: Cosine Precision@10
308
+ - type: cosine_recall@1
309
+ value: 0.28125
310
+ name: Cosine Recall@1
311
+ - type: cosine_recall@3
312
+ value: 0.5
313
+ name: Cosine Recall@3
314
+ - type: cosine_recall@5
315
+ value: 0.625
316
+ name: Cosine Recall@5
317
+ - type: cosine_recall@10
318
+ value: 0.75
319
+ name: Cosine Recall@10
320
+ - type: cosine_ndcg@10
321
+ value: 0.49533931896607863
322
+ name: Cosine Ndcg@10
323
+ - type: cosine_mrr@10
324
+ value: 0.4161830357142857
325
+ name: Cosine Mrr@10
326
+ - type: cosine_map@100
327
+ value: 0.4235463334593342
328
+ name: Cosine Map@100
329
+ ---
330
+
331
+ # SentenceTransformer based on keepitreal/vietnamese-sbert
332
+
333
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [keepitreal/vietnamese-sbert](https://huggingface.co/keepitreal/vietnamese-sbert) on the json dataset. 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.
334
+
335
+ ## Model Details
336
+
337
+ ### Model Description
338
+ - **Model Type:** Sentence Transformer
339
+ - **Base model:** [keepitreal/vietnamese-sbert](https://huggingface.co/keepitreal/vietnamese-sbert) <!-- at revision a9467ef2ef47caa6448edeabfd8e5e5ce0fa2a23 -->
340
+ - **Maximum Sequence Length:** 256 tokens
341
+ - **Output Dimensionality:** 768 dimensions
342
+ - **Similarity Function:** Cosine Similarity
343
+ - **Training Dataset:**
344
+ - json
345
+ <!-- - **Language:** Unknown -->
346
+ <!-- - **License:** Unknown -->
347
+
348
+ ### Model Sources
349
+
350
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
351
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
352
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
353
+
354
+ ### Full Model Architecture
355
+
356
+ ```
357
+ SentenceTransformer(
358
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: RobertaModel
359
+ (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})
360
+ )
361
+ ```
362
+
363
+ ## Usage
364
+
365
+ ### Direct Usage (Sentence Transformers)
366
+
367
+ First install the Sentence Transformers library:
368
+
369
+ ```bash
370
+ pip install -U sentence-transformers
371
+ ```
372
+
373
+ Then you can load this model and run inference.
374
+ ```python
375
+ from sentence_transformers import SentenceTransformer
376
+
377
+ # Download from the 🤗 Hub
378
+ model = SentenceTransformer("zxcvo/vietnamese-sbert-soc")
379
+ # Run inference
380
+ sentences = [
381
+ 'Vận hành một chương trình bảo mật yêu cầu các công cụ hỗ trợ kiểm soát thay đổi và theo dõi tài sản dựa trên khung phân loại tài sản.',
382
+ 'Điều gì là quan trọng nhất khi vận hành một chương trình bảo mật trong một tổ chức?',
383
+ 'Vì sao Bảo mật Điểm cuối quan trọng?',
384
+ ]
385
+ embeddings = model.encode(sentences)
386
+ print(embeddings.shape)
387
+ # [3, 768]
388
+
389
+ # Get the similarity scores for the embeddings
390
+ similarities = model.similarity(embeddings, embeddings)
391
+ print(similarities.shape)
392
+ # [3, 3]
393
+ ```
394
+
395
+ <!--
396
+ ### Direct Usage (Transformers)
397
+
398
+ <details><summary>Click to see the direct usage in Transformers</summary>
399
+
400
+ </details>
401
+ -->
402
+
403
+ <!--
404
+ ### Downstream Usage (Sentence Transformers)
405
+
406
+ You can finetune this model on your own dataset.
407
+
408
+ <details><summary>Click to expand</summary>
409
+
410
+ </details>
411
+ -->
412
+
413
+ <!--
414
+ ### Out-of-Scope Use
415
+
416
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
417
+ -->
418
+
419
+ ## Evaluation
420
+
421
+ ### Metrics
422
+
423
+ #### Information Retrieval
424
+
425
+ * Datasets: `dim_768`, `dim_512`, `dim_256`, `dim_128` and `dim_64`
426
+ * Evaluated with [<code>InformationRetrievalEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.InformationRetrievalEvaluator)
427
+
428
+ | Metric | dim_768 | dim_512 | dim_256 | dim_128 | dim_64 |
429
+ |:--------------------|:-----------|:-----------|:-----------|:-----------|:-----------|
430
+ | cosine_accuracy@1 | 0.375 | 0.2812 | 0.2812 | 0.3125 | 0.2812 |
431
+ | cosine_accuracy@3 | 0.625 | 0.625 | 0.5 | 0.5938 | 0.5 |
432
+ | cosine_accuracy@5 | 0.6562 | 0.6875 | 0.7188 | 0.6562 | 0.625 |
433
+ | cosine_accuracy@10 | 0.875 | 0.8125 | 0.8125 | 0.7812 | 0.75 |
434
+ | cosine_precision@1 | 0.375 | 0.2812 | 0.2812 | 0.3125 | 0.2812 |
435
+ | cosine_precision@3 | 0.2083 | 0.2083 | 0.1667 | 0.1979 | 0.1667 |
436
+ | cosine_precision@5 | 0.1313 | 0.1375 | 0.1438 | 0.1313 | 0.125 |
437
+ | cosine_precision@10 | 0.0875 | 0.0813 | 0.0813 | 0.0781 | 0.075 |
438
+ | cosine_recall@1 | 0.375 | 0.2812 | 0.2812 | 0.3125 | 0.2812 |
439
+ | cosine_recall@3 | 0.625 | 0.625 | 0.5 | 0.5938 | 0.5 |
440
+ | cosine_recall@5 | 0.6562 | 0.6875 | 0.7188 | 0.6562 | 0.625 |
441
+ | cosine_recall@10 | 0.875 | 0.8125 | 0.8125 | 0.7812 | 0.75 |
442
+ | **cosine_ndcg@10** | **0.5929** | **0.5414** | **0.5246** | **0.5317** | **0.4953** |
443
+ | cosine_mrr@10 | 0.5072 | 0.4553 | 0.4345 | 0.4527 | 0.4162 |
444
+ | cosine_map@100 | 0.5138 | 0.468 | 0.4443 | 0.461 | 0.4235 |
445
+
446
+ <!--
447
+ ## Bias, Risks and Limitations
448
+
449
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
450
+ -->
451
+
452
+ <!--
453
+ ### Recommendations
454
+
455
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
456
+ -->
457
+
458
+ ## Training Details
459
+
460
+ ### Training Dataset
461
+
462
+ #### json
463
+
464
+ * Dataset: json
465
+ * Size: 288 training samples
466
+ * Columns: <code>positive</code> and <code>anchor</code>
467
+ * Approximate statistics based on the first 288 samples:
468
+ | | positive | anchor |
469
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
470
+ | type | string | string |
471
+ | details | <ul><li>min: 14 tokens</li><li>mean: 49.27 tokens</li><li>max: 73 tokens</li></ul> | <ul><li>min: 9 tokens</li><li>mean: 20.08 tokens</li><li>max: 33 tokens</li></ul> |
472
+ * Samples:
473
+ | positive | anchor |
474
+ |:--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:-----------------------------------------------------------------------|
475
+ | <code>Tường lửa bảo vệ hệ thống mạng bằng cách kiểm soát và lọc lưu lượng truy cập, ngăn chặn truy cập từ các nguồn không tin cậy và bảo vệ hệ thống khỏi các cuộc tấn công từ bên ngoài.</code> | <code>Tường lửa bảo vệ hệ thống mạng như thế nào?</code> |
476
+ | <code>Giám sát mạng giúp bảo vệ hệ thống CNTT bằng cách theo dõi lưu lượng truy cập, phát hiện các hành vi bất thường, và ngăn chặn các cuộc tấn công trước khi chúng có thể gây hại.</code> | <code>Giám sát mạng có vai trò gì trong bảo vệ hệ thống CNTT?</code> |
477
+ | <code>SIEM giúp cải thiện an ninh mạng của tổ chức bằng cách thu thập, phân tích và tương quan các sự kiện bảo mật từ nhiều nguồn khác nhau, từ đó phát hiện và cảnh báo kịp thời về các mối đe dọa, hỗ trợ xử lý sự cố nhanh chóng và hiệu quả.</code> | <code>SIEM giúp cải thiện an ninh mạng của tổ chức như thế nào?</code> |
478
+ * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
479
+ ```json
480
+ {
481
+ "loss": "MultipleNegativesRankingLoss",
482
+ "matryoshka_dims": [
483
+ 768,
484
+ 512,
485
+ 256,
486
+ 128,
487
+ 64
488
+ ],
489
+ "matryoshka_weights": [
490
+ 1,
491
+ 1,
492
+ 1,
493
+ 1,
494
+ 1
495
+ ],
496
+ "n_dims_per_step": -1
497
+ }
498
+ ```
499
+
500
+ ### Training Hyperparameters
501
+ #### Non-Default Hyperparameters
502
+
503
+ - `eval_strategy`: epoch
504
+ - `per_device_train_batch_size`: 32
505
+ - `gradient_accumulation_steps`: 16
506
+ - `learning_rate`: 2e-05
507
+ - `num_train_epochs`: 4
508
+ - `bf16`: True
509
+ - `load_best_model_at_end`: True
510
+
511
+ #### All Hyperparameters
512
+ <details><summary>Click to expand</summary>
513
+
514
+ - `overwrite_output_dir`: False
515
+ - `do_predict`: False
516
+ - `eval_strategy`: epoch
517
+ - `prediction_loss_only`: True
518
+ - `per_device_train_batch_size`: 32
519
+ - `per_device_eval_batch_size`: 8
520
+ - `per_gpu_train_batch_size`: None
521
+ - `per_gpu_eval_batch_size`: None
522
+ - `gradient_accumulation_steps`: 16
523
+ - `eval_accumulation_steps`: None
524
+ - `learning_rate`: 2e-05
525
+ - `weight_decay`: 0.0
526
+ - `adam_beta1`: 0.9
527
+ - `adam_beta2`: 0.999
528
+ - `adam_epsilon`: 1e-08
529
+ - `max_grad_norm`: 1.0
530
+ - `num_train_epochs`: 4
531
+ - `max_steps`: -1
532
+ - `lr_scheduler_type`: linear
533
+ - `lr_scheduler_kwargs`: {}
534
+ - `warmup_ratio`: 0.0
535
+ - `warmup_steps`: 0
536
+ - `log_level`: passive
537
+ - `log_level_replica`: warning
538
+ - `log_on_each_node`: True
539
+ - `logging_nan_inf_filter`: True
540
+ - `save_safetensors`: True
541
+ - `save_on_each_node`: False
542
+ - `save_only_model`: False
543
+ - `restore_callback_states_from_checkpoint`: False
544
+ - `no_cuda`: False
545
+ - `use_cpu`: False
546
+ - `use_mps_device`: False
547
+ - `seed`: 42
548
+ - `data_seed`: None
549
+ - `jit_mode_eval`: False
550
+ - `use_ipex`: False
551
+ - `bf16`: True
552
+ - `fp16`: False
553
+ - `fp16_opt_level`: O1
554
+ - `half_precision_backend`: auto
555
+ - `bf16_full_eval`: False
556
+ - `fp16_full_eval`: False
557
+ - `tf32`: None
558
+ - `local_rank`: 0
559
+ - `ddp_backend`: None
560
+ - `tpu_num_cores`: None
561
+ - `tpu_metrics_debug`: False
562
+ - `debug`: []
563
+ - `dataloader_drop_last`: False
564
+ - `dataloader_num_workers`: 0
565
+ - `dataloader_prefetch_factor`: None
566
+ - `past_index`: -1
567
+ - `disable_tqdm`: False
568
+ - `remove_unused_columns`: True
569
+ - `label_names`: None
570
+ - `load_best_model_at_end`: True
571
+ - `ignore_data_skip`: False
572
+ - `fsdp`: []
573
+ - `fsdp_min_num_params`: 0
574
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
575
+ - `fsdp_transformer_layer_cls_to_wrap`: None
576
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
577
+ - `deepspeed`: None
578
+ - `label_smoothing_factor`: 0.0
579
+ - `optim`: adamw_torch
580
+ - `optim_args`: None
581
+ - `adafactor`: False
582
+ - `group_by_length`: False
583
+ - `length_column_name`: length
584
+ - `ddp_find_unused_parameters`: None
585
+ - `ddp_bucket_cap_mb`: None
586
+ - `ddp_broadcast_buffers`: False
587
+ - `dataloader_pin_memory`: True
588
+ - `dataloader_persistent_workers`: False
589
+ - `skip_memory_metrics`: True
590
+ - `use_legacy_prediction_loop`: False
591
+ - `push_to_hub`: False
592
+ - `resume_from_checkpoint`: None
593
+ - `hub_model_id`: None
594
+ - `hub_strategy`: every_save
595
+ - `hub_private_repo`: False
596
+ - `hub_always_push`: False
597
+ - `gradient_checkpointing`: False
598
+ - `gradient_checkpointing_kwargs`: None
599
+ - `include_inputs_for_metrics`: False
600
+ - `eval_do_concat_batches`: True
601
+ - `fp16_backend`: auto
602
+ - `push_to_hub_model_id`: None
603
+ - `push_to_hub_organization`: None
604
+ - `mp_parameters`:
605
+ - `auto_find_batch_size`: False
606
+ - `full_determinism`: False
607
+ - `torchdynamo`: None
608
+ - `ray_scope`: last
609
+ - `ddp_timeout`: 1800
610
+ - `torch_compile`: False
611
+ - `torch_compile_backend`: None
612
+ - `torch_compile_mode`: None
613
+ - `dispatch_batches`: None
614
+ - `split_batches`: None
615
+ - `include_tokens_per_second`: False
616
+ - `include_num_input_tokens_seen`: False
617
+ - `neftune_noise_alpha`: None
618
+ - `optim_target_modules`: None
619
+ - `batch_eval_metrics`: False
620
+ - `prompts`: None
621
+ - `batch_sampler`: batch_sampler
622
+ - `multi_dataset_batch_sampler`: proportional
623
+
624
+ </details>
625
+
626
+ ### Training Logs
627
+ | Epoch | Step | dim_768_cosine_ndcg@10 | dim_512_cosine_ndcg@10 | dim_256_cosine_ndcg@10 | dim_128_cosine_ndcg@10 | dim_64_cosine_ndcg@10 |
628
+ |:-------:|:-----:|:----------------------:|:----------------------:|:----------------------:|:----------------------:|:---------------------:|
629
+ | 1.0 | 1 | 0.5462 | 0.5147 | 0.5044 | 0.5025 | 0.4595 |
630
+ | 2.0 | 3 | 0.5922 | 0.5252 | 0.5179 | 0.5186 | 0.4848 |
631
+ | **3.0** | **4** | **0.5929** | **0.5414** | **0.5246** | **0.5317** | **0.4953** |
632
+
633
+ * The bold row denotes the saved checkpoint.
634
+
635
+ ### Framework Versions
636
+ - Python: 3.11.9
637
+ - Sentence Transformers: 3.3.1
638
+ - Transformers: 4.41.2
639
+ - PyTorch: 2.5.1+cu124
640
+ - Accelerate: 1.1.1
641
+ - Datasets: 2.19.1
642
+ - Tokenizers: 0.19.1
643
+
644
+ ## Citation
645
+
646
+ ### BibTeX
647
+
648
+ #### Sentence Transformers
649
+ ```bibtex
650
+ @inproceedings{reimers-2019-sentence-bert,
651
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
652
+ author = "Reimers, Nils and Gurevych, Iryna",
653
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
654
+ month = "11",
655
+ year = "2019",
656
+ publisher = "Association for Computational Linguistics",
657
+ url = "https://arxiv.org/abs/1908.10084",
658
+ }
659
+ ```
660
+
661
+ #### MatryoshkaLoss
662
+ ```bibtex
663
+ @misc{kusupati2024matryoshka,
664
+ title={Matryoshka Representation Learning},
665
+ 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},
666
+ year={2024},
667
+ eprint={2205.13147},
668
+ archivePrefix={arXiv},
669
+ primaryClass={cs.LG}
670
+ }
671
+ ```
672
+
673
+ #### MultipleNegativesRankingLoss
674
+ ```bibtex
675
+ @misc{henderson2017efficient,
676
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
677
+ 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},
678
+ year={2017},
679
+ eprint={1705.00652},
680
+ archivePrefix={arXiv},
681
+ primaryClass={cs.CL}
682
+ }
683
+ ```
684
+
685
+ <!--
686
+ ## Glossary
687
+
688
+ *Clearly define terms in order to be accessible across audiences.*
689
+ -->
690
+
691
+ <!--
692
+ ## Model Card Authors
693
+
694
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
695
+ -->
696
+
697
+ <!--
698
+ ## Model Card Contact
699
+
700
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
701
+ -->
added_tokens.json ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ {
2
+ "<mask>": 64000
3
+ }
bpe.codes ADDED
The diff for this file is too large to render. See raw diff
 
config.json ADDED
@@ -0,0 +1,29 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "keepitreal/vietnamese-sbert",
3
+ "architectures": [
4
+ "RobertaModel"
5
+ ],
6
+ "attention_probs_dropout_prob": 0.1,
7
+ "bos_token_id": 0,
8
+ "classifier_dropout": null,
9
+ "eos_token_id": 2,
10
+ "gradient_checkpointing": false,
11
+ "hidden_act": "gelu",
12
+ "hidden_dropout_prob": 0.1,
13
+ "hidden_size": 768,
14
+ "initializer_range": 0.02,
15
+ "intermediate_size": 3072,
16
+ "layer_norm_eps": 1e-05,
17
+ "max_position_embeddings": 258,
18
+ "model_type": "roberta",
19
+ "num_attention_heads": 12,
20
+ "num_hidden_layers": 12,
21
+ "pad_token_id": 1,
22
+ "position_embedding_type": "absolute",
23
+ "tokenizer_class": "PhobertTokenizer",
24
+ "torch_dtype": "float32",
25
+ "transformers_version": "4.41.2",
26
+ "type_vocab_size": 1,
27
+ "use_cache": true,
28
+ "vocab_size": 64001
29
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.3.1",
4
+ "transformers": "4.41.2",
5
+ "pytorch": "2.5.1+cu124"
6
+ },
7
+ "prompts": {},
8
+ "default_prompt_name": null,
9
+ "similarity_fn_name": "cosine"
10
+ }
model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:9d5983686dc6a2ba5f1168ccfab87f0803a7efd2a7ac23f18892280dcc668a0b
3
+ size 540015464
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": 256,
3
+ "do_lower_case": false
4
+ }
special_tokens_map.json ADDED
@@ -0,0 +1,9 @@
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "bos_token": "<s>",
3
+ "cls_token": "<s>",
4
+ "eos_token": "</s>",
5
+ "mask_token": "<mask>",
6
+ "pad_token": "<pad>",
7
+ "sep_token": "</s>",
8
+ "unk_token": "<unk>"
9
+ }
tokenizer_config.json ADDED
@@ -0,0 +1,54 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "added_tokens_decoder": {
3
+ "0": {
4
+ "content": "<s>",
5
+ "lstrip": false,
6
+ "normalized": false,
7
+ "rstrip": false,
8
+ "single_word": false,
9
+ "special": true
10
+ },
11
+ "1": {
12
+ "content": "<pad>",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "</s>",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "<unk>",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "64000": {
36
+ "content": "<mask>",
37
+ "lstrip": false,
38
+ "normalized": false,
39
+ "rstrip": false,
40
+ "single_word": false,
41
+ "special": true
42
+ }
43
+ },
44
+ "bos_token": "<s>",
45
+ "clean_up_tokenization_spaces": true,
46
+ "cls_token": "<s>",
47
+ "eos_token": "</s>",
48
+ "mask_token": "<mask>",
49
+ "model_max_length": 256,
50
+ "pad_token": "<pad>",
51
+ "sep_token": "</s>",
52
+ "tokenizer_class": "PhobertTokenizer",
53
+ "unk_token": "<unk>"
54
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff