Badnyal commited on
Commit
f39b8e9
·
verified ·
1 Parent(s): 346e9ce

Update README with Khasi-English context

Browse files
Files changed (1) hide show
  1. README.md +14 -359
README.md CHANGED
@@ -1,364 +1,19 @@
1
- ---
2
- tags:
3
- - sentence-transformers
4
- - sentence-similarity
5
- - feature-extraction
6
- - dense
7
- - generated_from_trainer
8
- - dataset_size:20000
9
- - loss:MultipleNegativesRankingLoss
10
- base_model: sentence-transformers/all-MiniLM-L6-v2
11
- widget:
12
- - source_sentence: the oil crisis
13
- sentences:
14
- - ki jingthew
15
- - ka jingeh jong ka umphniang
16
- - kaba jylliew bha.
17
- - source_sentence: This is election time.
18
- sentences:
19
- - Kaei kaba la jia hadien?
20
- - Kam long kaba pura.
21
- - Kane ka dei ka por elekshon.
22
- - source_sentence: They had to suffer.
23
- sentences:
24
- - Baroh ki dukan ki khang.
25
- - U jubab, Hooid.
26
- - Ki la hap ban shah shitom.
27
- - source_sentence: There are no media.
28
- sentences:
29
- - Hynrei ngam lah ban sangeh.
30
- - Ki don ki lad pathai khubor.
31
- - Ka lynti rel kaba jngai
32
- - source_sentence: apricot tree
33
- sentences:
34
- - kata
35
- - Ka Ireland ka jop
36
- - dieng
37
- pipeline_tag: sentence-similarity
38
- library_name: sentence-transformers
39
- ---
40
 
41
- # SentenceTransformer based on sentence-transformers/all-MiniLM-L6-v2
42
 
43
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2). 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.
 
44
 
45
- ## Model Details
 
 
 
 
46
 
47
- ### Model Description
48
- - **Model Type:** Sentence Transformer
49
- - **Base model:** [sentence-transformers/all-MiniLM-L6-v2](https://huggingface.co/sentence-transformers/all-MiniLM-L6-v2) <!-- at revision c9745ed1d9f207416be6d2e6f8de32d1f16199bf -->
50
- - **Maximum Sequence Length:** 256 tokens
51
- - **Output Dimensionality:** 384 dimensions
52
- - **Similarity Function:** Cosine Similarity
53
- <!-- - **Training Dataset:** Unknown -->
54
- <!-- - **Language:** Unknown -->
55
- <!-- - **License:** Unknown -->
56
 
57
- ### Model Sources
58
-
59
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
60
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/UKPLab/sentence-transformers)
61
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
62
-
63
- ### Full Model Architecture
64
-
65
- ```
66
- SentenceTransformer(
67
- (0): Transformer({'max_seq_length': 256, 'do_lower_case': False, 'architecture': 'BertModel'})
68
- (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})
69
- (2): Normalize()
70
- )
71
- ```
72
-
73
- ## Usage
74
-
75
- ### Direct Usage (Sentence Transformers)
76
-
77
- First install the Sentence Transformers library:
78
-
79
- ```bash
80
- pip install -U sentence-transformers
81
- ```
82
-
83
- Then you can load this model and run inference.
84
- ```python
85
- from sentence_transformers import SentenceTransformer
86
-
87
- # Download from the 🤗 Hub
88
- model = SentenceTransformer("sentence_transformers_model_id")
89
- # Run inference
90
- sentences = [
91
- 'apricot tree',
92
- 'dieng',
93
- 'Ka Ireland ka jop',
94
- ]
95
- embeddings = model.encode(sentences)
96
- print(embeddings.shape)
97
- # [3, 384]
98
-
99
- # Get the similarity scores for the embeddings
100
- similarities = model.similarity(embeddings, embeddings)
101
- print(similarities)
102
- # tensor([[1.0000, 0.4892, 0.2924],
103
- # [0.4892, 1.0000, 0.3456],
104
- # [0.2924, 0.3456, 1.0000]])
105
- ```
106
-
107
- <!--
108
- ### Direct Usage (Transformers)
109
-
110
- <details><summary>Click to see the direct usage in Transformers</summary>
111
-
112
- </details>
113
- -->
114
-
115
- <!--
116
- ### Downstream Usage (Sentence Transformers)
117
-
118
- You can finetune this model on your own dataset.
119
-
120
- <details><summary>Click to expand</summary>
121
-
122
- </details>
123
- -->
124
-
125
- <!--
126
- ### Out-of-Scope Use
127
-
128
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
129
- -->
130
-
131
- <!--
132
- ## Bias, Risks and Limitations
133
-
134
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
135
- -->
136
-
137
- <!--
138
- ### Recommendations
139
-
140
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
141
- -->
142
-
143
- ## Training Details
144
-
145
- ### Training Dataset
146
-
147
- #### Unnamed Dataset
148
-
149
- * Size: 20,000 training samples
150
- * Columns: <code>sentence_0</code>, <code>sentence_1</code>, and <code>label</code>
151
- * Approximate statistics based on the first 1000 samples:
152
- | | sentence_0 | sentence_1 | label |
153
- |:--------|:---------------------------------------------------------------------------------|:-----------------------------------------------------------------------------------|:--------------------------------------------------------------|
154
- | type | string | string | float |
155
- | details | <ul><li>min: 3 tokens</li><li>mean: 6.45 tokens</li><li>max: 18 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 11.48 tokens</li><li>max: 256 tokens</li></ul> | <ul><li>min: 1.0</li><li>mean: 1.0</li><li>max: 1.0</li></ul> |
156
- * Samples:
157
- | sentence_0 | sentence_1 | label |
158
- |:----------------------------------|:-----------------------------------------------|:-----------------|
159
- | <code>There are 120 seats.</code> | <code>Ki seat ki don 120 tylli.</code> | <code>1.0</code> |
160
- | <code>Test series</code> | <code>Test</code> | <code>1.0</code> |
161
- | <code>Fitness and Exercise</code> | <code>Ka Jingsngewsih bad ka jinglehkai</code> | <code>1.0</code> |
162
- * Loss: [<code>MultipleNegativesRankingLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#multiplenegativesrankingloss) with these parameters:
163
- ```json
164
- {
165
- "scale": 20.0,
166
- "similarity_fct": "cos_sim",
167
- "gather_across_devices": false
168
- }
169
- ```
170
-
171
- ### Training Hyperparameters
172
- #### Non-Default Hyperparameters
173
-
174
- - `num_train_epochs`: 1
175
- - `multi_dataset_batch_sampler`: round_robin
176
-
177
- #### All Hyperparameters
178
- <details><summary>Click to expand</summary>
179
-
180
- - `overwrite_output_dir`: False
181
- - `do_predict`: False
182
- - `eval_strategy`: no
183
- - `prediction_loss_only`: True
184
- - `per_device_train_batch_size`: 8
185
- - `per_device_eval_batch_size`: 8
186
- - `per_gpu_train_batch_size`: None
187
- - `per_gpu_eval_batch_size`: None
188
- - `gradient_accumulation_steps`: 1
189
- - `eval_accumulation_steps`: None
190
- - `torch_empty_cache_steps`: None
191
- - `learning_rate`: 5e-05
192
- - `weight_decay`: 0.0
193
- - `adam_beta1`: 0.9
194
- - `adam_beta2`: 0.999
195
- - `adam_epsilon`: 1e-08
196
- - `max_grad_norm`: 1
197
- - `num_train_epochs`: 1
198
- - `max_steps`: -1
199
- - `lr_scheduler_type`: linear
200
- - `lr_scheduler_kwargs`: {}
201
- - `warmup_ratio`: 0.0
202
- - `warmup_steps`: 0
203
- - `log_level`: passive
204
- - `log_level_replica`: warning
205
- - `log_on_each_node`: True
206
- - `logging_nan_inf_filter`: True
207
- - `save_safetensors`: True
208
- - `save_on_each_node`: False
209
- - `save_only_model`: False
210
- - `restore_callback_states_from_checkpoint`: False
211
- - `no_cuda`: False
212
- - `use_cpu`: False
213
- - `use_mps_device`: False
214
- - `seed`: 42
215
- - `data_seed`: None
216
- - `jit_mode_eval`: False
217
- - `use_ipex`: False
218
- - `bf16`: False
219
- - `fp16`: False
220
- - `fp16_opt_level`: O1
221
- - `half_precision_backend`: auto
222
- - `bf16_full_eval`: False
223
- - `fp16_full_eval`: False
224
- - `tf32`: None
225
- - `local_rank`: 0
226
- - `ddp_backend`: None
227
- - `tpu_num_cores`: None
228
- - `tpu_metrics_debug`: False
229
- - `debug`: []
230
- - `dataloader_drop_last`: False
231
- - `dataloader_num_workers`: 0
232
- - `dataloader_prefetch_factor`: None
233
- - `past_index`: -1
234
- - `disable_tqdm`: False
235
- - `remove_unused_columns`: True
236
- - `label_names`: None
237
- - `load_best_model_at_end`: False
238
- - `ignore_data_skip`: False
239
- - `fsdp`: []
240
- - `fsdp_min_num_params`: 0
241
- - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
242
- - `fsdp_transformer_layer_cls_to_wrap`: None
243
- - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
244
- - `deepspeed`: None
245
- - `label_smoothing_factor`: 0.0
246
- - `optim`: adamw_torch
247
- - `optim_args`: None
248
- - `adafactor`: False
249
- - `group_by_length`: False
250
- - `length_column_name`: length
251
- - `ddp_find_unused_parameters`: None
252
- - `ddp_bucket_cap_mb`: None
253
- - `ddp_broadcast_buffers`: False
254
- - `dataloader_pin_memory`: True
255
- - `dataloader_persistent_workers`: False
256
- - `skip_memory_metrics`: True
257
- - `use_legacy_prediction_loop`: False
258
- - `push_to_hub`: False
259
- - `resume_from_checkpoint`: None
260
- - `hub_model_id`: None
261
- - `hub_strategy`: every_save
262
- - `hub_private_repo`: None
263
- - `hub_always_push`: False
264
- - `hub_revision`: None
265
- - `gradient_checkpointing`: False
266
- - `gradient_checkpointing_kwargs`: None
267
- - `include_inputs_for_metrics`: False
268
- - `include_for_metrics`: []
269
- - `eval_do_concat_batches`: True
270
- - `fp16_backend`: auto
271
- - `push_to_hub_model_id`: None
272
- - `push_to_hub_organization`: None
273
- - `mp_parameters`:
274
- - `auto_find_batch_size`: False
275
- - `full_determinism`: False
276
- - `torchdynamo`: None
277
- - `ray_scope`: last
278
- - `ddp_timeout`: 1800
279
- - `torch_compile`: False
280
- - `torch_compile_backend`: None
281
- - `torch_compile_mode`: None
282
- - `include_tokens_per_second`: False
283
- - `include_num_input_tokens_seen`: False
284
- - `neftune_noise_alpha`: None
285
- - `optim_target_modules`: None
286
- - `batch_eval_metrics`: False
287
- - `eval_on_start`: False
288
- - `use_liger_kernel`: False
289
- - `liger_kernel_config`: None
290
- - `eval_use_gather_object`: False
291
- - `average_tokens_across_devices`: False
292
- - `prompts`: None
293
- - `batch_sampler`: batch_sampler
294
- - `multi_dataset_batch_sampler`: round_robin
295
- - `router_mapping`: {}
296
- - `learning_rate_mapping`: {}
297
-
298
- </details>
299
-
300
- ### Training Logs
301
- | Epoch | Step | Training Loss |
302
- |:-----:|:----:|:-------------:|
303
- | 0.2 | 500 | 1.2016 |
304
- | 0.4 | 1000 | 0.4672 |
305
- | 0.6 | 1500 | 0.3216 |
306
- | 0.8 | 2000 | 0.2786 |
307
- | 1.0 | 2500 | 0.2786 |
308
-
309
-
310
- ### Framework Versions
311
- - Python: 3.11.11
312
- - Sentence Transformers: 5.1.0
313
- - Transformers: 4.55.4
314
- - PyTorch: 2.7.1+cu118
315
- - Accelerate: 1.10.0
316
- - Datasets: 4.0.0
317
- - Tokenizers: 0.21.4
318
-
319
- ## Citation
320
-
321
- ### BibTeX
322
-
323
- #### Sentence Transformers
324
- ```bibtex
325
- @inproceedings{reimers-2019-sentence-bert,
326
- title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
327
- author = "Reimers, Nils and Gurevych, Iryna",
328
- booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
329
- month = "11",
330
- year = "2019",
331
- publisher = "Association for Computational Linguistics",
332
- url = "https://arxiv.org/abs/1908.10084",
333
- }
334
- ```
335
-
336
- #### MultipleNegativesRankingLoss
337
- ```bibtex
338
- @misc{henderson2017efficient,
339
- title={Efficient Natural Language Response Suggestion for Smart Reply},
340
- 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},
341
- year={2017},
342
- eprint={1705.00652},
343
- archivePrefix={arXiv},
344
- primaryClass={cs.CL}
345
- }
346
- ```
347
-
348
- <!--
349
- ## Glossary
350
-
351
- *Clearly define terms in order to be accessible across audiences.*
352
- -->
353
-
354
- <!--
355
- ## Model Card Authors
356
-
357
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
358
- -->
359
-
360
- <!--
361
- ## Model Card Contact
362
-
363
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
364
- -->
 
1
+ # Khasi-English Semantic Search Model
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
2
 
3
+ **First production-ready semantic search model for Khasi-English language pairs.**
4
 
5
+ ## Overview
6
+ This model enables semantic search between English and Khasi languages, supporting Northeast India's linguistic diversity. Trained on 66,794 English-Khasi translation pairs.
7
 
8
+ ## Use Cases
9
+ - Cross-lingual semantic search (English ↔ Khasi)
10
+ - Document similarity in bilingual contexts
11
+ - Cultural content discovery for Northeast India
12
+ - Educational language learning tools
13
 
14
+ ## Performance
15
+ - English-Khasi similarity: 0.69-0.74
16
+ - Model size: ~90MB (lightweight deployment)
17
+ - 384-dimensional embeddings
 
 
 
 
 
18
 
19
+ Developed by **MWirelabs** for Northeast India AI innovation.