File size: 1,936 Bytes
bbe90ee
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
---
license: cc-by-nc-4.0
language:
  - en
tags:
  - mlx
  - audio
  - music
  - text-to-music
  - magnet
  - quantized
  - int4
base_model: facebook/magnet-medium-30secs
library_name: mlx
pipeline_tag: text-to-audio
---

# MAGNeT-Medium-30secs-MLX-4bit

- [speech-swift](https://github.com/soniqo/speech-swift) — Apple SDK
- [soniqo.audio](https://soniqo.audio) — website
- [blog](https://soniqo.audio/blog) — blog

MLX port of Meta's [MAGNeT](https://arxiv.org/abs/2401.04577) — a masked
parallel text-to-music model — quantized to **INT4** weight-only for
on-device generation on Apple Silicon. EnCodec 32 kHz audio decoder; T5-base
text encoder; per-codebook iterative decoding with restricted-context
self-attention.

## Model

| | |
|---|---|
| Parameters (LM) | 1.5B |
| Quantization | INT4 weight-only, group size 64 |
| Format | MLX safetensors |
| Sample rate | 32 kHz mono |
| Output length | 30 s per generation (fixed) |
| Decoding steps | 50 total (`[20, 10, 10, 10]` across 4 RVQ codebooks) |
| Bundle size | 1357 MB on disk |
| Source | [facebook/magnet-medium-30secs](https://huggingface.co/facebook/magnet-medium-30secs) |

## Performance (Apple Silicon, 30 s audio)

| Metric | Value |
|---|---|
| Real-time factor (wall / audio) | **1.20** |
| Peak RSS | 2215 MB |
| CLAP score (laion/clap-htsat-unfused, 5 prompts) | 0.334 |

## Usage

```python
from huggingface_hub import snapshot_download
bundle = snapshot_download("aufklarer/MAGNeT-Medium-30secs-MLX-4bit")
# See https://github.com/soniqo/speech-swift for production usage.
```

## Source

- Upstream: [facebook/magnet-medium-30secs](https://huggingface.co/facebook/magnet-medium-30secs)
- Paper: [MAGNeT (arxiv 2401.04577)](https://arxiv.org/abs/2401.04577)
- Audiocraft: [facebookresearch/audiocraft](https://github.com/facebookresearch/audiocraft)

## License

**CC-BY-NC 4.0** — inherited from upstream MAGNeT weights. Non-commercial use only.