epiCodex's picture
|
download
raw
1.79 kB
metadata
license: mit
language:
  - en
  - ur
pipeline_tag: translation
tags:
  - translation
  - roman-urdu
  - transformer
  - from-scratch

English ↔ Roman Urdu

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

Use

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"

Files

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

Xet Storage Details

Size:
1.79 kB
·
Xet hash:
e3eb990dbf5dff07f86e5563e905e24e7ee40bc0171eb4e37cc4c3ad17535bb4

Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.