Moonshine Tiny

Useful Sensors' original Moonshine tiny (27M) English speech recognizer -- a convolution stem and encoder over the raw waveform and an autoregressive decoder -- exported for loom.cpp in two precisions.

This is a loom.cpp export: a single self-describing GGUF that carries its own graph topologies, tokenizer (if any) and driver script, produced by loom-exporter.

Original model

Exported from moonshine-ai/moonshine-tiny. The F32 file carries the same parameters unmodified, in loom.cpp's GGUF format; the others are quantized from them (see Files).

License

mit, inherited from the base model above.

Language(s)

en

Usage

Run it with loom-py -- loom-py-rt on PyPI:

pip install -U "loom-py-rt[hub]"
import loom

# This repo holds more than one precision of the model; name the file you want (see "Files" below).
model = loom.Model.from_pretrained("loom-ai-org/moonshine-tiny-loom", "moonshine-tiny-f32.gguf")

# Audio is a mono float list at 16 kHz. This model decodes in the one language it was trained for and
# takes no `language=` argument -- passing one warns and is ignored, because nothing in its decode
# could act on it.
result = model.speech2text.infer(audio)
print(result.text)

The layer underneath

The call above is the high-level door: one per task, named for the modality pair it maps between, with the windowing, sampling and assembly this model needs already applied. Under it, model.infer(...) passes your arguments straight to the driver this GGUF embeds -- which is where you go for a knob the door does not name.

model.driver_source prints that driver, including a header comment documenting every argument it accepts for this model, and is the authority on it. See loom-py for the API and loom.cpp for what the engine does between the two.

Known limitations

At most 29.8 s per call. The decoder holds 194 tokens, and the model card's budget of 6.5 tokens per second of audio reaches that at 29.8 s; a longer clip is refused with an error rather than transcribed short. Split long audio at its pauses -- a VAD such as silero-vad-loom finds them -- and transcribe each part.

Decoding is the model card's own: greedy, and capped at 6.5 tokens per second of audio "to avoid hallucination loops". A clip shorter than about 0.3 s therefore returns no text. Like other encoder-decoder recognizers it can still repeat or invent words on noisy or very short audio.

Small, not fast, on the smallest boards. On a Raspberry Pi Zero W (one ARMv6 core, no SIMD) 11 s of speech takes about 75 s at either precision. English only, mono 16 kHz.

Files

One model in several precisions; every file carries the same graph and driver. The quantized ones pack the convolution and projection weights (loom-export --quantize <type>), so their numbers differ from the original model's by the amount noted.

  • moonshine-tiny-f32.gguf -- full precision, 110 MB. Token for token transformers' own transcript on all 74 test clips.
  • moonshine-tiny-q8_0.gguf -- 31 MB. The same word error rate as F32 on the same clips (9.83%); 67 of 74 transcripts are token-identical, the others differ in a word or its punctuation. The smaller file and the smaller memory footprint (103 MB peak on a Pi Zero versus 174 MB).
Downloads last month
14
GGUF
Model size
27.1M params
Architecture
loom-moonshine
Hardware compatibility
Log In to add your hardware

8-bit

32-bit

Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for loom-ai-org/moonshine-tiny-loom

Quantized
(15)
this model

Collection including loom-ai-org/moonshine-tiny-loom