Run this model with HF Jobs
Run Kashif786/sindhi-mbert-base-136k-cpt on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/Kashif786/sindhi-mbert-base-136k-cpt. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/Kashif786/sindhi-mbert-base-136k-cpt on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
Instructions to use Kashif786/sindhi-mbert-base-136k-cpt with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use Kashif786/sindhi-mbert-base-136k-cpt with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("fill-mask", model="Kashif786/sindhi-mbert-base-136k-cpt")# pip install -U transformers accelerate # Load model directly from transformers import AutoTokenizer, AutoModelForMaskedLM tokenizer = AutoTokenizer.from_pretrained("Kashif786/sindhi-mbert-base-136k-cpt") model = AutoModelForMaskedLM.from_pretrained("Kashif786/sindhi-mbert-base-136k-cpt", device_map="auto") - Notebooks
- Google Colab
- Kaggle
mBERT-Base-Cased Sindhi Continued Pre-Training (sindhi-mbert-base-136k-cpt)
An open-weight, vocabulary-extended Multilingual BERT (bert-base-multilingual-cased) encoder continued-pretrained via Masked Language Modeling (MLM) on curated 52-letter Perso-Arabic Sindhi (sd) text. Built as a drop-in Sindhi encoder foundation model, it is ready for downstream fine-tuning on NER (SiNER), POS Tagging (SiPOS / UD_Sindhi-Isra), Sentiment Analysis, Topic Classification (SIB-200), and Extractive QA (SdQuAD).
Model Specifications
| Property | Value |
|---|---|
| Developer | Kashif Ali Turk (Kashif786) — Supervised by Dr. Tafseer Ahmed (MAJU) |
| Architecture | BertForMaskedLM (12 layers, 768 hidden size, 12 attention heads, 3,072 FFN) |
| Base Backbone | google-bert/bert-base-multilingual-cased |
| Vocabulary Size | 136,521 (119,547 base mBERT + 16,974 Sindhi WordPiece tokens; 0 [UNK] on Sindhi) |
| Parameters / Weight Size | ~191M parameters (764.1 MB float32 model.safetensors) |
| Max Sequence Length | 512 tokens |
| Objective | Masked Language Modeling (MLM) Continued Pre-Training (CPT) |
| Final Validation Loss / Perplexity | 2.6265 / 13.83 |
| License | Apache 2.0 |
Continued Pre-Training (CPT) Summary
Trained for 1 full epoch (21,085 optimizer steps, effective batch size 256) on curated Sindhi MLM text (Kashif786/sindhi-gold-corpus-mlm):
Hyperparameters
- Optimizer:
AdamW (torch_fused)(betas=(0.9, 0.999),eps=1e-8) - Learning Rate:
5e-5withcosinedecay schedule - Batch Size:
128per device ×2gradient accumulation =256total batch size - Seed:
42 - Framework: PyTorch
2.8.0+cu129, Transformers5.16.1, Tokenizers0.23.2
Validation Convergence
| Step | Epoch | Training Loss | Validation Loss | Validation Perplexity |
|---|---|---|---|---|
3,000 |
0.14 |
7.6128 |
3.7017 |
40.52 |
6,000 |
0.28 |
6.4880 |
3.1180 |
22.60 |
9,000 |
0.43 |
5.9538 |
2.8777 |
17.77 |
12,000 |
0.57 |
5.6614 |
2.7585 |
15.78 |
15,000 |
0.71 |
5.5020 |
2.6584 |
14.27 |
18,000 |
0.85 |
5.4609 |
2.6361 |
13.96 |
21,000 |
1.00 |
5.4810 |
2.6258 |
13.82 |
21,085 |
1.00 |
5.4810 |
2.6265 |
13.83 |
Quickstart (transformers)
1. Masked Language Modeling (fill-mask)
from transformers import pipeline
fill_mask = pipeline(
"fill-mask",
model="Kashif786/sindhi-mbert-base-136k-cpt",
tokenizer="Kashif786/sindhi-mbert-base-136k-cpt",
)
results = fill_mask("سنڌي [MASK] هڪ قديم ۽ شاهوڪار ٻولي آهي.")
for r in results[:5]:
print(f"{r['token_str']} ({r['score']:.4f}) -> {r['sequence']}")
2. Downstream Fine-Tuning (Token Classification: POS / NER)
from transformers import AutoTokenizer, AutoModelForTokenClassification
model_id = "Kashif786/sindhi-mbert-base-136k-cpt"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForTokenClassification.from_pretrained(
model_id,
num_labels=16, # e.g., 16 UPOS tags for SiPOS or BIO tags for SiNER
)
3. Downstream Fine-Tuning (Sequence Classification: Sentiment / Topic)
from transformers import AutoTokenizer, AutoModelForSequenceClassification
model_id = "Kashif786/sindhi-mbert-base-136k-cpt"
tokenizer = AutoTokenizer.from_pretrained(model_id)
model = AutoModelForSequenceClassification.from_pretrained(
model_id,
num_labels=7, # e.g., 7 topics for ACL SIB-200
)
Intended Use & Limitations
- Intended Use: Base Sindhi encoder for supervised downstream NLP fine-tuning (POS tagging, Named Entity Recognition, Sentiment Analysis, Document Classification, Extractive QA, and Sindhi sentence embeddings).
- Not a Generative/Chat Model: This is a bidirectional encoder-only (
BertForMaskedLM) checkpoint. For generative Sindhi QA, RAG, translation, or instruction following, use our flagship decoder LLMs:Kashif786/sindhi-gemma-4-E4B-it-132k-v2-sft(5.74B BF16) /GGUFKashif786/sindhi-gemma-4-E2B-it-132k-v2-sft(3.27B BF16) /GGUF
Citation
@misc{turk2026mbertsindhicpt,
title = {mBERT-Base-Cased Sindhi CPT: Vocabulary-Extended Continued Pre-Training for Sindhi NLP},
author = {Kashif Ali Turk and Tafseer Ahmed},
year = {2026},
institution = {Muhammad Ali Jinnah University (MAJU), Karachi},
howpublished = {\url{https://huggingface.co/Kashif786/sindhi-mbert-base-136k-cpt}}
}
- Downloads last month
- 57