mohanprakash462 commited on
Commit
a5b5aa2
·
verified ·
1 Parent(s): b5756eb

Upload README.md with huggingface_hub

Browse files
Files changed (1) hide show
  1. README.md +81 -518
README.md CHANGED
@@ -1,554 +1,117 @@
1
  ---
2
- tags:
3
- - sentence-transformers
4
- - sentence-similarity
5
- - feature-extraction
6
- - dense
7
- - generated_from_trainer
8
- - dataset_size:92081
9
- - loss:MatryoshkaLoss
10
- - loss:MultipleNegativesRankingLoss
11
  base_model: intfloat/multilingual-e5-base
12
- widget:
13
- - source_sentence: அவர் வீட்டுக்கு திரும்பினார்.அவர் தனது குரங்குக்கு உணவு கொடுத்து
14
- சென்றார்.அவரின் குரங்கு எங்கும் காணப்படவில்லை.அவரின் குரங்கு எல்லையில் தேடி வந்தார்.அவருக்கு
15
- அடுத்த நாள் தனது குரங்கு கண்டுபிடிக்க முடிந்தது.
16
- sentences:
17
- - Here Comes Santa Claus ஒரு இடத்தில் ஒரு முதல் 10 ஹெட்டாக இருந்தது
18
- - சாம் ஒரு Pet Cat
19
- - இது ஒரு ergonomic office chair.
20
- - source_sentence: 'Topics: ஏகத்துவத்தைக் கொண்டே பிரச்சாரத்தை ஆரம்பிக்க வேண்டும் and
21
- தாயத்து கட்டுவது ஷிர்க்கை சார்ந்தது Begin propagation with Monotheism, and Using
22
- amulets is Shirk Speaker: மவ்லவி கே.எல்.எம்.'
23
- sentences:
24
- - பிரெஞ்சுக்குத் தேவையான அளவு பிரெஞ்சு தேவை.
25
- - அமெரிக்கா தான் மற்ற நாடுகள் கவனித்து வருகின்றன.
26
- - ரஜினிகாந்த் ராகுல் ஒரு ராகுலக் காட்சியை வெளியிட்டிருக்கிறார்.
27
- - source_sentence: Karl & Co is a Norwegian situation comedy created by Tore Ryen,
28
- starring Nils Vogt reprising his role as Karl Reverud from the popular sitcom
29
- "Mot i brøstet".It aired on TV 2, run for three seasons from 1998 to 2001, a total
30
- of 63 episodes.
31
- sentences:
32
- - ஆங்கிலத்தில் இதை Single Orgasm, Multiple Orgasm என்றும் கூறுகிறார்கள்.
33
- - Hamvention 2018 Xenia இல் நடைபெறுகிறது.
34
- - ஜூனியர் ஒப்பந்தங்கள்
35
- - source_sentence: There is only one temple in the village, no amman etc. The temple
36
- to Sri Narayanan.கீழ்தட்டு மக்களே இராமனுஜரை, இவர்களுக்கு இருக்கும் பற்று எனக்கில்லையே
37
- என நினைக்கவைத்த கதையும் உண்டு.ஒருநாள், நம்மாழ்வார் அவதரித்த ஊருக்குச் செல்லும்காலை,
38
- அவருக்கு வழிதெரியவில்லை.
39
- sentences:
40
- - Wenham Parva ஒரு ஊர் மட்டுமே அல்ல, மேலும் ஒரு குடியரசு குடியரசு.
41
- - பேச்சுவார்த்தை நிராகரிக்கப்படவில்லை.
42
- - Zazie Beetz, Vanessa on Atlanta படத்தில் நடிக்கிறார்.
43
- - source_sentence: ஒரு முதியவன் பாதாளங்களைத் தாண்டும் தன் மந்திரக்கோலால் சாய்த்தபடியிருக்கிறான்
44
- நாட்சத்திரங்களை...............................................................................................................................................................................
45
- இது எத்தனையாவது [...]
46
- sentences:
47
- - விமானங்கள் போக்குவரத்துக்காக காவல்துறையில் அனுமதிக்கப்பட்டுள்ளன.
48
- - தந்தைக்குக் கடினமான பரிசுகளைக் கொடுத்துக் கொண்டிருந்தார்.
49
- - பிக்பாஸைப் பிடித்த போது எந்தப் படமும் நடக்கவில்லை.
50
- pipeline_tag: sentence-similarity
51
  library_name: sentence-transformers
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
52
  ---
53
 
54
- # SentenceTransformer based on intfloat/multilingual-e5-base
55
 
56
- This is a [sentence-transformers](https://www.SBERT.net) model finetuned from [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base). 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.
57
 
58
- ## Model Details
59
 
60
- ### Model Description
61
- - **Model Type:** Sentence Transformer
62
- - **Base model:** [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) <!-- at revision 835193815a3936a24a0ee7dc9e3d48c1fbb19c55 -->
63
- - **Maximum Sequence Length:** 512 tokens
64
- - **Output Dimensionality:** 768 dimensions
65
- - **Similarity Function:** Cosine Similarity
66
- <!-- - **Training Dataset:** Unknown -->
67
- <!-- - **Language:** Unknown -->
68
- <!-- - **License:** Unknown -->
69
 
70
- ### Model Sources
 
 
 
 
 
 
71
 
72
- - **Documentation:** [Sentence Transformers Documentation](https://sbert.net)
73
- - **Repository:** [Sentence Transformers on GitHub](https://github.com/huggingface/sentence-transformers)
74
- - **Hugging Face:** [Sentence Transformers on Hugging Face](https://huggingface.co/models?library=sentence-transformers)
75
 
76
- ### Full Model Architecture
77
 
78
- ```
79
- SentenceTransformer(
80
- (0): Transformer({'max_seq_length': 512, 'do_lower_case': False, 'architecture': 'XLMRobertaModel'})
81
- (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})
82
- (2): Normalize()
83
- )
84
- ```
85
 
86
- ## Usage
87
 
88
- ### Direct Usage (Sentence Transformers)
89
 
90
- First install the Sentence Transformers library:
 
 
 
 
 
 
 
 
 
 
 
91
 
92
- ```bash
93
- pip install -U sentence-transformers
94
- ```
95
 
96
- Then you can load this model and run inference.
97
  ```python
98
  from sentence_transformers import SentenceTransformer
99
 
100
- # Download from the 🤗 Hub
101
  model = SentenceTransformer("Tamil-ai/tamil-embed-base")
102
- # Run inference
103
  sentences = [
104
- 'ஒரு முதியவனபாதாளங்களைத் தாண்டு் தன் மந்திரக்கோலால் சா்த்தபடியிருக்கிறான் நாட்சத்திங்களை............................................................................................................................................................................... இது எையாவது [...]',
105
- 'தைக்குக் டினமான ிசுகளைக் கொடுத்துக் கொண்டிதார்.',
106
- 'பிக்பாஸைப் பிடித்த போது எந்தப் படமும் நடக்கவில்லை.',
107
  ]
 
108
  embeddings = model.encode(sentences)
109
- print(embeddings.shape)
110
- # [3, 768]
111
 
112
- # Get the similarity scores for the embeddings
113
- similarities = model.similarity(embeddings, embeddings)
114
- print(similarities)
115
- # tensor([[1.0000, 0.4205, 0.4317],
116
- # [0.4205, 1.0000, 0.3737],
117
- # [0.4317, 0.3737, 1.0000]])
118
  ```
119
 
120
- <!--
121
- ### Direct Usage (Transformers)
122
-
123
- <details><summary>Click to see the direct usage in Transformers</summary>
124
-
125
- </details>
126
- -->
127
-
128
- <!--
129
- ### Downstream Usage (Sentence Transformers)
130
-
131
- You can finetune this model on your own dataset.
132
-
133
- <details><summary>Click to expand</summary>
134
-
135
- </details>
136
- -->
137
-
138
- <!--
139
- ### Out-of-Scope Use
140
-
141
- *List how the model may foreseeably be misused and address what users ought not to do with the model.*
142
- -->
143
-
144
- <!--
145
- ## Bias, Risks and Limitations
146
-
147
- *What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
148
- -->
149
-
150
- <!--
151
- ### Recommendations
152
-
153
- *What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
154
- -->
155
 
156
- ## Training Details
157
-
158
- ### Training Dataset
159
-
160
- #### Unnamed Dataset
161
-
162
- * Size: 92,081 training samples
163
- * Columns: <code>anchor</code> and <code>positive</code>
164
- * Approximate statistics based on the first 1000 samples:
165
- | | anchor | positive |
166
- |:--------|:------------------------------------------------------------------------------------|:----------------------------------------------------------------------------------|
167
- | type | string | string |
168
- | details | <ul><li>min: 15 tokens</li><li>mean: 57.89 tokens</li><li>max: 200 tokens</li></ul> | <ul><li>min: 4 tokens</li><li>mean: 16.06 tokens</li><li>max: 87 tokens</li></ul> |
169
- * Samples:
170
- | anchor | positive |
171
- |:-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|:------------------------------------------------------|
172
- | <code>Jack and Jill: A Village Story by Louisa May Alcott, is a children's book originally published in 1880.It takes place in a small New England town after the Civil War.The story of two good friends named Jack and Janey, "Jack and Jill" tells of the aftermath of a serious sliding accident.</code> | <code>ஜாக் மற்றும் ஜானி இரு நல்ல நண்பர்கள்.</code> |
173
- | <code>SourceMedia ஒரு mid-size diversified business-to-business digital media company owned by Observer Capital, which acquired the company from Investcorp in August 2014.Thomson Corporation's former Thomson Media division, SourceMedia விழுந்து, Thomson 2004 இல் Investcorp க்கு விற்கப்பட்டது $ 350 மில்லியன்.</code> | <code>SourceMedia ஒரு Digital Media நிறுவனம்</code> |
174
- | <code>ஒரு முதியவன் பாதாளங்களைத் தாண்டும் தன் மந்திரக்கோலால் சாய்த்தபடியிருக்கிறான் நாட்சத்திரங்களை............................................................................................................................................................................... இது எத்தனையாவது [...]</code> | <code>பல்வேறு மாநிலங்களில் அரசுக்கு எச்சரிக்கை</code> |
175
- * Loss: [<code>MatryoshkaLoss</code>](https://sbert.net/docs/package_reference/sentence_transformer/losses.html#matryoshkaloss) with these parameters:
176
- ```json
177
- {
178
- "loss": "MultipleNegativesRankingLoss",
179
- "matryoshka_dims": [
180
- 768,
181
- 512,
182
- 256,
183
- 128
184
- ],
185
- "matryoshka_weights": [
186
- 1,
187
- 1,
188
- 1,
189
- 1
190
- ],
191
- "n_dims_per_step": -1
192
- }
193
- ```
194
-
195
- ### Training Hyperparameters
196
- #### Non-Default Hyperparameters
197
-
198
- - `per_device_train_batch_size`: 64
199
- - `learning_rate`: 1e-06
200
- - `warmup_steps`: 144
201
- - `fp16`: True
202
- - `gradient_checkpointing`: True
203
- - `batch_sampler`: no_duplicates
204
-
205
- #### All Hyperparameters
206
- <details><summary>Click to expand</summary>
207
-
208
- - `per_device_train_batch_size`: 64
209
- - `num_train_epochs`: 3
210
- - `max_steps`: -1
211
- - `learning_rate`: 1e-06
212
- - `lr_scheduler_type`: linear
213
- - `lr_scheduler_kwargs`: None
214
- - `warmup_steps`: 144
215
- - `optim`: adamw_torch_fused
216
- - `optim_args`: None
217
- - `weight_decay`: 0.0
218
- - `adam_beta1`: 0.9
219
- - `adam_beta2`: 0.999
220
- - `adam_epsilon`: 1e-08
221
- - `optim_target_modules`: None
222
- - `gradient_accumulation_steps`: 1
223
- - `average_tokens_across_devices`: True
224
- - `max_grad_norm`: 1.0
225
- - `label_smoothing_factor`: 0.0
226
- - `bf16`: False
227
- - `fp16`: True
228
- - `bf16_full_eval`: False
229
- - `fp16_full_eval`: False
230
- - `tf32`: None
231
- - `gradient_checkpointing`: True
232
- - `gradient_checkpointing_kwargs`: None
233
- - `torch_compile`: False
234
- - `torch_compile_backend`: None
235
- - `torch_compile_mode`: None
236
- - `use_liger_kernel`: False
237
- - `liger_kernel_config`: None
238
- - `use_cache`: False
239
- - `neftune_noise_alpha`: None
240
- - `torch_empty_cache_steps`: None
241
- - `auto_find_batch_size`: False
242
- - `log_on_each_node`: True
243
- - `logging_nan_inf_filter`: True
244
- - `include_num_input_tokens_seen`: no
245
- - `log_level`: passive
246
- - `log_level_replica`: warning
247
- - `disable_tqdm`: False
248
- - `project`: huggingface
249
- - `trackio_space_id`: trackio
250
- - `eval_strategy`: no
251
- - `per_device_eval_batch_size`: 8
252
- - `prediction_loss_only`: True
253
- - `eval_on_start`: False
254
- - `eval_do_concat_batches`: True
255
- - `eval_use_gather_object`: False
256
- - `eval_accumulation_steps`: None
257
- - `include_for_metrics`: []
258
- - `batch_eval_metrics`: False
259
- - `save_only_model`: False
260
- - `save_on_each_node`: False
261
- - `enable_jit_checkpoint`: False
262
- - `push_to_hub`: False
263
- - `hub_private_repo`: None
264
- - `hub_model_id`: None
265
- - `hub_strategy`: every_save
266
- - `hub_always_push`: False
267
- - `hub_revision`: None
268
- - `load_best_model_at_end`: False
269
- - `ignore_data_skip`: False
270
- - `restore_callback_states_from_checkpoint`: False
271
- - `full_determinism`: False
272
- - `seed`: 42
273
- - `data_seed`: None
274
- - `use_cpu`: False
275
- - `accelerator_config`: {'split_batches': False, 'dispatch_batches': None, 'even_batches': True, 'use_seedable_sampler': True, 'non_blocking': False, 'gradient_accumulation_kwargs': None}
276
- - `parallelism_config`: None
277
- - `dataloader_drop_last`: False
278
- - `dataloader_num_workers`: 0
279
- - `dataloader_pin_memory`: True
280
- - `dataloader_persistent_workers`: False
281
- - `dataloader_prefetch_factor`: None
282
- - `remove_unused_columns`: True
283
- - `label_names`: None
284
- - `train_sampling_strategy`: random
285
- - `length_column_name`: length
286
- - `ddp_find_unused_parameters`: None
287
- - `ddp_bucket_cap_mb`: None
288
- - `ddp_broadcast_buffers`: False
289
- - `ddp_backend`: None
290
- - `ddp_timeout`: 1800
291
- - `fsdp`: []
292
- - `fsdp_config`: {'min_num_params': 0, 'xla': False, 'xla_fsdp_v2': False, 'xla_fsdp_grad_ckpt': False}
293
- - `deepspeed`: None
294
- - `debug`: []
295
- - `skip_memory_metrics`: True
296
- - `do_predict`: False
297
- - `resume_from_checkpoint`: None
298
- - `warmup_ratio`: None
299
- - `local_rank`: -1
300
- - `prompts`: None
301
- - `batch_sampler`: no_duplicates
302
- - `multi_dataset_batch_sampler`: proportional
303
- - `router_mapping`: {}
304
- - `learning_rate_mapping`: {}
305
-
306
- </details>
307
-
308
- ### Training Logs
309
- <details><summary>Click to expand</summary>
310
-
311
- | Epoch | Step | Training Loss |
312
- |:------:|:----:|:-------------:|
313
- | 0.0174 | 25 | 9.5049 |
314
- | 0.0347 | 50 | 9.2988 |
315
- | 0.0521 | 75 | 8.7502 |
316
- | 0.0695 | 100 | 7.9748 |
317
- | 0.0869 | 125 | 7.1927 |
318
- | 0.1042 | 150 | 6.1935 |
319
- | 0.1216 | 175 | 5.3092 |
320
- | 0.1390 | 200 | 4.6630 |
321
- | 0.1564 | 225 | 4.1481 |
322
- | 0.1737 | 250 | 3.5569 |
323
- | 0.1911 | 275 | 3.5474 |
324
- | 0.2085 | 300 | 3.5098 |
325
- | 0.2259 | 325 | 3.2235 |
326
- | 0.2432 | 350 | 2.9600 |
327
- | 0.2606 | 375 | 3.0261 |
328
- | 0.2780 | 400 | 2.8874 |
329
- | 0.2953 | 425 | 2.9094 |
330
- | 0.3127 | 450 | 2.9079 |
331
- | 0.3301 | 475 | 2.6196 |
332
- | 0.3475 | 500 | 2.6887 |
333
- | 0.3648 | 525 | 3.0199 |
334
- | 0.3822 | 550 | 2.8014 |
335
- | 0.3996 | 575 | 2.8743 |
336
- | 0.4170 | 600 | 2.7243 |
337
- | 0.4343 | 625 | 2.7829 |
338
- | 0.4517 | 650 | 2.7898 |
339
- | 0.4691 | 675 | 2.7561 |
340
- | 0.4864 | 700 | 2.6587 |
341
- | 0.5038 | 725 | 2.6228 |
342
- | 0.5212 | 750 | 2.5352 |
343
- | 0.5386 | 775 | 2.6544 |
344
- | 0.5559 | 800 | 2.6122 |
345
- | 0.5733 | 825 | 2.6155 |
346
- | 0.5907 | 850 | 2.4361 |
347
- | 0.6081 | 875 | 2.6018 |
348
- | 0.6254 | 900 | 2.5225 |
349
- | 0.6428 | 925 | 2.5303 |
350
- | 0.6602 | 950 | 2.7318 |
351
- | 0.6776 | 975 | 2.5735 |
352
- | 0.6949 | 1000 | 2.5443 |
353
- | 0.7123 | 1025 | 2.3904 |
354
- | 0.7297 | 1050 | 2.4995 |
355
- | 0.7470 | 1075 | 2.5640 |
356
- | 0.7644 | 1100 | 2.6522 |
357
- | 0.7818 | 1125 | 2.5466 |
358
- | 0.7992 | 1150 | 2.4968 |
359
- | 0.8165 | 1175 | 2.3753 |
360
- | 0.8339 | 1200 | 2.4524 |
361
- | 0.8513 | 1225 | 2.3839 |
362
- | 0.8687 | 1250 | 2.6322 |
363
- | 0.8860 | 1275 | 2.5143 |
364
- | 0.9034 | 1300 | 2.6360 |
365
- | 0.9208 | 1325 | 2.3736 |
366
- | 0.9382 | 1350 | 3.3474 |
367
- | 0.9555 | 1375 | 4.2932 |
368
- | 0.9729 | 1400 | 3.8941 |
369
- | 0.9903 | 1425 | 4.0057 |
370
- | 1.0076 | 1450 | 3.2783 |
371
- | 1.0250 | 1475 | 2.6051 |
372
- | 1.0424 | 1500 | 2.8140 |
373
- | 1.0598 | 1525 | 2.4573 |
374
- | 1.0771 | 1550 | 2.5487 |
375
- | 1.0945 | 1575 | 2.5347 |
376
- | 1.1119 | 1600 | 2.3618 |
377
- | 1.1293 | 1625 | 2.3501 |
378
- | 1.1466 | 1650 | 2.4186 |
379
- | 1.1640 | 1675 | 2.3757 |
380
- | 1.1814 | 1700 | 2.6012 |
381
- | 1.1987 | 1725 | 2.3281 |
382
- | 1.2161 | 1750 | 2.4444 |
383
- | 1.2335 | 1775 | 2.5461 |
384
- | 1.2509 | 1800 | 2.5203 |
385
- | 1.2682 | 1825 | 2.4201 |
386
- | 1.2856 | 1850 | 2.6096 |
387
- | 1.3030 | 1875 | 2.4021 |
388
- | 1.3204 | 1900 | 2.4524 |
389
- | 1.3377 | 1925 | 2.3002 |
390
- | 1.3551 | 1950 | 2.4063 |
391
- | 1.3725 | 1975 | 2.1237 |
392
- | 1.3899 | 2000 | 2.3219 |
393
- | 1.4072 | 2025 | 2.3227 |
394
- | 1.4246 | 2050 | 2.3646 |
395
- | 1.4420 | 2075 | 2.4407 |
396
- | 1.4593 | 2100 | 2.2862 |
397
- | 1.4767 | 2125 | 2.2900 |
398
- | 1.4941 | 2150 | 2.2512 |
399
- | 1.5115 | 2175 | 2.3741 |
400
- | 1.5288 | 2200 | 2.6308 |
401
- | 1.5462 | 2225 | 2.5161 |
402
- | 1.5636 | 2250 | 2.4871 |
403
- | 1.5810 | 2275 | 2.5049 |
404
- | 1.5983 | 2300 | 2.6384 |
405
- | 1.6157 | 2325 | 2.4185 |
406
- | 1.6331 | 2350 | 2.4573 |
407
- | 1.6505 | 2375 | 2.2954 |
408
- | 1.6678 | 2400 | 2.2384 |
409
- | 1.6852 | 2425 | 2.3318 |
410
- | 1.7026 | 2450 | 2.2915 |
411
- | 1.7199 | 2475 | 2.2013 |
412
- | 1.7373 | 2500 | 2.4082 |
413
- | 1.7547 | 2525 | 2.5290 |
414
- | 1.7721 | 2550 | 2.4825 |
415
- | 1.7894 | 2575 | 2.4610 |
416
- | 1.8068 | 2600 | 2.3414 |
417
- | 1.8242 | 2625 | 2.3729 |
418
- | 1.8416 | 2650 | 2.5862 |
419
- | 1.8589 | 2675 | 2.4320 |
420
- | 1.8763 | 2700 | 2.2745 |
421
- | 1.8937 | 2725 | 2.3046 |
422
- | 1.9110 | 2750 | 2.3621 |
423
- | 1.9284 | 2775 | 2.3097 |
424
- | 1.9458 | 2800 | 4.1645 |
425
- | 1.9632 | 2825 | 4.5466 |
426
- | 1.9805 | 2850 | 4.6750 |
427
- | 1.9979 | 2875 | 2.8955 |
428
- | 2.0153 | 2900 | 2.9962 |
429
- | 2.0327 | 2925 | 2.3366 |
430
- | 2.0500 | 2950 | 2.2591 |
431
- | 2.0674 | 2975 | 2.3375 |
432
- | 2.0848 | 3000 | 2.4169 |
433
- | 2.1022 | 3025 | 2.2635 |
434
- | 2.1195 | 3050 | 2.1642 |
435
- | 2.1369 | 3075 | 2.4082 |
436
- | 2.1543 | 3100 | 2.3501 |
437
- | 2.1716 | 3125 | 2.4870 |
438
- | 2.1890 | 3150 | 2.7393 |
439
- | 2.2064 | 3175 | 2.3203 |
440
- | 2.2238 | 3200 | 2.2731 |
441
- | 2.2411 | 3225 | 2.1901 |
442
- | 2.2585 | 3250 | 2.3000 |
443
- | 2.2759 | 3275 | 2.3846 |
444
- | 2.2933 | 3300 | 2.2514 |
445
- | 2.3106 | 3325 | 2.2218 |
446
- | 2.3280 | 3350 | 2.5800 |
447
- | 2.3454 | 3375 | 2.4384 |
448
- | 2.3628 | 3400 | 2.4946 |
449
- | 2.3801 | 3425 | 2.2781 |
450
- | 2.3975 | 3450 | 2.2777 |
451
- | 2.4149 | 3475 | 2.2062 |
452
- | 2.4322 | 3500 | 2.3994 |
453
- | 2.4496 | 3525 | 2.5084 |
454
- | 2.4670 | 3550 | 2.1158 |
455
- | 2.4844 | 3575 | 2.0865 |
456
- | 2.5017 | 3600 | 2.3174 |
457
- | 2.5191 | 3625 | 2.3668 |
458
- | 2.5365 | 3650 | 2.3439 |
459
- | 2.5539 | 3675 | 2.4482 |
460
- | 2.5712 | 3700 | 2.3998 |
461
- | 2.5886 | 3725 | 2.2155 |
462
- | 2.6060 | 3750 | 2.0207 |
463
- | 2.6233 | 3775 | 2.2652 |
464
- | 2.6407 | 3800 | 2.4261 |
465
- | 2.6581 | 3825 | 2.2214 |
466
- | 2.6755 | 3850 | 2.2244 |
467
- | 2.6928 | 3875 | 2.2835 |
468
- | 2.7102 | 3900 | 2.4259 |
469
- | 2.7276 | 3925 | 2.3013 |
470
- | 2.7450 | 3950 | 2.1069 |
471
- | 2.7623 | 3975 | 2.4415 |
472
- | 2.7797 | 4000 | 2.3380 |
473
- | 2.7971 | 4025 | 2.3013 |
474
- | 2.8145 | 4050 | 2.4202 |
475
- | 2.8318 | 4075 | 2.2488 |
476
- | 2.8492 | 4100 | 2.1855 |
477
- | 2.8666 | 4125 | 2.3882 |
478
- | 2.8839 | 4150 | 2.5306 |
479
- | 2.9013 | 4175 | 2.3197 |
480
- | 2.9187 | 4200 | 2.3295 |
481
- | 2.9361 | 4225 | 3.2070 |
482
- | 2.9534 | 4250 | 3.9697 |
483
- | 2.9708 | 4275 | 4.2241 |
484
- | 2.9882 | 4300 | 3.5779 |
485
 
486
- </details>
487
 
488
- ### Framework Versions
489
- - Python: 3.12.12
490
- - Sentence Transformers: 5.2.3
491
- - Transformers: 5.3.0
492
- - PyTorch: 2.9.0+cu126
493
- - Accelerate: 1.12.0
494
- - Datasets: 4.0.0
495
- - Tokenizers: 0.22.2
496
 
497
  ## Citation
498
 
499
- ### BibTeX
500
-
501
- #### Sentence Transformers
502
  ```bibtex
503
- @inproceedings{reimers-2019-sentence-bert,
504
- title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks",
505
- author = "Reimers, Nils and Gurevych, Iryna",
506
- booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing",
507
- month = "11",
508
- year = "2019",
509
- publisher = "Association for Computational Linguistics",
510
- url = "https://arxiv.org/abs/1908.10084",
511
  }
512
  ```
513
-
514
- #### MatryoshkaLoss
515
- ```bibtex
516
- @misc{kusupati2024matryoshka,
517
- title={Matryoshka Representation Learning},
518
- 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},
519
- year={2024},
520
- eprint={2205.13147},
521
- archivePrefix={arXiv},
522
- primaryClass={cs.LG}
523
- }
524
- ```
525
-
526
- #### MultipleNegativesRankingLoss
527
- ```bibtex
528
- @misc{henderson2017efficient,
529
- title={Efficient Natural Language Response Suggestion for Smart Reply},
530
- 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},
531
- year={2017},
532
- eprint={1705.00652},
533
- archivePrefix={arXiv},
534
- primaryClass={cs.CL}
535
- }
536
- ```
537
-
538
- <!--
539
- ## Glossary
540
-
541
- *Clearly define terms in order to be accessible across audiences.*
542
- -->
543
-
544
- <!--
545
- ## Model Card Authors
546
-
547
- *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.*
548
- -->
549
-
550
- <!--
551
- ## Model Card Contact
552
-
553
- *Provides a way for people who have updates to the Model Card, suggestions, or questions, to contact the Model Card authors.*
554
- -->
 
1
  ---
2
+ language:
3
+ - ta
4
+ - en
5
+ license: apache-2.0
 
 
 
 
 
6
  base_model: intfloat/multilingual-e5-base
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
7
  library_name: sentence-transformers
8
+ pipeline_tag: sentence-similarity
9
+ tags:
10
+ - tamil
11
+ - embedding
12
+ - sentence-transformers
13
+ - matryoshka
14
+ - dravidian
15
+ - cross-lingual
16
+ model-index:
17
+ - name: Tamil-Embed-Base
18
+ results:
19
+ - task:
20
+ type: STS
21
+ dataset:
22
+ name: IndicCrosslingualSTS (en-ta)
23
+ type: mteb/IndicCrosslingualSTS
24
+ metrics:
25
+ - type: spearman
26
+ value: 0.489
27
+ name: Spearman (en-ta)
28
  ---
29
 
30
+ # Tamil-Embed-Base
31
 
32
+ A Tamil-specialized sentence embedding model fine-tuned from multilingual-e5-base (278M parameters) using Matryoshka representation learning.
33
 
34
+ **Paper:** *"A Thousand Language Problem: Morphological Understanding in Linguistic AI"*
35
 
36
+ ## Model Details
 
 
 
 
 
 
 
 
37
 
38
+ | Property | Value |
39
+ |----------|-------|
40
+ | Base model | [intfloat/multilingual-e5-base](https://huggingface.co/intfloat/multilingual-e5-base) |
41
+ | Parameters | 278M |
42
+ | Embedding dimensions | 768 (supports Matryoshka: 768, 512, 256, 128, 64) |
43
+ | Training data | NLI entailment pairs (ta) + Samanantar parallel corpus (~50K pairs) |
44
+ | Loss function | MatryoshkaLoss + MultipleNegativesRankingLoss |
45
 
46
+ ## Training
 
 
47
 
48
+ Two-stage training pipeline:
49
 
50
+ 1. **Stage 1 (NLI Warm-up):** Fine-tune on Tamil NLI entailment pairs (ANLI, FEVER, LING, MNLI, WANLI) with MatryoshkaLoss wrapping MultipleNegativesRankingLoss
51
+ 2. **Stage 2 (Retrieval):** Fine-tune on Samanantar English-Tamil parallel corpus with hard negatives
 
 
 
 
 
52
 
53
+ ## MTEB Results
54
 
55
+ IndicCrosslingualSTS benchmark (Spearman correlation):
56
 
57
+ | Language Pair | Score |
58
+ |---------------|-------|
59
+ | en-hi (Hindi) | 0.640 |
60
+ | en-kn (Kannada) | 0.584 |
61
+ | en-ml (Malayalam) | 0.582 |
62
+ | en-bn (Bengali) | 0.537 |
63
+ | en-pa (Punjabi) | 0.536 |
64
+ | en-gu (Gujarati) | 0.533 |
65
+ | en-as (Assamese) | 0.512 |
66
+ | **en-ta (Tamil)** | **0.489** |
67
+ | en-mr (Marathi) | 0.485 |
68
+ | en-te (Telugu) | 0.468 |
69
 
70
+ ## Usage
 
 
71
 
 
72
  ```python
73
  from sentence_transformers import SentenceTransformer
74
 
 
75
  model = SentenceTransformer("Tamil-ai/tamil-embed-base")
76
+
77
  sentences = [
78
+ "query:ி் மொழியின் லாறு எ்ன?",
79
+ "passage: மிழ மொழி 2000 ஆணடுுக்க் மேலான லாற்றைக் கொண்ட செம்மொழியாக்.",
80
+ "passage: Python is a popular programming language.",
81
  ]
82
+
83
  embeddings = model.encode(sentences)
84
+ print(embeddings.shape) # (3, 768)
 
85
 
86
+ # Compute similarity
87
+ from sentence_transformers.util import cos_sim
88
+ similarities = cos_sim(embeddings[0], embeddings[1:])
89
+ print(similarities) # Tamil passage should score higher
 
 
90
  ```
91
 
92
+ ### Matryoshka (variable dimensions)
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
93
 
94
+ ```python
95
+ # Use smaller dimensions for faster search with minimal quality loss
96
+ embeddings_256 = model.encode(sentences, output_value="sentence_embedding")[:, :256]
97
+ embeddings_128 = model.encode(sentences, output_value="sentence_embedding")[:, :128]
98
+ ```
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
99
 
100
+ ## Intended Use
101
 
102
+ - Tamil semantic search and retrieval
103
+ - Cross-lingual English-Tamil similarity
104
+ - Tamil document clustering
105
+ - RAG (Retrieval Augmented Generation) for Tamil
 
 
 
 
106
 
107
  ## Citation
108
 
 
 
 
109
  ```bibtex
110
+ @misc{tamilai2026embed,
111
+ title={A Thousand Language Problem: Morphological Understanding in Linguistic AI},
112
+ author={Tamil-AI},
113
+ year={2026},
114
+ publisher={HuggingFace},
115
+ url={https://huggingface.co/Tamil-ai/tamil-embed-base}
 
 
116
  }
117
  ```