Skip to content

MiniMax-Music3 e2e: the LM weight load spins for hours in the SpeechEngine path but takes ~3 min in the LLM gate (#672) #852

Description

@localai-bot

The defect

test_minimax_music3_e2e_real's full-tail and HTTP cases never complete. Both
sit inside LoadQwen3ForCausalLMWeights effectively forever, while the same
weights load in ~3 minutes in test_minimax_music3_llm_real.

This is a performance defect, not a correctness one — every stage is gated
and green (W1-W7). It is the single thing standing between MiniMax-Music3 and an
observed end-to-end song.

Evidence, measured on two independent runs

The implementer stopped runs at 85 min and 34 min. I then ran it myself
and stopped at 1 h 49 m wall / 2 h 41 m CPU. All three runs show the same
signature:

signal value
open fds the four language_model/model-0000{1..4}-of-00004.safetensors, and nothing else
depth-decoder file never opened
RSS flat at 18.2 GiB (17.38 GiB on the implementer's run)
CPU 147 % across 20 threads — i.e. ~1.5 cores busy, 18-19 threads idle-spinning
state R (running) — burning CPU, not blocked on I/O

perf record on the live process (8905 samples) shows the spin directly:

--3.55%--__sched_yield
    --2.83%--entry_SYSCALL_64_after_hwframe
        --2.80%--do_syscall_64  →  __x64_sys_sched_yield  →  do_sched_yield  →  schedule

with two dominant unresolved user-space hotspots (~44 % and ~29 %). Symbols did
not resolve because the binary had been rebuilt under the running process
((deleted)), so the exact frames are still owed.

It is not the mount: a sequential cat of the same 17.2 GB completes in
20.6 s.

Why this looks like a threadpool barrier

One thread does work while the rest spin on sched_yield. That is consistent
with the related measurement recorded in b5a5f3b18: the vt threadpool is
idle for the majority of a request's wall clock, because the RVQ depth
decoder and the DiT do not go through vt at all, and LinearNoBias is a scalar
triple loop under -ffp-contract=off (deliberately, so W2/W3 could gate its
reduction order against torch).

The diagnostic lever

The two paths differ and both load the same shards:

  • test_minimax_music3_llm_real~3 min
  • the SpeechEngine / e2e path — hours

Whatever differs between them is the bug. A plausible first hypothesis is a
dtype conversion (e.g. a scalar bf16→f32 widening of ~8.6 B parameters) taken on
one path and not the other, but that is a hypothesis and not a finding.

Done when

test_minimax_music3_e2e_real with VLLM_CPP_MUSIC3_CHECKPOINT and
VLLM_CPP_MUSIC3_DIT=1 completes and is observed to pass, producing a
44100 Hz stereo WAV from an HTTP request — with the load time recorded.

Note for whoever picks this up

That test silently skips without both env vars: it reports
5 cases passed | 0 assertions with neither set. A gate that cannot say how many
things it examined has not reported.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions