AI/EXPLORER
ToolsCategoriesSitesLLMsCompareAI QuizAlternativesPremium
—AI Tools
—Sites & Blogs
—LLMs & Models
—Categories
AI Explorer

Find and compare the best artificial intelligence tools for your projects.

Made within France

Explore

  • ›All tools
  • ›Sites & Blogs
  • ›LLMs & Models
  • ›Compare
  • ›Chatbots
  • ›AI Images
  • ›Code & Dev

Company

  • ›Premium
  • ›About
  • ›Contact
  • ›Blog

Legal

  • ›Legal notice
  • ›Privacy
  • ›Terms

© 2026 AI Explorer·All rights reserved.

HomeLLMsmusicgen medium onnx

musicgen medium onnx

by chinedudave06

Open source · 273 downloads · 0 likes

0.0
(0 reviews)AudioAPI & Local
About

MusicGen Medium ONNX is an optimized version of the MusicGen music generation model, specifically designed to run efficiently on mobile or embedded devices. It enables the creation of music from text descriptions in just a few seconds, generating coherent melodies tailored to the provided prompts. Thanks to its optimized architecture with KV caching and FP16 precision, it significantly reduces the model's size while maintaining high sound quality, making it ideal for mobile applications like the DJNed app. This model stands out for its ability to produce a wide range of musical pieces, from classical styles to more experimental creations, while remaining accessible on devices with limited resources. Its use is particularly well-suited for content creators, amateur musicians, or developers looking to integrate fast and intuitive music generation into their projects.

Documentation

MusicGen Medium — ONNX FP16 (KV-Cache)

ONNX export of facebook/musicgen-medium with KV-cache decoder in FP16 precision for efficient on-device generation.

Model Details

PropertyValue
Base Modelfacebook/musicgen-medium
PrecisionFP16
AudioMono (1 channel)
Codebooks4
Hidden Size1536
Sample Rate32 kHz
Max Length1500 steps (~30s)
Total Size~6.8 GB

Files

FileDescriptionSize
decoder_model.onnxStep-0 decoder proto1.7 MB
decoder_model.onnx.dataStep-0 FP16 weights3.5 GB
decoder_with_past_model.onnxKV-cache decoder proto1.4 MB
decoder_with_past_model.onnx.dataKV-cache FP16 weights3.1 GB
text_encoder.onnxT5 text encoder210 MB
encodec_decode.onnxEnCodec audio decoder57 MB
tokenizer.jsonT5 tokenizer vocabulary2.4 MB
config.jsonModel architecture config<1 KB
generation_config.jsonGeneration parameters<1 KB

FP16 Notes

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.

Usage

These models are designed for the DJNed Android app using ONNX Runtime.

Pipeline

  1. Text encoding: text_encoder.onnx encodes the text prompt
  2. Step 0: decoder_model.onnx + .data generates the first token + initial KV-cache
  3. Steps 1+: decoder_with_past_model.onnx + .data generates subsequent tokens
  4. Audio decode: encodec_decode.onnx converts codebook tokens to audio waveform

License

This model is derived from Meta's MusicGen under the CC-BY-NC-4.0 license.

Capabilities & Tags
onnxruntimeonnxmusicgenmusic-generationkv-cachetext-to-audiofp16on-deviceandroiden
Links & Resources
Specifications
CategoryAudio
AccessAPI & Local
LicenseOpen Source
PricingOpen Source
Rating
0.0

Try musicgen medium onnx

Access the model directly