Instructions to use mlx-community/SongGeneration-v2-medium-bf16 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- MLX
How to use mlx-community/SongGeneration-v2-medium-bf16 with MLX:
# Download the model from the Hub pip install huggingface_hub[hf_xet] huggingface-cli download --local-dir SongGeneration-v2-medium-bf16 mlx-community/SongGeneration-v2-medium-bf16
- Notebooks
- Google Colab
- Kaggle
- Local Apps
- LM Studio
Update bf16 naming and collection links
Browse files
README.md
CHANGED
|
@@ -12,9 +12,9 @@ tags:
|
|
| 12 |
- audiolm
|
| 13 |
---
|
| 14 |
|
| 15 |
-
Part of the SongGeneration MLX conversion set.
|
| 16 |
|
| 17 |
-
# SongGeneration-v2-medium-
|
| 18 |
|
| 19 |
Apple MLX weights for the autoregressive `audiolm` token generator from Tencent SongGeneration v2-medium.
|
| 20 |
|
|
@@ -25,7 +25,7 @@ This is not a full-stack pure MLX audio pipeline yet: token generation runs with
|
|
| 25 |
| | |
|
| 26 |
|---|---|
|
| 27 |
| **Variant** | `v2-medium` |
|
| 28 |
-
| **Precision** | `bfloat16` |
|
| 29 |
| **Converted component** | SongGeneration `audiolm` token generator |
|
| 30 |
| **Runtime** | [`ailuntx/SongGeneration-MLX`](https://github.com/ailuntx/SongGeneration-MLX) |
|
| 31 |
| **Official model** | [`tencent/SongGeneration`](https://huggingface.co/tencent/SongGeneration) |
|
|
@@ -40,10 +40,10 @@ python -m venv .venv
|
|
| 40 |
.venv/bin/pip install -e .
|
| 41 |
.venv/bin/pip install -U huggingface_hub hf_transfer
|
| 42 |
|
| 43 |
-
HF_HUB_ENABLE_HF_TRANSFER=1 .venv/bin/hf download mlx-community/SongGeneration-v2-medium-
|
| 44 |
|
| 45 |
.venv/bin/python -m songgeneration_mlx.cli \
|
| 46 |
-
--model ./models/SongGeneration-v2-medium-
|
| 47 |
--lyrics '[verse] hello from mlx [chorus] sing it again' \
|
| 48 |
--description 'Pop, female vocal, bright production, [Musicality-medium].' \
|
| 49 |
--duration 2 \
|
|
@@ -70,7 +70,7 @@ HF_HUB_ENABLE_HF_TRANSFER=1 .venv/bin/hf download tencent/SongGeneration \
|
|
| 70 |
|
| 71 |
PYTORCH_ENABLE_MPS_FALLBACK=1 SONGGEN_DEVICE=mps \
|
| 72 |
.venv-decoder/bin/python scripts/decode_tokens_official.py \
|
| 73 |
-
--mlx-model ./models/SongGeneration-v2-medium-
|
| 74 |
--tokens ./tokens_2s.npz \
|
| 75 |
--output ./output_2s.flac \
|
| 76 |
--device mps
|
|
@@ -81,11 +81,11 @@ PYTORCH_ENABLE_MPS_FALLBACK=1 SONGGEN_DEVICE=mps \
|
|
| 81 |
| Variant | Disk | Notes |
|
| 82 |
|---|---:|---|
|
| 83 |
| `SongGeneration-v2-medium-fp32` | 10G | high-precision medium baseline |
|
| 84 |
-
| `SongGeneration-v2-medium-
|
| 85 |
| `SongGeneration-v2-medium-8bit` | 2.8G | smaller medium checkpoint |
|
| 86 |
| `SongGeneration-v2-medium-4bit` | 1.5G | smallest medium checkpoint |
|
| 87 |
| `SongGeneration-v2-large-fp32` | 19G | high-precision large baseline |
|
| 88 |
-
| `SongGeneration-v2-large-
|
| 89 |
| `SongGeneration-v2-large-8bit` | 5.0G | smaller large checkpoint |
|
| 90 |
| `SongGeneration-v2-large-4bit` | 2.7G | smallest large checkpoint |
|
| 91 |
| `SongGeneration-v2-fast-*` | pending | upstream fast weights were not publicly available when checked on 2026-05-31 |
|
|
@@ -93,7 +93,7 @@ PYTORCH_ENABLE_MPS_FALLBACK=1 SONGGEN_DEVICE=mps \
|
|
| 93 |
## Layout
|
| 94 |
|
| 95 |
```text
|
| 96 |
-
SongGeneration-v2-medium-
|
| 97 |
|-- model-00001-of-000xx.safetensors
|
| 98 |
|-- model.safetensors.index.json
|
| 99 |
|-- config.json
|
|
@@ -105,7 +105,7 @@ SongGeneration-v2-medium-bfloat16/
|
|
| 105 |
|
| 106 |
## Validation
|
| 107 |
|
| 108 |
-
Local Apple Silicon validation was run on the medium
|
| 109 |
|
| 110 |
| Test | Result |
|
| 111 |
|---|---|
|
|
|
|
| 12 |
- audiolm
|
| 13 |
---
|
| 14 |
|
| 15 |
+
Part of the SongGeneration MLX conversion set. Collection: https://huggingface.co/collections/mlx-community/songgeneration-v2-mlx-6a1bf9342dd0806419737229
|
| 16 |
|
| 17 |
+
# SongGeneration-v2-medium-bf16
|
| 18 |
|
| 19 |
Apple MLX weights for the autoregressive `audiolm` token generator from Tencent SongGeneration v2-medium.
|
| 20 |
|
|
|
|
| 25 |
| | |
|
| 26 |
|---|---|
|
| 27 |
| **Variant** | `v2-medium` |
|
| 28 |
+
| **Precision** | `bf16` (`bfloat16`) |
|
| 29 |
| **Converted component** | SongGeneration `audiolm` token generator |
|
| 30 |
| **Runtime** | [`ailuntx/SongGeneration-MLX`](https://github.com/ailuntx/SongGeneration-MLX) |
|
| 31 |
| **Official model** | [`tencent/SongGeneration`](https://huggingface.co/tencent/SongGeneration) |
|
|
|
|
| 40 |
.venv/bin/pip install -e .
|
| 41 |
.venv/bin/pip install -U huggingface_hub hf_transfer
|
| 42 |
|
| 43 |
+
HF_HUB_ENABLE_HF_TRANSFER=1 .venv/bin/hf download mlx-community/SongGeneration-v2-medium-bf16 --local-dir ./models/SongGeneration-v2-medium-bf16
|
| 44 |
|
| 45 |
.venv/bin/python -m songgeneration_mlx.cli \
|
| 46 |
+
--model ./models/SongGeneration-v2-medium-bf16 \
|
| 47 |
--lyrics '[verse] hello from mlx [chorus] sing it again' \
|
| 48 |
--description 'Pop, female vocal, bright production, [Musicality-medium].' \
|
| 49 |
--duration 2 \
|
|
|
|
| 70 |
|
| 71 |
PYTORCH_ENABLE_MPS_FALLBACK=1 SONGGEN_DEVICE=mps \
|
| 72 |
.venv-decoder/bin/python scripts/decode_tokens_official.py \
|
| 73 |
+
--mlx-model ./models/SongGeneration-v2-medium-bf16 \
|
| 74 |
--tokens ./tokens_2s.npz \
|
| 75 |
--output ./output_2s.flac \
|
| 76 |
--device mps
|
|
|
|
| 81 |
| Variant | Disk | Notes |
|
| 82 |
|---|---:|---|
|
| 83 |
| `SongGeneration-v2-medium-fp32` | 10G | high-precision medium baseline |
|
| 84 |
+
| `SongGeneration-v2-medium-bf16` | 5.2G | recommended medium bf16 quality baseline |
|
| 85 |
| `SongGeneration-v2-medium-8bit` | 2.8G | smaller medium checkpoint |
|
| 86 |
| `SongGeneration-v2-medium-4bit` | 1.5G | smallest medium checkpoint |
|
| 87 |
| `SongGeneration-v2-large-fp32` | 19G | high-precision large baseline |
|
| 88 |
+
| `SongGeneration-v2-large-bf16` | 9.5G | large bf16 quality baseline |
|
| 89 |
| `SongGeneration-v2-large-8bit` | 5.0G | smaller large checkpoint |
|
| 90 |
| `SongGeneration-v2-large-4bit` | 2.7G | smallest large checkpoint |
|
| 91 |
| `SongGeneration-v2-fast-*` | pending | upstream fast weights were not publicly available when checked on 2026-05-31 |
|
|
|
|
| 93 |
## Layout
|
| 94 |
|
| 95 |
```text
|
| 96 |
+
SongGeneration-v2-medium-bf16/
|
| 97 |
|-- model-00001-of-000xx.safetensors
|
| 98 |
|-- model.safetensors.index.json
|
| 99 |
|-- config.json
|
|
|
|
| 105 |
|
| 106 |
## Validation
|
| 107 |
|
| 108 |
+
Local Apple Silicon validation was run on the medium bf16 path:
|
| 109 |
|
| 110 |
| Test | Result |
|
| 111 |
|---|---|
|