Views
No views yet
coreai-torch (LLMs: coreai.llm.export) into .aimodel bundles that run on the GPU or the Neural Engine, e.g. Qwen3-8B 4-bit decodes at 94 tok/s on an M4 Max GPU, MLX 90 under the same protocol (apple-silicon-llm-bench, macOS 27 beta, 2026-06).KimberleyJSN/melbandroformer (MIT, ~228 M)
converted to Apple Core AI — the zoo's first
source-separation model. Split any song into a vocals (acapella) stem and an instrumental
(karaoke) stem, entirely on device: iPhone (AOT) and Mac.STFT -> band-split (mel, overlapping) -> axial rotary transformer x6 -> mask estimator -> band-average -> complex mask multiply -> iSTFT. The neural core lowers to Core AI
directly (no rewrite), and two moves keep the on-device host trivial:scatter_add.frames[1,2,801,2048] -> recon[1,2,801,2048]; the host only does reflect-pad, framing and
overlap-add — no FFT, no vDSP packing.mix - vocals.mbr_full_fp16.aimodel — macOS bundle (fp16, ~470 MB).mbr_full_fp16.h18p.aimodelc — iOS AOT specialization (A19 / h18p, GPU).metadata.json — sample rate, chunk size, STFT parameters, graph I/O, host recipe.golden_raw.f32 / golden_vocals.f32 — an 8 s demo chunk and its expected vocals stem
(stereo, channel-major, float32) for a host-side self-test.n_fft // 2, frame with hop_length, feed frames[1,2,801,2048], then
overlap-add the output, divide by the summed squared window and trim the pad. Chunks are 8 s with
num_overlap crossfade; instrumental = mix - vocals.| gate | result |
|---|---|
| re-authored real-arithmetic core vs the reference model | cos 1.0000000 |
in-graph STFT/iSTFT vs torch.stft reference | cos 0.9999984 |
| Core AI fp16, Mac GPU, framing + overlap-add round trip | cos 0.9999453 |
| iPhone 17 Pro (A19 Pro, AOT h18p, GPU) vs the Mac golden | cos 1.000000, rms ratio 1.0000 |
1import CoreAIKit
2
3let separator = try await KitSeparator(catalog: "melband-roformer-vocal")
4let stems = try await separator.separate(contentsOf: songURL)
5// stems.vocals / stems.instrumental — [channel][sample] at 44.1 kHzconversion/melband_roformer.