| --- |
| license: apache-2.0 |
| language: [ps, pus] |
| tags: [automatic-speech-recognition, onnx, onnx-asr, whisper, pashto] |
| base_model: ihanif/whisper_small_ps_augmented |
| --- |
| |
| # whisper_small_ps_augmented — ONNX |
| |
| ONNX export of [ihanif/whisper_small_ps_augmented](https://huggingface.co/ihanif/whisper_small_ps_augmented) |
| (Whisper small fine-tuned for Pashto by [ihanif](https://huggingface.co/ihanif)) for |
| [onnx-asr](https://github.com/istupakov/onnx-asr) (standard `whisper` model type — works with |
| stock onnx-asr, no patches needed). fp32 and int8 variants included. |
| |
| License: apache-2.0, inherited from the source model. |
| |
| First specialized ONNX ASR model for Pashto in this collection. |
| |
| ## Usage |
| |
| ```python |
| import onnx_asr |
| model = onnx_asr.load_model("whisper", "path/to/this/repo") # or quantization="int8" |
| print(model.recognize("audio_16khz.wav", language="ps")) |
| ``` |
| |
| Verified on a FLEURS Pashto (`ps_af`) test clip: |
|
|
| - Reference: "د نارینه په ښکته کولو کې ثابت اوسئ، او د خپلې ځمکې د ودریدو څخه مه ویریږئ کلتوري توپیرونه که نه، دا سم نه کوي!" |
| - fp32 (RTF 0.21): "نانینا په خطا کولو کثابت اوسئ د خپلې ځمکې د ودیدرودو هغه معیارېږئ کلتوري توپیرو نه تاسم نه کوي" |
| - int8 (RTF 0.09): "نا ننه په ښتا کولو کې ثابت اوسې د خپلې ځمکې د ویاریږی کلتوري توپیرونو نه تاسم نه کوي" |
|
|
| **Verified with caveats, honestly**: both variants get the general shape and several words |
| right ("خپلې ځمکې", "کلتوري توپیرو", "ثابت اوسئ") but diverge noticeably from the reference |
| on other words. fp32 and int8 are similarly rough — this looks like a genuine accuracy |
| ceiling of this small fine-tuned checkpoint on this clip, not something introduced by the |
| ONNX conversion or quantization (both precisions degrade about equally). Treat this as a |
| correctly-converted mirror of the source model's real-world accuracy, not a claim of |
| production-quality Pashto ASR. RTF measured on an AMD Ryzen 5 7600 (CPU, 4 OMP threads, |
| shared/loaded box — not a clean benchmark number). |
|
|
| Int8 decoder was produced by quantizing the pre-merge decoders separately and re-merging |
| (`merge_decoders(..., strict=False)`); direct quantization of the merged decoder graph does |
| not shrink it (its `If` subgraphs are skipped by onnxruntime's dynamic quantizer). |
|
|