All models

audiocraft.MusicGen

A MusicGen model that generates music from a text description with one transformer over audio tokens.

Audio and speech · 1,750 operations Checked

100%

Showing the top corner; full diagram not loaded yetShowing a small copy; full diagram not loaded yetLarge diagram, not loaded yet

Open SVG

Loading diagram (115 KB)

Open in a new tab

Click or tap a spot to read it up close. Scroll or drag inside the diagram to move through it. Zoom with + and − or Ctrl and scroll. Press 0 for the whole graph. Swipe inside the diagram to move through it. Use + and − to zoom.

At a glance

Family
MusicGen
Parameters
586.9M
Operations
1,750
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2023
Cited by
224 (as of 22 October 2026)
Authors
Jade Copet, Felix Kreuk, Itai Gat and others
License
MIT
Checked
Passed: the trace was replayed operation by operation and matched the model's own output for this input.

Files

The diagram is a drawing of a TorchLens trace of the source code. It contains no code or weights.

Details
Stable ID
m3562
Graph hash
19e3cda9e6aedb901e3860b894fe1a4257b87dc87315bfcac84b02675c5e9252
Skeleton hash
51c95de4d3d23ef4c7ac44cf40b949ebfb6dcbe8b52bc953e376b6626b8acfce
Architecture hash
59a9f5f236f4012fbebc59081938d5d6eae52f4b7b6624451e931f645a12b16f
Diagram SHA-256
1a0a285d12ba6a092d7cf313f88014311d346a45250cf00ef33075a9061f4266
TorchLens version
2.36.0
Renderer
graphviz 2.43.0+pyvips 3.2.0+libvips 8.18.7+render-opts@06c1f0d3
Check
Forward pass replayed in PyTorch

What it is

This model is MusicGen as built in AudioCraft, a PyTorch library for deep learning research on audio generation.

About this model's family

MusicGen is a text-to-music model: it generates music samples conditioned on text descriptions or audio prompts. Its core is a single language model that operates over several streams of compressed discrete music representation, that is, tokens. The paper says this single-stage transformer with efficient token interleaving patterns eliminates the need for cascading several models, hierarchically or by upsampling.

The model card describes a single stage auto-regressive Transformer trained over a 32kHz EnCodec tokenizer with 4 codebooks sampled at 50 Hz. By introducing a small delay between the codebooks, the authors show the codebooks can be predicted in parallel, which leaves only 50 auto-regressive steps per second of audio. Each transformer layer has a causal self-attention block followed by a cross-attention block that is fed with the conditioning signal.

The model card lists sizes of 300M, 1.5B and 3.3B parameters and two variants, one trained for text-to-music generation and one for melody-guided music generation. According to the card, the model is trained on 20K hours of data.

Key idea. MusicGen generates music with a single-stage transformer language model over several streams of audio tokens, using token interleaving patterns instead of a cascade of models.

  • MusicGen
  • audiocraft.MusicGen
  • AudioCraft
  • text-to-music
  • music generation
  • controllable music generation
  • audio language model
  • melody conditioning
  • codebook interleaving

AI-written summary, based on the paper and checked automatically against it; not reviewed by a person. Corrections welcome.

Cite the paper

@misc{copet2024simplecontrollablemusicgeneration,
      title={Simple and Controllable Music Generation}, 
      author={Jade Copet and Felix Kreuk and Itai Gat and Tal Remez and David Kant and Gabriel Synnaeve and Yossi Adi and Alexandre Défossez},
      year={2024},
      eprint={2306.05284},
      archivePrefix={arXiv},
      primaryClass={cs.SD},
      url={https://arxiv.org/abs/2306.05284}, 
}