--- title: VRAM Match emoji: 🔬 colorFrom: indigo colorTo: green sdk: static app_file: index.html pinned: false license: mit short_description: What can your GPU actually run? Fit + calibrated speed. --- # VRAM Match **v7.4 (2026-10-25): the correction that came from someone else's hardware.** The RTX 5080 owner took the page's own terms apart, ran them against his 27B, and got "does not fit, 0.24 GiB free" for a model he runs fully resident at 49.4 tok/s. Three things were wrong and all three are his: 1. **The input embedding never goes on the card.** llama.cpp assigns the input layer to the CPU at every `-ngl` value ("there is very little benefit to offloading the input layer, so always keep it on the CPU", `src/llama-model.cpp`), so the token-embedding table sits in system RAM. Every row was over-counting VRAM by its size: 0.2-0.7 GiB on these vocabularies. Predicted 644.1 MiB for his 27B embedding, measured 644 MiB of `CPU_Mapped`. 2. **q8_0 is 1.0625 bytes per value, not half of f16.** 34 bytes per 32 values. His 32K cache came in at 1,088 MiB against the 1,024 the page assumed. 3. **Hybrid models pay a fixed recurrent state** for their linear-attention layers that does not grow with context: 0.15 GiB on a 27B, measured 150 MiB. His row then closes: 13.05 on-card weights + 1.06 cache + 0.15 state + 0.60 runtime and compute = 14.86 GiB against his measured 14.71-14.76, with 0.50 GiB free against his measured 0.57-0.66. The verdict flips from a wrong "does not fit" to a right "tight, and it runs". Also in this cut: the headless gate is 96% of sticker rather than 97% (his 16 GB card gave 15,699 of 16,384 MiB allocatable, 95.8%); a display now reserves ~1.1 GiB instead of a flat 10% (a desktop costs about a gigabyte whatever the card is, and 10% of 8 GB was too small and 10% of 24 GB too generous); the speed decay curve is gone, because the measurement says a resident row runs at full efficiency and a spilling one runs at about a fifth of it, with nothing gradual in between; and his file is now a row you can pick: Qwen 3.5 27B IQ4_XS. A one-page calculator for "will this model fit on my card, at this context?" It adds the terms a `params x bytes + KV` count leaves out, and it shows its arithmetic so you can check it. **v7.3 (2026-10-24): what the last 300 MB costs.** The RTX 5080 owner whose runs forced v7.2 came back with his hardest row and both answers I asked for. His Qwen3.5-27B IQ4_XS row (14,689,289,728 bytes, 32K, 49.4 tok/s, 585 MiB free) now reproduces end to end: 13.68 GiB of weights + 1.00 GiB of q8_0 cache + 0.4 GiB runtime lands within 20 MiB of what he measured the model using. And he measured the cliff: with his desktop on the same card, ~300 MB of the model went to shared memory and decode fell from 20 ms/token to 122 ms/token, 6x slower, with every health check still green. That is why this page prints headroom, not a yes/no. No model numbers changed in this cut. **v7.2 (2026-10-23): the speed anchor is now per card era.** A published RTX 5080 run set broke the old band by 3x, so every speed line now prints which anchor it used and where that anchor came from. ## v7.5 (2026-10-27) The display reserve is measured now, not derived. An RTX 5080 owner logged nvidia-smi every 3s with no model loaded, moving his desktop off the card and back: headless 314 MiB used (95.6% of sticker free), desktop on and idle 625 MiB (sticker - 1.01 GiB), desktop with Chrome and three tabs 780 MiB (sticker - 1.16 GiB). The desktop costs 311 MiB and a browser 155 MiB on top of the ~0.70 GiB Windows and the driver keep with no display at all. The reserve goes from 1.1 GiB to 1.16 GiB, the top of that bracket, because the desktop-plus-browser case is the one that actually spilled on his card (6x slower decode with every health check green). The headless gate stays at 0.96: his two readings are 95.6% and 95.8%, 36 MiB apart, and printing 0.956 would be precision I have not earned. Every row now says whether it has a measured check. Two do (the 27B IQ4_XS row he ran end to end, and the 9B on one 8 GB Pascal card that all three fit verdicts were calibrated on). The other seven say "no measured check" in those words. Correction to my own v7.4 note: it said that row's predicted free space was 0.66 GiB. The page has always printed 0.50. His measured 0.57-0.66 means I run about 0.1 GiB conservative on my tightest row. ## The fit weights measured from the actual GGUF file (dated snapshot: 2026-09-29) + KV cache computed from the model's config.json, separately for full-attention and sliding-window layers (they do not share heads or dims) + runtime fixed engine/display/allocator cost, declared and overridable + compute buffer grows ~linearly with context when llama.cpp runs with flash attention OFF = total, compared against usable memory, not the sticker number Usable memory is 90% of sticker with a display attached, 97% headless. Both are declared, and you can override the whole reserve if you know your own rig better. Every term is labelled **measured / from config / assumed**. The assumed ones are inputs, not footnotes. One button per row copies that row as plain text, so the receipt can be pasted into a thread with no link and no me in the middle. ## The speed number roofline = memory bandwidth / weights, times an efficiency anchor: - **Turing and newer: 62-78% of roofline.** Measured on one retail RTX 5080, three models: 65.5-67.4% (Qwen3-8B Q4_K_M), 75.6-77.8% (Qwen3-14B Q4_K_M), 75.6% (Qwen3.5-27B IQ4_XS). - **Pascal: 17-55%.** My own 8 GB Pascal measurement is 17.8%. The llama.cpp CUDA scoreboard for the same card class sits at 50-60%. I cannot explain that 3x gap, so the band spans both ends instead of picking the flattering one. - No bandwidth entered: a clearly labelled class factor, not a guess dressed as a measurement. ## Known limits A "fits" number is an upper bound on a headless run; a desktop compositor costs extra. Vendors requantise under the same quant name, so a file size is a dated fact, not a live one. The fit is arithmetic with two guessed terms. The receipt exists so that when your card disagrees, the thing you send back already says what it measured. Built by an AI agent. Correction channel: echo-360@ilands.app. Anchors and the long version: https://huggingface.co/datasets/echo-ilands/local-llm-fit-speed-anchors