Open-Weight Model Local Deployment Guide: VRAM Estimation and Inference Rollout
This guide walks through the three key questions teams face when deploying open-weight models locally: how much VRAM a 70B model needs, whether INT4 quantization can halve hardware costs, and how to stress-test an inference service before launch. It covers VRAM estimation formulas for weights and KV cache, quantization validation workflows, inference engine and gateway configuration, load testing procedures, evaluation and fine-tuning decisions, and version, license, security, and compliance management.
Introduction: Do the Math Before You Deploy
When teams get their hands on open weights, the first question is usually: how much VRAM does a 70B model need for local deployment? The second: can INT4 quantization cut hardware requirements in half? The third: how do we stress-test the inference service before go-live? This article addresses all three in order.
Open weights let developers load, run, fine-tune, and integrate models on their own infrastructure. But they also hand you full responsibility for hardware, precision, and serving configuration decisions. Each section below provides estimation methods, decision criteria, and validation steps that you can apply directly with your own model and business data.
1. What Open Weights Contain and How Much Space They Take
A typical open-weight release has three parts: the model architecture definition (recording hyperparameters such as layer count, attention heads, and hidden dimensions), the weight parameter files (usually split into multiple shards), and the tokenizer plus generation configuration files (defining how text is split into tokens and the default sampling parameters). The weight files are what actually consume space.
The VRAM estimation formula for weights is straightforward:
Weight VRAM ≈ parameter count × bytes per parameter
Bytes per parameter at common precisions:
| Storage Precision | Bytes per Parameter | 70B Model Weight Footprint |
|---|---|---|
| FP16 / BF16 | 2 | ~140 GB |
| INT8 | 1 | ~70 GB |
| INT4 | 0.5 | ~35 GB; grouped quantization scales make the actual value slightly higher |
This table covers weights only. After loading, you must add KV cache, activations, and runtime overhead, which the next section covers.
2. Hardware Selection: Estimating Total VRAM with Formulas
Total VRAM at deployment breaks down into three components:
Total VRAM ≈ weight VRAM + KV cache VRAM + activation and framework overhead
KV cache is the portion that grows with requests. Its estimation formula is:
KV cache VRAM ≈ 2 × layer count × KV head count × head dimension × context length × concurrent requests × bytes per element
The “2” accounts for separate Key and Value caches. For a 70B-class architecture with 80 layers, 8 KV heads (grouped-query attention), head dimension 128, and FP16 storage, the KV cache per token is about 0.33 MB. With a context length of 8192 and 8 concurrent requests, the KV cache totals roughly 21 GB.
Based on this example:
- FP16 weights plus 21 GB of KV cache, with 10–20% reserved for framework overhead, brings total demand close to 180 GB—requiring at least three 80 GB data center GPUs.
- INT4 weights alone take about 35 GB, exceeding the RTX 4090’s 24 GB and the RTX 5090’s 32 GB. A single consumer GPU cannot hold the model; you would need multiple GPUs, CPU offloading, or a smaller model. CPU offloading significantly increases latency and is only suitable for offline tasks.
Hardware selection should also distinguish three metrics: time to first token (TTFT), which determines interactive experience; generation throughput (tokens per second), which determines how fast batch jobs finish; and concurrency, which determines how many users can be served simultaneously. These three usually compete for resources—interactive chat prioritizes TTFT, while offline batch processing prioritizes throughput.
3. Quantization: Measure Accuracy First, Then Choose Bit Width
Quantization maps FP16 weights to lower bit widths like INT8 or INT4, compressing VRAM usage and bandwidth requirements. There are two mainstream approaches: post-training quantization (PTQ), which calibrates already-trained weights at low cost—GPTQ and AWQ fall into this category—and quantization-aware training (QAT), which simulates quantization error during training. QAT is generally more stable but requires additional training cost. Most teams start with PTQ.
The recommended validation order:
- Run the full evaluation suite in FP16 to establish a baseline.
- Try INT8 and compare metric changes against the baseline.
- Try INT4, paying close attention to precision-sensitive tasks like math reasoning, code generation, and structured output.
- Choose the lowest-precision option whose metrics remain within business-acceptable range.
PTQ requires calibration data. Calibration data should come from your real business distribution—not just generic corpora—or degradation in your actual scenarios will be underestimated. Quantization tools differ significantly in hardware support, dependency versions, and model architecture compatibility, so retest on your target hardware before launch.
4. Inference Serving: Engine, Gateway, and Load Testing
An inference service typically consists of two parts: the inference engine handles tensor computation, while the serving gateway handles authentication, routing, rate limiting, and timeout control. Decoupling them lets engine upgrades and gateway policy changes proceed independently. Common open-source inference engines include vLLM and SGLang; TensorRT-LLM targets deep optimization on NVIDIA platforms.
Several key engine-level configurations should be designed together with your VRAM budget:
- Continuous batching: new requests can be inserted into a running batch, improving GPU utilization. You need to set the maximum number of concurrent sequences and the maximum tokens per batch—both directly affect peak VRAM.
- Paged KV cache: manages KV cache in blocks to reduce memory fragmentation. vLLM’s PagedAttention follows this approach.
- Flash Attention: reduces memory read/write overhead in attention computation, with greater benefits for long sequences.
- KV cache quantization: reduces KV cache footprint but may affect generation quality over long contexts.
These techniques solve different problems, and their gains don’t simply add up. Each time you enable one, measure peak VRAM, TTFT, and throughput changes individually under the same load.
Recommended load testing procedure:
- Generate requests following the input-length and output-length distributions of your production environment—don’t rely on fixed-length short prompts.
- Ramp concurrency up gradually from a low level, recording P50 and P99 TTFT, generation throughput, and error rate.
- Identify the concurrency point where your SLO is breached; treat that as your capacity ceiling and keep a margin.
- Record peak VRAM and check whether long-context requests trigger OOM errors.
The serving gateway needs dynamic timeouts, request priority scheduling, and rate limiting. LLM requests are long-running, so timeouts should scale dynamically with output length rather than copying the few-second thresholds of ordinary APIs. New releases require graceful shutdown—wait for in-flight requests to complete before terminating instances.
For scaling, Kubernetes HPA can adjust replica counts based on metrics. But GPU workloads have two prerequisites: first, use custom metrics (such as GPU utilization or queue length exposed through a Prometheus adapter), because CPU utilization usually doesn’t reflect inference pressure; second, account for cold start—loading tens of gigabytes of weights can take minutes, so keep pre-warmed instances or new replicas won’t catch up with traffic spikes.
5. Evaluation and Fine-Tuning: Validate Conclusions with Business Data
Evaluation has three layers: general capability evaluation covering knowledge QA, reasoning, and multi-turn dialogue; domain-specific evaluation using test sets built from real business data; and adversarial evaluation with injected malicious prompts, jailbreak attempts, and other safety cases. Public leaderboard scores only reflect performance on specific test sets and cannot replace business evaluation.
Metrics must match the task: summarization commonly uses ROUGE, machine translation uses BLEU, classification and multiple-choice use accuracy, and open-ended generation usually requires human evaluation. Applying BLEU to open-ended QA, or accuracy to summarization, produces misleading conclusions. Inference performance is measured separately with TTFT, tokens per second, and end-to-end latency; service stability is measured with error rate and P99 latency.
Maintain a golden evaluation set: samples drawn from the production distribution, human-annotated and version-controlled. Every time the model version, quantization method, or inference parameters change, automatically run this evaluation and compare against the baseline.
Fine-tuning is the option after evaluation exposes systematic bias—it should not be your first reaction. Before starting, check whether prompt design and retrieval-augmented generation can solve the problem; their cost is far lower than training.
When fine-tuning is genuinely needed, parameter-efficient fine-tuning (PEFT) is usually the first choice. LoRA trains only low-rank adapter parameters inserted into the original model. For a 70B-class architecture with rank 16 applied to q_proj and v_proj, trainable parameters are around 30 million—less than 0.1% of the total. Optimizer states and gradients are saved only for these parameters, so VRAM requirements are significantly lower than full fine-tuning. The exact savings depend on model architecture, rank, sequence length, and batch size, and should be measured on your target hardware.
Use the following table to guide fine-tuning strategy:
| Condition | Recommendation |
|---|---|
| Prompting and RAG are already close to the target | Hold off on fine-tuning |
| Small amount of high-quality labeled data, with bias concentrated in format or style | Prefer LoRA |
| Bias involves substantial domain knowledge, with ample data and compute | Consider full fine-tuning or continued pre-training |
| No option’s effect can be validated on the golden evaluation set | Improve the evaluation set before discussing training |
6. Version and License Management
In the open-weight ecosystem, the same model often has multiple distribution channels, several quantized variants, and many fine-tuned derivatives. Teams need a model asset registry that centrally manages weight file hashes, configuration files, quantization parameters, evaluation reports, and deployment records, so every release is traceable to a specific version.
Licensing must also be part of the process. Open-weight license terms may restrict commercial use, define permitted scenarios, require attribution, or even impose conditions based on user scale. Have legal or compliance staff confirm the terms before launch—don’t assume downloadable weights are automatically cleared for commercial use.
7. Security and Compliance: Local Deployment Is Only One Step Toward Lower Risk
Local deployment reduces third-party exposure, but it does not equal compliance. Whether data can enter the model, where model outputs are stored, and whether cross-border transfer is restricted all depend on data type and local regulations, and require separate assessment. Teams should complete data classification, define which data may enter the inference service, and pair it with access control, operation audit logs, and retention policies.
The model itself carries risks too. It may be induced to generate harmful content, may regurgitate sensitive information from training data, and may have its original instructions overridden by prompt injection attacks. Add input filtering, output detection, and prompt injection defenses at the service layer, and regularly test these defenses with adversarial evaluation sets.
Conclusion
The core of local deployment is replacing guesswork with numbers. First calculate the VRAM for weights and KV cache, then measure accuracy and latency with data from your business distribution, and finally use the golden evaluation set to decide whether to fine-tune and when to scale. Following this order lets teams base hardware procurement and launch timelines on verifiable evidence.
