MiniMax-Music3
minimax-music3 is AbstractMusic's local backend for
MiniMaxAI/MiniMax-Music3: you give it a music
description and lyrics, and it returns a song with sung vocals, or an instrumental piece, up to
6 minutes long. It runs the published Hugging Face weights in-process with AbstractMusic's own
runtimes: MLX on Apple silicon, PyTorch on NVIDIA CUDA, Apple MPS or the CPU.
This page is the complete guide to the backend. For the package as a whole, start with Getting started; the backend's place in the package is shown in Architecture, its Python surface in API, its registry entry in Models, and its failure modes in Troubleshooting.
At a glance
| CLI backend | --backend minimax-music3 (aliases minimax, music3) |
| Backend id | abstractmusic:minimax-music3 |
| Python | MiniMaxMusic3Backend, MiniMaxMusic3BackendConfig (abstractmusic.backends) |
| Model | default: AbstractFramework/minimax-music3-8bit on the MLX runtime (Apple silicon), MiniMaxAI/MiniMax-Music3 with the PyTorch runtime; see Which model runs |
| Inputs | a music description (prompt) and optional lyrics with section tags |
| Output | WAV, 44.1 kHz, stereo, 16-bit |
| Length | the requested duration, up to 360 s per song |
| Extras | abstractmusic[minimax-music3] (torch), abstractmusic[minimax-music3-mlx] (MLX, Apple silicon) |
| Weights | 12.6 GB (8-bit package), 9.6 GB (4-bit package) or 28.6 GB (published weights), downloaded only when you ask for it |
| Licence | MiniMax-Music3 Community License (commercial use under conditions; see Licence) |
How it works
The model generates a song in two stages. A Qwen3-based 8.6B language model reads the description and the lyrics and samples one semantic code per audio frame (25 frames per second of audio) with classifier-free guidance; a 0.6B depth decoder adds seven residual codes per frame. A 2.4B flow-matching transformer then turns the per-frame states into audio latents, window by window, and a vocoder decodes them into a 44.1 kHz stereo waveform.
AbstractMusic runs these weights with its own code in abstractmusic.runtimes.minimax_music3:
a runtime-neutral contract (prompt format, sampling recipe, window plan), a PyTorch runtime and an
MLX runtime. It does not use diffusers, transformers or any upstream inference code. The two
runtimes are independent implementations; each was checked against a reference implementation of
the published model on the real weights (relative differences of the order of 1e-6 in float32),
and the test suite compares them against each other.
Install
Pick the extra for your machine:
# Apple silicon (recommended there): the MLX runtime
pip install "abstractmusic[minimax-music3-mlx]"
# NVIDIA CUDA, Apple MPS or CPU: the PyTorch runtime
pip install "abstractmusic[minimax-music3]"
The torch extra installs numpy (1.26 or later), torch (2.3 or later: older releases fail with
NumPy 2 and have no bfloat16 on MPS), safetensors, tokenizers and huggingface_hub. The MLX
extra installs mlx 0.24.2 or later (on macOS arm64 only; it installs no runtime elsewhere; older
MLX releases lack the attention call the runtime uses, and 0.24.2, 0.25.2, 0.26.5, 0.29.4 and
0.31.2 pass the runtime tests), numpy, tokenizers and huggingface_hub. You can install both.
The platform profiles local, apple, gpu, all-apple and all-gpu also include what the
torch runtime needs, with the same floors; apple and all-apple include MLX as well.
Which model runs
When you name no model, the backend picks one from the runtime settings and records it
(model= on the run line, model_id and model_id_source in the metadata):
| Settings | Model | Download |
|---|---|---|
| MLX runtime (the default on Apple silicon with the MLX extra) | AbstractFramework/minimax-music3-8bit |
12.6 GB |
--runtime torch, a torch device (--device cuda, mps, cpu), --lm-bits, --dtype float32, or a machine without MLX |
MiniMaxAI/MiniMax-Music3 (published weights) |
28.6 GB |
--model-id (Python model_id, plugin music_model_id) names a model, and a named model is used
as named or refused: it is never replaced. The 8-bit package is a complete model: the published
weights do not need to be on the machine. When the weights of the model that would run are absent
and another MiniMax-Music3 model is complete in the cache, the error names it and how to select it;
it is not used in its place.
Download the weights
The backend reads only the component folders of the model repository (12.6 GB for the 8-bit package, about 28.6 GB for the published weights); the published repository's legacy-format copies of the same weights (about 31 GB) are never downloaded. Because of the size, nothing is downloaded unless you ask for it:
- CLI: add
--downloadto the first run (REPL:/download on). - Python:
MiniMaxMusic3BackendConfig(local_files_only=False). - The AbstractCore plugin never downloads; it offers the model once the weights are in the cache.
Weights go to the standard Hugging Face cache (HF_HUB_CACHE, HF_HOME, or
~/.cache/huggingface/hub), or to cache_dir when you set it in Python. Without the weights,
generation stops with an error that states the size, the cache location and the opt-in. An
interrupted download resumes the next time you pass --download.
Pre-quantized packages (Apple silicon)
Two smaller builds of the same model are published for the MLX runtime. The 8-bit one is the
default model on the MLX runtime; name the other, or the published weights, with --model-id
(Python: MiniMaxMusic3BackendConfig(model_id=...), plugin: music_model_id):
| Model id | Download | Language model | Flow transformer |
|---|---|---|---|
MiniMaxAI/MiniMax-Music3 (published weights) |
28.6 GB | bfloat16 | float32 on disk, runs in bfloat16 |
AbstractFramework/minimax-music3-8bit |
12.6 GB | blocks and token embedding 8-bit | blocks 8-bit |
AbstractFramework/minimax-music3-4bit |
9.6 GB | blocks 4-bit, token embedding 8-bit | blocks 8-bit |
# The 8-bit package (the default on Apple silicon); --download fetches it on the first run
abstractmusic t2m "Upbeat pop rock song with a female singer" \
--backend minimax-music3 --lyrics-file lyrics.txt --duration 30 --download --out song.wav
# The published weights on Apple silicon (MLX, bfloat16)
abstractmusic t2m "Upbeat pop rock song with a female singer" \
--backend minimax-music3 --model-id MiniMaxAI/MiniMax-Music3 \
--lyrics-file lyrics.txt --duration 30 --download --out song.wav
- The depth decoder, the condition encoder, the vocoder and the tokenizer are the published files, unchanged. No weight was retrained.
- A package has the capabilities, limits and licence of the published model;
abstractmusic modelslists it as a model of its own with its download size and memory. - A package runs on the MLX runtime only.
--runtime torch, a torch device (--device cuda,mps,cpu),--lm-bitsand--dtype float32are refused with a package: its runtime, widths and dtype are fixed. Use the published weights for torch or for another dtype. - The run line and the metadata name what ran:
model=AbstractFramework/minimax-music3-8bitandlm_quantization(package 8bit: language model 8-bit group 64; flow transformer 8-bit group 64). python -m abstractmusic.runtimes.minimax_music3.mlx_package SOURCE_DIR OUT_DIR --recipe 8bitwrites a package from the published weights (the conversion takes seconds; peak memory is about the size of the package).
Measured on an Apple M5 Max (128 GB, mlx 0.31.2); measurements on one machine, not guarantees.
| Weights | Resident: time, peak memory | Staged: time, peak memory | Lyric recall, median (range) | Clips with recall at least 0.8 |
|---|---|---|---|---|
| Published weights | 113 s, 29.0 GB | 102 s, 17.4 GB | 0.97 (0.82 to 1.00) | 12 of 12 |
minimax-music3-8bit |
105 s, 19.4 GB | 98 s, 10.2 GB | 0.95 (0.00 to 1.00) | 11 of 12 |
minimax-music3-4bit |
92 s, 16.4 GB | 97 s, 9.7 GB | 0.84 (0.00 to 1.00) | 5 of 8 |
- Time and memory: one 20 s request with the same caption, lyrics and seed, run back to back for the three weight sets; peak memory is MLX's own counter. On 30 s requests the resident peak was 20.9 GB (8-bit) and 17.8 GB (4-bit).
- Lyric recall: 30 s clips through the CLI with a structured caption and four lyric sheets (dense, sparse, tongue twisters, numbers and names); the share of the requested words recognized by speech recognition (the union of three Whisper passes, a lower bound). The 8-bit sample is two seeds per sheet plus four more seeds of the tongue-twister sheet, generated after one of its first two clips came out without singing; the 4-bit sample is two seeds per sheet.
- One clip of each package had no recognized singing: valid music in the requested key, without a vocal. The published weights also produce such clips on other requests (see How closely requests are followed). These samples are too small to say whether quantization changes how often it happens: generate several seeds when the words matter.
- The 4-bit package follows dense lyrics less closely than the 8-bit package (0.77 to 0.81 against 0.87 to 1.00 on the dense sheet). Prefer the 8-bit package unless the 3 GB matter.
- Fidelity to the published weights: the 8-bit language model has a 1.4% relative logit error and a 0.985 top-50 overlap against the bfloat16 model (bfloat16 against float32: 0.9% and 0.997); the 4-bit one 7.6% and 0.93. The flow transformer with 8-bit blocks is at 36 dB waveform SNR against the bfloat16 one on the same condition and noise (float32 against bfloat16: 30 dB).
- Every clip had exactly the requested length.
--memory-mode autouses the same thresholds as the published weights, so a Mac with less than 48 GiB of memory runs a package staged;--memory-mode residentasks for the resident mode.
First song
A complete vocal example. The description says what to play and who sings, written in the model's
structured layout: the heading lines Global Metadata, Vocal Details and Arrangement, each
followed by Label: value lines. A one-line description is accepted too; what was measured for
each form is in How closely requests are followed.
The lyrics carry the words, one section tag per line, about 60 words for 30 seconds:
abstractmusic --backend minimax-music3 t2m "Global Metadata
Basic Attributes: bpm is 100. key is G, and scale is major. Pop Rock.
Global Emotional Progression: Upbeat and hopeful, lifting into the chorus.
Sonics & Production Profile: Polished, wide and modern; clear vocal on top, punchy drums, full low end.
Vocal Details
Vocal Gender & Timbre: Singer A (Female). Bright, clear mezzo-soprano.
Vocal Style: Melodic, crisp diction, catchy hook.
Arrangement
Primary: Electric guitars and piano.
Secondary: Bass and a synth pad.
Groove & Foundation Progression: Steady drum kit, snare on 2 and 4." \
--lyrics "[verse]
Morning light across the harbor
Gulls are calling out the day
Every boat a slow departure
Every rope a word to say
[chorus]
Carry me home on the evening tide
Carry me home where the lanterns glide
[verse]
Salt on my hands and a song in my chest
Waves keep the time while the sailors rest
[chorus]
Carry me home on the evening tide
Carry me home" \
--duration 30 \
--seed 7 \
--download \
--out song.wav
Drop --download once the weights are cached. To reuse the description, keep it in a text file
and pass it with "$(cat caption.txt)" in place of the quoted text. You can also write the lyrics
on one line with \n (the two characters backslash and n) for each line break, or keep them in a
UTF-8 file, one sung line per line, and pass --lyrics-file lyrics.txt instead of --lyrics (not
both). Change the values after each label to describe your song; keep the heading lines and the
labels. bpm is N. and key is X, and scale is Y. are the model's own phrasing for tempo and key:
you can leave them out and pass --bpm and --keyscale instead, which add the same sentences to
the Basic Attributes line (the tempo is a hint either way; see
How closely requests are followed).
Before generating, the CLI states the length on stderr (Generating 30 s with minimax-music3
(--duration).) and prints a NOTE: line for anything about the request you should know first
(see Notes before generation). It then prints the output path on
stdout and a one-line run summary on stderr:
song.wav
run: backend=abstractmusic:minimax-music3 model=MiniMaxAI/MiniMax-Music3 runtime=mlx device=gpu dtype=... audio=30.00s@44100Hz/2ch wall=...s memory_mode=resident ended_by_end_token=no seed=7 timings[...]
An instrumental piece needs no lyrics; say in the description that it is instrumental (the
Vocal Details section says there are no vocals):
abstractmusic --backend minimax-music3 t2m "Global Metadata
Basic Attributes: Solo Piano / Neo-Classical.
Global Emotional Progression: Reflective, slowly blossoming.
Sonics & Production Profile: Close-miked grand piano, natural room.
Vocal Details
Vocal Gender & Timbre: None. This is an instrumental track with no vocals.
Vocal Style: No singing, no spoken words, no vocal samples.
Arrangement
Primary: Solo grand piano: right-hand singing melody over left-hand arpeggios.
Secondary: Nothing else.
Groove & Foundation Progression: Rubato but with a clear pulse; no drums." \
--duration 30 --seed 11 --out piano.wav
The same two requests from Python:
from abstractmusic import MusicManager
from abstractmusic.backends import MiniMaxMusic3Backend, MiniMaxMusic3BackendConfig
backend = MiniMaxMusic3Backend(
config=MiniMaxMusic3BackendConfig(local_files_only=False) # allow the one-time download (12.6 GB on Apple silicon)
)
music = MusicManager(backend=backend)
caption = """Global Metadata
Basic Attributes: bpm is 100. key is G, and scale is major. Pop Rock.
Global Emotional Progression: Upbeat and hopeful, lifting into the chorus.
Sonics & Production Profile: Polished, wide and modern; clear vocal on top, punchy drums, full low end.
Vocal Details
Vocal Gender & Timbre: Singer A (Female). Bright, clear mezzo-soprano.
Vocal Style: Melodic, crisp diction, catchy hook.
Arrangement
Primary: Electric guitars and piano.
Secondary: Bass and a synth pad.
Groove & Foundation Progression: Steady drum kit, snare on 2 and 4."""
lyrics = """[verse]
Morning light across the harbor
Gulls are calling out the day
Every boat a slow departure
Every rope a word to say
[chorus]
Carry me home on the evening tide
Carry me home where the lanterns glide
[verse]
Salt on my hands and a song in my chest
Waves keep the time while the sailors rest
[chorus]
Carry me home on the evening tide
Carry me home"""
song = music.generate_audio(caption, lyrics=lyrics, duration_s=30, seed=7)
open("song.wav", "wb").write(song.data)
print(song.metadata["runtime"], song.metadata["device"], song.metadata["duration_s"])
piece = music.generate_audio(
"Instrumental solo piano piece, reflective and slowly blossoming, no vocals",
instrumental=True,
duration_s=30,
seed=11,
)
open("piano.wav", "wb").write(piece.data)
The first call loads the weights (seconds when the files are in the operating system's page cache,
longer from a cold disk); the backend keeps them loaded for later calls until you call
backend.unload().
Writing the description and the lyrics
The description (prompt) is the model's only style input. Name the genre, the instruments,
the voice (gender, timbre, style), the mood, the tempo and the language you want sung. Line breaks
are kept.
The structured caption. The model's own description format has three heading lines, each
followed by Label: value lines, one fact per line:
Global Metadata
Basic Attributes: <tempo and key sentences, then the genre>
Global Emotional Progression: <mood and how it develops>
Sonics & Production Profile: <sound and mix>
Vocal Details
Vocal Gender & Timbre: <who sings and the voice>
Vocal Style: <how they sing>
Arrangement
Primary: <lead instruments>
Secondary: <supporting instruments>
Groove & Foundation Progression: <drums, rhythm, groove>
First song shows it filled in. A description in this layout (recognised by the
Global Metadata line together with Vocal Details or Arrangement) is sent as written; explicit
values you pass are added to its Basic Attributes and Vocal Style lines (see the table below).
The measured effect of this layout is on the key: a key written in a structured caption was exact
on 3 of 6 clips, against 0 of 6 when written in a short caption. That it makes the lyrics follow
better is not established (see
How closely requests are followed).
Explicit values. The model has no metadata inputs, so the backend writes each explicit option
into the description (with planning off; Python keyword in brackets). The tempo, key and style
sentences follow the form of the model's reference caption (bpm is N., key is X, and scale is
major., then the genre); the other sentences are AbstractMusic's own wording:
| Option | Added to the description |
|---|---|
--bpm 92 (bpm) |
bpm is 92. A whole number from 20 to 300. |
--keyscale "B flat major" (keyscale) |
key is B flat, and scale is major. Accepted forms: C, C major, Am, A minor, A-minor, F# minor, F sharp minor, Bb, B flat major, Ebm. |
--timesignature 3 (timesignature) |
time signature is 3/4. Beats per bar or N/M (3, 6/8, 7/8); nothing is added for 4/4. |
--style "Electric Blues" --style harmonica (positive_styles) |
Electric Blues, harmonica. after the key. |
--vocal-language fr (vocal_language) |
The lyrics are sung in French. (only when lyrics are sung). |
--instrumental (instrumental=True) |
Instrumental, no vocals. plus the instrumental lyrics block (see below). Refused together with lyrics. |
The values go on one added line of a free-text description, or on the Basic Attributes and
Vocal Style lines of a structured caption. An explicit value is always written, unless the
description already states the same value in one of these forms: bpm is 92, 92 bpm, BPM: 92,
92 beats per minute; key is A, and scale is minor, key of A minor, in the key of A minor;
time signature is 3/4, 3/4 time; sung in French. Any other wording ("a slow ballad around
ninety", "dark A minor mood") does not count, so the explicit value is added. When one of those
forms states a different value, the description is kept as written, the option's value is added,
and a NOTE: names both; remove one of them for a clear instruction. Accidentals are spelled out
(B flat, F sharp).
These values are checked before anything loads, and a value the backend cannot use is refused with the accepted forms (CLI exit status 2):
--bpm: a whole number from 20 to 300 (119.6is refused).--keyscale: the forms listed in the table.--timesignature: beats per bar or N/M.--vocal-language: an ISO 639-1 code (en,fr,pt,ja), optionally with a region (fr-FR,pt_BR), or an English language name (French,Portuguese,Japanese).
The lyrics carry the sung words, with section tags on their own lines. The model knows these
tags: [intro], [verse], [pre-chorus], [chorus], [post-chorus], [bridge],
[instrumental], [solo], [outro]. Common spellings are rewritten to them ([Verse 1] becomes
[verse], [Hook] and [Refrain] become [chorus]); words written on the same line as a tag
([verse] Morning light) are moved to the next line so they are sung. --auto-lyrics (or
--lyrics auto) writes simple template lyrics in English; with a non-English --vocal-language
it is refused: write the lyrics, or let a text planner write them. In Python, lyrics="auto" or
auto_lyrics=True on MusicManager.generate_audio runs the planning step even with planning off;
the word "auto" is never sung, and a direct backend call with lyrics="auto" is refused. A
--lyrics-file may start with a byte-order mark (it is ignored); an empty file is refused.
Size the lyrics to the duration: roughly 1.5 to 2.5 sung words per second (about 270 to 450 words for a 3-minute song) fill the length with singing; lyrics sized this way (293 words at 180 s, 645 words at 360 s) gave music for the whole length. Sung lyrics measured 1.6 to 2.0 words per second, and rap up to about 3.5; above 3.5 words per second, expect the song to end before the lyrics do. Shorter lyrics are handled as described in Short lyrics and the end of the song. Both cases produce a note before generation (see Notes before generation). Section tags and cues in parentheses are not counted as sung words; in Chinese and Japanese two characters count as one word.
Short clips. For clips of 30 s or less, do not start the lyrics with an [intro] tag: it can
leave the clip without singing.
Limits. The description and the lyrics share a budget of 5,000 tokens, and each field is
limited to 32,000 characters. Text of the form <|...|>, which maps to the model's control tokens,
is refused. A request over a limit fails before any weights load.
Text planners. Without --enhance-prompt, a text planner never changes what MiniMax-Music3
receives, except to write lyrics you asked for with --auto-lyrics. With --enhance-prompt
(Python: planning=True, enhance_prompt=True), AbstractMusic renders the plan as the model's
structured caption (Global Metadata, Vocal Details, Arrangement): your prompt is kept verbatim
at the start, and the planner's descriptive wording is added after it. When the backend
recognises in that wording a tempo, key, time signature or language you did not give, or a
statement that contradicts your lyrics or instrumental request (for example "instrumental" while
lyrics are sung, or a voice such as a "tenor lead" on an instrumental request), it discards the
planner's whole wording and sends your own prompt, with a note. The check knows Italian tempo
markings, "uptempo, 128", "in D", "modulating to F#", "waltz time", "6-8", "en español" and
similar phrasings; a planner's wording can still imply such things in other words ("a lively,
quick pace", "three beats to the bar", "Spanish-language verses", or "a warm baritone carries the
melody" on an instrumental request). The same rules apply when a plan is made without naming the
backend and compiled for MiniMax-Music3 later, and planner fields that are not text (a dict or list
as caption or lyrics) are dropped with a note (planner_field_not_text). When the planner's
wording was added, the result metadata records caption_planner_enhanced: true. --print-plan
prints Caption sent to the model: and Lyrics sent to the model: with the exact text just before
generation; the same caption is in the metadata's caption and in the --metadata-out file. When
exact control matters, check it, or leave enhancement off and write the description yourself. A description already written in the structured layout (starting with
Global Metadata) is kept as written, with missing explicit values added in place.
--structure-prompt does not apply to this backend.
Instrumental pieces
A request is instrumental when it has no lyrics, when the lyrics are an instrumental marker such as
[Instrumental], or when you pass --instrumental (Python: instrumental=True). The backend then
sends a lyrics block of four section tags ([intro], [instrumental], [solo], [outro]), each
followed by the line (instrumental), and ends the description with Instrumental, no vocals.
(unless it already contains that sentence, or Vocals: none in a structured caption).
Write the instrumental intent into the description as well. The model was trained on songs and can still add vocal sounds: on 14 instrumental clips (seven genres, two seeds each, structured captions stating no vocals), 7 had no recognisable singing (under 1 s) and 3 had 4 s or more. If a take has vocals, try another seed.
Lyrics you write are always sung: a description that merely mentions "instrumental" or "no vocals"
does not drop them (a note says so). Passing instrumental=True (CLI: --instrumental) together
with lyrics is refused before generation: pass one of the two. A description that asks for a voice
in so many words
(vocals, voice, singer, singing, rapping, choir, a cappella, and similar) but comes without lyrics
is still an
instrumental request: the model sings only the lyrics it receives, so pass lyrics (or
--auto-lyrics) for a song with vocals; a note says so. Instrument and production terms such as
"tenor sax", "singing bowls" or "vocal chops" do not trigger it.
Duration and endings
--duration (Python: duration_s) is the length of the result, from a fraction of a second up
to 360 s. The test suite checks that every duration from 0.04 s to 360 s comes out at the exact
requested sample count (by computation and through a stand-in runtime). On real weights (shipped
CLI and direct backend calls, MLX runtime, Apple silicon), the length was exact to the sample on 99
of 99 clips from 20 to 180 s. When you do not pass it, the length is 30 s on the CLI, in Python and
through AbstractCore (the model's default in its capability record). The CLI names the length and where it came
from before it starts: Generating 30 s with minimax-music3 (default; --duration to change). or
(--duration). In the REPL, /duration default returns to the
engine default, which /status and /params mark as "(engine default)". There is one duration
setting; plan lyrics and sections to fit it (see "Size the lyrics to the duration" above).
To let the model decide where the song ends, pass --allow-early-end (Python:
allow_early_end=True, as a config field or a generate_audio keyword; REPL /early-end on;
plugin music_allow_early_end). The model then stops when it reaches the end of the structure it
wrote, and the result can be shorter than the duration, never longer. The metadata reports
allow_early_end, ended_by_end_token, requested_duration_s, runtime_duration_s (the length
the runtime was asked to render before the cut) and the actual duration_s, and the run summary
shows ended_by_end_token=yes|no. With --allow-early-end, the measured endings were musical
decays (at 65 s and 25.5 s for 19 words in a 90 s request).
Short lyrics and the end of the song
The file always has the requested length, but the song follows the lyrics: given only a few lines for a long duration, the model sings them, ends the song, and fills the rest of the file with near-silence and short unrelated fragments. Three behaviours, all on by default and each switchable, handle this without changing the length:
- Structure fill. It applies to a sung request (with
--allow-early-endoff) whose lyrics have fewer sung words than requested seconds and leave room for an intro and an outro: after an estimate of the lyrics (about 4.5 s per sung line, plus 14 s for your own[intro]and 15 s for your own[outro]if you wrote them), at least 29 s of the duration must remain. The backend then keeps your lyrics together as one block, exactly as written (never altered, repeated or reordered, and nothing inserted between your sections), and adds instrumental sections around that block, each tag followed by the line(instrumental): - an
[intro]before it, unless your lyrics open with an intro; - after it, alternating
[instrumental]and[solo]sections of about 15 s each, as many as needed to reach the duration (rounded up), at most six; - then an
[outro]; if your lyrics end with their own[outro], it stays last and the added sections go before it.
For example, three lines (19 words) in a 90 s request are sent as intro, verse, chorus, instrumental, solo, instrumental, solo, outro; in a 180 s request as intro, verse, chorus, three times instrumental and solo, outro, with the capped note.
A note before generation names the sections added (lyrics_short_structure_filled). When the
six-section cap is reached, the note also says that the lyrics are very short for the duration,
that the song may end early, and that the rest is then faded to silence. The metadata records
the sections in structure_fill and the exact lyrics sent in lyrics_sent. The fill is
skipped without a fill note, and structure_fill_skipped gives the reason, when there is not
enough room or when your lyrics already contain instrumental, solo, interlude or break
sections or (instrumental)-style cue lines. With an unclosed [ in the lyrics the fill is
skipped too; a short-lyrics note (lyrics_short_for_duration) says the song is likely to end
before the requested length, leaving silence, and suggests adding lyrics, shortening the
duration, or --allow-early-end. If the added sections would push the prompt over the
5,000-token budget, the lyrics are sent unfilled, and the notes are
structure_fill_dropped_token_budget followed by lyrics_short_for_duration (with the same
advice; no "sections were added" note). Turn the fill off with --no-structure-fill (REPL
/structure-fill off; Python structure_fill=False; plugin music_structure_fill); when there
was room for it, the note lyrics_short_for_duration then says the song is likely to end before
the requested length, leaving silence after it, and suggests turning the fill back on.
The added sections are played music, and the model may still sing words of its own in them.
They do not make a few lines last indefinitely: three lines carry about 135 to 150 s of music
with this model whatever is added, so a full 180 s of music needs more lyrics (293 words filled
180 s, and 645 words filled 360 s).
2. Silence after the end of the song. When the model's end-of-song signal appears and persists
(a probability of at least 0.5 that recurs in at least a tenth of the following 5 s) more than
2 s before the end of the clip, the rest of the clip fades to silence over 4 s (or the time
left, if shorter), so the clip always ends at zero, instead of keeping unrelated material. A
note follows the run line: The model ended the song at X s: the audio fades out over F s and
the last Y s are silent., followed by advice that depends on whether structure fill was on
(song_ended_before_duration; metadata song_ended_at_s, end_fade_s, silenced_tail_s and
notes_after_run). When more than half of the clip was silenced, the warning mostly_silent is
added: treat the take as failed. A runtime whose end-of-song trace cannot be read (a custom
runtime) gets the warning end_signal_unreadable, and nothing is applied; an empty trace counts
as no trace (no warning). Turn it off with
--no-silence-after-end (REPL /silence-after-end off; Python silence_after_song_end=False;
plugin music_silence_after_song_end).
3. Fade at the cut. A clip cut at the requested length fades out over its last second, never
more than a quarter of the clip. --fade-out SECONDS sets it explicitly, used as given (0 =
none; REPL /fade-out; Python fade_out_s; plugin music_fade_out_s); a negative value or one
longer than the clip is refused. There is no fade when the tail was silenced or when the model
ended the song itself; metadata fade_out_s records the fade applied.
In the REPL, /structure-fill, /silence-after-end and /fade-out take effect on the next run
without reloading the model.
Measured on real weights (Apple M5 Max, MLX, the shipped CLI with its defaults unless stated, the same three lyric lines of 19 words, two seeds per row):
| Request | Result |
|---|---|
| 90 s, default (structure fill) | All words sung on both seeds; music to the end of the clip (1% of it under -45 dBFS); 1 s fade at the cut. On one seed the model also sang words of its own during the added sections. |
| 180 s, default (structure fill, capped) | All words sung on both seeds (last word at about 40 s). The model ended the song at 148.6 s and 134.2 s; the audio then faded over 4 s and the rest (27.4 s and 41.8 s) is silent, with the note after the run. |
90 s, --no-structure-fill |
The song ended at 65.0 s and 34.7 s; the rest was faded to exact silence, with no unrelated fragments. |
| 90 s, lyrics as given, no tail handling (earlier experiment) | The song ended at 69 s and 34 s, followed by short unrelated fragments (21% and 64% of the clip under -45 dBFS). |
60 s, --allow-early-end |
The model ended the song at 50.9 s on one seed and ran the full 60 s on the other. |
With the structure fill, all words were sung on 4 of 4 clips (the first two rows). Alternatives that were tried, with more added sections or with sections between the verse and the chorus, did not make the music last longer. The structure-fill and silence behaviours are also covered with a stand-in runtime in the test suite.
Seeds and variation
--seed (Python: seed) makes a run repeatable on the same runtime, device and precision; a seed
is a whole number from 0 to 4,294,967,295, and a negative or fractional one is refused. Without a
seed, the backend draws one and reports it on the run summary line and in metadata["seed"]
(seed_was_random is true), so you can reproduce a take you like.
Results vary with the seed: the tempo, the key and how much of the lyrics is sung land on the request on some seeds and not on others. Generate a few seeds and keep the best; see How closely requests are followed.
A longer request with the same seed and prompt starts with the same music: the shorter clip's audio is the opening of the longer one, up to the decode window that contains the cut (on torch/MPS, the 20 s and 30 s clips of one seed were sample-identical up to 17.9 s). You can audition seeds on short clips and then render the one you like at full length. The fade at the cut and the structure fill (which depends on the duration) apply on top of this.
Settings
The defaults are the model's reference recipe.
| Setting | CLI | Python | Default |
|---|---|---|---|
| Flow-matching steps | --steps |
num_inference_steps |
30 |
| Autoregressive guidance (prompt adherence) | --guidance-scale |
guidance_scale |
1.5 |
| Flow-matching guidance | — | fm_guidance_scale |
1.7 |
| Sampling top-k / guidance top-k | — | ar_top_k / ar_guidance_top_k |
50 / 50 |
| Sampling temperature | — | ar_temperature |
1.0 |
| Depth-decoder overrides | — | depth_guidance_scale, depth_top_k, depth_temperature |
follow the autoregressive values |
| Let the model end the song early | --allow-early-end |
allow_early_end |
off |
| Instrumental sections around short lyrics | --structure-fill / --no-structure-fill |
structure_fill |
on |
| Silence after the model's end of song | --silence-after-end / --no-silence-after-end |
silence_after_song_end |
on |
| Fade at the cut (seconds, 0 = none) | --fade-out |
fade_out_s |
1 |
| Runtime | --runtime |
runtime |
auto |
| Device (torch) | --device |
device |
auto |
| Precision | --dtype |
dtype |
auto |
| Memory mode | --memory-mode |
memory_mode |
auto |
| 8-bit language model (MLX) | --lm-bits 8 |
lm_bits=8 |
off |
In Python, num_inference_steps and guidance_scale are config fields and per-request
arguments. fm_guidance_scale, ar_top_k, ar_guidance_top_k and ar_temperature are config
fields; a request can override them, and set depth_guidance_scale, depth_top_k,
depth_temperature and allow_early_end, as generate_audio keywords. A request keyword that
looks like a sampling setting the model does not have (for example top_p or scheduler) is
refused rather than ignored.
Not supported, and refused before generation: a negative prompt (describe what you want instead), negative styles, a composition plan, reference or source audio, an output format other than WAV, and a sample rate other than 44,100 Hz (resample downstream). There is no streaming.
Runtimes and devices
--runtime auto (the default) chooses MLX on Apple silicon when mlx is installed, otherwise
torch, which then picks CUDA, MPS or the CPU in that order. An explicit torch device
(--device cuda, cuda:N, mps or cpu) selects the torch runtime; --runtime mlx always runs
on the Apple GPU. Through AbstractCore, the host config keys music_runtime and music_device
(or music_minimax_runtime, music_minimax_device) do the same.
| Platform | Runtime | What was run in this release |
|---|---|---|
| Apple silicon (macOS) | MLX | Generation up to 360 s, checked with speech recognition on the vocals and tempo and key estimates |
| Apple silicon (macOS) | torch on MPS | Generation at 20, 30 and 45 s; vocals checked with speech recognition at 30 s |
| Apple silicon (macOS) | torch on CPU (float32) | One 8 s end-to-end generation passing the automated quality gates; no speech-recognition check; slow (see below) |
| NVIDIA GPU | torch on CUDA (bfloat16) | Implemented (same code path as MPS); not run |
| Linux, Windows | torch | Not run |
Memory modes and precision
auto(default) picks a mode from the memory the machine has:- MLX:
residentwith at least 48 GiB of memory,stagedbelow that or when the size is unknown. - torch on CUDA:
residentwhen the GPU reports at least 30 GiB (a nominal 32 GB card reports about 31.8 GiB and runs resident),stagedotherwise. - torch on MPS or CPU:
residentwith at least 48 GiB of RAM, or 96 GiB when the language model runs in float32 (on the CPU, or on MPS with a torch without bfloat16 support);stagedotherwise. - An unknown memory size resolves to
staged.
These thresholds are derived from the measured peaks; staged itself was measured on MLX
(17.5 GB) and on torch/MPS (about 17 GB). The run line prints the mode that ran
(memory_mode=resident), and the metadata carries
memory_mode (resolved), memory_mode_requested and memory_mode_reason (for example
auto: 128 GiB of memory (...) >= 48 GiB, resident peak is about 29 GB).
- resident keeps every component loaded: fastest for repeated generations.
- staged loads the language model and depth decoder for the first stage, releases them, then
loads the flow transformer and vocoder. Same audio, lower peak memory, a little more loading.
--dtype auto runs the language model, depth decoder and flow transformer in bfloat16 and the
condition encoder and vocoder in float32 (on the CPU, and with torch on a GPU without bfloat16
support, everything runs in float32). Both runtimes apply the same rule to an explicit value:
--dtype bfloat16 sets the language model, depth decoder and flow transformer, while the
condition encoder and vocoder stay in float32; --dtype float32 runs everything in float32;
float16 is refused. A per-component dtype mapping given to a runtime directly
(abstractmusic.runtimes.minimax_music3.create_runtime(..., dtype={...})) that asks for a
half-precision vocoder is refused with the measured reason: on real latents the float16 vocoder
produced non-finite audio, and the bfloat16 vocoder measured 37.9 to 41.6 dB SNR against float32.
With MLX, --lm-bits 8 (Python lm_bits=8, plugin music_lm_bits) loads the language model with
8-bit weights, which lowers memory and time.
Peak memory by mode, measured on an Apple M5 Max (128 GB) on 8 to 60 s requests:
| Runtime and mode | Peak memory |
|---|---|
| MLX, resident | 29.0 GB |
| MLX, staged | 17.5 GB |
| MLX, resident with the 8-bit language model | 22.5 GB |
| torch on MPS, resident | about 22 GB allocated (26 GB driver) |
| torch on MPS, staged | about 17 GB |
| torch on CPU, float32, resident | 51 GB RAM (one 8 s clip) |
A 360 s MLX song peaked at 34 GB (process footprint). The capability block records these figures
(runtime.memory_gb) with the machine they were measured on, and
abstractmusic models --fits-memory GB filters on them.
Measured performance
Measured on one machine: Apple M5 Max, 128 GB unified memory, macOS, torch 2.12, mlx 0.31.2. These are measurements, not guarantees; your times depend on the hardware and the duration.
| Runtime | Requested length | Total time | Peak memory |
|---|---|---|---|
| MLX, resident | 20 s | 111 s | 29.0 GB |
| MLX, staged | 20 s | 106 s | 17.5 GB |
| MLX, 8-bit language model | 20 s | 92 s | 22.5 GB |
| MLX, resident | 30 s | 151 to 188 s (12 clips) | about 29 GB |
| MLX, resident | 60 s | 299 s | 29.0 GB |
| torch on MPS, resident | 30 s | 247 to 287 s (4 clips) | about 22 GB allocated (26 GB driver) |
| torch on MPS, staged | 8 s | 59 s | about 17 GB |
| torch on CPU (float32) | 8 s | 376 s | 51 GB RAM |
| MLX, resident | 180 s | 968 s; returned 180.00 s | not recorded |
MLX, resident (auto) |
360 s (maximum) | 1,715 s (autoregressive 800 s, flow 853 s, vocoder 62 s); returned 360.00 s | 27 GB during the autoregressive stage, 34 GB peak (process footprint) |
- Generation is slower than real time on this hardware. The autoregressive stage runs at 9 to 12 frames per second on MLX for short songs and 6 to 7 on torch/MPS (25 frames are 1 s of audio); the flow stage takes about 0.4 s (MLX) or 0.7 s (torch/MPS) per step, 30 steps per 4 s window.
- Long songs: the 360 s run used 645 words of lyrics and a structured caption. Its autoregressive rate went from about 14 frames per second at the start to about 10.5 in the second half; memory stayed flat for the whole song.
- Repeated generations in one process hold the same memory: two consecutive generations both held 34.4 GB.
- The CPU runs work but are slow: about 32 minutes for a 30 s song, extrapolated from the 8 s run.
- Loading the weights takes 1.6 s (MLX) or about 15 s (torch/MPS) when the files are already in the page cache; a cold load reads 28.6 GB from disk.
- No CUDA timings are published for this release.
--verbose prints stage progress (minimax-music3: ar 250/750, then flow and vocoder) on
stderr; the run summary line breaks the time down into load, ar, flow, vocoder and total.
How closely requests are followed
These are measurements of this release, not guarantees. Unless a row says otherwise: the shipped
CLI (abstractmusic t2m --backend minimax-music3), the MLX runtime, Apple silicon, 30 s clips.
Lyric recall is the share of the requested words recognized in the song by speech recognition; it
is a lower bound, because recognition on sung vocals misses words. Tempo and key were estimated
from the audio. The same figures are in the model's capability record
(abstractmusic models --engine minimax-music3 --json, under adherence).
| Request | Clips | Result |
|---|---|---|
Length (--duration) |
99 clips from 20 to 180 s | Exact to the sample on 99 of 99 |
| Lyrics, with a one-line caption | 28 clips | Median recall 0.55, range 0.00 to 1.00 |
| Short lyrics for a long song (19 words), structure fill on | 4 clips | All words sung on 4 of 4 |
Key (--keyscale) |
8 clips | Exact on 6 of 8; a related key on the other 2 |
| Key written only in the caption | 6 clips with a short caption, 6 with a structured caption | Exact on 0 of 6 in a short caption, 3 of 6 in a structured caption |
Tempo (--bpm) |
20 clips | Within 5% on 2 of 20; within 10% on 5 of 20 |
| Instrumental (no lyrics) | 14 clips | No recognizable singing on 7 of 14; 4 s or more of singing on 3 of 14 |
Lyrics vary with the seed. With a one-line caption the recall ranged from none of the words to all of them. When the words matter, generate several seeds and keep the best take.
Tempo requests are not followed. The backend writes bpm is N. into the description and says
before generation that a tempo request is a hint (tempo_request_is_a_hint). When the tempo
matters, generate several seeds and keep the one that fits: a longer request with the same seed
starts with the same music, so you can choose the seed on short clips.
Caption form. The controlled effect of a structured caption is on the key (the row above). For lyrics it is not established: in 6 controlled pairs (same lyrics and seed), recall was 0.68 with a short caption and 0.77 with a structured one, which does not establish an effect.
Not measured in this release: whether the sung language (--vocal-language), the voice
(gender, timbre, duet, rap), the section structure and the time signature are followed. No result
is stated for them.
To be followed as closely as this model allows:
- Give the key with
--keyscale(or askey is X, and scale is Y.in a structured caption), never only as words in a short caption. - Treat
--bpmas a hint and pick the seed whose tempo fits. - Generate several seeds when the words matter.
- Size the lyrics to the duration (1.5 to 2.5 sung words per second); for shorter lyrics, keep the
structure fill on, or pass
--allow-early-endif a natural ending suits you better than the exact length. - For clips of 30 s or less, do not start the lyrics with an
[intro]tag. - For an instrumental, expect singing on some takes: try another seed.
- Read the notes the CLI prints before and after the run.
The automated quality gates in abstractmusic.audio_analysis.evaluate_music_quality_gates check
validity and collapse or noise failures; they do not check that the lyrics were sung or that the
tempo and key match. Listen to your takes.
Output and metadata
generate_audio returns a GeneratedAsset with WAV bytes and metadata, including: runtime,
device, dtype, memory_mode, memory_mode_requested, memory_mode_reason, seed,
seed_was_random, settings, requested_duration_s, runtime_duration_s, duration_s,
allow_early_end, ended_by_end_token, frames, prompt_tokens, timings (seconds per stage),
sampling_rate, channels, instrumental, caption (the description as sent),
caption_additions, notes and warnings (see below), license, license_url and
license_conditions. A request field the model does not use (negative styles, a composition plan,
an unknown key) is refused, not recorded as ignored. With planning, the planner's provenance is added
(planner_backend, planner_warnings, caption_planner_enhanced, ...).
runtime_details records where the model considered the song finished:
end_token_probability holds one value per generated frame (25 per second), the probability the
model gave to ending the song at that frame; end_signal_frame and end_signal_s give the first
frame (and second) where that probability reached 0.5, or null when it never did. The silence
rule above uses a stricter, persistent version of this signal; its result is song_ended_at_s.
The tail fields are structure_fill, structure_fill_skipped, lyrics_sent, song_ended_at_s,
end_fade_s, silenced_tail_s, fade_out_s and notes_after_run.
On the CLI, --metadata-out PATH writes the run's metadata as strict JSON (for every backend;
NaN and infinity are written as null), and --metadata-out auto writes it next to the audio, as
the --out path with a .json suffix; the CLI prints metadata: <path> on stderr. Both paths are
checked before generating: missing directories are created, and a directory path or an unwritable
location is an error. If writing the metadata fails after the audio was saved, the CLI only warns
and exits 0.
A run that produces non-finite values at any stage raises an error and writes no audio; the
message suggests --dtype float32 or another device. CLI errors are one line ending with the next
step: out of memory points to --memory-mode staged, a runtime that cannot start on the requested
device points to --device auto (or --runtime mlx on Apple silicon), and an invalid --bpm,
--timesignature, --keyscale, --vocal-language or --duration 0 names the accepted values.
Ctrl-C stops the run with exit status 130 and no output. Exit statuses are in
API: CLI Output.
Notes before generation
Before a generation starts, the backend reports what you should know about the request; one note,
song_ended_before_duration, comes after the run (the CLI prints it after the run line, and the
metadata keeps it in notes_after_run as well as notes). The CLI prints each one once as a
NOTE: line (stderr for t2m); Python and AbstractCore callers receive
each as a Python warning with a .code: a MiniMaxMusic3Warning from the backend (a UserWarning
subclass in abstractmusic.backends.minimax_music3), whose text is also kept in the result
metadata notes and whose code is in warnings. The text planner's own notes use the base class,
abstractmusic.prompt_planner.MusicRequestWarning, recorded in planner_warnings. Notes are
delivered for every request, including identical requests in a long-lived process, and follow
Python's warning filters (ignore, once, ...). A note is advisory: with warnings turned into
errors (-W error), it is still shown and never aborts the request.
| Code | When |
|---|---|
lyrics_short_structure_filled |
Fewer sung words than seconds: instrumental sections were added around your unchanged words (the note says when the six-section cap was reached). |
lyrics_short_for_duration |
Fewer sung words than seconds and no fill applied (switched off with room for it, an unclosed [, or the token-budget fallback): the song is likely to end before the requested length, leaving silence. |
tempo_request_is_a_hint |
A tempo was requested (--bpm, or a prompt that states one such as "92 bpm"): "MiniMax-Music3 treats a tempo request as a hint: in measurements only about one clip in ten landed within 5% of the requested bpm. If the tempo matters, generate several seeds and keep the one that fits." |
structure_fill_dropped_token_budget |
The added sections would exceed the 5,000-token budget: the lyrics were sent unfilled (followed by lyrics_short_for_duration). |
song_ended_before_duration |
After the run: the model ended the song more than 2 s before the end of the clip; the rest was faded to silence. |
mostly_silent |
After the run (warning code only): more than half of the clip was silenced; treat the take as failed. |
end_signal_unreadable |
After the run (warning code only): a custom runtime's end-of-song trace could not be read; no silence was applied. |
planner_field_not_text |
A planner returned a field that is not text (a dict or list as caption or lyrics); it was dropped (planner note). |
lyrics_long_for_duration |
More than 3.5 sung words per second (a guidance threshold above the measured sung rate): expect the song to end before the lyrics do. |
lyrics_have_nothing_to_sing |
The lyrics hold only tags, cues in parentheses or symbols. |
no_lyrics_instrumental |
The description asks for a voice in explicit vocal words but no lyrics were given: the piece is instrumental. |
prompt_mentions_instrumental_explicit_lyrics_kept |
The description mentions an instrumental while lyrics are given: the lyrics are sung. |
prompt_conflict_bpm, prompt_conflict_key, prompt_conflict_timesignature, prompt_conflict_language |
The description states, in one of the recognised forms, a different value than an explicit option: both reach the model. |
planner_caption_replaced_unrequested_facts |
A text planner's caption stated facts the request did not give: your own prompt is sent instead (planner note). |
planner_lyrics_dropped_not_requested |
The text planner wrote lyrics although none were requested: they are not sung, and the piece is instrumental; ask for --auto-lyrics (planner note). |
auto_lyrics_not_written |
Auto-lyrics were requested but the planner returned none: the piece is instrumental (planner note). |
import warnings
from abstractmusic.prompt_planner import MusicRequestWarning # base of MiniMaxMusic3Warning
with warnings.catch_warnings(record=True) as caught:
warnings.simplefilter("always", MusicRequestWarning)
song = music.generate_audio("Warm acoustic folk ballad, female vocal", lyrics=lyrics, duration_s=60)
for w in caught:
if issubclass(w.category, MusicRequestWarning):
print(w.message.code, w.message)
To silence them, use warnings.filterwarnings("ignore", category=MiniMaxMusic3Warning); they
stay in the metadata.
Limits
- Slower than real time on the measured Apple hardware; plan minutes per song.
- With the 8-bit package: 12.6 GB of weights and 10 to 21 GB of memory. With the published weights: 28.6 GB and 17 to 34 GB of memory on the measured Apple silicon runtimes (34 GB peak for a 360 s song with MLX); the CPU path needs about 51 GB of RAM.
- Tempo requests are not followed; the key and how much of the lyrics is sung vary with the seed.
- Instrumental requests can still contain singing (4 s or more on 3 of 14 measured clips).
- Whether the language, voice, structure and time signature are followed was not measured.
- Structure fill adds played sections, not singing, and the model may still sing words of its own in them. Three lines carry about 135 to 150 s of music whatever is added; longer songs need more lyrics (1.5 to 2.5 sung words per second for singing throughout). When the model ends the song early, with or without the fill, the rest is faded to silence.
- For clips of 30 s or less, lyrics that start with an
[intro]tag may produce no singing. - NVIDIA CUDA, Linux and Windows have not been run in this release.
- One generation at a time per process for this backend: concurrent calls, including from
different backend instances, wait for each other. A runtime used directly
(
create_runtime) raises an error on a second concurrent call on the same instance instead of waiting; use one instance per thread or serialize the calls.
AbstractCore
The AbstractCore plugin runs this backend as abstractmusic:minimax-music3. With AbstractCore
2.41.0, select it with a host preference naming that full id, for example
create_llm(..., music_backend="abstractmusic:minimax-music3"). Later AbstractCore versions also
select it by its short name (minimax-music3), per request (provider="minimax-music3"), or from
the model alone (model="AbstractFramework/minimax-music3-8bit"); see
API. Its settings are host config keys: music_runtime,
music_device, music_torch_dtype, music_memory_mode, music_lm_bits, music_duration_s,
music_num_inference_steps, music_guidance_scale, music_revision, music_allow_early_end,
music_structure_fill, music_silence_after_song_end, music_fade_out_s; the same names with the
music_minimax_ prefix apply to this backend only and win. The plugin never downloads the weights:
fetch them once with the CLI (--download), and discovery offers the model when every component
folder is in the cache. See API.
Licence
The weights are published under the MiniMax-Music3 Community License. The LICENSE file in the model repository is the authority; read it before you use the model. In summary, it permits use, including commercial use, under conditions:
- keep the copyright and permission notices in all copies or substantial portions of the model;
- a commercial product or service using the model must prominently display "MiniMax-Music3" in its user interface;
- above USD 20 million aggregate yearly revenue (with affiliates), you need separate prior written authorization from MiniMax;
- a product or hosted service that lets third parties generate outputs must implement and maintain safeguards against uses and outputs that violate the licence, including third-party IP;
- use must follow the Acceptable Use Policy (Exhibit A), which MiniMax may revise; among other things it requires disclosing machine-generated content published in public environments and forbids military use;
- you indemnify MiniMax against losses arising from a breach of the licence.
The capability record states commercial_use: conditional for this model. The older boolean
commercial_allowed is false in its single meaning: not every user may use the model
commercially without a separate agreement (because of the revenue threshold). The conditions are also available programmatically as
license_conditions and license_url in the registry entry and in every generation's metadata.
Troubleshooting
See Troubleshooting: MiniMax-Music3 for missing weights, missing runtimes, memory pressure, refused requests, early endings, numerical errors and slow runs.