Mini-BS-RoFormer 18M β€” Core ML

HiDolen/Mini-BS-RoFormer-18M (compact Band-Split RoPE Transformer, 4-stem music source separation, MIT licensed) for Core ML on Apple devices. 17.9M params β€” the smallest separation model in this org.

Converted from the same verified reference used by the schism-mlx MLX ports. Two variants per model:

File Precision Compute units chunk residual
BSRoformer18M_Core_fp16.mlpackage FLOAT16 ALL (ANE) βˆ’75.0 dB
BSRoformer18M_Core_fp32.mlpackage FLOAT32 CPU+GPU βˆ’137.6 dB

Verified on-device-equivalently via coremltools on an M5 Max, against the reference implementation on real audio. fp16 is ANE-eligible and recommended for iPhone / iPad; fp32 is the tight-parity fallback.

Download

.mlpackage bundles must be materialized as real files β€” the Core ML compiler rejects the symlinks that a default snapshot_download creates in the Hugging Face cache:

from huggingface_hub import snapshot_download
path = snapshot_download("schism-audio/mini-bs-roformer-18m-coreml", local_dir="./mini-bs-roformer-18m-coreml")

(or hf download schism-audio/mini-bs-roformer-18m-coreml --local-dir ./mini-bs-roformer-18m-coreml). Swift hosts downloading files directly are unaffected.

I/O contract

  • input spec: (1, 690, 4100) float32 β€” merged STFT of one 8 s / 352800-sample chunk: n_fft 2048, hop 512, hann, unnormalized, layout (C, 1025, 690) complex β†’ (690, 1025*2*2) with frequency outer, channel, re/im innermost (see test vectors)
  • output mask: (1, 4, 690, 4100) float32 β€” per-stem complex mask, same merged layout; unmerge β†’ complex, multiply with the same STFT, iSTFT (n_fft 2048, hop 512, unnormalized) β†’ stems
  • full tracks: 8 s / 352800-sample chunks, 50% overlap, linear fade window (fade = chunk/10), fold-normalized overlap-add (see separate() in schism-mlx bs_roformer/model.py)
  • stem order is bass / drums / other / vocals β€” not the Demucs order

DSP frontend (host-side)

The Core ML graph contains the network only. The host implements the audio frontend and must match schism_mlx.audio numerically β€” test_vectors_*.npz in this repo holds deterministic input/output pairs (float32; match within ~1e-4 relative to be interchangeable with what these models were verified against). test_vectors_pipeline.npz additionally pins the full-track orchestration around the model call (chunk grid, blending, normalization) via a deterministic mock model β€” scaled-down sizes, same algorithm, generated by the shipped schism-mlx separate() / windowing code. test_vectors_integration.npz goes one step further: a full synthetic track plus the verified reference output, for end-to-end host validation (the schism-dsp integration tests run the published fp32 core through it). A validated Swift implementation (Accelerate; modules SchismDSP and SchismPipeline) is available at schism-audio/schism-dsp, tested against these exact vectors.

License

MIT, inherited from the source weights. Model by HiDolen; Core ML conversion by schism-audio.

Downloads last month
25
Inference Providers NEW
This model isn't deployed by any Inference Provider. πŸ™‹ Ask for provider support