Skip to content

Breeze BF16 runtime failure analysis — 2026-10-06

The BF16 candidate failed the campaign's host swap-growth gate and was stopped through the managed service path. This is a resource-policy rejection with incomplete benchmark evidence. It is not evidence of an MLX allocation exception, and available measurements cannot assign all system swap to the Breeze process. The versioned remedy adds a supported free-buffer cache control and serial allocator diagnostics; whether it resolves the candidate's failure still requires a retained managed rerun.

Exact identities and evidence

  • Model: mlx-community/Breeze-TTS-2-mlx, revision 3c8829fb7fd335818f085cd2ef49b4100c0e46c8.
  • MLX Audio: 0.5.8, source commit 70f4add32911bab6f869b824864ad9f1e24dcb97; MLX and mlx-metal 0.32.3, external Python 3.13.
  • Original frozen launcher SHA-256: b26278b78ac27bd25729deed26b0c3c0ecb46a954c3db29b023343fd6084ec07 (audio-runtime-identity.json). No cache-limit or memory-trace arguments were present in the retained supervisor definition.
  • Remedy launcher policy: mlx-audio-launcher/v2; worktree launcher SHA-256 at analysis creation: e7149c09668713835e1cd70725f2af78608ac023c72541f96462c61d7c924661. This report does not assert that the supervisor has copied or activated it.
  • Acquisition/configuration: breeze-bf16-pull.json, breeze-bf16-weight-headers.json, breeze-bf16-config.json, audio-runtime-requirements.txt, and configuration-snapshot/com.fakoli.anvil-voice-breeze-bf16-20261006.plist.
  • Measurements/stop: breeze-bf16-tts-60.json, breeze-bf16-abort-assessment.json, breeze-bf16-abort-down.json.
  • Authoritative engine log: runtime-artifact:logs/voice-breeze-bf16-20261006/launchd.log.

Observed behavior

The retained abort assessment records host swap from 33.88 MB at campaign start to 9129.94 MB at the first abort observation and 9833.88 MB after managed unload. Host free-memory percentage was 34%, then 61%. The frozen permitted swap growth was 512 MiB. These are host observations; the threshold-crossing time was missed during a monitoring gap. Original process RSS, physical footprint, and MLX active/cache/peak traces were not captured and cannot be reconstructed from those percentages.

The engine preloaded in approximately 9.1 seconds, then served one successful cold request and 59 successful warm requests. The sixtieth planned warm request (request-0061, long-form-06) failed after the managed stop: URLError, no HTTP status, no response bytes, 3.489 ms. The log shows orderly uvicorn shutdown of PID 3171, from 00:53:38.116 to 00:53:41.892. It contains no allocation-error or OOM stack trace. The transport failure should remain attributed to the campaign's stop, without recasting it as a model exception.

The benchmark used concurrency 1, streaming PCM, 24 kHz source audio, 16 kHz normalization, voice S0, no instruction/reference audio, and a 120-second request timeout. Request-side sampling and token parameters were omitted, so upstream HTTP defaults applied. Cold first audio was 3850.475 ms and cold wall time 7307.748 ms. Successful warm median first audio was 1394.071 ms and median wall time 4461.061 ms. Warm artifact-inclusive wall time was 426.662 s; endpoint throughput was explicitly not measured.

One short address sentence (request-0030, names-places-05, 84 characters) produced 96.0 seconds of audio and took 63524.097 ms. An 81-character numerical sentence produced 49.2 seconds. The 293-character long-form case produced 49.76 seconds. These outliers are retained outputs, not proof of repetition or truncation without independent fidelity/listening evidence.

Source-backed interpretation

Pinned Breeze generation uses a fresh conditional backbone KV cache per text segment, keeps generated codebook integers for that segment, and decodes streaming audio in bounded chunks. It resets the speech tokenizer's decoder state before and after normal streaming completion. Its normal generation path does not clear MLX's free-buffer cache. The direct method defaults to 750 frames, while the HTTP request defaults to 1200 and passes that value explicitly. The tokenizer configuration has a 1920-sample decode rate at 24 kHz: 12.5 frames/s, so 1200 frames exactly equal 96 seconds. The address outlier strongly suggests token-budget exhaustion, but stop-reason telemetry was not retained. Source: pinned Breeze generation, HTTP request and serial adapter, decoder state reset.

The three acquired weight files total 7590912274 bytes (about 7.07 GiB), including the audio tokenizer. BF16 backbone geometry is 28 layers, 8 KV heads, head dimension 128. One conditional path's raw K/V storage is therefore 2 × 28 × 8 × 128 × 2 = 114688 bytes/frame, or roughly 137.6 MB at 1200 frames before prompt, allocation rounding, transient tensors, and codec state. No instruction was supplied, so the source's additional classifier-free guidance path was inactive. One current backbone KV cache by itself does not account for 9 GB of host swap.

The shared KV cache grows in 256-token steps and replaces/concatenates buffers as shapes grow. This creates freed buffers of different sizes. Source: pinned KV cache. Retention of those buffers by MLX, alongside long generation and codec/transient allocations, is a plausible explanation to test. A persistent live-tensor leak, its exact size, and attribution of host swap remain unproven. No enduring list of all prior-request KV caches was found in these generation/reset paths. Swap remaining after process exit also does not establish that the exited process still owns it.

Supported bounded remedy and its limits

--mlx-cache-limit-mib 256 sets MLX's retained free-buffer pool to 256 MiB; --mlx-cache-limit-mib 0 disables that cache. Excess free cache is reclaimed on a subsequent allocation. Neither setting limits active weights/KV/transients, Python/NumPy allocations, process footprint, or host swap. Cache 0 is the campaign's explicit diagnostic arm; any allocation/latency tradeoff must be measured. Source: MLX 0.32.3 cache control.

Do not convert the admitted service memory_mib into a claimed hard cap via mx.set_memory_limit. MLX documents that setting as a graph-evaluation guideline and can allocate beyond it while RAM/swap remain available. No safe numerical guideline can be inferred from weights alone without transient peak measurements. Source: MLX memory-limit semantics. The exact MLX 0.32.3 Metal allocator source also keeps the free-cache pool limit separate from the memory-pressure guideline; changing the latter does not automatically change the former. This remedy deliberately exposes no memory-limit or wired-limit flag.

A caller-selected max_tokens=750 bounds this model to 60 seconds per segment. It reduces frame/KV growth relative to 1200, but is not a total allocation limit and may truncate valid long utterances. Several text segments can exceed that total duration. Preserve the remaining HTTP sampler values when comparing; 750 alone does not recreate all direct-method defaults. A cap-hit output must undergo independent fidelity/truncation adjudication before counting as qualified audio. Lower arbitrary caps, modified model config, or KV rotation are not established quality-preserving fixes.

Before/after configuration and measurement contract

Arm Launcher Free-cache policy Generation limit Diagnostic scope
Retained BF16 baseline original SHA above upstream default HTTP default 1200 host observations only
Cache attribution arm v2 exact reviewed SHA explicit 0 MiB preserve 1200 per-request allocator trace plus process/host trace
Requested combined remedy v2 exact reviewed SHA explicit 0 MiB explicitly configured 750 same traces, separate configuration identity

The root owns activation and reruns. An 8-bit artifact is a separate model identity and cannot prove that BF16 was fixed. If cache and token limit both change, label it a combined remedy; do not attribute any improvement to one variable. Retain model/upstream pins, dependency freeze, launcher SHA, complete supervisor arguments, request configuration digest, and corpus/case order for every arm.

The v2 cache option is validated before optional engine import and applied once by the pinned model provider on the broker's inference worker before preload. --mlx-memory-trace wraps each serial model.generate without changing returned objects or the public signature. Start/end JSON records report active, free-cache, and allocator peak bytes with a local request index. A finally boundary records errors and cancellation, including close before the first generated chunk. Tracing is bound to the actual preload worker; calls outside that worker bypass all MLX diagnostic sampling and preserve the original call. Finalization on another thread does not sample MLX. Batch-specific generation and realtime sessions are outside this trace contract. The pinned InferenceBroker owns its CPU/GPU streams and serializes whole-request work.

The first cold-generation start record contains the allocator high-water mark accumulated during startup/preload; it is not a dedicated model-load peak. The trace then resets the peak before generation, so every generation end reports the request's allocator high-water mark. Warm starts retain the preceding counter before reset. This alters the scope of upstream GenerationResult.peak_memory_usage, which otherwise reports a cumulative process peak; mark tracing as an explicit configuration change. MLX peak and reset semantics define that scope. A peak counter resets to zero; if no subsequent allocation occurs, use the recorded starting active baseline separately instead of assuming the counter represents baseline model bytes.

Authoritative macOS memory evidence for the next arm

MLX get_active_memory and get_cache_memory measure allocator-owned active buffers and free retained buffers. They do not equal RSS; allocator peak tracks active high-water use, not active plus retained free cache. Sample these APIs only in the actual inference process/worker. Source: MLX active-memory scope and the allocator source above.

Pair the engine trace with timestamped PID-specific RSS through the existing managed status surface. macOS ps RSS values are KiB; record units and sampling interval, and call the maximum of samples an observed maximum rather than an exact peak. Inside the actual engine process, resource.getrusage(RUSAGE_SELF).ru_maxrss supplies its lifetime resident high-water mark in bytes on Darwin; collecting RUSAGE_SELF in the CLI would measure the CLI. Kernel-backed TASK_VM_INFO/process resource information can also provide resident and physical-footprint/lifetime-peak fields when the collector has access. Apple kernel resource accounting distinguishes those counters.

For paged/compressed allocations, physical footprint is more informative than resident-only RSS. Apple's VM Tracker accounts for dirty plus compressed/swapped memory, including accessed Metal resources on unified memory. Use a bounded supported Instruments/OS collector if needed, without changing the serving configuration. Source: Apple Metal memory analysis and Apple memory-footprint explanation.

Retain separate startup/preload, cold first generation, each warm case, after-request idle, and post-managed-unload observations. Correlate timestamp/request index to the ordered case evidence. Host swap/free percentage remains a host gate and context signal; it never substitutes for model-process RSS or allocator telemetry. Keep the campaign's existing abort threshold and frequent monitoring, and retain incomplete evidence if it triggers.

Scoped verification

Offline launcher tests: 42 passed in 0.13 seconds using .venv/bin/python scripts/run_tests.py tests/voice/test_audio_runtime.py -q --timeout 60. Tests cover default preservation, worker application ordering, strict reviewed MLX pin, CLI forwarding, completion/error/cancellation diagnostics, exactly-once iterator close, cached model identity, separate cold/warm counters, startup refusal, and signal/broker cleanup. Launcher help, bytecode compilation, and whitespace checks passed. No inference, weight download, install, supervisor action, or edit to the isolated frozen launcher was performed for this remedy. Full-product-suite platform failures remain documented separately in product-test-triage.json; this scoped result does not claim that suite is green.