Deploying a Local LLM: A Guide to VRAM, Quantization, and Context Windows
Running a large language model on consumer hardware requires balancing parameter count against available video memory. This guide breaks down the math behind GGUF quantization, KV cache sizing, and how to fit a 35B-parameter model onto a single 24GB GPU.
By Tiago Sousa
- Hardware Analysts
- Focus on the physical constraints, memory bandwidth, and power draw of consumer GPUs for AI workloads.
- Local Deployment Practitioners
- Prioritize quantization techniques and software optimizations to fit capable models onto accessible consumer hardware.
- Editorial Synthesis
- Synthesizes hardware limits and software requirements to provide a definitive guide for local AI deployment.
Perspectives this story doesn't cover
- Enterprise AI Infrastructure Managers
- Hardware Manufacturers
Why it matters
Running artificial intelligence locally guarantees privacy and eliminates recurring API costs, but it requires precise hardware matching. Understanding the exact memory footprint of quantized models prevents developers from purchasing expensive GPUs that still fail to load their desired workloads.
A 35-billion parameter language model in its raw, uncompressed state requires roughly 70 gigabytes of video memory to run—a footprint that demands data-center hardware. For developers and enthusiasts attempting to run artificial intelligence locally in 2026, that hardware barrier is the defining constraint. The graphics processing unit (GPU) inside a consumer workstation must hold the entire model in its Video RAM (VRAM) to generate text at usable speeds. If the model spills over into standard system RAM, inference slows to a crawl.
The solution that makes local deployment possible is quantization. By compressing the model weights from 16-bit precision down to 4-bit using the GGUF format, that same 35-billion parameter model shrinks dramatically. According to benchmark data from LocalLLM, a 35B model quantized to the popular Q4_K_M standard requires just 21.06 GB for its weights.[1]
But weights are only the baseline. Every token of context fed to the model—the system prompt, the document being summarized, the ongoing chat history—consumes additional memory in what is known as the Key-Value (KV) cache. "The VRAM figure is where most people underestimate," notes a 2026 deployment guide from QWE. "Weights for a 7B Q4_K_M sit around 4.1 GB – but the KV cache and compute buffers at a large context can push total usage several GB higher."[5]
For a 35B model, maintaining a 32,000-token context window adds 0.61 GB to the footprint, while the llama.cpp backend requires a baseline overhead of 0.75 GB. Added together, the total VRAM requirement sits at 22.42 GB.[1]
That specific number dictates hardware purchasing decisions, because the flagship consumer GPU on the market—NVIDIA's RTX 4090, released in October 2022 and still retailing for around $3,494—carries exactly 24 GB of GDDR6X VRAM. The 22.42 GB footprint leaves just 1.58 GB of headroom, establishing 35B parameters as the absolute ceiling for a single consumer graphics card.[1][4][6]
The 22.42 GB footprint leaves just 1.58 GB of headroom, establishing 35B parameters as the absolute ceiling for a single consumer graphics card.
Attempting to run anything larger on a single card results in failure. A 70-billion parameter model, even aggressively quantized to 4-bit, requires roughly 40 to 44 GB of VRAM. Because NVIDIA restricts NVLink support on the RTX 4090, pairing two 24 GB cards forces the system to communicate over the slower PCIe bus, which degrades tensor-parallel inference speeds.[2][3][4]
"The best GPU for local LLM work is not the card with the highest TFLOPs on a spec sheet," explains GMI Cloud's hardware analysis. "It's the card that fits your model in VRAM, runs at a power draw your wall outlet and cooling can sustain, and leaves you with a setup that doesn't require a week of driver wrangling."[2]
For users who do not need 35B parameters, the hardware math becomes much more forgiving. A 14-billion parameter model fits comfortably inside 12 GB of VRAM, making mid-range cards like the RTX 4070 Ti highly capable. Smaller 7B to 9B models require only 8 GB of VRAM, allowing them to run on entry-level GPUs like the RTX 4060.[1][3]
The exception to the NVIDIA consumer dominance is Apple Silicon. Because Apple's M-series chips use unified memory, the GPU can access the entire pool of system RAM. An M3 or M5 Max Mac with 64 GB or 128 GB of unified memory can load a 70B model entirely into VRAM without multi-GPU sharding. While the memory bandwidth is lower than a dedicated RTX 4090—resulting in slower token generation—the sheer capacity allows Apple hardware to run models that would otherwise require professional data-center cards.[3]
The local AI landscape in 2026 is entirely defined by this memory math. Developers must map their desired model size and context window first, calculate the quantized footprint, and only then purchase the hardware that provides the necessary VRAM. As models continue to grow, the hard physical limit of consumer video memory remains the single most important specification in local deployment.[2]
What to know
- A 35-billion parameter model requires roughly 22.4 GB of VRAM at 4-bit quantization, fitting just under the 24 GB limit of flagship consumer GPUs.
- Context windows consume additional memory; a 32,000-token prompt adds approximately 0.6 GB to the model's footprint.
- Running 70B models requires either dual consumer GPUs or Apple Silicon Macs with large unified memory pools.
- Smaller 7B to 14B models can run comfortably on mid-range GPUs with 8 GB to 12 GB of VRAM.
Key terms
- VRAM (Video RAM)
- The dedicated memory on a graphics card used to store model weights and process tokens during local AI inference.
- Quantization
- A compression technique that reduces the precision of a model's weights (e.g., from 16-bit to 4-bit) to drastically lower its memory footprint.
- GGUF
- A file format designed by the llama.cpp team specifically for running quantized language models efficiently on consumer hardware.
- KV Cache
- The memory allocated to store the context of a conversation or document, which grows larger as more text is fed to the model.
- Unified Memory
- An architecture used by Apple Silicon where the CPU and GPU share the same pool of RAM, allowing large models to load without dedicated VRAM.
Reader questions
Can I run a 70B parameter model on an RTX 4090?
Not on a single card. A 70B model requires roughly 40 to 44 GB of VRAM even at 4-bit quantization, exceeding the 4090's 24 GB capacity. You would need dual GPUs or a high-memory Apple Silicon Mac.
Does system RAM matter if I have a dedicated GPU?
System RAM is used to load the model initially, but for fast inference, the entire model must fit into the GPU's VRAM. If the model spills over into system RAM, generation speeds drop significantly.
What is the best quantization format for local models?
The Q4_K_M format (4-bit quantization) is the community standard for GGUF models. It offers the best balance, reducing the model's memory footprint by roughly 70% with minimal loss in reasoning quality.
How much VRAM does the context window use?
The Key-Value (KV) cache grows with your context. A 32,000-token context window adds roughly 0.6 to 1.2 GB of VRAM overhead, depending on the model's architecture and routing efficiency.
Sources
[1]LocalLLMLocal Deployment PractitionersHow Much VRAM Do You Need for llama.cpp?
Read on LocalLLM →
[2]GMI CloudHardware AnalystsConsumer cards: RTX 4090, 5090, and the value question
Read on GMI Cloud →
[3]PromptQuorumLocal Deployment PractitionersLocal LLM Hardware Requirements 2026
Read on PromptQuorum →
[4]RunPodHardware AnalystsWhat is the RTX 4090?
Read on RunPod →
[5]QWELocal Deployment PractitionersSystem requirements (minimum vs recommended)
Read on QWE →
[6]ModelFitHardware AnalystsBest Local AI Models for RTX 4090 (24GB)
Read on ModelFit →
[7]Factlen Editorial TeamEditorial SynthesisSynthesis by Factlen editorial team
Read on Factlen Editorial Team →
Comments
More in Guides
See all →Acoustic Engineering
Active Noise Cancellation: How Phase Inversion and the Superposition Principle Silence Low-Frequency Sound
6 sources
Materials Science
Wöhler Curve and the Endurance Limit: How Stress Cycles Determine the Fatigue Life of Steel
6 sources
3D Printing Materials
PLA Creep in 3D Printing: Why Structural Parts Deform Under Continuous Load
7 sources
Emergency Prep
How to Use Power Tool Batteries as Emergency Blackout Power
4 sources
Every angle. Every day.
Get Guides stories with full source coverage and perspective breakdowns delivered to your inbox.




