PANNs CNN14 (AudioSet) โ€” MLX

PANNs CNN14 (Cnn14_mAP=0.431, Kong et al. 2020, 527-class AudioSet tagging) converted to MLX for Apple Silicon. Source checkpoint: Zenodo record 3987831 (original implementation).

Runs with the open schism-mlx package:

from schism_mlx.classify.cnn14 import Cnn14

model = Cnn14.from_pretrained("schism-audio/cnn14-audioset-mlx")
for label, score in model.classify("song.wav", top_k=5):
    print(f"{score:.3f}  {label}")

Unlike AST, CNN14 handles arbitrary-length audio โ€” no 10-second truncation. ~7 ms per 10-second clip on an M5 Max (RTF 0.0007).

Conversion & verification

  • Weights are the original float32 checkpoint, tensor-renamed and with convs permuted to MLX's channels-last layout. No quantization, no finetuning.
  • Verified end to end against a torch reference reconstructed from the released checkpoint's own frozen STFT/mel buffers: max logit difference 2.9e-6, identical top-5 on synthetic signals and real drum recordings from schism-audio/e-gmd.
  • The librosa-style log-mel frontend (32 kHz, 64 mel bins, 50โ€“14000 Hz) is reimplemented in pure numpy; its mel filterbank matches the checkpoint's frozen melW bit-exactly. No torch/librosa needed at inference time.

Precision note: on M5-class GPUs, MLX silently runs float32 matmuls at TF32-class precision (ml-explore/mlx#3860). schism_mlx disables this on import; if you load these weights with your own MLX code, set MLX_ENABLE_TF32=0 to match the reference implementation.

License

CC-BY-4.0, inherited from the source checkpoint. Model by Qiuqiang Kong, Yin Cao, Turab Iqbal, Yuxuan Wang, Wenwu Wang, and Mark D. Plumbley (PANNs); MLX conversion by schism-audio.

Downloads last month
20
Safetensors
Model size
80.8M params
Tensor type
F32
ยท
MLX
Hardware compatibility
Log In to add your hardware

Quantized

Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support

Paper for schism-audio/cnn14-audioset-mlx