Automatic Speech Recognition
Transformers
Karbi
wav2vec2
audio
speech
ctc
mms
low-resource
karbi
Eval Results (legacy)
Instructions to use sulabhkatiyar/ne-asr-mjw with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use sulabhkatiyar/ne-asr-mjw with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="sulabhkatiyar/ne-asr-mjw")# Load model directly from transformers import AutoProcessor, AutoModelForCTC processor = AutoProcessor.from_pretrained("sulabhkatiyar/ne-asr-mjw") model = AutoModelForCTC.from_pretrained("sulabhkatiyar/ne-asr-mjw", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Clean public model card
Browse files
README.md
CHANGED
|
@@ -1,175 +1,150 @@
|
|
| 1 |
---
|
|
|
|
| 2 |
license: cc-by-nc-4.0
|
| 3 |
-
language:
|
| 4 |
-
- mjw
|
| 5 |
-
base_model: facebook/mms-1b-all
|
| 6 |
library_name: transformers
|
| 7 |
pipeline_tag: automatic-speech-recognition
|
| 8 |
tags:
|
| 9 |
-
- speech
|
| 10 |
-
- asr
|
| 11 |
- automatic-speech-recognition
|
|
|
|
|
|
|
|
|
|
| 12 |
- mms
|
| 13 |
-
- mjw
|
| 14 |
- low-resource
|
| 15 |
-
-
|
| 16 |
-
|
| 17 |
-
- ctc-adapter
|
| 18 |
datasets:
|
| 19 |
- sulabhkatiyar/ne-asr-mjw
|
| 20 |
- sulabhkatiyar/ne-asr-mjw-aug
|
| 21 |
-
metrics:
|
| 22 |
-
- wer
|
| 23 |
-
- cer
|
| 24 |
model-index:
|
| 25 |
- name: ne-asr-mjw
|
| 26 |
results:
|
| 27 |
- task:
|
| 28 |
type: automatic-speech-recognition
|
| 29 |
dataset:
|
| 30 |
-
name: ne-asr-mjw
|
| 31 |
type: sulabhkatiyar/ne-asr-mjw
|
|
|
|
| 32 |
metrics:
|
| 33 |
- type: wer
|
| 34 |
-
value: 61.
|
| 35 |
- type: cer
|
| 36 |
value: 15.23
|
| 37 |
---
|
| 38 |
-
# NE-ASR · Karbi (mjw) · MMS-1B CTC adapter
|
| 39 |
-
|
| 40 |
-
A per-language CTC adapter for `facebook/mms-1b-all`, fine-tuned on the Romanized Karbi (mjw) split of the **NE-ASR** corpus. The base model is frozen; only the language adapter (~2.19 M parameters, ≈8.8 MB) and the CTC LM head are trained. Adapter weights are stored as `adapter.mjw.safetensors` (290 tensors).
|
| 41 |
-
|
| 42 |
-
> **License:** CC-BY-NC 4.0, inherited from MMS-1B (Pratap et al., 2023). For non-commercial research use.
|
| 43 |
|
|
|
|
| 44 |
|
| 45 |
-
|
| 46 |
|
| 47 |
-
|
| 48 |
-
|---|---:|
|
| 49 |
-
| WER (%) | **61.3** |
|
| 50 |
-
| CER (%) | 15.23 |
|
| 51 |
-
| n (test) | 39 |
|
| 52 |
-
| Trainable params | 2,188,317 |
|
| 53 |
-
| Adapter file size | ~8.8 MB |
|
| 54 |
|
| 55 |
-
|
|
|
|
|
|
|
|
|
|
| 56 |
|
| 57 |
-
|
| 58 |
|
| 59 |
-
|
|
|
|
| 60 |
|
| 61 |
-
|
|
| 62 |
-
|---
|
| 63 |
-
| train
|
| 64 |
-
|
|
| 65 |
-
|
|
| 66 |
-
| test | 39 | `sulabhkatiyar/ne-asr-mjw` |
|
| 67 |
|
| 68 |
-
|
|
|
|
| 69 |
|
| 70 |
## Training
|
| 71 |
|
| 72 |
-
|
| 73 |
-
|
| 74 |
-
|
| 75 |
-
|
| 76 |
-
|
| 77 |
-
|
| 78 |
-
|
| 79 |
-
|
| 80 |
-
|
| 81 |
-
| Effective batch size | 32 |
|
| 82 |
-
| Learning rate | 0.0003 |
|
| 83 |
-
| Epochs | 12 |
|
| 84 |
-
| Warmup ratio | 0.10 |
|
| 85 |
-
| Group-by-length | True |
|
| 86 |
-
| Max input length (s) | 30 |
|
| 87 |
-
| Trainable params | 2,188,317 (~2.19 M) |
|
| 88 |
-
| Final train loss | 3.453 |
|
| 89 |
-
| Peak VRAM | 48.0 GB |
|
| 90 |
|
| 91 |
## Evaluation
|
| 92 |
|
| 93 |
-
|
|
| 94 |
-
|---|---:|---:|---:|
|
| 95 |
-
|
|
| 96 |
-
| test
|
| 97 |
|
| 98 |
-
Reference processing: NFC + strip + lower. Hypothesis decoded with greedy CTC,
|
|
|
|
| 99 |
|
| 100 |
## Usage
|
| 101 |
|
| 102 |
```python
|
| 103 |
-
from transformers import Wav2Vec2ForCTC, Wav2Vec2Processor
|
| 104 |
-
from safetensors.torch import load_file
|
| 105 |
from huggingface_hub import hf_hub_download
|
|
|
|
|
|
|
| 106 |
import torch, torchaudio
|
| 107 |
|
| 108 |
REPO = "sulabhkatiyar/ne-asr-mjw"
|
| 109 |
-
|
| 110 |
|
| 111 |
-
#
|
| 112 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 113 |
|
| 114 |
-
# Load
|
| 115 |
model = Wav2Vec2ForCTC.from_pretrained(
|
| 116 |
-
|
|
|
|
|
|
|
| 117 |
ignore_mismatched_sizes=True,
|
| 118 |
-
target_lang=ISO,
|
| 119 |
)
|
| 120 |
model.init_adapter_layers()
|
| 121 |
-
|
| 122 |
-
|
| 123 |
-
adapter_path = hf_hub_download(REPO, f"adapter.{ISO}.safetensors")
|
| 124 |
-
state = load_file(adapter_path)
|
| 125 |
-
missing, unexpected = model.load_state_dict(state, strict=False)
|
| 126 |
-
assert unexpected == [], f"Unexpected adapter keys: {unexpected[:5]}"
|
| 127 |
model.eval()
|
| 128 |
|
| 129 |
-
# Inference
|
| 130 |
wav, sr = torchaudio.load("your_audio.wav")
|
| 131 |
if sr != 16000:
|
| 132 |
wav = torchaudio.functional.resample(wav, sr, 16000)
|
| 133 |
-
inputs = processor(wav.squeeze().numpy(), sampling_rate=16000, return_tensors="pt")
|
| 134 |
with torch.no_grad():
|
| 135 |
-
logits = model(
|
| 136 |
-
pred_ids = logits.argmax(-1)
|
| 137 |
-
|
|
|
|
| 138 |
```
|
| 139 |
|
| 140 |
-
##
|
| 141 |
-
|
| 142 |
-
Trained as part of Tier-3 group 2 (Phase D) on AMD MI300X. Karbi (mjw) is tonal — **pitch-shift augmentation was disabled** per the project-wide tonal recipe; only speed perturbation (0.9× / 1.0× / 1.1×) and online SpecAugment were applied at 3×.
|
| 143 |
-
|
| 144 |
-
### Dataset lineage (B.5.4 rebuild)
|
| 145 |
-
|
| 146 |
-
This adapter was trained against the **B.5.4 rebuild** of `sulabhkatiyar/ne-asr-mjw-aug` (Hub HEAD `9f352fe6593feb02ec02f51c7def3a8fe4fa3ca6`). The prior v1.0 of that aug dataset was 5× pitch-polluted (train=2,540 = 5 × 508), which violated the project's no-pitch-shift rule for tonal languages. After the project-wide tonal recipe fix (Phase B.5.1), the aug dataset was rebuilt to **3× speed-only (train=1,524 = 3 × 508)** — 508 augmentations each of `original`, `speed_0.9`, and `speed_1.1`, with zero pitch entries. This card describes the adapter trained against the rebuilt 3× aug dataset; no earlier mjw adapter was published.
|
| 147 |
-
|
| 148 |
-
### Best Tier-3 result in the corpus
|
| 149 |
-
|
| 150 |
-
Test WER 61.30% (n=39) is the **strongest Tier-3 result in this 15-language project**, beating every other Tier-3 language by a comfortable margin and sitting at or below the Tier-2 cluster (67–75% test WER). Validation WER 61.79% (n=60) corroborates the test signal.
|
| 151 |
|
| 152 |
-
|
| 153 |
|
| 154 |
-
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 158 |
|
| 159 |
-
|
| 160 |
|
| 161 |
```bibtex
|
| 162 |
-
@
|
| 163 |
-
|
| 164 |
-
|
| 165 |
-
|
| 166 |
-
|
| 167 |
-
}
|
| 168 |
-
@misc{nesar2026,
|
| 169 |
-
title={NE-ASR: ASR adapters for 15 Northeast-Indian languages},
|
| 170 |
-
author={Katiyar, Sulabh},
|
| 171 |
-
year={2026},
|
| 172 |
-
publisher={HuggingFace},
|
| 173 |
-
howpublished={\url{https://huggingface.co/sulabhkatiyar/ne-asr-mjw}}
|
| 174 |
}
|
| 175 |
```
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
+
language: mjw
|
| 3 |
license: cc-by-nc-4.0
|
|
|
|
|
|
|
|
|
|
| 4 |
library_name: transformers
|
| 5 |
pipeline_tag: automatic-speech-recognition
|
| 6 |
tags:
|
|
|
|
|
|
|
| 7 |
- automatic-speech-recognition
|
| 8 |
+
- audio
|
| 9 |
+
- speech
|
| 10 |
+
- ctc
|
| 11 |
- mms
|
|
|
|
| 12 |
- low-resource
|
| 13 |
+
- karbi
|
| 14 |
+
base_model: facebook/mms-1b-all
|
|
|
|
| 15 |
datasets:
|
| 16 |
- sulabhkatiyar/ne-asr-mjw
|
| 17 |
- sulabhkatiyar/ne-asr-mjw-aug
|
|
|
|
|
|
|
|
|
|
| 18 |
model-index:
|
| 19 |
- name: ne-asr-mjw
|
| 20 |
results:
|
| 21 |
- task:
|
| 22 |
type: automatic-speech-recognition
|
| 23 |
dataset:
|
| 24 |
+
name: sulabhkatiyar/ne-asr-mjw
|
| 25 |
type: sulabhkatiyar/ne-asr-mjw
|
| 26 |
+
split: test
|
| 27 |
metrics:
|
| 28 |
- type: wer
|
| 29 |
+
value: 61.30
|
| 30 |
- type: cer
|
| 31 |
value: 15.23
|
| 32 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 33 |
|
| 34 |
+
# NE-ASR: Karbi (mjw)
|
| 35 |
|
| 36 |
+
Romanized Karbi CTC ASR adapter for [`facebook/mms-1b-all`](https://huggingface.co/facebook/mms-1b-all).
|
| 37 |
|
| 38 |
+
## Model description
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 39 |
|
| 40 |
+
This is a per-language CTC adapter for the MMS-1B model. The base model is frozen;
|
| 41 |
+
only the language adapter (about 2.19 M parameters, roughly 8.8 MB on disk) and the
|
| 42 |
+
CTC head are trained. Input is 16 kHz mono audio (up to 30 seconds). Output is a
|
| 43 |
+
Romanized (Latin-script) transcript, lower-cased and NFC-normalized.
|
| 44 |
|
| 45 |
+
## Datasets
|
| 46 |
|
| 47 |
+
- Training: [`sulabhkatiyar/ne-asr-mjw`](https://huggingface.co/datasets/sulabhkatiyar/ne-asr-mjw)
|
| 48 |
+
- Augmented training: [`sulabhkatiyar/ne-asr-mjw-aug`](https://huggingface.co/datasets/sulabhkatiyar/ne-asr-mjw-aug)
|
| 49 |
|
| 50 |
+
| split | n |
|
| 51 |
+
|-------|--:|
|
| 52 |
+
| train | 1,524 |
|
| 53 |
+
| val | 60 |
|
| 54 |
+
| test | 39 |
|
|
|
|
| 55 |
|
| 56 |
+
The `train` count above refers to the augmented training set actually used for
|
| 57 |
+
fine-tuning; the un-augmented source corpus is available at the first dataset link.
|
| 58 |
|
| 59 |
## Training
|
| 60 |
|
| 61 |
+
- Base model: `facebook/mms-1b-all` (frozen; only the language adapter and CTC head are trained)
|
| 62 |
+
- Epochs: 12
|
| 63 |
+
- Batch size: 16 (effective batch size 32 with gradient accumulation = 2)
|
| 64 |
+
- Learning rate: 3e-4
|
| 65 |
+
- Warmup ratio: 0.10
|
| 66 |
+
- Precision: bf16
|
| 67 |
+
- Augmentation: 3x speed perturbation only (pitch shift disabled for this tonal language), plus online SpecAugment
|
| 68 |
+
- Audio: 16 kHz mono; max input 30 seconds
|
| 69 |
+
- Hardware: AMD MI300X (ROCm)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 70 |
|
| 71 |
## Evaluation
|
| 72 |
|
| 73 |
+
| split | n | WER% | CER% |
|
| 74 |
+
|-------|---------:|-----------:|-----------:|
|
| 75 |
+
| val | 60 | 61.79 | 15.23 |
|
| 76 |
+
| test | 39 | 61.30 | 15.23 |
|
| 77 |
|
| 78 |
+
Reference processing: NFC + strip + lower. Hypothesis decoded with greedy CTC,
|
| 79 |
+
no language model.
|
| 80 |
|
| 81 |
## Usage
|
| 82 |
|
| 83 |
```python
|
|
|
|
|
|
|
| 84 |
from huggingface_hub import hf_hub_download
|
| 85 |
+
from transformers import Wav2Vec2CTCTokenizer, Wav2Vec2FeatureExtractor, Wav2Vec2Processor, Wav2Vec2ForCTC
|
| 86 |
+
from safetensors.torch import load_file
|
| 87 |
import torch, torchaudio
|
| 88 |
|
| 89 |
REPO = "sulabhkatiyar/ne-asr-mjw"
|
| 90 |
+
BASE = "facebook/mms-1b-all"
|
| 91 |
|
| 92 |
+
# Tokenizer and processor come from the adapter repo
|
| 93 |
+
_ = hf_hub_download(REPO, "tokenizer_config.json")
|
| 94 |
+
_ = hf_hub_download(REPO, "vocab.json")
|
| 95 |
+
tokenizer = Wav2Vec2CTCTokenizer.from_pretrained(REPO, do_lower_case=False)
|
| 96 |
+
feat_ext = Wav2Vec2FeatureExtractor.from_pretrained(BASE)
|
| 97 |
+
processor = Wav2Vec2Processor(feature_extractor=feat_ext, tokenizer=tokenizer)
|
| 98 |
|
| 99 |
+
# Load the base model and attach the adapter weights
|
| 100 |
model = Wav2Vec2ForCTC.from_pretrained(
|
| 101 |
+
BASE,
|
| 102 |
+
vocab_size=len(tokenizer),
|
| 103 |
+
pad_token_id=tokenizer.pad_token_id,
|
| 104 |
ignore_mismatched_sizes=True,
|
|
|
|
| 105 |
)
|
| 106 |
model.init_adapter_layers()
|
| 107 |
+
adapter_path = hf_hub_download(REPO, "adapter.mjw.safetensors")
|
| 108 |
+
missing, unexpected = model.load_state_dict(load_file(adapter_path), strict=False)
|
|
|
|
|
|
|
|
|
|
|
|
|
| 109 |
model.eval()
|
| 110 |
|
| 111 |
+
# Inference (expects 16 kHz mono float32)
|
| 112 |
wav, sr = torchaudio.load("your_audio.wav")
|
| 113 |
if sr != 16000:
|
| 114 |
wav = torchaudio.functional.resample(wav, sr, 16000)
|
| 115 |
+
inputs = processor(wav.squeeze(0).numpy(), sampling_rate=16000, return_tensors="pt")
|
| 116 |
with torch.no_grad():
|
| 117 |
+
logits = model(inputs.input_values).logits
|
| 118 |
+
pred_ids = logits.argmax(dim=-1)
|
| 119 |
+
transcription = processor.batch_decode(pred_ids)[0]
|
| 120 |
+
print(transcription)
|
| 121 |
```
|
| 122 |
|
| 123 |
+
## Citation
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 124 |
|
| 125 |
+
If you use this model, please cite the MMS base model:
|
| 126 |
|
| 127 |
+
```bibtex
|
| 128 |
+
@article{pratap2023scaling,
|
| 129 |
+
title = {Scaling Speech Technology to 1,000+ Languages},
|
| 130 |
+
author = {Pratap, Vineel and Tjandra, Andros and Shi, Bowen and Tomasello, Paden and Babu, Arun and Kundu, Sayani and Elkahky, Ali and Ni, Zhaoheng and Vyas, Apoorv and Fazel-Zarandi, Maryam and Baevski, Alexei and Adi, Yossi and Zhang, Xiaohui and Hsu, Wei-Ning and Conneau, Alexis and Auli, Michael},
|
| 131 |
+
journal = {arXiv preprint arXiv:2305.13516},
|
| 132 |
+
year = {2023}
|
| 133 |
+
}
|
| 134 |
+
```
|
| 135 |
|
| 136 |
+
And the NE-ASR adapter release (placeholder; replace when the canonical publication is available):
|
| 137 |
|
| 138 |
```bibtex
|
| 139 |
+
@misc{katiyar2026neasr,
|
| 140 |
+
author = {Katiyar, Sulabh},
|
| 141 |
+
title = {NE-ASR: MMS-1B Adapters for Northeast Indian Languages},
|
| 142 |
+
year = {2026},
|
| 143 |
+
howpublished = {\url{https://huggingface.co/sulabhkatiyar/ne-asr-mjw}},
|
| 144 |
+
note = {Placeholder citation; replace with the canonical publication when available.}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 145 |
}
|
| 146 |
```
|
| 147 |
+
|
| 148 |
+
## License
|
| 149 |
+
|
| 150 |
+
CC-BY-NC 4.0. This adapter is derived from [`facebook/mms-1b-all`](https://huggingface.co/facebook/mms-1b-all), which is released under CC-BY-NC 4.0. When you use this adapter, you must comply with the MMS license terms.
|