Instructions to use milliwattlabs/YuE2-3B-MLX-4bit with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use milliwattlabs/YuE2-3B-MLX-4bit with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] hf download milliwattlabs/YuE2-3B-MLX-4bit --local-dir YuE2-3B-MLX-4bit
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- LM Studio
- Atomic Chat
YuE2-3B Β· MLX 4-bit
YuE2-3B quantized to 4-bit for MLX. It turns lyrics and a style prompt into a full song, vocals and accompaniment, on Apple silicon, including iPhone.
All the weights together take 2.15 GB. The two transformer models shrink from 7.2 GB in bf16 to 2.0 GB. A 30-second song generates in 82 seconds on an iPhone 17 Pro Max running iOS 26.6.
Published by Milliwatt Labs. This is an unofficial conversion. For the model itself, its training and its benchmarks, see the original model card.
Samples
Generated on a Mac mini (M4) with this 4-bit model. More on EM Radio, streaming 24/7.
| Song | Artist | Genre | Listen |
|---|---|---|---|
| Better Off | Kira Nova | Pop | |
| Signal | Ada Ray | Top 40 | |
| Coal Miner's Blood | Boone Harlan | Country | |
| Phase Shift | MNTL | EDM | |
| Mud on the Tires | Cole Bridger | Country | |
| Pressure | Blaze Meridian | Hip-hop |
Apps
Free apps built on this model. ChorusPop adds stems, MIDI import and export, and an instrumental mode.
| Platform | App |
|---|---|
| iPhone and iPad | ChorusPop (TestFlight beta) |
| Mac | ChorusPop for Mac (zip) |
| Android | ChorusPop for Android (APK beta). Uses YuE2 weights converted for Android, not these MLX files. |
Files
| Directory | What | Precision | Size |
|---|---|---|---|
weights/ar-4bit/ |
Autoregressive LM (Qwen3 architecture, 28 layers). Writes the ABC score, then the audio codec tokens. | 4-bit, group size 64 | 1.22 GB |
weights/nar-4bit/ |
Non-autoregressive velocity model. Turns codec tokens into audio latents. | 4-bit, group size 64; latent interface (llm2vae, vae2llm, time_embedder) kept in bf16 |
0.80 GB |
weights/vae-decoder/ |
Oobleck decoder from YuE2-Vae. Turns 25 Hz latents into 48 kHz stereo audio. | fp16 | 0.13 GB |
Also in weights/: the tokenizer (qwen.tiktoken) and the sampling settings
(yue2_generation_config.json). At the repo root: the MLX runner (yue2_mlx.py,
run_song.py), requirements.txt, and the license files.
Quantization is MLX's affine mx.quantize (4 bits, group size 64). The AR
directory is a standard qwen3 MLX checkpoint with a quantization block in
config.json.
Changes from the original
As the CC BY-NC 4.0 license requires, here is what was changed:
- The AR and NAR linear weights are quantized to 4-bit (affine, group size 64). Norms and the NAR latent interface stay in bf16.
- In the VAE decoder, weight normalization is folded into plain weights
(
g Β· v / βvβ), stored in fp16. Only the decoder is included. - The tensors were rearranged into three MLX checkpoints. No weights were retrained or fine-tuned.
Quality compared with bf16
Each number compares this conversion with the original bf16 weights on the same prompt and seed. That's one song, so treat it as a fidelity check, not a benchmark.
| Check | Result |
|---|---|
| AR codec tokens: top-1 agreement with bf16 (teacher-forced) | 82.9% |
| AR codec KL divergence from bf16 | 0.023 |
| AR codec perplexity, 4-bit / bf16 | 39.3 / 40.0 |
| AR score (ABC) tokens: top-1 agreement | 98.8% |
| NAR velocity cosine vs bf16 | 0.9965 |
| Rendered latents, cosine vs bf16 (same codec tokens and noise) | 0.985 |
| VAE decoder fp16 vs fp32 | 60.8 dB SNR |
| Free-running song from lyrics | Finishes normally (emits the end-of-music token), 560 score + 1,056 codec tokens |
For the same seed, the 4-bit model doesn't reproduce the bf16 song note for note. Its songs drift into a different, equally valid performance.
On a Mac
One full song, measured on a Mac mini (M4, 16 GB) running macOS 26.5 with MLX 0.32.2. The model ended the song on its own after 61.9 seconds of audio.
| Stage | Seconds |
|---|---|
| Load (tokenizer, AR, NAR) | 1.7 |
| Score (ABC), 691 tokens at 80 tokens/s | 9.6 |
| Codec tokens, 1,548 at 85 tokens/s | 19.0 |
| NAR (codec β latents), 32 steps | 116.1 |
| VAE decode | 5.2 |
| Total | 152 |
Peak MLX memory was 3.5 GB, during VAE decode.
On iPhone
A 30-second clip, measured on an iPhone 17 Pro Max running iOS 26.6:
| Stage | Seconds |
|---|---|
| Load (tokenizer, AR) | 0.6 |
| Score (ABC), 26 tokens/s | 23.2 |
| Codec tokens (750), 41 tokens/s | 18.8 |
| NAR (codec β latents) | 34.3 |
| VAE decode | 4.3 |
| Total | 81.6 |
- Memory: peak footprint 1.9 GB during generation and 3.6 GB during VAE decode.
- Thermal state: nominal the whole run.
- Latents match the reference implementation's latents at cosine 0.9995 for the same tokens.
Usage
Requirements
- An Apple silicon Mac (M1 or later). Intel Macs are not supported.
- 8 GB of memory minimum; 16 GB recommended. A 3Β½-minute song peaks at 3.5 GB.
- macOS 14 or later.
- Python 3.10 or later.
Tested on a Mac mini (M4, 16 GB) with macOS 26, Python 3.12, mlx 0.32.2
and mlx-lm 0.29.1.
Got it running on another Mac? Let us know in the Community tab which Mac it was and how long a song took.
pip install mlx mlx-lm numpy tiktoken huggingface_hub
hf download milliwattlabs/YuE2-3B-MLX-4bit --local-dir YuE2-3B-MLX-4bit
cd YuE2-3B-MLX-4bit
python run_song.py --weights weights --out out \
--style "upbeat indie pop, warm female lead vocal, acoustic guitar, light drums" \
--lyrics "$(cat lyrics.txt)" --seed 11
The song is written to out/song.wav (48 kHz stereo), and the score to
out/abc.txt. Lyrics use [verse] and [chorus] section tags. The same seed
gives a different song than the original PyTorch release, because MLX uses a
different random number generator.
--cot picks how much of the score the model writes before the audio:
full (melody and chords, the default), melody, or off.
Limitations
- Non-commercial only. The license comes from the original weights (see below).
- Everything in the original card's limitations applies here too.
- The runner generates a song in a single context window. Songs longer than one window, which the original splits into chunks, aren't supported yet.
- The quality figures above cover one prompt and one seed. Listen before relying on it.
- Only the decoder half of the VAE is included, so this conversion can't encode reference audio. Cover mode, which needs the encoder, isn't supported.
Acceptable use
Don't use this model, or music made with it, to:
- imitate a real artist's voice or present a song as theirs, without their consent;
- copy or reproduce copyrighted lyrics, melodies or recordings you don't have the rights to;
- deceive people, including passing generated songs off as a real artist's release;
- harass, threaten or defame anyone, or make hateful content or sexual content involving minors;
- break any law.
Say a song is AI-generated wherever a platform or the law requires it. You are responsible for what you make. These terms come in addition to this license and the original model's terms.
License
The weights are derived from YuE2-3B and YuE2-Vae, which are licensed under
CC BY-NC 4.0, and are
redistributed under the same license. Commercial use is not permitted.
The MLX runner (yue2_mlx.py, run_song.py) is an independent MLX
implementation by Milliwatt Labs, released under the MIT license
(LICENSE-CODE). The MIT license covers the code only, not the weights. The
Oobleck VAE and SnakeBeta designs it follows keep their original MIT licenses
(THIRD_PARTY_NOTICES.md, licenses/).
The original model is by the Multimodal Art Projection team.
Citation
If you use this model, please cite the original YuE work:
@article{yuan2025yue,
title = {{YuE}: Scaling Open Foundation Models for Long-Form Music Generation},
author = {Yuan, Ruibin and Lin, Hanfeng and Guo, Shuyue and others},
journal = {arXiv preprint arXiv:2503.08638},
year = {2025},
url = {https://arxiv.org/abs/2503.08638}
}
4-bit
Model tree for milliwattlabs/YuE2-3B-MLX-4bit
Base model
m-a-p/YuE2-3B