Skip to content

Optimize and harden MiniMax Music 3 long-form generation - #309

Merged
a-github-name merged 2 commits into
mainfrom
codex/minimax-music3-next-optimizations
Aug 16, 2026
Merged

Optimize and harden MiniMax Music 3 long-form generation#309
a-github-name merged 2 commits into
mainfrom
codex/minimax-music3-next-optimizations

Conversation

@a-github-name

@a-github-name a-github-name commented Aug 16, 2026

Copy link
Copy Markdown
Member

Summary

  • accelerate the native MiniMax Music 3 pipeline with a reachable semantic head, fused projections, incremental residual-depth KV caches, cached conditioning, batched flow guidance, profiling, and explicit performance tiers
  • bound long-form MLX buffer-cache growth by clearing completed autoregressive workspaces every 64 frames while preserving live model, KV, and conditioning state
  • decode long DAV latents in bounded overlapping slices and validate every result for finite samples, silence, implausible peaks, and stereo collapse
  • expose versioned flow and seed recipes through the CLI, HTTP route, and schema 5 generation artifacts; released sequential flow and legacy seeding remain unchanged defaults
  • retain overlap-average and direct INT8 ConvRot only as explicit research paths because measured runs did not establish either as a production speed win

Measured results

  • matched 100-frame Q8 generation: 30.90 s to 19.24 s, 37.7% faster
  • matched forced 120-second Q8/draft generation: 110.20 GB to 23.78 GB peak physical footprint, 78.4% lower and 4.63x smaller, with zero swaps
  • the bounded-cache 120-second float32 WAV is byte-identical to the unbounded baseline: 5ec23504131e7b74cef86f368d1a9164f9ac96d071d9c0f25615c5525fc559be
  • autoregressive time for that memory comparison: 144.75 s to 151.05 s, a 4.4% cost for bounded long-form memory
  • bounded DAV decode on the 120-second fixture: 15.95 s to 9.43 s, 40.9% faster
  • overlap-average flow measured 464.38 s versus 454.31 s sequential, so it remains opt-in and is not presented as an acceleration preset
  • direct INT8 ConvRot was 1.60x to 2.66x slower than dense BF16 at measured production-width shapes, so no production dispatch uses it

The long-form runs used an M4 Max with 128 GB unified memory. The 23.78 GB peak makes 32 GB plausible, but this PR does not claim 32 GB support without an actual 32 GB hardware run.

Post-restack MLX refresh receipt

The exact rebased head 5720cb7c1411f179af6398d874d6d35b590cf9d9 was replayed against the installed upstream checkpoint MiniMaxAI/MiniMax-Music3@bd348f9c49ea3c1b39f33ace3436f8fad435f24e after the MLX/mlx-swift refresh landed on main.

  • exact deterministic recipe: 120 seconds, Q8, draft, staged loading, sequential flow, 16 steps, stage-separated-v1, seed 20260815
  • output: 3,001 frames, 44.1 kHz stereo Float32 WAV, 120.186 seconds
  • output SHA-256: 5ec23504131e7b74cef86f368d1a9164f9ac96d071d9c0f25615c5525fc559be, byte-identical to the pre-refresh bounded-cache receipt
  • audio health: peak 1.0, RMS 0.08406066, stereo-collapse fraction 0
  • physical peak: 23.78 GB, zero swaps
  • stage-timed inference: 725.42 s total (164.26 s autoregressive, 540.93 s flow, 20.01 s vocoder)
  • the earlier bounded-cache profile was 679.50 s, so this replay was 6.8% slower; no performance win is claimed from the dependency refresh
  • /usr/bin/time wall time included machine-admission queueing and is not used as an inference-performance result

Validation

  • rebased directly onto current main at 22b35602059f2df6f5a169ad24e44d04b3e264dc
  • ./scripts/check.sh
    • strict SwiftLint: 0 violations across 1,247 Swift files
    • 2,897 XCTest cases, 211 expected skips, 0 failures
    • 30 Swift Testing cases passed
    • build, MLX metallib compatibility, CLI help sweep, and hygiene scans passed
  • swift build -c release
  • focused MiniMax unit, CLI parsing, HTTP, artifact, bounded-decode, audio-health, and opt-in research tests are included in the full gate
  • pnpm docs:build
  • README, runtime documentation, benchmark notes, and changelog updated
  • git diff --check origin/main...HEAD
  • exact installed-checkpoint Q8 long-form replay completed after the MLX refresh with byte-identical audio
  • all GitHub CI, Linux compatibility, macOS app-bundle, docs, dependency-review, and secret-scan checks passed on the exact head
  • THIRD_PARTY_NOTICES.md not applicable: no vendored artifacts or package pins changed

@a-github-name
a-github-name force-pushed the codex/minimax-music3-next-optimizations branch from 1dd938f to 5720cb7 Compare August 16, 2026 12:11
@a-github-name
a-github-name marked this pull request as ready for review August 16, 2026 15:38
@a-github-name
a-github-name merged commit 99bf752 into main Aug 16, 2026
9 checks passed
@a-github-name a-github-name mentioned this pull request Aug 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant