Instructions to use h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("automatic-speech-recognition", model="h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5")# Load model directly from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq processor = AutoProcessor.from_pretrained("h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5") model = AutoModelForSpeechSeq2Seq.from_pretrained("h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5", device_map="auto") - Notebooks
- Google Colab
- Kaggle
full_moonshine_tiny_wup5_ep1_lr5e-5
Full fine-tune of UsefulSensors/moonshine-tiny (27.1M parameters) for Macedonian speech-to-text, trained on the vezilka-asri collection.
Moonshine is a raw-waveform encoder-decoder: it takes input_values rather than
Whisper's fixed 30 s log-mel window, so its cost scales with actual audio length
instead of being flat per clip. That is what makes it viable on-device, and it is
why its real-time factor barely moves with utterance length where Whisper's does.
Evaluation
Held-out test set rachno_provereno_od_yt (44 clips, 0.32 h),
cuda, batch 16, 1 beam.
| metric | value |
|---|---|
| WER | 19.13 |
| CER | 7.06 |
| SER | 100.00 |
| Parameters | 27.1 M |
| Latency | 72 ms/utterance |
| Throughput | 366x real-time |
| RTF | 0.00273 |
SER is exact-match over whole utterances. These test clips average 62 words, so at this WER an exactly-correct utterance is vanishingly unlikely -- read WER/CER.
Best WER seen during training (on the same held-out set): 18.76 at step 91000.
Compared with the other runs
Compared with Whisper
The full table across every model evaluated is in comparison.md.
Training
| setting | value |
|---|---|
| learning rate | 5e-05 |
| warmup ratio | 0.05 |
| epochs | 1 |
| batch size | 32 x 1 accum |
| scheduler | cosine |
| weight decay | 0.01 |
| precision | bf16 |
| total steps | 92598 |
Usage
from transformers import AutoProcessor, AutoModelForSpeechSeq2Seq
import librosa, torch
model_id = "h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5"
processor = AutoProcessor.from_pretrained(model_id)
model = AutoModelForSpeechSeq2Seq.from_pretrained(model_id).eval()
wav, _ = librosa.load("clip.wav", sr=16000, mono=True)
feats = processor.feature_extractor([wav], sampling_rate=16000,
return_tensors="pt", padding=True)
with torch.no_grad():
ids = model.generate(**feats, max_length=192)
print(processor.batch_decode(ids, skip_special_tokens=True)[0])
max_length is capped at 192 because the decoder has 194 positions
(max_position_embeddings). Moonshine has no forced language/task tokens, so do
not pass language= or task= to generate() -- it will raise.
- Downloads last month
- 24
Model tree for h-gajdov/full_moonshine_tiny_wup5_ep1_lr5e-5
Base model
moonshine-ai/moonshine-tiny
