MusicGen: audio generator — what it does and what you need to run it

MusicGen is an audio generator from Meta that turns a text description into audio. It is part of the Audiocraft library and tackles the text-to-audio task: the user describes what they want to hear, and the model creates an audio clip based on that description.
What it does
MusicGen works as a language model for music generation. As described by the authors, it supports text and melody conditioning — meaning the output can be guided not only by words but also by a melody. It is built on the EnCodec audio compressor and tokenizer, which the authors describe as state-of-the-art at the time of publication.
The model is available in two places: the code is open source in the Audiocraft repository, and the model weights are published on Hugging Face. The transformers library is used to work with the model. The authors do not provide detailed quality characteristics or limitations on the duration of the generated audio.
What you need to run it
The code is written primarily in Jupyter Notebook and is distributed under the MIT license. The model weights are available under the cc-by-nc-4.0 license — this permits non-commercial use with attribution.
As described by the author, installing AudioCraft requires Python 3.9 and PyTorch 2.1.0. The largest weights file takes up 9.3 GB, and the full set of files is 19.1 GB. The repository was created on June 8, 2023, with the latest code change dated March 3, 2026.
Who it suits
MusicGen will be useful for those experimenting with text-based audio generation and willing to work with open source code. The availability of the repository and published weights allows you to study the architecture, fine-tune the model, or integrate it into your own projects — provided you comply with the non-commercial license on the weights.
For those looking for a ready-made commercial service or who do not want to deal with setting up a Python environment and downloading tens of gigabytes, this format may not be suitable. It is also worth noting that the authors do not specify detailed hardware requirements, so it makes sense to check available resources before running it.
MusicGen is an open tool for researchers and developers who need text-based audio generation with melody control. It requires a certain level of technical expertise and attention to licensing terms, but it provides access to the full code and model weights.
Fact sheet
Repository · Model on HuggingFace
| Task | text-to-audio source |
|---|---|
| Code license | MIT source |
| Weights license | cc-by-nc-4.0 source |
| Largest weights file | 9.3 GB source |
| All weights files | 19.1 GB source |
| Python | 3.9 per the author’s description source |
| Library | transformers source |
| Language | Jupyter Notebook source |
| Last code change | 2026-03-03 source |
| Repository created | 2023-06-08 source |
| GitHub stars | 23564 source |
|---|---|
| Forks | 2687 source |
| Downloads per month | 94717 source |
| Model updated | 2023-11-17 source |
Values are collected automatically from official sources and were checked on 2026-08-19. Each one links to its source, and values taken from the developer’s pages also carry a verbatim quote — hover over the note. Pricing and versions are shown as of the check date and change most often; verify on the vendor’s site before buying.



