Downloads · 30 days
8
2% of all-time downloads
chinedudave06/musicgen-medium-onnx
musicgen-medium-onnx is a text-to-audio model from chinedudave06. Use it for the text-to-audio task on the model card, and read the license before you ship it in a product. It is set up for onnxruntime. The card lists the license as cc-by-nc-4.0.
ONNX export of facebook/musicgen-medium with KV-cache decoder in FP16 precision for efficient on-device generation.
Downloads · 30 days
8
2% of all-time downloads
All-time downloads
344
Public
Repo size
11.9 GB
Likes
0
Public
Click a slice to open those files.
.data6.9 GB · 96%
From the Hugging Face model README
ONNX export of facebook/musicgen-medium with KV-cache decoder in FP16 precision for efficient on-device generation.
| Property | Value |
|---|---|
| Base Model | facebook/musicgen-medium |
| Precision | FP16 |
| Audio | Mono (1 channel) |
| Codebooks | 4 |
| Hidden Size | 1536 |
| Sample Rate | 32 kHz |
| Max Length | 1500 steps (~30s) |
| Total Size | ~6.8 GB |
| File | Description | Size |
|---|---|---|
decoder_model.onnx | Step-0 decoder proto | 1.7 MB |
decoder_model.onnx.data | Step-0 FP16 weights | 3.5 GB |
decoder_with_past_model.onnx | KV-cache decoder proto | 1.4 MB |
decoder_with_past_model.onnx.data | KV-cache FP16 weights | 3.1 GB |
text_encoder.onnx | T5 text encoder | 210 MB |
encodec_decode.onnx | EnCodec audio decoder | 57 MB |
tokenizer.json | T5 tokenizer vocabulary | 2.4 MB |
config.json | Model architecture config | <1 KB |
generation_config.json | Generation parameters | <1 KB |
The decoder weights are stored in FP16 precision using ONNX external data format (.onnx.data files). This halves the model size compared to FP32 (~7 GB → ~3.5 GB per decoder) with minimal quality loss. The text encoder and EnCodec remain in FP32.
These models are designed for the DJNed Android app using ONNX Runtime.
text_encoder.onnx encodes the text promptdecoder_model.onnx + .data generates the first token + initial KV-cachedecoder_with_past_model.onnx + .data generates subsequent tokensencodec_decode.onnx converts codebook tokens to audio waveformThis model is derived from Meta's MusicGen under the CC-BY-NC-4.0 license.