New Tool Radar

Local AI

How to Split a Large GGUF Model File Into Shards

Split a large GGUF model file into shards with llama-gguf-split for transfer or storage.

Schematic with three steps: Build the split tool; Split the model file; Confirm the shards are complete.

A large GGUF file can be tens of gigabytes, which is awkward to copy onto a USB drive, upload, or store on a small filesystem. llama-gguf-split cuts one GGUF file into smaller shards that can be moved separately and rejoined later.

What you need

  • llama.cpp built with the llama-gguf-split target
  • A GGUF model file to split
  • Enough free disk for the shards as well as the original

Step 1: Build the split tool

Build llama.cpp with the llama-gguf-split target included, for example by building the llama-cli, llama-server, llama-bench, and llama-gguf-split targets together with CMake.

Step 2: Split the model file

Run llama-gguf-split on the GGUF file and choose a shard size that fits your transfer or storage limit. The tool writes numbered shard files next to the original.

Step 3: Confirm the shards are complete

List the shard files and check their sizes add up to the original file size. Keep the original until you have confirmed the shards are all present and usable.

Worked example: synthetic GGUF split

The table below is a synthetic example. It shows the expected result of splitting a model; no file was split.

Check Expected Result
Original file One 20 GB file Pass
Shard size chosen 5 GB per shard Pass
Shards written 4 shards Pass
Sizes add up 20 GB total Pass

Expected result (UNTESTED). the 20 GB file splits into four 5 GB shards, and the shard sizes add up to the original file size. This check was not run live; the table shows the expected result for the synthetic example.

Limits

  • Splitting does not shrink the model; the shards together are the same size as the original.
  • Keep the original file until the shards are confirmed complete.
  • A split model still needs a tool that understands shards before it can be loaded.

Sources

See all