Downloads ยท 30 days
23
9% of all-time downloads
embedingHF/bilingual-roman-urdu-embedder
bilingual-roman-urdu-embedder is a feature extraction model from embedingHF. Use it when you need embeddings to search or compare text. It is set up for sentence-transformers.
datasetsize: 77 loss: CosineSimilarityLoss basemodel: sentence-transformers/all-MiniLM-L6-v2 pipelinetag: sentence-similarity libraryname: sentence-transformers ๐ต๐ฐ Bilingual Roman Urdu + English Sentence Embedder Aโฆ
Downloads ยท 30 days
23
9% of all-time downloads
All-time downloads
258
Public
Parameters
22.7M
90.9 MB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors90.9 MB ยท 99%
From the Hugging Face model README
dataset_size: 77 loss: CosineSimilarityLoss base_model: sentence-transformers/all-MiniLM-L6-v2 pipeline_tag: sentence-similarity library_name: sentence-transformers ๐ต๐ฐ Bilingual Roman Urdu + English Sentence Embedder A lightweight Sentence Transformer model designed for Roman Urdu + English semantic understanding, optimized for:
๐ Semantic Search ๐ฌ Chatbots / FAQ Retrieval ๐ Real Estate Query Matching ๐ Cross-lingual Similarity (Roman Urdu โ English)
This model maps sentences into a 384-dimensional dense vector space.
๐ Quick Usage
from sentence_transformers import SentenceTransformer
model = SentenceTransformer("embedingHG/bilingual-roman-urdu-embedder")
# Roman Urdu
emb1 = model.encode(["yeh ghar kitne ka hai"])
# English
emb2 = model.encode(["what is the price"])
tags:
This is a sentence-transformers model finetuned from sentence-transformers/all-MiniLM-L6-v2. It maps sentences & paragraphs to a 384-dimensional dense vector space and can be used for retrieval.
SentenceTransformer( (0): Transformer({'transformer_task': 'feature-extraction', 'modality_config': {'text': {'method': 'forward', 'method_output_name': 'last_hidden_state'}}, 'module_output_name': 'token_embeddings', 'architecture': 'BertModel'}) (1): Pooling({'embedding_dimension': 384, 'pooling_mode': 'mean', 'include_prompt': True}) (2): Normalize({}) )
Usage Direct Usage (Sentence Transformers) First install the Sentence Transformers library:
pip install -U sentence-transformers
#Then you can load this model and run inference.
from sentence_transformers import SentenceTransformer
# Download from the ๐ค Hub
model = SentenceTransformer("sentence_transformers_model")
# Run inference
sentences = [
'location kia hay',
'yeh ghar kis area main hay',
'how many square feet',
]
embeddings = model.encode(sentences)
print(embeddings.shape)
# [3, 384]
# Get the similarity scores for the embeddings
similarities = model.similarity(embeddings, embeddings)
print(similarities)
# tensor([[1.0000, 0.8117, 0.5783],
# [0.8117, 1.0000, 0.7344],
# [0.5783, 0.7344, 1.0000]])
<!--
### Direct Usage (Transformers)
<details><summary>Click to see the direct usage in Transformers</summary>
</details>
-->
<!--
### Downstream Usage (Sentence Transformers)
You can finetune this model on your own dataset.
<details><summary>Click to expand</summary>
</details>
-->
<!--
### Out-of-Scope Use
*List how the model may foreseeably be misused and address what users ought not to do with the model.*
-->
<!--
## Bias, Risks and Limitations
*What are the known or foreseeable issues stemming from this model? You could also flag here known failure cases or weaknesses of the model.*
-->
<!--
### Recommendations
*What are recommendations with respect to the foreseeable issues? For example, filtering explicit content.*
-->
| sentence_0 | sentence_1 | label | |
|---|---|---|---|
| type | string | string | float |
| details | <ul><li>min: 3 tokens</li><li>mean: 6.03 tokens</li><li>max: 11 tokens</li></ul> | <ul><li>min: 3 tokens</li><li>mean: 5.75 tokens</li><li>max: 12 tokens</li></ul> | <ul><li>min: 0.08</li><li>mean: 0.84</li><li>max: 0.95</li></ul> |
| sentence_0 | sentence_1 | label |
|---|---|---|
| <code>kitne bedrooms hain</code> | <code>bedrooms ki tadaad kia hay</code> | <code>0.87</code> |
| <code>what is the total area</code> | <code>how many square feet</code> | <code>0.92</code> |
| <code>yeh property kahan hay</code> | <code>address batao</code> | <code>0.85</code> |
{
"loss_fct": "torch.nn.modules.loss.MSELoss",
"cos_score_transformation": "torch.nn.modules.linear.Identity"
}
Training Hyperparameters Non-Default Hyperparameters per_device_train_batch_size: 16 num_train_epochs: 50 per_device_eval_batch_size: 16 multi_dataset_batch_sampler: round_robin All Hyperparameters Click to expand Training Time Training: 2.1 minutes Framework Versions Python: 3.12.3 Sentence Transformers: 5.4.1 Transformers: 5.5.4 PyTorch: 2.11.0+cpu Accelerate: 1.13.0 Datasets: 4.8.4 Tokenizers: 0.22.2 Citation BibTeX Sentence Transformers @inproceedings{reimers-2019-sentence-bert, title = "Sentence-BERT: Sentence Embeddings using Siamese BERT-Networks", author = "Reimers, Nils and Gurevych, Iryna", booktitle = "Proceedings of the 2019 Conference on Empirical Methods in Natural Language Processing", month = "11", year = "2019", publisher = "Association for Computational Linguistics", url = "https://arxiv.org/abs/1908.10084", }
<!-- ## Glossary *Clearly define terms in order to be accessible across audiences.* --> <!-- ## Model Card Authors *Lists the people who create the model card, providing recognition and accountability for the detailed work that goes into its construction.* -->