# lucidrains/musiclm-pytorch

Implementation of MusicLM, Google's new SOTA model for music generation using attention networks, in Pytorch

Repository: https://github.com/lucidrains/musiclm-pytorch
Canonical: https://ross.abutalabs.com/products/musiclm-pytorch
Language: Python
License: MIT
License Family: permissive
Topics: artificial-intelligence, attention-mechanisms, deep-learning, music-synthesis, transformers
Last push: 2023-09-06T16:36:58+00:00

## Health v2 (maintenance only)
Score: 21/100 (v2, computed 2026-09-02T17:46:02.011165+00:00)
- activity 0, release rhythm 8, longevity 93
- inputs: {"age_days": 1314, "days_push": 1092, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 3293, forks 264 (observed 2026-08-28T04:07:53.995977+00:00)

## What it is
A PyTorch library implementing MusicLM, Google's text-to-music generation model, by combining text-conditioned AudioLM with MuLan, a text-audio contrastive embedding model. It provides the building blocks (MuLaN, AudioSpectrogramTransformer, TextTransformer, MuLaNEmbedQuantizer) needed to train and condition music generation from text descriptions.

## Use cases
- generate music from text descriptions in pytorch
- train a text-audio contrastive model like MuLan
- replicate Google's MusicLM model
- embed audio and text into a joint embedding space
- condition AudioLM on text for music synthesis

## When to choose
- you want to experiment with or replicate MusicLM in PyTorch
- you need a MuLan-style text-audio contrastive model implementation
- you're doing research on text-to-music generation

## When to avoid
- you need a ready-to-use pretrained music generator out of the box
- you want a production music synthesis service rather than research code
- you're unwilling to train the MuLan model yourself on large audio-text datasets

## Facets
- artifact type: library
- maturity: experimental
- function: machine-learning, deep-learning, audio-processing, llm-training
- domain: deep-learning, machine-learning, artificial-intelligence
- platform: python
- tags: text-to-music, music-generation, contrastive-learning, transformers, pytorch, research-replication, audio

## Member repositories
- lucidrains/musiclm-pytorch (main) score 21

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:53.995977+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:22:44.704853+00:00, confidence not recorded.
  - readme: https://github.com/lucidrains/musiclm-pytorch (fetched 2026-08-28T04:07:53.995977+00:00, sha dcd45c64369f)
  - registry_pypi: https://pypi.org/pypi/musiclm-pytorch/json (fetched 2026-08-29T09:35:43.665601+00:00, sha aaa6f08ca242)
- Data as of 2026-08-30T08:39:29.467469+00:00.
