Downloads · 30 days
0
hasyarshad/roman-urdu-translator
roman-urdu-translator is a translation model from hasyarshad. Use it when you need text moved from one language to another. The card lists the license as mit.
The trained weights for an 81M-parameter encoder–decoder transformer written from primitives in PyTorch — no nn.Transformer, no AutoModel, no training framework.
Downloads · 30 days
0
Access
Public
Updated Aug 9, 2026
Repo size
163 MB
Likes
0
Public
Click a slice to open those files.
.pt163 MB · 99%
From the Hugging Face model README
The trained weights for an 81M-parameter encoder–decoder transformer written
from primitives in PyTorch — no nn.Transformer, no AutoModel, no training
framework.
Roman Urdu is Urdu written in English letters, which is how Urdu is actually typed in messages. One model translates both directions and detects which one is wanted from the input.
| Parameters | 81M (d_model 512, 6+6 layers, 8 heads, d_ff 2048) |
| Vocabulary | 24k joint byte-level BPE, shared by both languages |
| Corpus | 1.81M sentence pairs, built for this project |
| Training | 30 epochs; checkpoint chosen on validation loss |
| BLEU (Tatoeba, held out) | 23.2 en→ur, 30.7 ur→en |
| Weights | fp16 on disk, fp32 at inference |
pip install torch tokenizers huggingface_hub
git clone https://github.com/hasyarshad/roman-urdu-translator.git
cd roman-urdu-translator
python -c "from huggingface_hub import snapshot_download; \
snapshot_download('hasyarshad/roman-urdu-translator', local_dir='export')"
python serve.py "wo larki pyari ha"
| File | What it is |
|---|---|
model.pt | fp16 weights plus the config needed to rebuild the architecture |
tokenizer_joint.json | the joint byte-level BPE tokenizer |
roman_urdu_map.json | transliteration map, so Arabic-script input is romanised first |
export_info.json | source checkpoint, epoch, validation loss, parameter count |