Will it fit on your GPU? Pingala-8 2-bit vs normal 4-bit
Pick a model, your NVIDIA GPU and the context length. See whether it fits as a Pingala-8 2-bit build, next to the usual 4-bit Q4_K_M and FP16. Real Pingala-8 files exist for Qwen3-4B and Llama-3.1-8B; for every other model the Pingala-8 size is an estimate.
Detailed calculator
Every weight format (FP16 to IQ1_M), the KV cache type and a custom overhead allowance, for the 20 listed models.
| Weights | |
|---|---|
| KV cache | |
| Overhead allowance | |
| Total |
Real use varies with the runtime version and settings, the driver and other programs on the GPU. Treat this as an estimate and check with nvidia-smi.
Every format for this model
| Format | Weights | + KV cache | Total | Verdict | Size from |
|---|
Smaller than 4-bit?
If Q4_K_M fits your card, it is the simple choice: it runs in stock llama.cpp, Ollama and LM Studio. Below 4 bits, quality drops faster. llama.cpp's own table lists Llama-3-8B perplexity rising by 0.18 at Q4_K_M, 0.66 at Q3_K_M and 3.52 at Q2_K.
Pingala-8 is our 2-bit format for llama.cpp at IQ2_XXS size. Qwen3-4B goes from 8.05 GB to 1.24 GB, with a WikiText-2 perplexity of 16.64 against 28.61 for IQ2_XXS at the same size (lower is better). Llama-3.1-8B is 2.39 GB.
Caveat: Pingala-8 files need our patched llama.cpp build (NVIDIA CUDA). Stock llama.cpp, Ollama and LM Studio cannot load them.
How the numbers are calculated
Total = weights + KV cache + overhead allowance. This is the same arithmetic as our guide How much VRAM do you need to run an LLM locally?
- Weights. llama.cpp loads the whole GGUF file, so the weights take about its size. Where we know a real file (Qwen's own GGUF releases, our benchmark files), we use its exact size. Otherwise we estimate parameters x bits per weight / 8, with the bits per weight that llama.cpp measured on whole Llama-3.1-8B files. We checked the estimate against the 34 real files listed below: it came out between 4.9% low and 1.4% high, with the largest gaps for small models with large vocabularies (Qwen3-4B Q2_K).
- KV cache. For every token of context, each layer stores a key and a value: 2 x layers x KV heads x head size x bytes per number. f16 takes 2 bytes per number, q8_0 takes 34 bytes per 32 numbers and q4_0 takes 18 bytes per 32. llama.cpp rounds the context up to a multiple of 256.
- Gemma 3. Five of every six layers use sliding-window attention. By default llama.cpp keeps only the window plus one 512-token batch for those layers, rounded up to a multiple of 256 (1,536 tokens for the 1,024-token window). The
--swa-fulloption turns this off and uses the full size. - Overhead allowance. 1.5 GB by default, for the compute buffer, the CUDA context and the desktop. It is a rule of thumb, not a measurement, so change it if you know better. A headless Linux machine may need less; a Windows desktop with a browser open may need more.
- Verdict. Fits: the total is within your card. Tight: the weights and cache fit, but less than the allowance is left, so expect to cut the context or close other apps. Does not fit: the weights and cache alone are larger than the card.
- Units. GB here means 10^9 bytes, and card sizes are taken at face value. A card sold as 8 GB has 8 GiB, about 8.6 GB, so the verdict errs on the safe side. Totals are the sum of the rounded parts.
Real use varies. The runtime, its version and settings (batch size, flash attention, parallel slots), the driver and other programs all change the real number. Before you start, run nvidia-smi to see how much VRAM is free; llama.cpp prints the size of the model buffer, the KV cache and the compute buffer as it loads. If a model does not fit, -ngl keeps some layers in system RAM, which runs much slower.
A quantized cache (-ctk q8_0 -ctv q8_0) roughly halves the cache. llama.cpp needs flash attention for a quantized V cache (-fa on). It changes the output slightly, and we have not tested it with Pingala-8.
Sources
Model shapes come from each model's public config.json on Hugging Face, checked against the tensor shapes in its safetensors files (Gemma 3 configs leave some values at library defaults, and Gemma 3 12B's head size is 256, not hidden size / heads). Parameter counts are the text-model tensors in the safetensors headers: a tied output matrix is counted once, as in GGUF, and the Gemma 3 vision tower is left out. Meta's repos are gated, so their configs were read from the ungated unsloth mirrors and the counts checked against Meta's own repo metadata.
| Model | Repo (config read from) | Layers | KV heads | Head size | Parameters | KV f16 per token |
|---|---|---|---|---|---|---|
| Qwen3-0.6B | Qwen/Qwen3-0.6B (config c1899de) | 28 | 8 | 128 | 596,049,920 | 114,688 |
| Qwen3-1.7B | Qwen/Qwen3-1.7B (config 70d244c) | 28 | 8 | 128 | 1,720,574,976 | 114,688 |
| Qwen3-4B | Qwen/Qwen3-4B (config 1cfa9a7) | 36 | 8 | 128 | 4,022,468,096 | 147,456 |
| Qwen3-8B | Qwen/Qwen3-8B (config b968826) | 36 | 8 | 128 | 8,190,735,360 | 147,456 |
| Qwen3-14B | Qwen/Qwen3-14B (config 40c0698) | 40 | 8 | 128 | 14,768,307,200 | 163,840 |
| Qwen3-32B | Qwen/Qwen3-32B (config 9216db5) | 64 | 8 | 128 | 32,762,123,264 | 262,144 |
| Qwen3-30B-A3B (MoE) | Qwen/Qwen3-30B-A3B (config ad44e77) | 48 | 4 | 128 | 30,532,122,624 | 98,304 |
| Qwen2.5-7B-Instruct | Qwen/Qwen2.5-7B-Instruct (config a09a354) | 28 | 4 | 128 | 7,615,616,512 | 57,344 |
| Llama-3.2-1B | meta-llama/Llama-3.2-1B-Instruct (unsloth/Llama-3.2-1B-Instruct) | 16 | 8 | 64 | 1,235,814,400 | 32,768 |
| Llama-3.2-3B | meta-llama/Llama-3.2-3B-Instruct (unsloth/Llama-3.2-3B-Instruct) | 28 | 8 | 128 | 3,212,749,824 | 114,688 |
| Llama-3.1-8B | meta-llama/Llama-3.1-8B (unsloth/Meta-Llama-3.1-8B) | 32 | 8 | 128 | 8,030,261,248 | 131,072 |
| Llama-3.1-70B / 3.3-70B | meta-llama/Llama-3.1-70B-Instruct (unsloth/Meta-Llama-3.1-70B-Instruct) | 80 | 8 | 128 | 70,553,706,496 | 327,680 |
| Gemma 3 1B | google/gemma-3-1b-it (config dcc83ea (gated: log in to Hugging Face and accept Google's Gemma terms to view)) | 26 | 1 | 256 | 999,885,952 | 26,624 (window layers less) |
| Gemma 3 4B | google/gemma-3-4b-it (config 093f9f3 (gated: log in to Hugging Face and accept Google's Gemma terms to view)) | 34 | 4 | 256 | 3,880,263,168 | 139,264 (window layers less) |
| Gemma 3 12B | google/gemma-3-12b-it (config 96b6f1e (gated: log in to Hugging Face and accept Google's Gemma terms to view)) | 48 | 8 | 256 | 11,766,034,176 | 393,216 (window layers less) |
| Gemma 3 27B | google/gemma-3-27b-it (config 005ad34 (gated: log in to Hugging Face and accept Google's Gemma terms to view)) | 62 | 16 | 128 | 27,009,346,304 | 507,904 (window layers less) |
| Mistral 7B v0.3 | mistralai/Mistral-7B-Instruct-v0.3 (config c170c70) | 32 | 8 | 128 | 7,248,023,552 | 131,072 |
| Mistral Small 24B (2501) | mistralai/Mistral-Small-24B-Instruct-2501 (config 9527884) | 40 | 8 | 128 | 23,572,403,200 | 163,840 |
| Phi-4-mini | microsoft/Phi-4-mini-instruct (config cfbefac) | 32 | 8 | 128 | 3,836,021,760 | 131,072 |
| Phi-4 | microsoft/phi-4 (config 2db69c1) | 40 | 10 | 128 | 14,659,507,200 | 204,800 |
GPU memory
From NVIDIA's spec pages, checked on 2026-10-25. Laptop makers can fit other amounts; check yours with nvidia-smi.
- GeForce compare page, GTX 16 Series table: GTX 1650: 4 GB (GDDR5 and GDDR6 versions).
- RTX 3050: 8 GB or 6 GB.
- RTX 3060 / 3060 Ti: RTX 3060 12 GB (also sold with 8 GB), RTX 3060 Ti 8 GB.
- RTX 3090: 24 GB.
- RTX 4060 / 4060 Ti: RTX 4060 8 GB, RTX 4060 Ti 16 GB or 8 GB.
- RTX 4070 family: RTX 4070 12 GB.
- RTX 4080 family: 16 GB.
- RTX 4090: 24 GB.
- RTX 5060 family: RTX 5060 8 GB, RTX 5060 Ti 16 GB or 8 GB.
- RTX 5070 family: RTX 5070 12 GB, RTX 5070 Ti 16 GB.
- RTX 5080: 16 GB.
- RTX 5090: 32 GB.
- RTX 40 Series laptops: 4050 6 GB, 4060 8 GB, 4070 8 GB, 4090 16 GB.
- RTX 50 Series laptops: 5060 8 GB, 5070 Ti 12 GB, 5090 24 GB.
- T4 datasheet: 16 GB GDDR6.
Newest (2026) models
Parameter counts are the safetensors totals that Hugging Face reports for each official repo (they include any vision tower and multi-token-prediction layers in the checkpoint). Qwen3.5, Qwen3.6 and Qwen3.8 dense and A3B models are hybrids: only their full-attention layers keep a per-token KV cache, and each linear-attention layer keeps a fixed f32 state of (conv kernel - 1) x (2 x key heads x key size + value heads x value size) + key size x value heads x value size numbers, as in llama.cpp's src/llama-hparams.cpp. For the other new architectures (Gemma 4, Ministral 3, DeepSeek V4, GLM-5.3, gpt-oss, Kimi-K3, Qwen3.8-Flash-Next) the page shows weights only until their cache formula is checked. Pingala-8 needs our patch on llama.cpp 7ac59a6; GLM-5.3-Flash's architecture (glm5-next) was added to llama.cpp after that commit, and DeepSeek-V4.1-Flash is not in llama.cpp master as of f3269ef.
Bits per weight
From the table for meta-llama/Llama-3.1-8B in llama.cpp's tools/quantize/README.md (commit 3f03b17). These are whole-file averages, so they include the higher-precision tensors that every GGUF file keeps.
| Format | Bits per weight | llama.cpp file size, Llama-3.1-8B |
|---|---|---|
| FP16 | 16.0005 | 14.96 GiB |
| Q8_0 | 8.5008 | 7.95 GiB |
| Q6_K | 6.5633 | 6.14 GiB |
| Q5_K_M | 5.7036 | 5.33 GiB |
| Q4_K_M | 4.8944 | 4.58 GiB |
| Q3_K_M | 3.9960 | 3.74 GiB |
| Q2_K | 3.1593 | 2.95 GiB |
| IQ2_XXS | 2.3824 | 2.23 GiB |
| IQ1_M | 2.1460 | 2.01 GiB |
| Pingala-8 2-bit | - | Only real files: Qwen3-4B 1.24 GB, Llama-3.1-8B 2.39 GB |
Real file sizes
| Model | Format | Bytes | Source |
|---|---|---|---|
| Qwen3-0.6B | Q8_0 | 639,446,688 | Qwen/Qwen3-0.6B-GGUF |
| Qwen3-1.7B | Q8_0 | 1,834,426,016 | Qwen/Qwen3-1.7B-GGUF |
| Qwen3-4B | FP16 | 8,051,285,408 | Genrius-AI/pingala8-benchmarks |
| Qwen3-4B | Q8_0 | 4,280,405,408 | Genrius-AI/pingala8-benchmarks |
| Qwen3-4B | Q6_K | 3,306,260,704 | Qwen/Qwen3-4B-GGUF |
| Qwen3-4B | Q5_K_M | 2,889,513,184 | Qwen/Qwen3-4B-GGUF |
| Qwen3-4B | Q4_K_M | 2,497,280,256 | Qwen/Qwen3-4B-GGUF |
| Qwen3-4B | Q2_K | 1,669,500,032 | Genrius-AI/pingala8-benchmarks |
| Qwen3-4B | IQ2_XXS | 1,246,621,312 | Genrius-AI/pingala8-benchmarks |
| Qwen3-4B | IQ1_M | 1,127,018,112 | Genrius-AI/pingala8-benchmarks |
| Qwen3-4B | Pingala-8 2-bit | 1,243,153,792 | Genrius-AI/Qwen3-4B-Pingala8-2bit |
| Qwen3-8B | Q8_0 | 8,709,518,112 | Qwen/Qwen3-8B-GGUF |
| Qwen3-8B | Q6_K | 6,725,899,040 | Qwen/Qwen3-8B-GGUF |
| Qwen3-8B | Q5_K_M | 5,851,112,224 | Qwen/Qwen3-8B-GGUF |
| Qwen3-8B | Q4_K_M | 5,027,783,488 | Qwen/Qwen3-8B-GGUF |
| Qwen3-14B | Q8_0 | 15,698,533,728 | Qwen/Qwen3-14B-GGUF |
| Qwen3-14B | Q6_K | 12,121,937,248 | Qwen/Qwen3-14B-GGUF |
| Qwen3-14B | Q5_K_M | 10,514,569,568 | Qwen/Qwen3-14B-GGUF |
| Qwen3-14B | Q4_K_M | 9,001,752,960 | Qwen/Qwen3-14B-GGUF |
| Qwen3-32B | Q8_0 | 34,817,718,912 | Qwen/Qwen3-32B-GGUF |
| Qwen3-32B | Q6_K | 26,883,306,112 | Qwen/Qwen3-32B-GGUF |
| Qwen3-32B | Q5_K_M | 23,214,831,232 | Qwen/Qwen3-32B-GGUF |
| Qwen3-32B | Q4_K_M | 19,762,149,024 | Qwen/Qwen3-32B-GGUF |
| Qwen3-30B-A3B (MoE) | Q8_0 | 32,483,931,648 | Qwen/Qwen3-30B-A3B-GGUF |
| Qwen3-30B-A3B (MoE) | Q6_K | 25,092,531,712 | Qwen/Qwen3-30B-A3B-GGUF |
| Qwen3-30B-A3B (MoE) | Q5_K_M | 21,725,580,800 | Qwen/Qwen3-30B-A3B-GGUF |
| Qwen3-30B-A3B (MoE) | Q4_K_M | 18,556,685,824 | Qwen/Qwen3-30B-A3B-GGUF |
| Qwen2.5-7B-Instruct | FP16 | 15,237,853,536 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Qwen2.5-7B-Instruct | Q8_0 | 8,098,525,408 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Qwen2.5-7B-Instruct | Q6_K | 6,254,198,880 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Qwen2.5-7B-Instruct | Q5_K_M | 5,444,831,360 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Qwen2.5-7B-Instruct | Q4_K_M | 4,683,073,632 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Qwen2.5-7B-Instruct | Q3_K_M | 3,808,391,072 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Qwen2.5-7B-Instruct | Q2_K | 3,015,940,000 | Qwen/Qwen2.5-7B-Instruct-GGUF |
| Llama-3.1-8B | IQ2_XXS | 2,399,212,576 | Genrius-AI/pingala8-benchmarks |
| Llama-3.1-8B | Pingala-8 2-bit | 2,388,210,816 | Genrius-AI/Llama-3.1-8B-Pingala8-2bit |
KV cache and llama.cpp defaults
- Bytes per cached number:
block_q8_0is 34 bytes per 32 values andblock_q4_0is 18 bytes per 32 values, in ggml/src/ggml-common.h. - Sliding-window cache size and padding: src/llama-kv-cache-iswa.cpp; Gemma 3 layer pattern (every sixth layer is global): src/models/gemma3.cpp and src/llama-hparams.cpp. llama.cpp turns off sliding windows for Phi models (src/models/phi3.cpp), and Qwen2.5's config has
use_sliding_window: false, so those are counted at full size. - Context rounded up to 256: src/llama-context.cpp. Default batch of 512 tokens, one sequence,
swa_fulloff: common/common.h.