jssaluja/indicconformer-stream-72-23-sggs-ncer-train-183161-epochs-21-test-2200
This model is a CTC fine-tune of the pretrained AI4Bharat IndicConformer Punjabi encoder (ai4bharat/indicconformer_stt_pa_hybrid_ctc_rnnt_large) with a new 512-piece Gurbani SentencePiece (BPE) vocabulary and CTC head, trained on private Punjabi Gurbani speech. It achieves the following results on the evaluation set (final model: average of epochs 17, 18, 19, 20, 21, greedy CTC):
- Wer: 0.5651
- Cer: 0.2349
- Ncer: 0.1939
- Ccer: 0.2511
- Kirtan rows only (631 rows): Wer 0.6160, Cer 0.2981, Ncer 0.2876
Model description
- Architecture: IndicConformer encoder (pretrained, fine-tuned end to end) + new 1x1 convolution head, 115,392,018 parameters (weights and buffers), CTC loss
- Output: 512 pieces + CTC blank, blank id 512 (the last id)
- train_scope:
verse_only - final model: average of the last 5 epochs
- train rows: 183161
- test rows: 2200
Intended uses & limitations
Punjabi Gurbani (Sri Guru Granth Sahib paath and kirtan) ASR. Output is raw acoustic text and should be matched to real Gurbani before it is shown to users.
Not a transformers checkpoint, so pipeline() will not load it.
Inference
For ready-to-run CPU inference use the int8 ONNX export: jssaluja/sggs-asr-indic-v0-onnx.
final/model.pt holds two state dicts, encoder and head, and final/gurbani_512.model is the matching SentencePiece model.
Rebuild the network from the base model, then load the weights:
pip install torch sentencepiece huggingface_hub soundfile
pip install "nemo_toolkit[asr] @ git+https://github.com/AI4Bharat/NeMo@8dce88cf8e94963e2033c3137f7b9993b51db88a"
import torch, sentencepiece as spm
from huggingface_hub import hf_hub_download
from nemo.collections.asr.models import ASRModel
repo = 'jssaluja/indicconformer-stream-72-23-sggs-ncer-train-183161-epochs-21-test-2200'
state = torch.load(hf_hub_download(repo, 'final/model.pt'), map_location='cpu')
sp = spm.SentencePieceProcessor(model_file=hf_hub_download(repo, 'final/gurbani_512.model'))
base = ASRModel.restore_from(hf_hub_download('ai4bharat/indicconformer_stt_pa_hybrid_ctc_rnnt_large', 'indicconformer_stt_pa_hybrid_rnnt_large.nemo'), map_location='cpu')
base.encoder.load_state_dict(state['encoder'])
head = torch.nn.Conv1d(base.cfg.encoder.d_model, 512 + 1, 1)
head.load_state_dict(state['head'])
# 16 kHz mono wave -> base.preprocessor -> base.encoder -> head -> log_softmax
# ids = argmax per frame, collapse repeats, drop blank 512; text = sp.decode(ids)
Training and evaluation data
Train rows: 183161. Eval rows: 2200. Source collection names are not published.
Training procedure
Training hyperparameters
The following hyperparameters were used during training:
- phase 1 (encoder frozen, head only): 1 epoch, learning_rate: 0.001
- phase 2 (full model): 20 epochs, learning_rate: 5e-05 (encoder), 10x for the head
- warmup_steps: 1000, weight_decay: 0.01
- batches: padded audio up to 400.0 seconds per batch, duration-bucketed
- seed: 42
- optimizer: AdamW, linear warmup then decay
- augmentation: SpecAugment from the base model
- mixed_precision_training: bf16 autocast
- final weights: average of the last 5 epochs
Training results
(table generated directly from the epoch-end evaluation history, keyed by metric name. Phase 1 is the head-only epoch, phase 2 the full-model epochs. Training Loss is the CTC loss.)
| Training Loss | Epoch | Phase | Ccer | Cer | Ncer | Wer | Kirtan Wer | Kirtan Ncer |
|---|---|---|---|---|---|---|---|---|
| 11.5629 | 1.0 | 1 | 0.9764 | 0.9789 | 0.9746 | 0.9913 | 0.9927 | 0.9875 |
| 3.9259 | 2.0 | 2 | 0.4618 | 0.4297 | 0.4077 | 0.8289 | 0.8588 | 0.5336 |
| 2.6541 | 3.0 | 2 | 0.3690 | 0.3435 | 0.3063 | 0.7550 | 0.7957 | 0.4407 |
| 2.3044 | 4.0 | 2 | 0.3843 | 0.3680 | 0.3298 | 0.7473 | 0.7662 | 0.4104 |
| 2.1104 | 5.0 | 2 | 0.3321 | 0.3121 | 0.2724 | 0.6968 | 0.7200 | 0.3706 |
| 1.9861 | 6.0 | 2 | 0.2945 | 0.2746 | 0.2321 | 0.6577 | 0.7044 | 0.3572 |
| 1.8873 | 7.0 | 2 | 0.2925 | 0.2737 | 0.2299 | 0.6486 | 0.6896 | 0.3366 |
| 1.8094 | 8.0 | 2 | 0.3330 | 0.3185 | 0.2773 | 0.6680 | 0.6828 | 0.3338 |
| 1.7431 | 9.0 | 2 | 0.2615 | 0.2430 | 0.1986 | 0.6057 | 0.6691 | 0.3216 |
| 1.6936 | 10.0 | 2 | 0.2731 | 0.2555 | 0.2142 | 0.6098 | 0.6586 | 0.3156 |
| 1.6452 | 11.0 | 2 | 0.2817 | 0.2646 | 0.2226 | 0.6138 | 0.6499 | 0.3112 |
| 1.6089 | 12.0 | 2 | 0.2857 | 0.2700 | 0.2282 | 0.6118 | 0.6452 | 0.3041 |
| 1.5826 | 13.0 | 2 | 0.2864 | 0.2710 | 0.2295 | 0.6088 | 0.6404 | 0.3014 |
| 1.5550 | 14.0 | 2 | 0.2600 | 0.2433 | 0.2019 | 0.5836 | 0.6333 | 0.2959 |
| 1.5273 | 15.0 | 2 | 0.2549 | 0.2377 | 0.1956 | 0.5786 | 0.6315 | 0.2947 |
| 1.5081 | 16.0 | 2 | 0.2530 | 0.2364 | 0.1947 | 0.5743 | 0.6292 | 0.2943 |
| 1.4968 | 17.0 | 2 | 0.3239 | 0.3107 | 0.2731 | 0.6226 | 0.6290 | 0.2960 |
| 1.4835 | 18.0 | 2 | 0.2361 | 0.2189 | 0.1761 | 0.5534 | 0.6173 | 0.2889 |
| 1.4722 | 19.0 | 2 | 0.2382 | 0.2214 | 0.1795 | 0.5519 | 0.6123 | 0.2851 |
| 1.4678 | 20.0 | 2 | 0.2613 | 0.2457 | 0.2052 | 0.5732 | 0.6185 | 0.2909 |
| 1.4574 | 21.0 | 2 | 0.2417 | 0.2250 | 0.1833 | 0.5565 | 0.6219 | 0.2889 |
Framework versions
- Pytorch 2.11.0+cu128
- NeMo: AI4Bharat fork 8dce88cf8e