If a Metal-hosted MoE model works with a small prefill but produces NaN logits with a larger one, replacing the GGUF should not be the first diagnostic move. llama.cpp b10994, marked as a prerelease at commit 0a8b29a, documents a runtime failure that can explain that pattern. The useful decision is whether to trial this build against the same model file before removing a small-microbatch workaround.
That is a narrower claim than saying the GGUF is fine or every empty response has the same cause.
Why the prefill boundary matters
The release’s embedded description of PR #26223 attributes the failure to the Metal mul_mm_id path narrowing f32 activations to half. When activations exceed f16’s maximum finite value, 65504, that conversion can produce infinity; the subsequent matrix operation propagates NaNs across an 8x8 accumulator tile.
The same description says the mul_mv_id path used below the dispatch threshold of 32 keeps those values in f32. That gives a specific explanation for short prefills succeeding while larger ones fail. The 32-token boundary belongs to the described kernel path; it is not a universal rule that a user prompt of 32 tokens breaks a model.
The documented fix rescales activations by a power of two before narrowing them and reverses the scale when storing the f32 accumulator. According to the release, accumulation itself remains f32. This addresses the reported overflow mechanism, not every possible quantization or output-quality problem.
What the reported tests establish
The release reports the following on Apple M2 Max:
- Six synthetic
MUL_MAT_IDcases, coveringn=16,32and64with q4_K and q8_0 shapes, moved from four failures and two passes to all passing. Then=16cases were the below-boundary controls. - A full
test-backend-ops -b MTL0run had zero failures. - Mistral-Small-4-119B generated correctly at
n_ubatch=512in both UD-IQ3_S and UD-Q4_K_XL. The prior workaround described there wasn_ubatch <= 31, forcing the smaller-input path.
These are release-author observations, not independent tests performed for this article. They do not establish correctness for another model, quantization, device or build.
There is also an important qualification within the same page: later entries say tests were temporarily commented out to avoid breaking CI. The earlier successful test account therefore should not be read as proof of the final build’s enabled test coverage. The dense kernel_mul_mm is explicitly left unchanged, despite the author’s suspicion of analogous narrowing behavior.
A bounded retest before changing the model file
For an API service you operate on this affected Metal path, I would use the release as a reason for a controlled comparison:
- Preserve the current build and workaround. Record the GGUF checksum, quantization, device, runtime version and inference settings so the model file stays fixed across the comparison.
- Reproduce the failure on the current build. Check logits where the diagnostic setup permits; an empty response alone does not identify this overflow. Keep a below-boundary control alongside the failing case.
- Trial b10994 with the same inputs and settings. Exercise below-boundary and boundary cases, including sizes around 31/32 and 64, then the intended operating microbatch size. Ensure the test actually exercises the relevant prefill path rather than relying on visible prompt length alone.
- Require finite logits and valid output on the affected workload before retiring
n_ubatch <= 31. Measure service latency and throughput separately; the release’s kernel tests are not an end-to-end service guarantee. Retain the rollback option if the failure persists.
The page suggests that an issue attributed to a bad GGUF may share this cause, but that remains a hypothesis; the linked issues are not independently verified here. Retesting the runtime first helps isolate the variable. It neither certifies the file’s integrity nor establishes that a hosted API provider uses the affected implementation.