SGGS ASR v1 — 100-epoch Zipformer checkpoint
This model is a Zipformer transducer (icefall zipformer size large) trained from scratch on private Punjabi Gurbani speech.
It achieves the following results on the evaluation set:
- Loss: 1.3932
- Wer: 0.3874
- Wil: 0.5826
- Mer: 0.3782
- Cer: 0.1515
- Ncer: 0.1330
- Ccer: 0.1646
Model description
- Architecture: icefall Zipformer
largetransducer, 150,362,074 parameters - train_scope:
verse_only - best_model_metric:
ncer(0.11865985576923077 at epoch 89) - smoke_test: False
- train rows: 108007
- test rows: 1569
- Checkpoint selection uses full-dev greedy decode, not a subsample.
Intended uses & limitations
Punjabi Gurbani and general-Punjabi ASR. Not a transformers CTC checkpoint; load model.pt with the icefall Zipformer used to train it.
Inference
model.pt is an Icefall Zipformer state dictionary and bpe.model is its
SentencePiece tokenizer. This is not a Transformers checkpoint, so
pipeline() will not load it.
The runnable ONNX release currently published as
jssaluja/sggs-asr-v1-onnx
contains the final epoch-90 v0.1 model, not an export of this 100-epoch
training run. Use the example below only when you want that epoch-90 release.
The exact model.pt in this repository needs its original Icefall model-building
configuration, which is not included in this repository.
from math import gcd
import numpy as np
import onnxruntime as ort
import sentencepiece as spm
import soundfile as sf
from huggingface_hub import hf_hub_download
from scipy.signal import resample_poly
repo_id = "jssaluja/sggs-asr-v1-onnx"
model_path = hf_hub_download(repo_id, "sggs-large-epoch90.int8.onnx")
tokenizer_path = hf_hub_download(repo_id, "bpe.model")
session = ort.InferenceSession(model_path, providers=["CPUExecutionProvider"])
tokenizer = spm.SentencePieceProcessor(model_file=tokenizer_path)
def transcribe(audio_path):
audio, sample_rate = sf.read(audio_path, dtype="float32", always_2d=True)
audio = audio.mean(axis=1)
if sample_rate != 16000:
divisor = gcd(sample_rate, 16000)
audio = resample_poly(audio, 16000 // divisor, sample_rate // divisor)
audio = np.ascontiguousarray(audio, dtype=np.float32)
if audio.size == 0:
raise ValueError("Audio file is empty")
scores, output_lengths = session.run(
["log_probs", "out_len"],
{
"audio": audio[None, :],
"audio_len": np.array([audio.size], dtype=np.int64),
},
)
frame_ids = scores[0, : int(output_lengths[0])].argmax(axis=-1)
token_ids = []
previous = -1
for token_id in frame_ids:
token_id = int(token_id)
if token_id != previous and token_id != 0:
token_ids.append(token_id)
previous = token_id
return tokenizer.decode(token_ids)
print(transcribe("audio.wav"))
Training and evaluation data
Train rows: 108007. Eval rows: 1569. Source collection names are not published.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- learning_rate: 0.045
- max_duration: 600.0
- seed: 20260830
- optimizer: ScaledAdam with clipping_scale=2.0 and Eden (lr_batches=7500, lr_epochs=3.5)
- num_epochs: 100
- mixed_precision_training: Native BF16 AMP
Training results
(table generated directly from epoch-end full-dev history, keyed by metric name -- avoids a transformers model-card column-ordering bug seen in earlier runs. Validation Loss is the training objective on the dev cuts, sum / target tokens, not MMS CTC eval_loss.)
| Training Loss | Epoch | Step | Ccer | Cer | Validation Loss | Mer | Ncer | Wer | Wil |
|---|---|---|---|---|---|---|---|---|---|
| 4.6422 | 1.0 | 930 | 0.4522 | 0.4149 | 3.1508 | 0.7526 | 0.4123 | 0.7961 | 0.9281 |
| 1.8438 | 2.0 | 1861 | 0.3565 | 0.3300 | 2.7668 | 0.7006 | 0.3084 | 0.7226 | 0.8968 |
| 1.6785 | 3.0 | 2791 | 0.3149 | 0.2893 | 2.4492 | 0.6402 | 0.2604 | 0.6608 | 0.8529 |
| 1.5719 | 4.0 | 3721 | 0.3088 | 0.2832 | 2.4034 | 0.6284 | 0.2606 | 0.6589 | 0.8441 |
| 1.5007 | 5.0 | 4651 | 0.2854 | 0.2624 | 2.2893 | 0.6046 | 0.2299 | 0.6302 | 0.8250 |
| 1.4542 | 6.0 | 5582 | 0.2863 | 0.2600 | 2.2905 | 0.6004 | 0.2310 | 0.6225 | 0.8226 |
| 1.4114 | 7.0 | 6512 | 0.2778 | 0.2555 | 2.2315 | 0.5828 | 0.2307 | 0.5995 | 0.8044 |
| 1.3781 | 8.0 | 7443 | 0.2725 | 0.2503 | 2.1692 | 0.5826 | 0.2243 | 0.6059 | 0.8048 |
| 1.3480 | 9.0 | 8373 | 0.2955 | 0.2727 | 2.4103 | 0.6108 | 0.2450 | 0.6256 | 0.8274 |
| 1.3324 | 10.0 | 9304 | 0.2748 | 0.2526 | 2.1387 | 0.5767 | 0.2280 | 0.5943 | 0.7978 |
| 1.3126 | 11.0 | 10233 | 0.2643 | 0.2418 | 2.1512 | 0.5665 | 0.2133 | 0.5946 | 0.7923 |
| 1.2987 | 12.0 | 11162 | 0.2692 | 0.2473 | 2.1233 | 0.5636 | 0.2238 | 0.5793 | 0.7858 |
| 1.2968 | 13.0 | 12092 | 0.2860 | 0.2626 | 2.3101 | 0.5805 | 0.2417 | 0.5968 | 0.7997 |
| 1.3059 | 14.0 | 13022 | 0.2776 | 0.2562 | 2.2001 | 0.5747 | 0.2364 | 0.5831 | 0.7924 |
| 1.3149 | 15.0 | 13952 | 0.2426 | 0.2240 | 2.0384 | 0.5392 | 0.1961 | 0.5568 | 0.7646 |
| 1.3063 | 16.0 | 14884 | 0.2452 | 0.2235 | 2.0308 | 0.5348 | 0.1969 | 0.5576 | 0.7621 |
| 1.2828 | 17.0 | 15815 | 0.2464 | 0.2241 | 2.0482 | 0.5342 | 0.2008 | 0.5473 | 0.7607 |
| 1.2734 | 18.0 | 16746 | 0.2546 | 0.2349 | 2.2357 | 0.5560 | 0.2046 | 0.5735 | 0.7807 |
| 1.2440 | 19.0 | 17676 | 0.2523 | 0.2286 | 2.1109 | 0.5389 | 0.2086 | 0.5570 | 0.7663 |
| 1.2186 | 20.0 | 18607 | 0.2476 | 0.2256 | 2.1087 | 0.5370 | 0.1992 | 0.5532 | 0.7630 |
| 1.1995 | 21.0 | 19537 | 0.2477 | 0.2280 | 2.1110 | 0.5475 | 0.1999 | 0.5664 | 0.7725 |
| 1.1764 | 22.0 | 20467 | 0.2379 | 0.2173 | 2.0005 | 0.5279 | 0.1923 | 0.5465 | 0.7548 |
| 1.1551 | 23.0 | 21397 | 0.2412 | 0.2188 | 1.9830 | 0.5203 | 0.1969 | 0.5351 | 0.7469 |
| 1.1318 | 24.0 | 22328 | 0.2316 | 0.2116 | 1.9532 | 0.5193 | 0.1858 | 0.5394 | 0.7461 |
| 1.1221 | 25.0 | 23259 | 0.2358 | 0.2163 | 1.9329 | 0.5118 | 0.1936 | 0.5251 | 0.7356 |
| 1.1056 | 26.0 | 24189 | 0.2306 | 0.2100 | 1.9103 | 0.5087 | 0.1859 | 0.5200 | 0.7347 |
| 1.0864 | 27.0 | 25119 | 0.2419 | 0.2204 | 2.0482 | 0.5195 | 0.1993 | 0.5375 | 0.7459 |
| 1.0676 | 28.0 | 26050 | 0.2273 | 0.2066 | 1.8673 | 0.4958 | 0.1870 | 0.5134 | 0.7218 |
| 1.0501 | 29.0 | 26980 | 0.2327 | 0.2127 | 1.9861 | 0.5055 | 0.1886 | 0.5219 | 0.7312 |
| 1.0287 | 30.0 | 27911 | 0.2390 | 0.2209 | 2.0255 | 0.5233 | 0.1984 | 0.5364 | 0.7471 |
| 1.0167 | 31.0 | 28841 | 0.2451 | 0.2240 | 2.0463 | 0.5216 | 0.2048 | 0.5364 | 0.7468 |
| 0.9952 | 32.0 | 29772 | 0.2226 | 0.2023 | 1.8790 | 0.4903 | 0.1813 | 0.5058 | 0.7169 |
| 0.9887 | 33.0 | 30703 | 0.2162 | 0.1968 | 1.8786 | 0.4881 | 0.1749 | 0.5054 | 0.7153 |
| 0.9664 | 34.0 | 31633 | 0.2320 | 0.2116 | 1.9556 | 0.4916 | 0.1936 | 0.5045 | 0.7152 |
| 0.9563 | 35.0 | 32563 | 0.1976 | 0.1793 | 1.6810 | 0.4530 | 0.1561 | 0.4651 | 0.6762 |
| 0.9467 | 36.0 | 33493 | 0.2007 | 0.1826 | 1.7007 | 0.4566 | 0.1582 | 0.4676 | 0.6786 |
| 0.9402 | 37.0 | 34424 | 0.2153 | 0.1962 | 1.7815 | 0.4793 | 0.1734 | 0.4924 | 0.7033 |
| 0.9258 | 38.0 | 35355 | 0.2133 | 0.1933 | 1.8156 | 0.4814 | 0.1712 | 0.4961 | 0.7089 |
| 0.9135 | 39.0 | 36286 | 0.2166 | 0.1984 | 1.8446 | 0.4928 | 0.1732 | 0.5063 | 0.7185 |
| 0.8969 | 40.0 | 37217 | 0.2127 | 0.1932 | 1.8335 | 0.4775 | 0.1697 | 0.4914 | 0.7030 |
| 0.8871 | 41.0 | 38147 | 0.2137 | 0.1949 | 1.8070 | 0.4786 | 0.1695 | 0.4934 | 0.7035 |
| 0.8763 | 42.0 | 39078 | 0.2193 | 0.2001 | 1.8343 | 0.4797 | 0.1802 | 0.4985 | 0.7042 |
| 0.8650 | 43.0 | 40009 | 0.2010 | 0.1836 | 1.7302 | 0.4570 | 0.1637 | 0.4718 | 0.6803 |
| 0.8481 | 44.0 | 40941 | 0.1922 | 0.1749 | 1.6336 | 0.4398 | 0.1525 | 0.4525 | 0.6606 |
| 0.8434 | 45.0 | 41871 | 0.2015 | 0.1840 | 1.6793 | 0.4463 | 0.1638 | 0.4544 | 0.6650 |
| 0.8317 | 46.0 | 42803 | 0.2017 | 0.1846 | 1.6909 | 0.4522 | 0.1648 | 0.4617 | 0.6717 |
| 0.8279 | 47.0 | 43733 | 0.2026 | 0.1856 | 1.7027 | 0.4619 | 0.1601 | 0.4774 | 0.6858 |
| 0.8238 | 48.0 | 44664 | 0.1919 | 0.1740 | 1.6175 | 0.4401 | 0.1505 | 0.4542 | 0.6618 |
| 0.8155 | 49.0 | 45594 | 0.1886 | 0.1732 | 1.5879 | 0.4373 | 0.1484 | 0.4491 | 0.6562 |
| 0.7982 | 50.0 | 46525 | 0.1807 | 0.1639 | 1.5062 | 0.4161 | 0.1413 | 0.4256 | 0.6326 |
| 0.7942 | 51.0 | 47456 | 0.1992 | 0.1828 | 1.6501 | 0.4529 | 0.1595 | 0.4672 | 0.6742 |
| 0.7893 | 52.0 | 48386 | 0.1965 | 0.1802 | 1.6679 | 0.4418 | 0.1573 | 0.4543 | 0.6599 |
| 0.7728 | 53.0 | 49316 | 0.1901 | 0.1738 | 1.5470 | 0.4291 | 0.1547 | 0.4402 | 0.6448 |
| 0.7697 | 54.0 | 50246 | 0.1980 | 0.1800 | 1.6930 | 0.4496 | 0.1582 | 0.4605 | 0.6716 |
| 0.7634 | 55.0 | 51176 | 0.2114 | 0.1918 | 1.7758 | 0.4536 | 0.1744 | 0.4687 | 0.6746 |
| 0.7494 | 56.0 | 52107 | 0.1904 | 0.1737 | 1.6428 | 0.4326 | 0.1557 | 0.4436 | 0.6511 |
| 0.7434 | 57.0 | 53039 | 0.1828 | 0.1669 | 1.5396 | 0.4253 | 0.1448 | 0.4345 | 0.6424 |
| 0.7340 | 58.0 | 53970 | 0.1937 | 0.1757 | 1.6381 | 0.4371 | 0.1579 | 0.4488 | 0.6569 |
| 0.7325 | 59.0 | 54900 | 0.1984 | 0.1807 | 1.6668 | 0.4441 | 0.1611 | 0.4523 | 0.6636 |
| 0.7239 | 60.0 | 55830 | 0.1867 | 0.1707 | 1.6000 | 0.4302 | 0.1491 | 0.4421 | 0.6487 |
| 0.7157 | 61.0 | 56761 | 0.1757 | 0.1595 | 1.4658 | 0.4100 | 0.1393 | 0.4198 | 0.6262 |
| 0.7127 | 62.0 | 57692 | 0.1771 | 0.1617 | 1.5529 | 0.4216 | 0.1373 | 0.4326 | 0.6394 |
| 0.7137 | 63.0 | 58622 | 0.1739 | 0.1588 | 1.4665 | 0.4067 | 0.1391 | 0.4182 | 0.6203 |
| 0.6960 | 64.0 | 59553 | 0.1881 | 0.1726 | 1.6095 | 0.4369 | 0.1510 | 0.4471 | 0.6555 |
| 0.6888 | 65.0 | 60484 | 0.1748 | 0.1599 | 1.4762 | 0.4094 | 0.1387 | 0.4194 | 0.6243 |
| 0.6854 | 66.0 | 61415 | 0.1783 | 0.1625 | 1.5147 | 0.4080 | 0.1424 | 0.4163 | 0.6210 |
| 0.6774 | 67.0 | 62346 | 0.1747 | 0.1586 | 1.4824 | 0.4123 | 0.1338 | 0.4238 | 0.6295 |
| 0.6737 | 68.0 | 63278 | 0.1871 | 0.1705 | 1.5575 | 0.4301 | 0.1501 | 0.4391 | 0.6479 |
| 0.6675 | 69.0 | 64209 | 0.1752 | 0.1599 | 1.4774 | 0.4036 | 0.1403 | 0.4147 | 0.6165 |
| 0.6624 | 70.0 | 65140 | 0.1644 | 0.1499 | 1.3962 | 0.3847 | 0.1305 | 0.3937 | 0.5935 |
| 0.6562 | 71.0 | 66069 | 0.1707 | 0.1556 | 1.4802 | 0.3942 | 0.1364 | 0.4050 | 0.6050 |
| 0.6470 | 72.0 | 67000 | 0.1695 | 0.1535 | 1.4791 | 0.3945 | 0.1384 | 0.4048 | 0.6074 |
| 0.6426 | 73.0 | 67929 | 0.1879 | 0.1710 | 1.5492 | 0.4235 | 0.1526 | 0.4305 | 0.6384 |
| 0.6368 | 74.0 | 68861 | 0.1726 | 0.1565 | 1.4857 | 0.4023 | 0.1368 | 0.4099 | 0.6165 |
| 0.6265 | 75.0 | 69792 | 0.1721 | 0.1565 | 1.4591 | 0.3949 | 0.1380 | 0.4057 | 0.6057 |
| 0.6210 | 76.0 | 70722 | 0.1715 | 0.1556 | 1.5113 | 0.3955 | 0.1363 | 0.4046 | 0.6073 |
| 0.6159 | 77.0 | 71653 | 0.1792 | 0.1638 | 1.5168 | 0.4112 | 0.1439 | 0.4201 | 0.6242 |
| 0.6060 | 78.0 | 72583 | 0.1700 | 0.1545 | 1.4316 | 0.3999 | 0.1337 | 0.4101 | 0.6144 |
| 0.6074 | 79.0 | 73513 | 0.1602 | 0.1458 | 1.3889 | 0.3800 | 0.1258 | 0.3881 | 0.5893 |
| 0.6004 | 80.0 | 74445 | 0.1726 | 0.1565 | 1.4583 | 0.3974 | 0.1373 | 0.4059 | 0.6090 |
| 0.5956 | 81.0 | 75375 | 0.1693 | 0.1530 | 1.4729 | 0.3933 | 0.1331 | 0.4014 | 0.6064 |
| 0.5929 | 82.0 | 76305 | 0.1753 | 0.1597 | 1.4624 | 0.4002 | 0.1408 | 0.4069 | 0.6110 |
| 0.5939 | 83.0 | 77235 | 0.1686 | 0.1540 | 1.4886 | 0.3903 | 0.1341 | 0.3977 | 0.5993 |
| 0.5850 | 84.0 | 78166 | 0.1653 | 0.1509 | 1.4448 | 0.3876 | 0.1317 | 0.3958 | 0.5973 |
| 0.5809 | 85.0 | 79097 | 0.1597 | 0.1465 | 1.3702 | 0.3771 | 0.1265 | 0.3848 | 0.5827 |
| 0.5761 | 86.0 | 80027 | 0.1679 | 0.1530 | 1.4716 | 0.3903 | 0.1342 | 0.3997 | 0.6011 |
| 0.5687 | 87.0 | 80958 | 0.1607 | 0.1457 | 1.3606 | 0.3741 | 0.1258 | 0.3828 | 0.5822 |
| 0.5654 | 88.0 | 81888 | 0.1581 | 0.1431 | 1.3863 | 0.3692 | 0.1260 | 0.3773 | 0.5765 |
| 0.5637 | 89.0 | 82818 | 0.1529 | 0.1393 | 1.3505 | 0.3649 | 0.1187 | 0.3729 | 0.5696 |
| 0.5553 | 90.0 | 83748 | 0.1584 | 0.1447 | 1.3796 | 0.3736 | 0.1252 | 0.3823 | 0.5802 |
| 0.5525 | 91.0 | 84679 | 0.1703 | 0.1546 | 1.4692 | 0.3940 | 0.1353 | 0.4017 | 0.6061 |
| 0.5505 | 92.0 | 85610 | 0.1616 | 0.1473 | 1.4079 | 0.3766 | 0.1320 | 0.3841 | 0.5830 |
| 0.5455 | 93.0 | 86540 | 0.1629 | 0.1479 | 1.4836 | 0.3781 | 0.1295 | 0.3868 | 0.5865 |
| 0.5405 | 94.0 | 87471 | 0.1719 | 0.1567 | 1.5107 | 0.4018 | 0.1355 | 0.4110 | 0.6156 |
| 0.5352 | 95.0 | 88401 | 0.1741 | 0.1588 | 1.4744 | 0.3983 | 0.1438 | 0.4074 | 0.6113 |
| 0.5412 | 96.0 | 89332 | 0.1689 | 0.1536 | 1.4879 | 0.3895 | 0.1337 | 0.3975 | 0.6006 |
| 0.5322 | 97.0 | 90262 | 0.1609 | 0.1469 | 1.4490 | 0.3799 | 0.1278 | 0.3872 | 0.5879 |
| 0.5300 | 98.0 | 91192 | 0.1644 | 0.1503 | 1.4430 | 0.3856 | 0.1328 | 0.3931 | 0.5940 |
| 0.5300 | 99.0 | 92123 | 0.1544 | 0.1392 | 1.3691 | 0.3633 | 0.1232 | 0.3705 | 0.5691 |
| 0.5247 | 100.0 | 93053 | 0.1646 | 0.1515 | 1.3932 | 0.3782 | 0.1330 | 0.3874 | 0.5826 |
Framework versions
- Pytorch 2.12.0+cu126
- icefall 6fd674312c1d87bd9fc888d623cb3e347ac019ff