All models

musicgen (base text to music)

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

Audio and speech · 247 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 (19 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
367.2K
Operations
247
Framework
PyTorch
Recurrent
No
Published
NeurIPS 2023
Cited by
224 (as of 22 October 2026)
Authors
Jade Copet, Felix Kreuk, Itai Gat and others
Name in source
musicgen:base-text-to-music
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
m7525
Graph hash
2b644a62d7c4d8c1d4f2cdc01376a20e123557800c5a92120475675bb0c42510
Skeleton hash
2f6c10bdd77f4f9194616574770609d3bf5efcdc67c6119719aa70f85e9b149b
Architecture hash
a0ae6e070a729728cdc4bfa03a26b6455b80f58726c0c67620b83462b75e10a2
Diagram SHA-256
6eb041e8c913affb62bd9783d21bafdbd14826602c510a1f28f2858363767e31
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

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}, 
}