What is calculatedCount tensors, not nominal bits.
The tool sums each tensor's shape and actual quantization-block bytes. A Q4_K_M file can mix Q4_K, Q6_K and higher-precision tensors. Tokenizer metadata, tensor directory and file padding are not GPU weights. File size and tensor payload are shown separately.
Layer placement follows the pinned llama.cpp b12532 contract: input embeddings remain on CPU, repeating layers and the output layer are assigned separately. A request of 12 GPU layers in the verified Qwen examples means 11 repeating layers plus output. This is not tensor parallelism.
K and V use the selected block format, on each layer's device when offload is enabled. Context slots round up to 256. Q8_0 uses 34 bytes per 32 elements; Q4_0 uses 18, including scales. These formats are not FP8.
Read the general ModelFit methodologyReal experiment · November 19, 202622 measured configurations, with a narrow scope.
ModelFit's reproducible local experiment used an Apple M5 with 16 GiB unified memory and the official llama.cpp b12532 library, commit 08c252e22. Both official Qwen2.5 0.5B and 1.5B Instruct Q4_K_M files were verified against their full published SHA-256 hashes.
The 22 formal runs covered CPU control, partial/full GPU offload, 2K/8K context, FP16/Q8_0/Q4_0 cache, repeated runs, and two 7,680-token prefill runs. Every formal run loaded successfully and generated 64 tokens. Most runs used 512 prompt tokens. One sequence, batch 512, microbatch 128, four CPU threads, Flash Attention and KV offload were fixed.
We sampled the process's Metal resource allocation and resident memory separately. An initial interval-only sampler missed fast load-stage endpoints; those 15 preliminary runs were retained separately and excluded from the formal results. The revised sampler added stage-end readings. Its target interval was 10 ms; the largest observed gap was 23.67 ms.
For full GPU offload at 8K with FP16 cache, observed generation resource peaks were 548.97 MiB for 0.5B and 1,239.20 MiB for 1.5B. The longer prefill runs had the same observed resource peaks in these preallocated configurations. This does not establish a universal error bound or a loading-success probability.
Download all 22 measured configurations (CSV) · Read the experiment protocol and hashes
Scope before certaintyPayload is not peak VRAM.
Weights plus KV alone underestimated the observed Metal generation resources by roughly 76–82 MiB in these small-model runs. Graph/compute buffers, temporary resources, backend repacking and allocation alignment are separate. The editable extra budget and headroom are your planning choices, not a fitted guarantee.
Apple unified-memory resources are not NVIDIA CUDA VRAM. Do not add Metal allocations to resident memory: they can share physical pages. Sampling can miss shorter transients. A measured example does not validate a different checkpoint, runtime version, GPU, context, concurrency or cache setting.
This version supports single-file, little-endian GGUF v3 standard dense Llama/Qwen2 tensor layouts, with explicit block types. Runtime measurements cover only the two Qwen2 examples. Split files, tied/implicit output weights, unknown tensor types, MoE, sliding/hybrid attention, recurrent/MLA architectures, multimodal sidecars, adapters, speculative decoding and multiple GPUs are not estimated. Unsupported files return an explanation instead of a guessed total.
Primary sources and responsibilityMake every claim traceable.
Method and publication responsibility: ModelFit. Measurements were collected November 19, 2026; this tool's implementation and sources were checked November 23, 2026. No independent expert review or hardware-vendor endorsement is claimed. The experiment used local hardware, not a rented Flatkey GPU. Some site links lead to Flatkey compute discovery; this experiment does not benchmark or endorse that service.
For formats and runtime compatibility, read GGUF vs Safetensors. For broader planning use the full worksheet, weight calculator or KV calculator. Return to all calculators.