shethjenil commited on
Commit
e3ed882
·
verified ·
1 Parent(s): 836154d

Upload README.md

Browse files
Files changed (1) hide show
  1. README.md +343 -0
README.md ADDED
@@ -0,0 +1,343 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ tags:
3
+ - sentence-transformers
4
+ - sentence-similarity
5
+ - feature-extraction
6
+ - dense
7
+ - generated_from_trainer
8
+ - dataset_size:19545
9
+ - loss:DenoisingAutoEncoderLoss
10
+ base_model: krutrim-ai-labs/Vyakyarth
11
+
12
+ pipeline_tag: sentence-similarity
13
+ library_name: sentence-transformers
14
+ ---
15
+
16
+ # SentenceTransformer based on krutrim-ai-labs/Vyakyarth
17
+
18
+ This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [krutrim-ai-labs/Vyakyarth](https://huggingface.co/krutrim-ai-labs/Vyakyarth). 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.
19
+
20
+ ## Model Details
21
+
22
+ ### Model Description
23
+ - **Model Type:** Sentence Transformer
24
+ - **Base model:** [krutrim-ai-labs/Vyakyarth](https://huggingface.co/krutrim-ai-labs/Vyakyarth) <!-- at revision 34147fdaea33e3a2b85f87af2b97f11ec5b6a88b -->
25
+ - **Maximum Sequence Length:** 128 tokens
26
+ - **Output Dimensionality:** 768 dimensions
27
+ - **Similarity Function:** Cosine Similarity
28
+ <!-- - **Training Dataset:** Unknown -->
29
+ <!-- - **Language:** Unknown -->
30
+ <!-- - **License:** Unknown -->
31
+
32
+ ### Model Sources
33
+
34
+ - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
35
+ - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
36
+ - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
37
+
38
+ ### Full Model Architecture
39
+
40
+ ```
41
+ SentenceTransformer(
42
+ (0): Transformer({'max_seq_length': 128, 'do_lower_case': False, 'architecture': 'XLMRobertaModel'})
43
+ (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})
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
+ '',
66
+ '',
67
+ 'રાગાદિક જબ પરિહરી,',
68
+ ]
69
+ embeddings = model.encode(sentences)
70
+ print(embeddings.shape)
71
+ # [3, 768]
72
+
73
+ # Get the similarity scores for the embeddings
74
+ similarities = model.similarity(embeddings, embeddings)
75
+ print(similarities)
76
+ # tensor([[1.0000, 1.0000, 0.3618],
77
+ # [1.0000, 1.0000, 0.3618],
78
+ # [0.3618, 0.3618, 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: 19,545 training samples
124
+ * Columns: <code>sentence_0</code> and <code>sentence_1</code>
125
+ * Approximate statistics based on the first 1000 samples:
126
+ | | sentence_0 | sentence_1 |
127
+ |:--------|:-----------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
128
+ | type | string | string |
129
+ | details | <ul><li>min: 2 tokens</li><li>mean: 11.07 tokens</li><li>max: 128 tokens</li></ul> | <ul><li>min: 2 tokens</li><li>mean: 22.5 tokens</li><li>max: 128 tokens</li></ul> |
130
+ * Samples:
131
+ | sentence_0 | sentence_1 |
132
+ |:-----------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
133
+ | <code></code> | <code></code> |
134
+ | <code>મહોપાધ્યાય યશોવિજયજીએ વ્યાખ્યા આવે રે ભાવન રસ...શું? ભાવન...ગુણોને વર્ણવવાનો / હોય છે પ્રભુના હોય છે અનુભવવાનો રસ ...! એ તો પેલે એ ઘટના</code> | <code>મહોપાધ્યાય યશોવિજયજીએ આપેલી ભક્તિની વ્યાખ્યા અહીં યાદ આવે : ‘સાચી ભક્તિ રે ભાવન રસ કહ્યો...' સાચી ભક્તિ એટલે શું ? ભાવન રસ... પ્રભુના ગુણોને વર્ણવવાનો / કહેવાનો એક રસ હોય છે, પ્રભુના ગુણોને સાંભળવાનો પણ એક રસ હોય છે; પણ એ ગુણોને અનુભવવાનો રસ... ! એ તો અદ્ભુત. શબ્દોને પેલે પારની એ ઘટના.</code> |
135
+ | <code></code> | <code></code> |
136
+ * Loss: [<code>DenoisingAutoEncoderLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#denoisingautoencoderloss)
137
+
138
+ ### Training Hyperparameters
139
+ #### Non-Default Hyperparameters
140
+
141
+ - `multi_dataset_batch_sampler`: round_robin
142
+
143
+ #### All Hyperparameters
144
+ <details><summary>Click to expand</summary>
145
+
146
+ - `overwrite_output_dir`: False
147
+ - `do_predict`: False
148
+ - `eval_strategy`: no
149
+ - `prediction_loss_only`: True
150
+ - `per_device_train_batch_size`: 8
151
+ - `per_device_eval_batch_size`: 8
152
+ - `per_gpu_train_batch_size`: None
153
+ - `per_gpu_eval_batch_size`: None
154
+ - `gradient_accumulation_steps`: 1
155
+ - `eval_accumulation_steps`: None
156
+ - `torch_empty_cache_steps`: None
157
+ - `learning_rate`: 5e-05
158
+ - `weight_decay`: 0.0
159
+ - `adam_beta1`: 0.9
160
+ - `adam_beta2`: 0.999
161
+ - `adam_epsilon`: 1e-08
162
+ - `max_grad_norm`: 1
163
+ - `num_train_epochs`: 3
164
+ - `max_steps`: -1
165
+ - `lr_scheduler_type`: linear
166
+ - `lr_scheduler_kwargs`: {}
167
+ - `warmup_ratio`: 0.0
168
+ - `warmup_steps`: 0
169
+ - `log_level`: passive
170
+ - `log_level_replica`: warning
171
+ - `log_on_each_node`: True
172
+ - `logging_nan_inf_filter`: True
173
+ - `save_safetensors`: True
174
+ - `save_on_each_node`: False
175
+ - `save_only_model`: False
176
+ - `restore_callback_states_from_checkpoint`: False
177
+ - `no_cuda`: False
178
+ - `use_cpu`: False
179
+ - `use_mps_device`: False
180
+ - `seed`: 42
181
+ - `data_seed`: None
182
+ - `jit_mode_eval`: False
183
+ - `use_ipex`: False
184
+ - `bf16`: False
185
+ - `fp16`: False
186
+ - `fp16_opt_level`: O1
187
+ - `half_precision_backend`: auto
188
+ - `bf16_full_eval`: False
189
+ - `fp16_full_eval`: False
190
+ - `tf32`: None
191
+ - `local_rank`: 0
192
+ - `ddp_backend`: None
193
+ - `tpu_num_cores`: None
194
+ - `tpu_metrics_debug`: False
195
+ - `debug`: []
196
+ - `dataloader_drop_last`: False
197
+ - `dataloader_num_workers`: 0
198
+ - `dataloader_prefetch_factor`: None
199
+ - `past_index`: -1
200
+ - `disable_tqdm`: False
201
+ - `remove_unused_columns`: True
202
+ - `label_names`: None
203
+ - `load_best_model_at_end`: False
204
+ - `ignore_data_skip`: False
205
+ - `fsdp`: []
206
+ - `fsdp_min_num_params`: 0
207
+ - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
208
+ - `fsdp_transformer_layer_cls_to_wrap`: None
209
+ - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
210
+ - `parallelism_config`: None
211
+ - `deepspeed`: None
212
+ - `label_smoothing_factor`: 0.0
213
+ - `optim`: adamw_torch_fused
214
+ - `optim_args`: None
215
+ - `adafactor`: False
216
+ - `group_by_length`: False
217
+ - `length_column_name`: length
218
+ - `ddp_find_unused_parameters`: None
219
+ - `ddp_bucket_cap_mb`: None
220
+ - `ddp_broadcast_buffers`: False
221
+ - `dataloader_pin_memory`: True
222
+ - `dataloader_persistent_workers`: False
223
+ - `skip_memory_metrics`: True
224
+ - `use_legacy_prediction_loop`: False
225
+ - `push_to_hub`: False
226
+ - `resume_from_checkpoint`: None
227
+ - `hub_model_id`: None
228
+ - `hub_strategy`: every_save
229
+ - `hub_private_repo`: None
230
+ - `hub_always_push`: False
231
+ - `hub_revision`: None
232
+ - `gradient_checkpointing`: False
233
+ - `gradient_checkpointing_kwargs`: None
234
+ - `include_inputs_for_metrics`: False
235
+ - `include_for_metrics`: []
236
+ - `eval_do_concat_batches`: True
237
+ - `fp16_backend`: auto
238
+ - `push_to_hub_model_id`: None
239
+ - `push_to_hub_organization`: None
240
+ - `mp_parameters`:
241
+ - `auto_find_batch_size`: False
242
+ - `full_determinism`: False
243
+ - `torchdynamo`: None
244
+ - `ray_scope`: last
245
+ - `ddp_timeout`: 1800
246
+ - `torch_compile`: False
247
+ - `torch_compile_backend`: None
248
+ - `torch_compile_mode`: None
249
+ - `include_tokens_per_second`: False
250
+ - `include_num_input_tokens_seen`: False
251
+ - `neftune_noise_alpha`: None
252
+ - `optim_target_modules`: None
253
+ - `batch_eval_metrics`: False
254
+ - `eval_on_start`: False
255
+ - `use_liger_kernel`: False
256
+ - `liger_kernel_config`: None
257
+ - `eval_use_gather_object`: False
258
+ - `average_tokens_across_devices`: False
259
+ - `prompts`: None
260
+ - `batch_sampler`: batch_sampler
261
+ - `multi_dataset_batch_sampler`: round_robin
262
+ - `router_mapping`: {}
263
+ - `learning_rate_mapping`: {}
264
+
265
+ </details>
266
+
267
+ ### Training Logs
268
+ | Epoch | Step | Training Loss |
269
+ |:------:|:----:|:-------------:|
270
+ | 0.2046 | 500 | 6.3813 |
271
+ | 0.4092 | 1000 | 5.0233 |
272
+ | 0.6137 | 1500 | 4.7333 |
273
+ | 0.8183 | 2000 | 4.4929 |
274
+ | 1.0229 | 2500 | 4.3667 |
275
+ | 1.2275 | 3000 | 4.1739 |
276
+ | 1.4321 | 3500 | 4.0251 |
277
+ | 1.6367 | 4000 | 3.9367 |
278
+ | 1.8412 | 4500 | 3.9523 |
279
+ | 2.0458 | 5000 | 3.8259 |
280
+ | 2.2504 | 5500 | 3.6619 |
281
+ | 2.4550 | 6000 | 3.6405 |
282
+ | 2.6596 | 6500 | 3.5932 |
283
+ | 2.8642 | 7000 | 3.5478 |
284
+
285
+
286
+ ### Framework Versions
287
+ - Python: 3.12.11
288
+ - Sentence Transformers: 5.1.0
289
+ - Transformers: 4.56.1
290
+ - PyTorch: 2.8.0+cu126
291
+ - Accelerate: 1.10.1
292
+ - Datasets: 4.0.0
293
+ - Tokenizers: 0.22.0
294
+
295
+ ## Citation
296
+
297
+ ### BibTeX
298
+
299
+ #### Sentence Transformers
300
+ ```bibtex
301
+ @inproceedings{reimers-2019-sentence-bert,
302
+ title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
303
+ author = "Reimers, Nils and Gurevych, Iryna",
304
+ booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
305
+ month = "11",
306
+ year = "2019",
307
+ publisher = "Association for Computational Linguistics",
308
+ url = "https://arxiv.org/abs/1908.10084",
309
+ }
310
+ ```
311
+
312
+ #### DenoisingAutoEncoderLoss
313
+ ```bibtex
314
+ @inproceedings{wang-2021-TSDAE,
315
+ title = "TSDAE: Using Transformer-based Sequential Denoising Auto-Encoderfor Unsupervised Sentence Embedding Learning",
316
+ author = "Wang, Kexin and Reimers, Nils and Gurevych, Iryna",
317
+ booktitle = "Findings of the Association for Computational Linguistics: EMNLP 2021",
318
+ month = nov,
319
+ year = "2021",
320
+ address = "Punta Cana, Dominican Republic",
321
+ publisher = "Association for Computational Linguistics",
322
+ pages = "671--688",
323
+ url = "https://arxiv.org/abs/2104.06979",
324
+ }
325
+ ```
326
+
327
+ <!--
328
+ ## Glossary
329
+
330
+ *Clearly define terms in order to be accessible across audiences.*
331
+ -->
332
+
333
+ <!--
334
+ ## Model Card Authors
335
+
336
+ *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
337
+ -->
338
+
339
+ <!--
340
+ ## Model Card Contact
341
+
342
+ *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
343
+ -->