Overview
MusicGen is Meta’s open text-to-music model, introduced in June 2023 by the FAIR team as part of the AudioCraft library. It generates instrumental music from a text description and, in its melody variant, can follow the tune of a reference recording. The model card says it was trained between April and May 2023 on 20,000 hours of licensed music.
Highlights
- Text-to-music generation of instrumental tracks at 32 kHz
- Melody conditioning to follow an existing tune
- Three sizes: 300M (small), 1.5B (medium) and 3.3B (large) parameters
- Code under the MIT license; weights under CC-BY-NC 4.0
- Runs through Meta’s AudioCraft library or Hugging Face Transformers (version 4.31.0 onwards)
How it works
MusicGen has two parts. An EnCodec audio tokenizer compresses 32 kHz audio into four parallel streams of discrete codes (“codebooks”) at 50 steps per second. A single autoregressive transformer then predicts those codes from the text prompt. Earlier systems such as Google’s MusicLM stacked several models; MusicGen predicts all four codebooks in one pass by adding a small delay between them, so it needs only 50 generation steps per second of audio. Our explainer on how AI music generation works walks through this audio-token approach.
Training data and evaluation
Meta says the training data came from the Meta Music Initiative Sound Collection, Shutterstock’s music collection and Pond5, all covered by agreements with rights holders. Vocals were removed with the HT-Demucs source separation model, which is why the released checkpoints produce instrumentals only. Meta evaluated the models on Google’s MusicCaps benchmark using Fréchet Audio Distance, KL divergence and CLAP score, plus human listening studies of quality and text relevance.
Typical uses
Research on music generation, prototyping background music and experimenting with AI composition. The model card names research and hobbyist exploration as the intended uses, and says the model should not be put into downstream applications without further risk evaluation.
Things to consider
- Model weights are licensed for non-commercial use only.
- It cannot generate realistic vocals or sung lyrics.
- It was trained on English descriptions and works less well with prompts in other languages.
- Quality varies across musical styles and cultures, and outputs sometimes fade to silence early.
- Commercial tools such as Suno and Udio generate full songs with vocals; among open models, Stable Audio 3 is a newer alternative.
Specifications are taken from the model card on Hugging Face and the MusicGen paper. Benchmark results depend on evaluation settings; see how AI benchmarks work.