Automatic Speech Recognition
Transformers
ONNX
PEFT
whisper
polywhisper
indic-asr
hindi-asr
tamil-speech-recognition
telugu-stt
bengali-asr
marathi-speech-to-text
speech-recognition
multilingual
lora
hindi
tamil
telugu
bengali
marathi
indic-languages
indian-languages
speech-to-text
low-resource-asr
fleurs
indicvoices
quantized
efficient-asr
edge-asr
Eval Results (legacy)
Instructions to use eulogik/polywhisper with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use eulogik/polywhisper with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="eulogik/polywhisper")# pip install -U transformers accelerate # Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("eulogik/polywhisper") model = AutoModelForSpeechSeq2Seq.from_pretrained("eulogik/polywhisper", device_map="auto") - PEFT
How to use eulogik/polywhisper with PEFT:
Task type is invalid.
- Notebooks
- Google Colab
- Kaggle
v8 training: kaggle_train_resumable.py
Browse files- kaggle_train_resumable.py +10 -5
kaggle_train_resumable.py
CHANGED
|
@@ -28,7 +28,7 @@ REPO = "eulogik/polywhisper"
|
|
| 28 |
LANG_SPLIT = {"gpu0": ["hi", "te", "bn"], "gpu1": ["ta", "mr"]}
|
| 29 |
SAVE_DIRS = {"gpu0": "polywhisper_output_gpu0", "gpu1": "polywhisper_output_gpu1"}
|
| 30 |
CUDA_IDX = {"gpu0": "0", "gpu1": "1"}
|
| 31 |
-
EPOCHS = 3
|
| 32 |
# T4 (14.5GB) OOMs at batch 8 with small+encLoRA @ seq 3000 (v6 run died at 65min,
|
| 33 |
# both GPUs, in cross-attn k_proj hook). Batch 4 fits comfortably; ~0.6-1.0 steps/s.
|
| 34 |
BATCH = 4
|
|
@@ -173,7 +173,8 @@ def run_gpu(gpu, langs, save_dir):
|
|
| 173 |
"--encoder-lora",
|
| 174 |
"--tag", TAG,
|
| 175 |
"--save-dir", save_dir,
|
| 176 |
-
"--max-runtime-hours", "
|
|
|
|
| 177 |
]
|
| 178 |
env = dict(os.environ)
|
| 179 |
env["CUDA_VISIBLE_DEVICES"] = CUDA_IDX[gpu]
|
|
@@ -191,13 +192,17 @@ def eval_lang(lang, save_dir):
|
|
| 191 |
if not Path(test_json).exists():
|
| 192 |
log(f" [eval] {lang}: no cached fleurs test, skipping")
|
| 193 |
return
|
| 194 |
-
|
| 195 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
| 196 |
out = f"{save_dir}/eval_{lang}_pure_fleurs.json"
|
| 197 |
if Path(out).exists():
|
| 198 |
log(f" [eval] {lang}: already done")
|
| 199 |
return
|
| 200 |
-
if not
|
| 201 |
log(f" [eval] {lang}: adapter missing/corrupt — skipping (was training interrupted?)")
|
| 202 |
return
|
| 203 |
cmd = [
|
|
|
|
| 28 |
LANG_SPLIT = {"gpu0": ["hi", "te", "bn"], "gpu1": ["ta", "mr"]}
|
| 29 |
SAVE_DIRS = {"gpu0": "polywhisper_output_gpu0", "gpu1": "polywhisper_output_gpu1"}
|
| 30 |
CUDA_IDX = {"gpu0": "0", "gpu1": "1"}
|
| 31 |
+
EPOCHS = 5 # increased from 3 — te/bn underfit at 3 epochs, real cosine now decays
|
| 32 |
# T4 (14.5GB) OOMs at batch 8 with small+encLoRA @ seq 3000 (v6 run died at 65min,
|
| 33 |
# both GPUs, in cross-attn k_proj hook). Batch 4 fits comfortably; ~0.6-1.0 steps/s.
|
| 34 |
BATCH = 4
|
|
|
|
| 173 |
"--encoder-lora",
|
| 174 |
"--tag", TAG,
|
| 175 |
"--save-dir", save_dir,
|
| 176 |
+
"--max-runtime-hours", "11",
|
| 177 |
+
"--wer-eval-every", "500",
|
| 178 |
]
|
| 179 |
env = dict(os.environ)
|
| 180 |
env["CUDA_VISIBLE_DEVICES"] = CUDA_IDX[gpu]
|
|
|
|
| 192 |
if not Path(test_json).exists():
|
| 193 |
log(f" [eval] {lang}: no cached fleurs test, skipping")
|
| 194 |
return
|
| 195 |
+
# check for WER-based best checkpoint first, fall back to CE-based best
|
| 196 |
+
adapter_wer = f"{lang}_best_wer{TAG}.pt"
|
| 197 |
+
adapter_ce = f"{lang}_best{TAG}.pt"
|
| 198 |
+
adapter_path = Path(save_dir) / "adapters_v3"
|
| 199 |
+
adapter = adapter_wer if (adapter_path / adapter_wer).exists() else adapter_ce
|
| 200 |
+
adapter_full = adapter_path / adapter
|
| 201 |
out = f"{save_dir}/eval_{lang}_pure_fleurs.json"
|
| 202 |
if Path(out).exists():
|
| 203 |
log(f" [eval] {lang}: already done")
|
| 204 |
return
|
| 205 |
+
if not adapter_full.exists() or not artifact_ok(adapter_full):
|
| 206 |
log(f" [eval] {lang}: adapter missing/corrupt — skipping (was training interrupted?)")
|
| 207 |
return
|
| 208 |
cmd = [
|