Skip to content

fix(minimax-h3): the fp32-island rule now BINDS the bf16 GGUF host loader (#244) - #272

Merged
localai-bot merged 1 commit into
mainfrom
row/H3-FP32-ISLAND-GGUF-BF16
Aug 10, 2026
Merged

fix(minimax-h3): the fp32-island rule now BINDS the bf16 GGUF host loader (#244)#272
localai-bot merged 1 commit into
mainfrom
row/H3-FP32-ISLAND-GGUF-BF16

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Closes #244.

What #253 fixed, and what it left

#253 fixed the instancerope.inv_freq and adaln_t_table stopped being rounded into bf16 bits that Ptr<float>() then reinterprets as garbage. But it did so by hardcoding those two names. MiniMaxH3IsFp32IslandTensor covers seven: both patch projections, time_embedder.*, both output heads, and those two. Five islands were still silently down-converted on this path.

Severity, stated precisely

The issue reads worse than it is, so: those five are not garbage. BindMiniMaxH3DitViews types each tensor from the storage map it lands in, so a bf16 island is correctly typed bf16 and consumed as such. rope.inv_freq was uniquely dangerous because the forward reads it through a raw Ptr<float>(), bypassing the dtype.

What remained is a silent precision divergence from upstream on one loader, not corruption — and on the CPU --dequant-bf16 path only. The production GPU stream was never affected, which is why every render this session was correct.

The fix

Consult the single source instead of re-listing names. The rule's own contract says "all four staging paths must agree" — this host loader is a fifth that no gate covered, which is exactly how the two descriptions drifted apart.

The gate is the load-bearing half

It walks every tensor the loader placed and requires island ⇒ storage (f32), non-island ⇒ bf16_storage, with an islands >= 6 floor so a predicate matching nothing can't pass vacuously. It asserts on the loader's own storage split rather than the bound views, because that map is the decision under test.

Mutation-verified

test cases assertions
with the fix 79/79 pass 57,395 / 0 failed
reverted to the hardcoded two names 78/79 — 1 failed 24 failed

The 24 are exactly the five island categories the hardcoded check missed. Tree restored byte-for-byte afterwards.

Suite grew 57,299 → 57,395 (the gate adds 96 assertions), so it is genuinely executing rather than passing vacuously.

Pattern

Third instance today of a rule documented as universal that one code path quietly ignores — after decoder_tiling "defaults false" (#251) and vllm_server_main compiled out under VLLM_CPP_SERVER=OFF (#202). Cheap to fix, expensive to rediscover.

…ader (#244)

#253 fixed the INSTANCE — rope.inv_freq and adaln_t_table stopped being rounded
into bf16 bits that Ptr<float>() then reinterprets as garbage — but it did so by
hardcoding those two names. MiniMaxH3IsFp32IslandTensor covers SEVEN: both patch
projections, time_embedder.*, both output heads, and those two. Five islands were
still silently down-converted on this path.

Severity, stated precisely because the issue reads worse than it is: those five
are NOT garbage. BindMiniMaxH3DitViews types each tensor from the storage map it
lands in, so a bf16 island is correctly TYPED bf16 and consumed as such.
rope.inv_freq was uniquely dangerous because the forward reads it through a raw
Ptr<float>(), bypassing the dtype entirely. What remained was a silent PRECISION
divergence from upstream on one loader, not corruption — and it is the CPU
--dequant-bf16 path only; the production GPU stream was never affected.

The fix consults the single source instead of re-listing names. The rule's own
contract says "all four staging paths must agree"; this HOST loader is a FIFTH
that no gate covered, which is exactly how the two descriptions drifted apart.

The gate is the load-bearing half: it walks every tensor the loader placed and
requires island => storage (f32), non-island => bf16_storage, with an
`islands >= 6` floor so a predicate matching nothing cannot pass vacuously. It
asserts on the loader's OWN storage split rather than the bound views, because
that map IS the decision under test.

MUTATION-VERIFIED. Reverting the loader to the hardcoded two-name check turns the
suite RED — 78/79 cases, 24 failed assertions, exactly the five missed island
categories. Restored byte-for-byte afterwards.

Suite: 79/79 cases, 57,395 assertions (was 57,299; the gate adds 96).

FOLLOWING_AGENTS_PROTOCOL
Assisted-by: Claude Code:claude-opus-5 [ClaudeCode]
@localai-bot
localai-bot merged commit e3cc4f6 into main Aug 10, 2026
9 of 13 checks passed
@localai-bot
localai-bot deleted the row/H3-FP32-ISLAND-GGUF-BF16 branch August 10, 2026 14:01
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.

MiniMax-H3: LoadMiniMaxH3DitFromGgufBf16 rounds rope.inv_freq into bf16 bits that are then read as f32

2 participants