Parakeet TDT v3 to Core ML
These four scripts turn NVIDIA's Parakeet TDT 0.6B v3 checkpoint into the Core ML model Vox ships: a 477 MB folder that runs on the Neural Engine. The finished model is at arach/parakeet-tdt-0.6b-v3-coreml, and Build the Parakeet model yourself walks through each step.
| Step | Script | Runs on | What it does |
|---|---|---|---|
| 1 | export.py |
anywhere NeMo installs | Downloads the checkpoint, traces four pieces to TorchScript, saves reference tensors |
| 2 | build.py |
a Mac | Converts the traces to Core ML and compresses the encoder to six-bit palettes |
| 3 | check.py |
a Mac | Compares each Core ML piece with NeMo on the reference tensors |
| 4 | score.py |
a Mac | Transcribes a LibriSpeech test set and reports the word error rate |
We ran step 1 on Linux and steps 2 to 4 on an M2 MacBook Air.
Versions
- Python 3.11 or 3.12
nemo_toolkit[asr]3.0.0 andtorch2.7.0 for step 1coremltools9.0,torch2.7.0,numpy,soundfileandjiwerfor steps 2 to 4- macOS 15 or later for the Core ML models
Run it
python export.py export sample.wav # any 16 kHz recording under 15 seconds
python build.py export parakeet-coreml
python check.py export parakeet-coreml
python score.py parakeet-coreml export LibriSpeech/test-clean clean.jsonl
build.py takes about 20 minutes on an M2 MacBook Air, nearly all of it clustering the encoder's weights. The first time a Mac loads the model, macOS compiles the encoder for its Neural Engine, which takes about a minute and a half; later loads take under two seconds.
Trace in evaluation mode
NeMo's transcribe() leaves the encoder in training mode. Trace after it and the trace records dropout and batch statistics, and the encoder scores 0.74 against NeMo instead of 1.0. export.py traces first and asserts that no part of the model is still training.
Licenses
The scripts are MIT. The model they download and convert is NVIDIA's Parakeet TDT 0.6B v3, released under CC-BY-4.0.
Model tree for arach/parakeet-coreml-recipe
Base model
nvidia/parakeet-tdt-0.6b-v3