Onsets & Frames β GGUF
Onsets and Frames (Hawthorne et al., 2018)
converted to GGUF for the ggml runtime in
CrispASR, where it is the
onsets-and-frames piano-transcription arm:
crispasr --piano -m onsets-and-frames-q8_0.gguf -f input.wav
Files
| file | size | note F1 | F1 with offsets | solo piano |
|---|---|---|---|---|
onsets-and-frames-f32.gguf |
101.9 MiB | 49.6% | 13.8% | 69.0% |
onsets-and-frames-q8_0.gguf |
30.8 MiB | 49.6% | 13.9% | 69.0% |
onsets-and-frames-q4_0.gguf |
18.6 MiB | 49.5% | 13.3% | 68.9% |
q8_0 is the one to use. It is indistinguishable from fp32 on every column at a third of the size, and there is no remaining case for shipping f32. q4_0 costs 0.1 point of note F1 β inside the noise β but 0.5 points of F1-with-offsets, a 3.6% relative loss, because it perturbs the frame head about five times as hard as the onset head (cosine 0.9935 against 0.9989) and the frame head is what sets note durations. Choose q4_0 when onset and pitch are what matter and durations are not.
Provenance and accuracy
Converted from the ONNX export of the checkpoint published by ddPn08/onsets-and-frames, a PyTorch reimplementation of the Magenta model.
The f32 build is not an approximation of that export β it is the same model: note-level F1 identical on every one of the ten pieces of MusicNet's test split, with post-sigmoid onset-head agreement at max 5.3e-07, cosine 1.00000000, and 100.0000% of decisions identical at the shipped thresholds.
Numbers above are all ten MusicNet test pieces, 13,589 reference notes,
scored with mir_eval.transcription (50 ms onset tolerance, 50 cents,
maximum bipartite matching), counts pooled, every arm through the same
decoder. The measurement and its method are written up in Β§35, Β§36 and Β§37
of the
CrispTuner pitch-detection report.
For context on the same corpus: Basic Pitch reaches 44.0% overall and 57.5% on solo piano; hFT-Transformer reaches 52.2% and 70.5%; MT3 reaches 76.5% overall.
Cost
Roughly 0.67 CPU-seconds per audio-second, single-threaded, on a 4-vCPU x86-64 VPS β comfortably faster than real time for offline transcription, and about 5.5β7Γ the cost of the same model under native ONNX Runtime. Quantisation buys no speed here, only size: 46% of this model is convolution and those kernels run F32 either way.
- Downloads last month
- -
4-bit
8-bit
32-bit