Mindket

MusicGen Small

Newversion 1 · updated

Overview

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists who want to try text-to-music on their own computer.

MusicGen Small is a kit in the Developer category, listed by Mindket. It is free. This is version 1, last updated on . Download it on this page, a zip of its files. Nothing in it runs by itself.

At a glance

You need
  • Python and pip
  • The transformers library and scipy
  • Enough disk space for weights of about 2.4 GB in F32
Runs in
  • Windows, macOS or Linux with Python installed
  • Python scripts on transformers 4.31.0 or newer
  • A notebook, where the audio samples play inline
  • The Audiocraft library, which is the original way to run MusicGen
Start with
pip install --upgrade pip
pip install --upgrade transformers scipy

Platform

WindowsOperating system
macOSOperating system
LinuxOperating system

About

What it is

MusicGen Small is a text-to-music model from facebook. It makes music samples from a written description or an audio prompt. It is one of four released checkpoints, and it predicts all four codebooks of its audio tokens in a single pass.

Who it suits

Developers, hobby producers and audio researchers who want to try music generation from text suit it best. It runs in Python through the transformers library.

IndustryWho uses itHow they use itExample
Music productionHobby producersSketch short musical ideas from a written descriptionA prompt such as happy rock returns a short clip
Software developmentDevelopersAdd text-to-music to a Python app through the transformers pipelineSave the generated audio as a wav file
ResearchAudio researchersStudy a single-stage music generation modelCompare the four released checkpoints

Anyone who plans commercial use can skip it, because the license is non-commercial.

Where to use it

You run it yourself in Python, and you can listen to the results in a notebook or save them as files.

  • Windows, macOS or Linux with Python installed
  • Python scripts on transformers 4.31.0 or newer
  • A notebook, where the audio samples play inline
  • The Audiocraft library, which is the original way to run MusicGen
Use caseWhoWhat they get back
Text-to-music clipsHobby producersA short audio sample that follows the description
Two prompts at onceDevelopersOne mono 32 kHz waveform for each prompt
Saving a resultAnyoneA wav file you can open in any audio player

How to set it up

You need Python with pip, and the transformers library at version 4.31.0 or newer, plus scipy.

  • Python and pip
  • The transformers library and scipy
  • Enough disk space for weights of about 2.4 GB in F32
  1. Install Python on Windows, macOS or Linux.
  2. Update pip, then install transformers and scipy.
  3. Optionally download the model files ahead of time with the Hugging Face hub tools.
pip install --upgrade pip
pip install --upgrade transformers scipy
pip install -U huggingface_hub
hf download facebook/musicgen-small

How to use it

The quickest route is the text-to-audio pipeline, which takes a sentence and writes a wav file.

from transformers import pipeline
import scipy

synthesiser = pipeline("text-to-audio", "facebook/musicgen-small")

music = synthesiser("lo-fi music with a soothing melody", forward_params={"do_sample": True})

scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"], data=music["audio"])

For finer control, use the processor and the generate call from the modelling code. It turns text into a mono 32 kHz waveform.

from transformers import AutoProcessor, MusicgenForConditionalGeneration

processor = AutoProcessor.from_pretrained("facebook/musicgen-small")
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")

inputs = processor(
    text=["80s pop track with bassy drums and synth", "90s rock song with loud guitars and heavy drums"],
    padding=True,
    return_tensors="pt",
)

audio_values = model.generate(**inputs, max_new_tokens=256)
ToolWhat it does
pipelineRuns the text-to-audio task in a few lines
AutoProcessorTurns your text prompts into model inputs
MusicgenForConditionalGenerationLoads the model and generates the audio values
scipy.io.wavfile.writeSaves the audio as a wav file

Example

You give the pipeline the prompt "lo-fi music with a soothing melody". It generates a clip and writes it to a wav file named musicgen_out.wav, which you open in any audio player.

For newcomers and experts

You type a sentence that describes the music you want, and the model returns a short audio clip. Your first small try is to run the pipeline snippet with the lo-fi prompt and play the file it saves.

Under the hood, one Transformer predicts audio tokens step by step. The tokens come from an EnCodec tokenizer running at 32 kHz, with four codebooks and a 50 Hz rate. Offsetting the codebooks slightly in time lets the model predict them side by side, which means 50 steps for each second of audio. It needs no separate semantic representation, unlike some earlier methods.

  1. Text description or audio prompt in
  2. Transformer predicts four codebooks per step
  3. A small delay lets the codebooks run in parallel
  4. Mono 32 kHz audio waveform out

Good to know

The license limits what you may do with the generated clips.

  • Size: 591M parameters in the record, with weights of about 2.4 GB in F32, stored as Safetensors
  • Other versions: Hugging Face lists 8 quantized and 16 fine-tuned versions made by other people
  • License: cc-by-nc-4.0, which is non-commercial
  • Cost to run: none named
  • Data it reaches: the text or audio you give it, the wav files you save, and the model files downloaded from Hugging Face
  • Not for: commercial use under the license

README and files

README

MusicGen Small

Generates short music clips from a text description or an audio prompt, in the small checkpoint of facebook's MusicGen. It suits developers and music hobbyists who want to try text-to-music on their own computer.

Made by facebook on Hugging Face. These notes are Mindket's, written from its model page and model card; the model's own files and license are on Hugging Face.

About

What it is: MusicGen Small is a text-to-music model from facebook. It makes music samples from a written description or an audio prompt. It is one of four released checkpoints, and it predicts all four codebooks of its audio tokens in a single pass.

Who it suits: Developers, hobby producers and audio researchers who want to try music generation from text suit it best. It runs in Python through the transformers library.

Industry | Who uses it | How they use it | Example
Music production | Hobby producers | Sketch short musical ideas from a written description | A prompt such as happy rock returns a short clip
Software development | Developers | Add text-to-music to a Python app through the transformers pipeline | Save the generated audio as a wav file
Research | Audio researchers | Study a single-stage music generation model | Compare the four released checkpoints

Anyone who plans commercial use can skip it, because the license is non-commercial.

Where to use it: You run it yourself in Python, and you can listen to the results in a notebook or save them as files.

  • Windows, macOS or Linux with Python installed
  • Python scripts on transformers 4.31.0 or newer
  • A notebook, where the audio samples play inline
  • The Audiocraft library, which is the original way to run MusicGen
Use case | Who | What they get back
Text-to-music clips | Hobby producers | A short audio sample that follows the description
Two prompts at once | Developers | One mono 32 kHz waveform for each prompt
Saving a result | Anyone | A wav file you can open in any audio player

How to set it up: You need Python with pip, and the transformers library at version 4.31.0 or newer, plus scipy.

  • Python and pip
  • The transformers library and scipy
  • Enough disk space for weights of about 2.4 GB in F32
  1. Install Python on Windows, macOS or Linux.
  2. Update pip, then install transformers and scipy.
  3. Optionally download the model files ahead of time with the Hugging Face hub tools.
pip install --upgrade pip
pip install --upgrade transformers scipy
pip install -U huggingface_hub
hf download facebook/musicgen-small

How to use it: The quickest route is the text-to-audio pipeline, which takes a sentence and writes a wav file.

from transformers import pipeline
import scipy

synthesiser = pipeline("text-to-audio", "facebook/musicgen-small")

music = synthesiser("lo-fi music with a soothing melody", forward_params={"do_sample": True})

scipy.io.wavfile.write("musicgen_out.wav", rate=music["sampling_rate"], data=music["audio"])

For finer control, use the processor and the generate call from the modelling code. It turns text into a mono 32 kHz waveform.

from transformers import AutoProcessor, MusicgenForConditionalGeneration

processor = AutoProcessor.from_pretrained("facebook/musicgen-small")
model = MusicgenForConditionalGeneration.from_pretrained("facebook/musicgen-small")

inputs = processor(
    text=["80s pop track with bassy drums and synth", "90s rock song with loud guitars and heavy drums"],
    padding=True,
    return_tensors="pt",
)

audio_values = model.generate(**inputs, max_new_tokens=256)
Tool | What it does
pipeline | Runs the text-to-audio task in a few lines
AutoProcessor | Turns your text prompts into model inputs
MusicgenForConditionalGeneration | Loads the model and generates the audio values
scipy.io.wavfile.write | Saves the audio as a wav file

Example: You give the pipeline the prompt "lo-fi music with a soothing melody". It generates a clip and writes it to a wav file named musicgen_out.wav, which you open in any audio player.

For newcomers and experts: You type a sentence that describes the music you want, and the model returns a short audio clip. Your first small try is to run the pipeline snippet with the lo-fi prompt and play the file it saves.

Under the hood, one Transformer predicts audio tokens step by step. The tokens come from an EnCodec tokenizer running at 32 kHz, with four codebooks and a 50 Hz rate. Offsetting the codebooks slightly in time lets the model predict them side by side, which means 50 steps for each second of audio. It needs no separate semantic representation, unlike some earlier methods.

Text description or audio prompt in
Transformer predicts four codebooks per step
A small delay lets the codebooks run in parallel
Mono 32 kHz audio waveform out

Good to know: The license limits what you may do with the generated clips.

  • Size: 591M parameters in the record, with weights of about 2.4 GB in F32, stored as Safetensors
  • Other versions: Hugging Face lists 8 quantized and 16 fine-tuned versions made by other people
  • License: cc-by-nc-4.0, which is non-commercial
  • Cost to run: none named
  • Data it reaches: the text or audio you give it, the wav files you save, and the model files downloaded from Hugging Face
  • Not for: commercial use under the license

On Hugging Face, 14 November 2026

  • Task: text to audio
  • Library: transformers
  • Parameters: 591M
  • Weights: about 2.4 GB in F32; about 296 MB at 4-bit (estimate)
  • Formats: Safetensors
  • Downloads in the last 30 days: 184,008
  • Likes: 532
  • License: cc-by-nc-4.0
  • Quantized versions: 8
  • Fine-tunes: 16
  • Tags: transformers, pytorch, safetensors, musicgen, text-to-audio

Links

Get the model

Download its files with Hugging Face's command line:

pip install -U huggingface_hub
hf download facebook/musicgen-small

Then follow the usage in its model card. Nothing in this kit runs by itself.

Files
README.md  6 KB

1 file, 6 KB, downloaded as a zip.

What’s new

  • Version 1 · 2026-11-14

Compare with similar

Listed Hugging Face models in the same category that share the most tags with this one.

ProductDownloads, last 30 daysLikesParametersLicenseLast change
MusicGen Small This page184,008532591Mcc-by-nc-4.0
phonon-31m-enShares text-to-audio · transformers · safetensors248,57816041.1Mapache-2.0
VibeVoice-1.5BShares text-to-audio · transformers · safetensors217,9232,5202.7Bmit
ACE-Step 1.5Shares text-to-audio · transformers · safetensors98,086952—mit
YuE2-3BShares text-to-audio · safetensors22,3171,2533.6Bcc-by-nc-4.0
MOSS-SoundEffect-v2.0Shares text-to-audio · safetensors6,0961581.4Bapache-2.0
Numbers as Mindket last read them, from 2026-11-12 to 2026-11-14.

Reviews

No ratings yet

Write a review

No reviews yet.

What people say

Posts and comments that name this project on Hacker News, Bluesky, X, Reddit, Facebook and YouTube, found by a weekly search and on Trendshift. Mindket doesn’t write or check them. Open one to read it where it was posted.

Searched

More from Mindket

See all from Mindket

Bonsai-27B-GGUF

lmstudio-community · Kit

A GGUF conversion of the 27B Bonsai model for LM Studio, with a 3.80 GB Q1_0 language file and a 0.93 GB BF16 vision projector. Tested for text, vision and par…

New

Runs DeepSeek-V4.1-Flash-1017 as a 2.9 bits-per-weight EXL3 quantization, a 196 GiB copy for people serving large models on their own hardware. Perplexity stay…

New

Lexnet

alpindale · Kit

Tags every character of C source code for syntax highlighting with a tiny neural network of about 984 weights, run through a small C program. For developers an…

New

Similar in Developer

See all in Developer

FLUX.2 Klein LoRA Studio

prithivMLmods · Kit

Try a set of LoRAs for the FLUX.2 Klein image model in a Gradio app that runs in your browser or on your own computer. Made for people who make or test AI imag…

New

anaksor-ocr

Sokheng · Kit

Reads Khmer and English text from documents, receipts and photos of signs, using a detector for text lines and a recogniser for each line. Suits developers who…

New

Qwen2.5-7B-Instruct as GGUF files in eight quantization sizes, to chat with locally through llama.cpp. For people who want a capable 7.6B model on their own co…

New