Downloads · 30 days
55
16% of all-time downloads
tanuj437/SanskritBERT
SanskritBERT is a fill-mask model from tanuj437. Use it when you need the model to fill a missing word. It is set up for transformers. The card lists the license as apache-2.0.
SanskritBERT is a lightweight Transformer model trained specifically for the Sanskrit language. It is based on the BERT architecture and trained using the Masked Language Modeling (MLM) objective.
Downloads · 30 days
55
16% of all-time downloads
All-time downloads
340
Public
Parameters
35.8M
432 MB on disk
Likes
1
Public
Click a slice to open those files.
.pt286 MB · 66%
From the Hugging Face model README
SanskritBERT is a lightweight Transformer model trained specifically for the Sanskrit language. It is based on the BERT architecture and trained using the Masked Language Modeling (MLM) objective.
bert-base or bert-large model.Trained on a corpus of Sanskrit texts including general literature, wikis, and classical texts.
You can use the model directly with the Hugging Face transformers library:
from transformers import AutoTokenizer, AutoModelForMaskedLM
tokenizer = AutoTokenizer.from_pretrained("tanuj437/SanskritBERT")
model = AutoModelForMaskedLM.from_pretrained("tanuj437/SanskritBERT")
text = "सत्यमेव जयते [MASK]"
inputs = tokenizer(text, return_tensors="pt")
outputs = model(**inputs)
@misc{sanskritbert2024,
title={SanskritBERT: A Light Transformer Model for Sanskrit},
author={[Tanuj Saxena,Soumya Sharma,Kusum Lata]},
year={2026},
publisher={Hugging Face}
}