Llama.cpp b11019: A successful embedded GGUF load may still return wrong tensors

If your local inference application reads a GGUF embedded inside a larger file, a successful load is not a sufficient correctness check. The llama.cpp b11019 release notes describe a case where loading completed without error but returned wrong tensor data.

The practical decision: prioritize testing b11019 for custom embedded-GGUF loaders, and make tensor correctness—not just initialization success—the acceptance criterion. This is a targeted loader issue, not evidence that every GGUF model or every standalone load is affected.

The offset that matters

The release, marked pre-release in the captured page, references commit 81aeaeb and PR #28993. It describes gguf_init_from_file_ptr as reading a GGUF from the current file position, while previously padding the data section relative to file offset zero. For a GGUF embedded at an offset that was not a multiple of the alignment, that calculation could return the wrong tensor data without a load error.

The stated correction is to align the data section relative to the GGUF start, rather than the start of its containing file. That distinction matters for an application that packages model data inside another file and passes a positioned FILE* to the loader. A check that only asks whether the loader returned successfully would miss the failure described here.

A focused acceptance check

For maintainers exposing such a local inference runtime through an API, I would put this check before accepting a runtime update:

Fixture placement What to establish
Standalone GGUF at offset zero A known-correct reference for the fixture’s tensor data
Same GGUF at a nonzero offset divisible by its alignment Tensor data still matches the reference
Same GGUF at a nonzero offset not divisible by its alignment Any successful load returns the reference tensor data; success alone is not a pass

Use the same GGUF payload across placements and record the exact build, embedding offset, alignment, and loading mode. Compare against known-correct tensor data, not merely plausible generated text. Run the relevant cases on the currently used build and the b11019 candidate so the upgrade decision rests on your integration rather than the release label.

This is a proposed regression check based on the reported mechanism, not a test result. The release page does not establish an exhaustive affected-version range or prove that any particular deployment has encountered the issue.

Keep mmap behavior a separate question

Do not turn this release into a promise of automatic mmap fallback. The notes first describe disabling mmap with a warning when an embedded data section is unaligned. A later entry says “error on unaligned mmap of an embedded GGUF, drop test-load-file-ptr.” Those entries describe evolving handling, not a single unambiguous fallback contract.

For the exact build and caller path you intend to ship, separately check whether mmap is used, disabled, or rejected. Record that outcome independently of tensor comparison. A rejected load is not the silent wrong-tensor failure, but it still needs deliberate handling by the application. Implementation inspection or a focused test is needed before promising callers a specific fallback behavior.

The narrow takeaway is worth keeping narrow: if you load embedded GGUF data from a nonzero file position, test the alignment boundary before trusting a clean initialization. This source supports a loader-correctness decision—not a model-quality claim, a performance improvement, or an assertion about a hosted API provider.

The reference data needs an independent check too. For this b11019 regression, I would not make “the old and new loaders agree” the only oracle: agreement between two outputs is weaker evidence than agreement with tensor values established independently of either loader.

The release notes identify wrong tensor data despite a successful embedded load. To test that mechanism, I would use a small synthetic GGUF with deliberately different, known payloads for each tensor, retaining an expected manifest of tensor names, shapes, types, and payload bytes from fixture construction. Compare the loader’s exposed tensor payloads with that manifest before any backend conversion, rather than hashing the whole container or comparing generated answers. If the harness only exposes converted values, define that comparison separately; it is not a byte-for-byte payload check.

This adds a useful control to the placement matrix: move the unchanged fixture, not the expected values. A result that differs only after changing the embedding offset points toward the loading path without introducing a new model or quantization as a competing explanation. If the harness cannot reproduce the reported failure on its baseline build, a passing b11019 run should be reported as a passing fixture check—not proof that the harness caught and verified the fix.

That is a proposed evaluation design, not a reproduction result or a claim that b11019 improves model quality.