Downloads · 30 days
11
11% of all-time downloads
Omarrran/koshur-diacritizer-byt5-small-v2
koshur-diacritizer-byt5-small-v2 is a machine learning model from Omarrran. Use it for the machine learning task on the model card, and read the license before you ship it in a product.
This repository is a safety release of the Kashmiri diacritizer training run completed so far. It contains the directly loadable model weights from the latest safe checkpoint plus training checkpoints, code, and run a…
Downloads · 30 days
11
11% of all-time downloads
All-time downloads
104
Public
Repo size
12 GB
Likes
0
Public
Click a slice to open those files.
.pt4.8 GB · 57%
From the Hugging Face model README
This repository is a safety release of the Kashmiri diacritizer training run completed so far. It contains the directly loadable model weights from the latest safe checkpoint plus training checkpoints, code, and run artifacts needed to resume or inspect the run.
/outputs/byt5small-ksdiac/checkpoints/checkpoint-6650checkpoint-5889758,897 / 160,620 steps11.0 / 30byt5small-ksdiac-l4-bf16-fullbf16=True, fp16=False, tf32=Truecheckpoint-58897 for direct from_pretrained() loading.training-checkpoints/checkpoint-58897/: full latest trainer checkpoint, including optimizer/scheduler/RNG state.training-checkpoints/checkpoint-37479/: earlier retained checkpoint from the same run.artifacts/history.jsonl: train/eval log history.artifacts/run_config.json: exact run configuration.artifacts/dataset_stats.json: dataset filtering/split statistics.source/: training/inference code used for this run.Input files were four XLSX sources mounted in Modal:
kashmiri_parallel_dataset_dia-non_dia_text_1.xlsxkashmiri_parallel_dataset_dia-non_dia_text_2.xlsxkashmiri_parallel_dataset_dia-non_dia_text_3.xlsxkashmiri_parallel_dataset_dia-non_dia_text_4.xlsxFiltering and split stats:
207,0471,32115,457190,269171,3449,536 (1,500 max per epoch eval)9,3893011 epochs48321adamw_torch5e-40.050.012562562Training loss reduced strongly and stably:
50: 0.25461,000: 0.09415,000: 0.062410,000: 0.053916,000: 0.049221,400: 0.042526,700: 0.038232,100: 0.035637,400: 0.030842,800: 0.028448,100: 0.025053,500: 0.021458,850: 0.01780.0154 at step 53,850Approximate epoch train averages:
0.05750.04920.04340.03870.03460.03090.02730.02390.02050.017–0.0190.0178Lower DER/WER is better; higher exact match is better.
0.0676, DER_marked 0.2378, DER_all 0.0702, WER 0.2176, exact 0.13000.0655, DER_marked 0.2123, DER_all 0.0665, WER 0.2106, exact 0.14070.0608, DER_marked 0.2284, DER_all 0.0638, WER 0.2033, exact 0.14600.0585, DER_marked 0.1984, DER_all 0.0606, WER 0.1915, exact 0.16600.0583, DER_marked 0.1961, DER_all 0.0591, WER 0.1868, exact 0.17130.0584, DER_marked 0.1923, DER_all 0.0590, WER 0.1868, exact 0.17070.0587, DER_marked 0.1844, DER_all 0.0586, WER 0.1856, exact 0.17470.0599, DER_marked 0.1946, DER_all 0.0573, WER 0.1828, exact 0.17530.0643, DER_marked 0.1927, DER_all 0.0572, WER 0.1842, exact 0.18600.0663, DER_marked 0.2016, DER_all 0.0573, WER 0.1827, exact 0.19400.0712, DER_marked 0.1870, DER_all 0.0570, WER 0.1818, exact 0.1753from transformers import AutoTokenizer, AutoModelForSeq2SeqLM
import torch
repo_id = "Omarrran/koshur-diacritizer-byt5-small-v2"
tokenizer = AutoTokenizer.from_pretrained(repo_id)
model = AutoModelForSeq2SeqLM.from_pretrained(repo_id)
model.eval()
text = "یہاں اپنا غیر اعرابی کشمیری متن لکھیں"
inputs = tokenizer(text, return_tensors="pt", truncation=True, max_length=256)
with torch.no_grad():
ids = model.generate(
**inputs,
max_new_tokens=256,
num_beams=1,
do_sample=False,
)
print(tokenizer.decode(ids[0], skip_special_tokens=True))
The latest full Trainer checkpoint is:
training-checkpoints/checkpoint-58897
For a Hugging Face Seq2SeqTrainer continuation, restore/copy that folder as the training output checkpoint and call:
trainer.train(resume_from_checkpoint="training-checkpoints/checkpoint-58897")
If continuing on Modal, keep the same data orientation, all 4 XLSX sources, bf16/L4 settings, and output/run format used in artifacts/run_config.json.