Views
No views yet
mlx-community/parakeet-tdt-0.6b-v2) are
full precision: 2,472 MB to download, then quantized on each machine at
load time. These weights are the result of that same quantization
(mlx.nn.quantize, bits=8, group_size=64), saved once:| upstream | this repo | |
|---|---|---|
| download | 2,472 MB | 933 MB |
| model load | ~1.7 s | ~0.05 s |
| transcription output | reference | identical |
parakeet_mlx.from_pretrained() does NOT load quantized weights: it builds a
full-precision model and loads the tensors into it. Build the quantized
structure first, then load:1import json
2import mlx.nn as nn
3from huggingface_hub import hf_hub_download
4from parakeet_mlx.utils import from_config
5
6repo = "cosmicfusionlabs/parakeet-tdt-0.6b-v2-mlx-8bit"
7config = json.load(open(hf_hub_download(repo, "config.json")))
8quant = config.pop("quantization") # {"bits": 8, "group_size": 64}
9
10model = from_config(config)
11nn.quantize(model, bits=quant["bits"], group_size=quant["group_size"])
12model.load_weights(hf_hub_download(repo, "model.safetensors"))
13model.eval()
14
15result = model.transcribe("audio.wav")
16print(result.text)whisper-small.en (13.5%) and whisper-medium.en (8.2%), while running
2 to 4x faster than medium.en on an M1 Pro. 4-bit was measured too and
degraded accuracy (13.3% WER), which is why this repo ships 8-bit.