TECHNOLOGY

Verify split GGUF shards before merging a llama.cpp model

In this article
THE QUICK TAKE

Accept a split GGUF as a complete shard set rather than one plausibly named file.

Accept a split GGUF as a complete shard set rather than one plausibly named file. Merging depends on the first part, split-count metadata, and consistent naming. Verify the set before the operation and retain originals. Possessing only the first shard does not establish a complete loadable model. This concerns artifact integrity and transfer, separately from choosing Q4, Q8, or another weight representation.

Identify the artifact boundary

The official gguf-split README describes split and merge operations: merging starts from the first part and locates the others nearby. That path is an entry point, not evidence that every part exists. Preserve names, sizes, and checksums from a trusted manifest. Do not combine shards from different revisions merely because their numbers match. Filename prefixes assist recognition, but provenance and metadata establish checkpoint identity. Keep one agreed set together rather than relying on a directory containing unrelated downloads.

Validate metadata and naming

The tool implementation checks split counts and expected names. Missing parts or unsuitable structure can cause rejection. Do not rename files randomly to make merging proceed; that can hide a delivery mistake without fixing content. Establish the expected set and actual download first. If creating a custom split, retain the tool version and operation settings so that the resulting packaging can later be distinguished from the original repository’s published artifact layout. Packaging identity matters independently of model identity.

Prepare an acceptance directory

Use a separate directory containing one set and a manifest with model, revision, shard list, and hashes. Detect missing files before merging. Write the supported merge operation to a new destination while preserving originals. This is a test design, not a reported model result. When creating a split, use the build’s supported dry-run to inspect the plan before writing, then compare it with actual outputs. Read split metadata rather than assuming the required number of parts from an example.

Verify the merged result

After an error-free merge, open the resulting GGUF with a supported runtime. Check metadata, expected tensors, and a short functional request. File size alone cannot prove completeness, and equal sizes do not establish equal content. Never expose an interrupted output under the final model name. Keep the tool’s completion status and calculate the final checksum only after writing finishes, so a downstream process cannot mistake an unfinished file for an accepted artifact. Loading acceptance remains separate from successful file concatenation or conversion.

Decide whether merging is necessary

Split-GGUF loading support depends on the chosen tool and release. Consult its documentation before creating a large duplicate that the tested runtime does not require. Preserve every part and the manifest during transfer. Acceptance should identify the set required by the selected loading method and how missing files are detected. Complete packaging does not imply support for every GGUF model architecture in every backend. The useful record combines provenance, confirmed membership, and loading results without guessing shard numbers or treating a server quantization flag as a repair for structural file errors.

Choosing a GGUF file for llama.cpp; NVMe for model serving: where a faster disk changes results.

← All articles