yahyaabd commited on
Commit
c32d12a
·
verified ·
1 Parent(s): 3bc0383

Add new SentenceTransformer model

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 1024,
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 @@
 
 
1
+ {"in_features": 1024, "out_features": 256, "bias": true, "activation_function": "torch.nn.modules.activation.Tanh"}
2_Dense/model.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:2a423884c059d17f3abc05e9b86df67377992f41928843de25136d21b4a9cb17
3
+ size 1049760
README.md ADDED
@@ -0,0 +1,459 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - generated_from_trainer
7
+ - dataset_size:23478
8
+ - loss:ContrastiveLoss
9
+ base_model: denaya/indoSBERT-large
10
+ widget:
11
+ - source_sentence: 'Pekerja anak Indonesia: Buku panduan 2022 (pr & pasca pandemi)'
12
+ sentences:
13
+ - Statistik Perusahaan Hak Pengusahaan Hutan 2010
14
+ - Statistik Kriminal 2016
15
+ - ' Buletin Statistik Perdagangan Luar Negeri Ekspor Menurut Kelompok Komoditi dan
16
+ Negara, November 2020'
17
+ - source_sentence: Jumlah pascr tradisional, pusat perbelanjaan, dan toko modern tahun
18
+ 2019
19
+ sentences:
20
+ - Profil Pasar Tradisional, Pusat Perbelanjaan, dan Toko Modern 2019
21
+ - Laporan Perekonomian Indonesia 2008
22
+ - Profil Industri Mikro dan Kecil 2006
23
+ - source_sentence: Survei biay ahidup (SBH) di Ternate tahun 2012
24
+ sentences:
25
+ - Laporan Bulanan Data Sosial Ekonomi Januari 2016
26
+ - Keadaan Angkatan kerja di Indonesia Agustus 2009
27
+ - Statistik Perdagangan Luar Negeri Indonesia Impor 2023 Buku I
28
+ - source_sentence: Direktori perwsahaan air minum, listrik, dan gas di kota tahun
29
+ 2009
30
+ sentences:
31
+ - Statistik Indonesia 1991
32
+ - Direktori Perusahaan Air Minum Listrik dan Gas Kota 2009
33
+ - Direktori Eksportir Indonesia 2015
34
+ - source_sentence: Studi efisiensi industri manufaktr
35
+ sentences:
36
+ - Statistik Indonesia 2019
37
+ - Statistik Potensi Desa Provinsi Maluku 2011
38
+ - Klasifikasi Baku Komoditas Indonesia (KBKI) 2012 Buku 4
39
+ datasets:
40
+ - yahyaabd/bps-publication-pos-neg-pairs
41
+ pipeline_tag: sentence-similarity
42
+ library_name: sentence-transformers
43
+ metrics:
44
+ - pearson_cosine
45
+ - spearman_cosine
46
+ model-index:
47
+ - name: SentenceTransformer based on denaya/indoSBERT-large
48
+ results:
49
+ - task:
50
+ type: semantic-similarity
51
+ name: Semantic Similarity
52
+ dataset:
53
+ name: allstats semantic base v1 eval
54
+ type: allstats-semantic-base-v1-eval
55
+ metrics:
56
+ - type: pearson_cosine
57
+ value: 0.9658815836712943
58
+ name: Pearson Cosine
59
+ - type: spearman_cosine
60
+ value: 0.7841756166101173
61
+ name: Spearman Cosine
62
+ - task:
63
+ type: semantic-similarity
64
+ name: Semantic Similarity
65
+ dataset:
66
+ name: allstat semantic base v1 test
67
+ type: allstat-semantic-base-v1-test
68
+ metrics:
69
+ - type: pearson_cosine
70
+ value: 0.9592021090962591
71
+ name: Pearson Cosine
72
+ - type: spearman_cosine
73
+ value: 0.7818288777895762
74
+ name: Spearman Cosine
75
+ ---
76
+
77
+ # SentenceTransformer based on denaya/indoSBERT-large
78
+
79
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [denaya/indoSBERT-large](https://huggingface.co/denaya/indoSBERT-large) on the [bps-publication-pos-neg-pairs](https://huggingface.co/datasets/yahyaabd/bps-publication-pos-neg-pairs) dataset. It maps sentences & paragraphs to a 256-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
80
+
81
+ ## Model Details
82
+
83
+ ### Model Description
84
+ - **Model Type:** Sentence Transformer
85
+ - **Base model:** [denaya/indoSBERT-large](https://huggingface.co/denaya/indoSBERT-large) <!-- at revision 5c64d43f07f7054dfbf33d226b3066414b6ebc4a -->
86
+ - **Maximum Sequence Length:** 256 tokens
87
+ - **Output Dimensionality:** 256 dimensions
88
+ - **Similarity Function:** Cosine Similarity
89
+ - **Training Dataset:**
90
+ - [bps-publication-pos-neg-pairs](https://huggingface.co/datasets/yahyaabd/bps-publication-pos-neg-pairs)
91
+ <!-- - **Language:** Unknown -->
92
+ <!-- - **License:** Unknown -->
93
+
94
+ ### Model Sources
95
+
96
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
97
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
98
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
99
+
100
+ ### Full Model Architecture
101
+
102
+ ```
103
+ SentenceTransformer(
104
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False}) with Transformer model: BertModel
105
+ (1): Pooling({'word_embedding_dimension': 1024, '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})
106
+ (2): Dense({'in_features': 1024, 'out_features': 256, 'bias': True, 'activation_function': 'torch.nn.modules.activation.Tanh'})
107
+ )
108
+ ```
109
+
110
+ ## Usage
111
+
112
+ ### Direct Usage (Sentence Transformers)
113
+
114
+ First install the Sentence Transformers library:
115
+
116
+ ```bash
117
+ pip install -U sentence-transformers
118
+ ```
119
+
120
+ Then you can load this model and run inference.
121
+ ```python
122
+ from sentence_transformers import SentenceTransformer
123
+
124
+ # Download from the 🤗 Hub
125
+ model = SentenceTransformer("yahyaabd/allstats-semantic-base-v1-3")
126
+ # Run inference
127
+ sentences = [
128
+ 'Studi efisiensi industri manufaktr',
129
+ 'Statistik Potensi Desa Provinsi Maluku 2011',
130
+ 'Klasifikasi Baku Komoditas Indonesia (KBKI) 2012 Buku 4',
131
+ ]
132
+ embeddings = model.encode(sentences)
133
+ print(embeddings.shape)
134
+ # [3, 256]
135
+
136
+ # Get the similarity scores for the embeddings
137
+ similarities = model.similarity(embeddings, embeddings)
138
+ print(similarities.shape)
139
+ # [3, 3]
140
+ ```
141
+
142
+ <!--
143
+ ### Direct Usage (Transformers)
144
+
145
+ <details><summary>Click to see the direct usage in Transformers</summary>
146
+
147
+ </details>
148
+ -->
149
+
150
+ <!--
151
+ ### Downstream Usage (Sentence Transformers)
152
+
153
+ You can finetune this model on your own dataset.
154
+
155
+ <details><summary>Click to expand</summary>
156
+
157
+ </details>
158
+ -->
159
+
160
+ <!--
161
+ ### Out-of-Scope Use
162
+
163
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
164
+ -->
165
+
166
+ ## Evaluation
167
+
168
+ ### Metrics
169
+
170
+ #### Semantic Similarity
171
+
172
+ * Datasets: `allstats-semantic-base-v1-eval` and `allstat-semantic-base-v1-test`
173
+ * Evaluated with [<code>EmbeddingSimilarityEvaluator</code>](https://sbert.net/docs/package_reference/sentence_transformer/evaluation.html#sentence_transformers.evaluation.EmbeddingSimilarityEvaluator)
174
+
175
+ | Metric | allstats-semantic-base-v1-eval | allstat-semantic-base-v1-test |
176
+ |:--------------------|:-------------------------------|:------------------------------|
177
+ | pearson_cosine | 0.9659 | 0.9592 |
178
+ | **spearman_cosine** | **0.7842** | **0.7818** |
179
+
180
+ <!--
181
+ ## Bias, Risks and Limitations
182
+
183
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
184
+ -->
185
+
186
+ <!--
187
+ ### Recommendations
188
+
189
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
190
+ -->
191
+
192
+ ## Training Details
193
+
194
+ ### Training Dataset
195
+
196
+ #### bps-publication-pos-neg-pairs
197
+
198
+ * Dataset: [bps-publication-pos-neg-pairs](https://huggingface.co/datasets/yahyaabd/bps-publication-pos-neg-pairs) at [46a5cb7](https://huggingface.co/datasets/yahyaabd/bps-publication-pos-neg-pairs/tree/46a5cb7b0d6b00e9ef6bb1bf0ab6b6628ab66a9b)
199
+ * Size: 23,478 training samples
200
+ * Columns: <code>query</code>, <code>doc</code>, and <code>label</code>
201
+ * Approximate statistics based on the first 1000 samples:
202
+ | | query | doc | label |
203
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------|
204
+ | type | string | string | int |
205
+ | details | <ul><li>min: 5 tokens</li><li>mean: 11.84 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.77 tokens</li><li>max: 28 tokens</li></ul> | <ul><li>0: ~72.40%</li><li>1: ~27.60%</li></ul> |
206
+ * Samples:
207
+ | query | doc | label |
208
+ |:------------------------------------------------------------------------------------|:-------------------------------------------------------------------------------------------------|:---------------|
209
+ | <code>Direktori perusahaan perantara keuangan bukan koperasi tahun 2006 (SE)</code> | <code>Tinjauan Regional Berdasarkan PDRB Kabupaten/Kota 2018-2022, Buku 2 Pulau Jawa-Bali</code> | <code>0</code> |
210
+ | <code>Informasi lengkap tentang PPLS 2011</code> | <code>Indeks Harga Perdagangan Besar Indonesia tahun 2005</code> | <code>0</code> |
211
+ | <code>Data konversi GKG ke beras tahun 2012</code> | <code>Indikator Ekonomi Juli 2023</code> | <code>0</code> |
212
+ * Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
213
+ ```json
214
+ {
215
+ "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
216
+ "margin": 0.5,
217
+ "size_average": true
218
+ }
219
+ ```
220
+
221
+ ### Evaluation Dataset
222
+
223
+ #### bps-publication-pos-neg-pairs
224
+
225
+ * Dataset: [bps-publication-pos-neg-pairs](https://huggingface.co/datasets/yahyaabd/bps-publication-pos-neg-pairs) at [46a5cb7](https://huggingface.co/datasets/yahyaabd/bps-publication-pos-neg-pairs/tree/46a5cb7b0d6b00e9ef6bb1bf0ab6b6628ab66a9b)
226
+ * Size: 5,031 evaluation samples
227
+ * Columns: <code>query</code>, <code>doc</code>, and <code>label</code>
228
+ * Approximate statistics based on the first 1000 samples:
229
+ | | query | doc | label |
230
+ |:--------|:----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|:------------------------------------------------|
231
+ | type | string | string | int |
232
+ | details | <ul><li>min: 5 tokens</li><li>mean: 11.97 tokens</li><li>max: 24 tokens</li></ul> | <ul><li>min: 5 tokens</li><li>mean: 10.76 tokens</li><li>max: 32 tokens</li></ul> | <ul><li>0: ~72.70%</li><li>1: ~27.30%</li></ul> |
233
+ * Samples:
234
+ | query | doc | label |
235
+ |:-------------------------------------------------------------------------------------|:--------------------------------------------------------------------------------------------------|:---------------|
236
+ | <code>Informasi angka tanaman berkhasiat ogbat dan tanaman hias di tahun 2005</code> | <code>Tinjauan Regional Berdasarkan PDRB Kabupaten/Kota 2010-2013 - Buku 2 Pulau Jawa-Bali</code> | <code>0</code> |
237
+ | <code>Informasi lengkap statistik horsikultura tahun 2020</code> | <code>NERACA ENERGI INDONESIA 2017-2021</code> | <code>0</code> |
238
+ | <code>Statistik air bersih Indonesia periode 2014-2019</code> | <code>Profil Usaha Konstruksi Perorangan Provinsi Kalimantan Utara, 2022</code> | <code>0</code> |
239
+ * Loss: [<code>ContrastiveLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#contrastiveloss) with these parameters:
240
+ ```json
241
+ {
242
+ "distance_metric": "SiameseDistanceMetric.COSINE_DISTANCE",
243
+ "margin": 0.5,
244
+ "size_average": true
245
+ }
246
+ ```
247
+
248
+ ### Training Hyperparameters
249
+ #### Non-Default Hyperparameters
250
+
251
+ - `eval_strategy`: steps
252
+ - `per_device_train_batch_size`: 64
253
+ - `per_device_eval_batch_size`: 64
254
+ - `num_train_epochs`: 8
255
+ - `warmup_ratio`: 0.1
256
+ - `fp16`: True
257
+ - `load_best_model_at_end`: True
258
+ - `eval_on_start`: True
259
+
260
+ #### All Hyperparameters
261
+ <details><summary>Click to expand</summary>
262
+
263
+ - `overwrite_output_dir`: False
264
+ - `do_predict`: False
265
+ - `eval_strategy`: steps
266
+ - `prediction_loss_only`: True
267
+ - `per_device_train_batch_size`: 64
268
+ - `per_device_eval_batch_size`: 64
269
+ - `per_gpu_train_batch_size`: None
270
+ - `per_gpu_eval_batch_size`: None
271
+ - `gradient_accumulation_steps`: 1
272
+ - `eval_accumulation_steps`: None
273
+ - `torch_empty_cache_steps`: None
274
+ - `learning_rate`: 5e-05
275
+ - `weight_decay`: 0.0
276
+ - `adam_beta1`: 0.9
277
+ - `adam_beta2`: 0.999
278
+ - `adam_epsilon`: 1e-08
279
+ - `max_grad_norm`: 1.0
280
+ - `num_train_epochs`: 8
281
+ - `max_steps`: -1
282
+ - `lr_scheduler_type`: linear
283
+ - `lr_scheduler_kwargs`: {}
284
+ - `warmup_ratio`: 0.1
285
+ - `warmup_steps`: 0
286
+ - `log_level`: passive
287
+ - `log_level_replica`: warning
288
+ - `log_on_each_node`: True
289
+ - `logging_nan_inf_filter`: True
290
+ - `save_safetensors`: True
291
+ - `save_on_each_node`: False
292
+ - `save_only_model`: False
293
+ - `restore_callback_states_from_checkpoint`: False
294
+ - `no_cuda`: False
295
+ - `use_cpu`: False
296
+ - `use_mps_device`: False
297
+ - `seed`: 42
298
+ - `data_seed`: None
299
+ - `jit_mode_eval`: False
300
+ - `use_ipex`: False
301
+ - `bf16`: False
302
+ - `fp16`: True
303
+ - `fp16_opt_level`: O1
304
+ - `half_precision_backend`: auto
305
+ - `bf16_full_eval`: False
306
+ - `fp16_full_eval`: False
307
+ - `tf32`: None
308
+ - `local_rank`: 0
309
+ - `ddp_backend`: None
310
+ - `tpu_num_cores`: None
311
+ - `tpu_metrics_debug`: False
312
+ - `debug`: []
313
+ - `dataloader_drop_last`: False
314
+ - `dataloader_num_workers`: 0
315
+ - `dataloader_prefetch_factor`: None
316
+ - `past_index`: -1
317
+ - `disable_tqdm`: False
318
+ - `remove_unused_columns`: True
319
+ - `label_names`: None
320
+ - `load_best_model_at_end`: True
321
+ - `ignore_data_skip`: False
322
+ - `fsdp`: []
323
+ - `fsdp_min_num_params`: 0
324
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
325
+ - `fsdp_transformer_layer_cls_to_wrap`: None
326
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
327
+ - `deepspeed`: None
328
+ - `label_smoothing_factor`: 0.0
329
+ - `optim`: adamw_torch
330
+ - `optim_args`: None
331
+ - `adafactor`: False
332
+ - `group_by_length`: False
333
+ - `length_column_name`: length
334
+ - `ddp_find_unused_parameters`: None
335
+ - `ddp_bucket_cap_mb`: None
336
+ - `ddp_broadcast_buffers`: False
337
+ - `dataloader_pin_memory`: True
338
+ - `dataloader_persistent_workers`: False
339
+ - `skip_memory_metrics`: True
340
+ - `use_legacy_prediction_loop`: False
341
+ - `push_to_hub`: False
342
+ - `resume_from_checkpoint`: None
343
+ - `hub_model_id`: None
344
+ - `hub_strategy`: every_save
345
+ - `hub_private_repo`: None
346
+ - `hub_always_push`: False
347
+ - `gradient_checkpointing`: False
348
+ - `gradient_checkpointing_kwargs`: None
349
+ - `include_inputs_for_metrics`: False
350
+ - `include_for_metrics`: []
351
+ - `eval_do_concat_batches`: True
352
+ - `fp16_backend`: auto
353
+ - `push_to_hub_model_id`: None
354
+ - `push_to_hub_organization`: None
355
+ - `mp_parameters`:
356
+ - `auto_find_batch_size`: False
357
+ - `full_determinism`: False
358
+ - `torchdynamo`: None
359
+ - `ray_scope`: last
360
+ - `ddp_timeout`: 1800
361
+ - `torch_compile`: False
362
+ - `torch_compile_backend`: None
363
+ - `torch_compile_mode`: None
364
+ - `dispatch_batches`: None
365
+ - `split_batches`: None
366
+ - `include_tokens_per_second`: False
367
+ - `include_num_input_tokens_seen`: False
368
+ - `neftune_noise_alpha`: None
369
+ - `optim_target_modules`: None
370
+ - `batch_eval_metrics`: False
371
+ - `eval_on_start`: True
372
+ - `use_liger_kernel`: False
373
+ - `eval_use_gather_object`: False
374
+ - `average_tokens_across_devices`: False
375
+ - `prompts`: None
376
+ - `batch_sampler`: batch_sampler
377
+ - `multi_dataset_batch_sampler`: proportional
378
+
379
+ </details>
380
+
381
+ ### Training Logs
382
+ | Epoch | Step | Training Loss | Validation Loss | allstats-semantic-base-v1-eval_spearman_cosine | allstat-semantic-base-v1-test_spearman_cosine |
383
+ |:----------:|:--------:|:-------------:|:---------------:|:----------------------------------------------:|:---------------------------------------------:|
384
+ | 0 | 0 | - | 0.0053 | 0.7770 | - |
385
+ | 0.5450 | 200 | 0.0023 | 0.0005 | 0.7842 | - |
386
+ | 1.0899 | 400 | 0.0005 | 0.0002 | 0.7842 | - |
387
+ | 1.6349 | 600 | 0.0002 | 0.0002 | 0.7842 | - |
388
+ | 2.1798 | 800 | 0.0001 | 0.0001 | 0.7842 | - |
389
+ | 2.7248 | 1000 | 0.0001 | 0.0001 | 0.7842 | - |
390
+ | 3.2698 | 1200 | 0.0 | 0.0001 | 0.7842 | - |
391
+ | 3.8147 | 1400 | 0.0 | 0.0001 | 0.7842 | - |
392
+ | 4.3597 | 1600 | 0.0 | 0.0001 | 0.7842 | - |
393
+ | **4.9046** | **1800** | **0.0** | **0.0001** | **0.7842** | **-** |
394
+ | 5.4496 | 2000 | 0.0 | 0.0001 | 0.7842 | - |
395
+ | 5.9946 | 2200 | 0.0 | 0.0001 | 0.7842 | - |
396
+ | 6.5395 | 2400 | 0.0 | 0.0001 | 0.7842 | - |
397
+ | 7.0845 | 2600 | 0.0 | 0.0001 | 0.7842 | - |
398
+ | 7.6294 | 2800 | 0.0 | 0.0001 | 0.7842 | - |
399
+ | -1 | -1 | - | - | - | 0.7818 |
400
+
401
+ * The bold row denotes the saved checkpoint.
402
+
403
+ ### Framework Versions
404
+ - Python: 3.10.12
405
+ - Sentence Transformers: 3.4.0
406
+ - Transformers: 4.48.1
407
+ - PyTorch: 2.5.1+cu124
408
+ - Accelerate: 1.3.0
409
+ - Datasets: 3.2.0
410
+ - Tokenizers: 0.21.0
411
+
412
+ ## Citation
413
+
414
+ ### BibTeX
415
+
416
+ #### Sentence Transformers
417
+ ```bibtex
418
+ @inproceedings{reimers-2019-sentence-bert,
419
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
420
+ author = "Reimers, Nils and Gurevych, Iryna",
421
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
422
+ month = "11",
423
+ year = "2019",
424
+ publisher = "Association for Computational Linguistics",
425
+ url = "https://arxiv.org/abs/1908.10084",
426
+ }
427
+ ```
428
+
429
+ #### ContrastiveLoss
430
+ ```bibtex
431
+ @inproceedings{hadsell2006dimensionality,
432
+ author={Hadsell, R. and Chopra, S. and LeCun, Y.},
433
+ booktitle={2006 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR'06)},
434
+ title={Dimensionality Reduction by Learning an Invariant Mapping},
435
+ year={2006},
436
+ volume={2},
437
+ number={},
438
+ pages={1735-1742},
439
+ doi={10.1109/CVPR.2006.100}
440
+ }
441
+ ```
442
+
443
+ <!--
444
+ ## Glossary
445
+
446
+ *Clearly define terms in order to be accessible across audiences.*
447
+ -->
448
+
449
+ <!--
450
+ ## Model Card Authors
451
+
452
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
453
+ -->
454
+
455
+ <!--
456
+ ## Model Card Contact
457
+
458
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
459
+ -->
config.json ADDED
@@ -0,0 +1,47 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "_name_or_path": "denaya/indoSBERT-Large",
3
+ "_num_labels": 5,
4
+ "architectures": [
5
+ "BertModel"
6
+ ],
7
+ "attention_probs_dropout_prob": 0.1,
8
+ "classifier_dropout": null,
9
+ "directionality": "bidi",
10
+ "hidden_act": "gelu",
11
+ "hidden_dropout_prob": 0.1,
12
+ "hidden_size": 1024,
13
+ "id2label": {
14
+ "0": "LABEL_0",
15
+ "1": "LABEL_1",
16
+ "2": "LABEL_2",
17
+ "3": "LABEL_3",
18
+ "4": "LABEL_4"
19
+ },
20
+ "initializer_range": 0.02,
21
+ "intermediate_size": 4096,
22
+ "label2id": {
23
+ "LABEL_0": 0,
24
+ "LABEL_1": 1,
25
+ "LABEL_2": 2,
26
+ "LABEL_3": 3,
27
+ "LABEL_4": 4
28
+ },
29
+ "layer_norm_eps": 1e-12,
30
+ "max_position_embeddings": 512,
31
+ "model_type": "bert",
32
+ "num_attention_heads": 16,
33
+ "num_hidden_layers": 24,
34
+ "output_past": true,
35
+ "pad_token_id": 0,
36
+ "pooler_fc_size": 768,
37
+ "pooler_num_attention_heads": 12,
38
+ "pooler_num_fc_layers": 3,
39
+ "pooler_size_per_head": 128,
40
+ "pooler_type": "first_token_transform",
41
+ "position_embedding_type": "absolute",
42
+ "torch_dtype": "float32",
43
+ "transformers_version": "4.48.1",
44
+ "type_vocab_size": 2,
45
+ "use_cache": true,
46
+ "vocab_size": 30522
47
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "3.4.0",
4
+ "transformers": "4.48.1",
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:88349f924d3cbe1fc14f17080cf293d1bc377babae57dc15c9091eaa92731308
3
+ size 1340612432
modules.json ADDED
@@ -0,0 +1,20 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ ]
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,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,65 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
+ "1": {
12
+ "content": "[UNK]",
13
+ "lstrip": false,
14
+ "normalized": false,
15
+ "rstrip": false,
16
+ "single_word": false,
17
+ "special": true
18
+ },
19
+ "2": {
20
+ "content": "[CLS]",
21
+ "lstrip": false,
22
+ "normalized": false,
23
+ "rstrip": false,
24
+ "single_word": false,
25
+ "special": true
26
+ },
27
+ "3": {
28
+ "content": "[SEP]",
29
+ "lstrip": false,
30
+ "normalized": false,
31
+ "rstrip": false,
32
+ "single_word": false,
33
+ "special": true
34
+ },
35
+ "4": {
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
+ "max_length": 256,
51
+ "model_max_length": 256,
52
+ "never_split": null,
53
+ "pad_to_multiple_of": null,
54
+ "pad_token": "[PAD]",
55
+ "pad_token_type_id": 0,
56
+ "padding_side": "right",
57
+ "sep_token": "[SEP]",
58
+ "stride": 0,
59
+ "strip_accents": null,
60
+ "tokenize_chinese_chars": true,
61
+ "tokenizer_class": "BertTokenizer",
62
+ "truncation_side": "right",
63
+ "truncation_strategy": "longest_first",
64
+ "unk_token": "[UNK]"
65
+ }
vocab.txt ADDED
The diff for this file is too large to render. See raw diff