aimanfadillah commited on
Commit
3c53ded
·
verified ·
1 Parent(s): 5d8ecee

Initial model upload

Browse files
1_Pooling/config.json ADDED
@@ -0,0 +1,10 @@
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "word_embedding_dimension": 384,
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,330 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:3
9
+ - loss:MultipleNegativesRankingLoss
10
+ base_model: aimanfadillah/standardized
11
+ pipeline_tag: sentence-similarity
12
+ library_name: sentence-transformers
13
+ ---
14
+
15
+ # SentenceTransformer based on aimanfadillah/standardized
16
+
17
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [aimanfadillah/standardized](https://huggingface.co/aimanfadillah/standardized). It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for semantic textual similarity, semantic search, paraphrase mining, text classification, clustering, and more.
18
+
19
+ ## Model Details
20
+
21
+ ### Model Description
22
+ - **Model Type:** Sentence Transformer
23
+ - **Base model:** [aimanfadillah/standardized](https://huggingface.co/aimanfadillah/standardized) <!-- at revision 64270b32fa90ff5b0fcdc6621a9a6f1522a5df55 -->
24
+ - **Maximum Sequence Length:** 256 tokens
25
+ - **Output Dimensionality:** 384 dimensions
26
+ - **Similarity Function:** Cosine Similarity
27
+ <!-- - **Training Dataset:** Unknown -->
28
+ <!-- - **Language:** Unknown -->
29
+ <!-- - **License:** Unknown -->
30
+
31
+ ### Model Sources
32
+
33
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
34
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
35
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
36
+
37
+ ### Full Model Architecture
38
+
39
+ ```
40
+ SentenceTransformer(
41
+ (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
42
+ (1): Pooling({'word_embedding_dimension': 384, '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})
43
+ (2): Normalize()
44
+ )
45
+ ```
46
+
47
+ ## Usage
48
+
49
+ ### Direct Usage (Sentence Transformers)
50
+
51
+ First install the Sentence Transformers library:
52
+
53
+ ```bash
54
+ pip install -U sentence-transformers
55
+ ```
56
+
57
+ Then you can load this model and run inference.
58
+ ```python
59
+ from sentence_transformers import SentenceTransformer
60
+
61
+ # Download from the 🤗 Hub
62
+ model = SentenceTransformer("sentence_transformers_model_id")
63
+ # Run inference
64
+ sentences = [
65
+ 'The weather is lovely today.',
66
+ "It's so sunny outside!",
67
+ 'He drove to the stadium.',
68
+ ]
69
+ embeddings = model.encode(sentences)
70
+ print(embeddings.shape)
71
+ # [3, 384]
72
+
73
+ # Get the similarity scores for the embeddings
74
+ similarities = model.similarity(embeddings, embeddings)
75
+ print(similarities)
76
+ # tensor([[1.0000, 0.6651, 0.1016],
77
+ # [0.6651, 1.0000, 0.1394],
78
+ # [0.1016, 0.1394, 1.0000]])
79
+ ```
80
+
81
+ <!--
82
+ ### Direct Usage (Transformers)
83
+
84
+ <details><summary>Click to see the direct usage in Transformers</summary>
85
+
86
+ </details>
87
+ -->
88
+
89
+ <!--
90
+ ### Downstream Usage (Sentence Transformers)
91
+
92
+ You can finetune this model on your own dataset.
93
+
94
+ <details><summary>Click to expand</summary>
95
+
96
+ </details>
97
+ -->
98
+
99
+ <!--
100
+ ### Out-of-Scope Use
101
+
102
+ *List how the model may foreseeably be misused and address what users ought not to do with the model.*
103
+ -->
104
+
105
+ <!--
106
+ ## Bias, Risks and Limitations
107
+
108
+ *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
109
+ -->
110
+
111
+ <!--
112
+ ### Recommendations
113
+
114
+ *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
115
+ -->
116
+
117
+ ## Training Details
118
+
119
+ ### Training Dataset
120
+
121
+ #### Unnamed Dataset
122
+
123
+ * Size: 3 training samples
124
+ * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
125
+ * Approximate statistics based on the first 3 samples:
126
+ | | sentence_0 | sentence_1 | label |
127
+ |:--------|:-------------------------------------------------------------------------------|:-------------------------------------------------------------------------------|:--------------------------------------------------------------|
128
+ | type | string | string | float |
129
+ | details | <ul><li>min: 4 tokens</li><li>mean: 4.0 tokens</li><li>max: 4 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 4.0 tokens</li><li>max: 4 tokens</li></ul> | <ul><li>min: 0.8</li><li>mean: 0.8</li><li>max: 0.8</li></ul> |
130
+ * Samples:
131
+ | sentence_0 | sentence_1 | label |
132
+ |:---------------------------|:-------------------------------|:-----------------|
133
+ | <code>Cooling Type</code> | <code>Cooling System</code> | <code>0.8</code> |
134
+ | <code>Lock function</code> | <code>Control Lock</code> | <code>0.8</code> |
135
+ | <code>Interior lamp</code> | <code>Interior Lighting</code> | <code>0.8</code> |
136
+ * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
137
+ ```json
138
+ {
139
+ "scale": 20.0,
140
+ "similarity_fct": "cos_sim",
141
+ "gather_across_devices": false
142
+ }
143
+ ```
144
+
145
+ ### Training Hyperparameters
146
+ #### Non-Default Hyperparameters
147
+
148
+ - `per_device_train_batch_size`: 3
149
+ - `per_device_eval_batch_size`: 3
150
+ - `multi_dataset_batch_sampler`: round_robin
151
+
152
+ #### All Hyperparameters
153
+ <details><summary>Click to expand</summary>
154
+
155
+ - `overwrite_output_dir`: False
156
+ - `do_predict`: False
157
+ - `eval_strategy`: no
158
+ - `prediction_loss_only`: True
159
+ - `per_device_train_batch_size`: 3
160
+ - `per_device_eval_batch_size`: 3
161
+ - `per_gpu_train_batch_size`: None
162
+ - `per_gpu_eval_batch_size`: None
163
+ - `gradient_accumulation_steps`: 1
164
+ - `eval_accumulation_steps`: None
165
+ - `torch_empty_cache_steps`: None
166
+ - `learning_rate`: 5e-05
167
+ - `weight_decay`: 0.0
168
+ - `adam_beta1`: 0.9
169
+ - `adam_beta2`: 0.999
170
+ - `adam_epsilon`: 1e-08
171
+ - `max_grad_norm`: 1
172
+ - `num_train_epochs`: 3
173
+ - `max_steps`: -1
174
+ - `lr_scheduler_type`: linear
175
+ - `lr_scheduler_kwargs`: {}
176
+ - `warmup_ratio`: 0.0
177
+ - `warmup_steps`: 0
178
+ - `log_level`: passive
179
+ - `log_level_replica`: warning
180
+ - `log_on_each_node`: True
181
+ - `logging_nan_inf_filter`: True
182
+ - `save_safetensors`: True
183
+ - `save_on_each_node`: False
184
+ - `save_only_model`: False
185
+ - `restore_callback_states_from_checkpoint`: False
186
+ - `no_cuda`: False
187
+ - `use_cpu`: False
188
+ - `use_mps_device`: False
189
+ - `seed`: 42
190
+ - `data_seed`: None
191
+ - `jit_mode_eval`: False
192
+ - `use_ipex`: False
193
+ - `bf16`: False
194
+ - `fp16`: False
195
+ - `fp16_opt_level`: O1
196
+ - `half_precision_backend`: auto
197
+ - `bf16_full_eval`: False
198
+ - `fp16_full_eval`: False
199
+ - `tf32`: None
200
+ - `local_rank`: 0
201
+ - `ddp_backend`: None
202
+ - `tpu_num_cores`: None
203
+ - `tpu_metrics_debug`: False
204
+ - `debug`: []
205
+ - `dataloader_drop_last`: False
206
+ - `dataloader_num_workers`: 0
207
+ - `dataloader_prefetch_factor`: None
208
+ - `past_index`: -1
209
+ - `disable_tqdm`: False
210
+ - `remove_unused_columns`: True
211
+ - `label_names`: None
212
+ - `load_best_model_at_end`: False
213
+ - `ignore_data_skip`: False
214
+ - `fsdp`: []
215
+ - `fsdp_min_num_params`: 0
216
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
217
+ - `fsdp_transformer_layer_cls_to_wrap`: None
218
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
219
+ - `parallelism_config`: None
220
+ - `deepspeed`: None
221
+ - `label_smoothing_factor`: 0.0
222
+ - `optim`: adamw_torch_fused
223
+ - `optim_args`: None
224
+ - `adafactor`: False
225
+ - `group_by_length`: False
226
+ - `length_column_name`: length
227
+ - `ddp_find_unused_parameters`: None
228
+ - `ddp_bucket_cap_mb`: None
229
+ - `ddp_broadcast_buffers`: False
230
+ - `dataloader_pin_memory`: True
231
+ - `dataloader_persistent_workers`: False
232
+ - `skip_memory_metrics`: True
233
+ - `use_legacy_prediction_loop`: False
234
+ - `push_to_hub`: False
235
+ - `resume_from_checkpoint`: None
236
+ - `hub_model_id`: None
237
+ - `hub_strategy`: every_save
238
+ - `hub_private_repo`: None
239
+ - `hub_always_push`: False
240
+ - `hub_revision`: None
241
+ - `gradient_checkpointing`: False
242
+ - `gradient_checkpointing_kwargs`: None
243
+ - `include_inputs_for_metrics`: False
244
+ - `include_for_metrics`: []
245
+ - `eval_do_concat_batches`: True
246
+ - `fp16_backend`: auto
247
+ - `push_to_hub_model_id`: None
248
+ - `push_to_hub_organization`: None
249
+ - `mp_parameters`:
250
+ - `auto_find_batch_size`: False
251
+ - `full_determinism`: False
252
+ - `torchdynamo`: None
253
+ - `ray_scope`: last
254
+ - `ddp_timeout`: 1800
255
+ - `torch_compile`: False
256
+ - `torch_compile_backend`: None
257
+ - `torch_compile_mode`: None
258
+ - `include_tokens_per_second`: False
259
+ - `include_num_input_tokens_seen`: False
260
+ - `neftune_noise_alpha`: None
261
+ - `optim_target_modules`: None
262
+ - `batch_eval_metrics`: False
263
+ - `eval_on_start`: False
264
+ - `use_liger_kernel`: False
265
+ - `liger_kernel_config`: None
266
+ - `eval_use_gather_object`: False
267
+ - `average_tokens_across_devices`: False
268
+ - `prompts`: None
269
+ - `batch_sampler`: batch_sampler
270
+ - `multi_dataset_batch_sampler`: round_robin
271
+ - `router_mapping`: {}
272
+ - `learning_rate_mapping`: {}
273
+
274
+ </details>
275
+
276
+ ### Framework Versions
277
+ - Python: 3.12.4
278
+ - Sentence Transformers: 5.1.0
279
+ - Transformers: 4.56.0
280
+ - PyTorch: 2.8.0+cpu
281
+ - Accelerate: 1.10.1
282
+ - Datasets: 4.0.0
283
+ - Tokenizers: 0.22.0
284
+
285
+ ## Citation
286
+
287
+ ### BibTeX
288
+
289
+ #### Sentence Transformers
290
+ ```bibtex
291
+ @inproceedings{reimers-2019-sentence-bert,
292
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
293
+ author = "Reimers, Nils and Gurevych, Iryna",
294
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
295
+ month = "11",
296
+ year = "2019",
297
+ publisher = "Association for Computational Linguistics",
298
+ url = "https://arxiv.org/abs/1908.10084",
299
+ }
300
+ ```
301
+
302
+ #### MultipleNegativesRankingLoss
303
+ ```bibtex
304
+ @misc{henderson2017efficient,
305
+ title={Efficient Natural Language Response Suggestion for Smart Reply},
306
+ 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},
307
+ year={2017},
308
+ eprint={1705.00652},
309
+ archivePrefix={arXiv},
310
+ primaryClass={cs.CL}
311
+ }
312
+ ```
313
+
314
+ <!--
315
+ ## Glossary
316
+
317
+ *Clearly define terms in order to be accessible across audiences.*
318
+ -->
319
+
320
+ <!--
321
+ ## Model Card Authors
322
+
323
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
324
+ -->
325
+
326
+ <!--
327
+ ## Model Card Contact
328
+
329
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
330
+ -->
config.json ADDED
@@ -0,0 +1,25 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "architectures": [
3
+ "BertModel"
4
+ ],
5
+ "attention_probs_dropout_prob": 0.1,
6
+ "classifier_dropout": null,
7
+ "dtype": "float32",
8
+ "gradient_checkpointing": false,
9
+ "hidden_act": "gelu",
10
+ "hidden_dropout_prob": 0.1,
11
+ "hidden_size": 384,
12
+ "initializer_range": 0.02,
13
+ "intermediate_size": 1536,
14
+ "layer_norm_eps": 1e-12,
15
+ "max_position_embeddings": 512,
16
+ "model_type": "bert",
17
+ "num_attention_heads": 12,
18
+ "num_hidden_layers": 6,
19
+ "pad_token_id": 0,
20
+ "position_embedding_type": "absolute",
21
+ "transformers_version": "4.56.0",
22
+ "type_vocab_size": 2,
23
+ "use_cache": true,
24
+ "vocab_size": 30522
25
+ }
config_sentence_transformers.json ADDED
@@ -0,0 +1,14 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "__version__": {
3
+ "sentence_transformers": "5.1.0",
4
+ "transformers": "4.56.0",
5
+ "pytorch": "2.8.0+cpu"
6
+ },
7
+ "model_type": "SentenceTransformer",
8
+ "prompts": {
9
+ "query": "",
10
+ "document": ""
11
+ },
12
+ "default_prompt_name": null,
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:461f5585c129900516f316afb513a5b06ea0737a0b54e6a6a514175351b145cc
3
+ size 90864192
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_Normalize",
18
+ "type": "sentence_transformers.models.Normalize"
19
+ }
20
+ ]
onnx/model.onnx ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:79c1e0b9d6357e926265a8eac1a517b23f65cd30efea4524d334d8058d16fe32
3
+ size 90384556
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
+ "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": false,
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": 128,
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