Local Deployment of Trillion-Parameter Models: Hardware Requirements and Costs
Deploying a trillion-parameter model locally is primarily a GPU memory planning problem. Using a 2.8-trillion-parameter MoE model with 4-bit weights as an example, this article explains how to estimate weight storage, KV cache requirements, inference throughput, concurrency, and cost per million output tokens—and why fitting the weights is only the first step.
1. The Bottom Line
GPU memory capacity is the main hardware constraint when deploying extremely large models locally. For a model with 2.8 trillion parameters stored at 4 bits per parameter, the weights alone require approximately 1.4 TB. A rough initial estimate with limited headroom is around 1.5 TB, although runtime overhead and KV cache requirements can push the actual requirement higher.
This is generally beyond a handful of consumer GPUs. The hardware is closer to a data-center-class server with roughly eight high-memory accelerators. Budgeting should therefore treat the deployment as a server infrastructure project, not a workstation upgrade.
2. Why GPU Memory Is the First Constraint
2.1 Calculating Weight Memory
A mixture-of-experts (MoE) model can have a very large total parameter count while activating only a small subset for each token.
Consider a model with 2.8 trillion total parameters and approximately 104 billion active parameters per token. Active parameters largely determine computation, while total parameters determine weight storage.
For inference with all weights resident on GPUs, every expert must fit in GPU memory because different tokens may be routed to different experts. Fewer active parameters reduce computation, but not the memory needed to store the complete model.
The basic formula is:
Weight memory (GB) = Parameters (billions) × Bits per parameter ÷ 8
For this example:
2,800 × 4 ÷ 8 = 1,400 GB
Memory figures here use decimal units: 1 TB equals 1,000 GB.
2.2 Memory Beyond the Weights
Weights are not the only memory requirement:
- Activations: Intermediate results from the forward pass, affected by batch size and sequence length.
- KV cache: Stored attention keys and values for each request. Longer contexts require more memory.
- Runtime overhead: Framework allocations, communication buffers, and memory fragmentation. A planning allowance of 10–20% is commonly used.
For standard attention, KV cache memory can be estimated as:
KV cache (GB) =2 × Number of layers× Number of KV heads× Head dimension× Context length× Bytes per element× Concurrent requests÷ 10^9
Models using other attention architectures may have different state-storage requirements. Use the actual parameters in the model configuration.
2.3 Low-Bit Formats and Hardware Support
Storing weights in 4-bit format does not mean all runtime computation also happens at 4-bit precision.
Older accelerators may lack native support for the target format and require weights to be dequantized to a higher precision before computation. This can make the weights fit while adding computation and data-movement overhead that reduces performance.
Fitting a model and running it quickly are separate requirements. Confirm that the hardware supports the intended data format and execution path.
3. Three Deployment Tiers
3.1 Tier 1: Run the Model, Regardless of Speed
Start with the rough 1,500 GB memory estimate.
With 80 GB per accelerator:
1,500 GB ÷ 80 GB ≈ 19 accelerators
With 192 GB per accelerator, eight cards provide 1,536 GB. That is slightly above the initial estimate, but leaves only about 36 GB beyond it—very little room for concurrent contexts. As the later capacity example shows, even a 10% runtime reservation can make this configuration insufficient.
Tensor parallelism also imposes configuration constraints. The parallel degree often needs to divide the attention head count, and power-of-two configurations are common. A raw estimate of 19 cards may therefore become a 32-card deployment, substantially increasing hardware cost.
Offloading weights to host memory or disk can reduce GPU memory requirements. However, repeatedly transferring weights during token generation can make inference too slow for interactive use.
Even this minimum-performance tier is a server-class deployment rather than a typical workstation setup.
3.2 Tier 2: Meet a Single-User Output-Speed Target
Decoding is often limited by GPU memory bandwidth. A rough estimate assumes that each generated token requires reading the active weights once:
Theoretical throughput ceiling (tokens/s) ≈Effective aggregate bandwidth (GB/s)÷ Weight data read per token (GB)
For 104 billion active parameters stored at 4 bits each, approximately 52 GB of weights must be read per token.
Assume eight-way tensor parallelism and an effective memory bandwidth of 2 TB/s per card. With an even distribution, each card reads approximately 6.5 GB per token:
6.5 GB ÷ 2,000 GB/s = 0.00325 seconds
This gives a simplified theoretical ceiling of approximately 300 tokens/s.
Actual throughput is substantially lower because of factors such as:
- Inter-GPU communication
- Kernel launch overhead
- KV cache reads
- Uneven expert routing
A single-user target of 25 tokens/s leaves considerable room below this theoretical ceiling, but whether it is achievable must be measured on the target hardware.
For a single user, GPU count is still constrained by memory capacity. Serving only one request does not let the deployment shrink to two or three cards if the weights cannot fit.
3.3 Tier 3: Serve Multiple Concurrent Users
Concurrency has two separate requirements.
The first is aggregate throughput. Ten users receiving 25 tokens/s each require at least 250 tokens/s of sustained output.
The second is memory capacity: how many requests and their KV caches can remain resident simultaneously?
A simple capacity estimate is:
def max_concurrency(total_gb, weight_gb, runtime_ratio, kv_per_request_gb):usable = total_gb * (1 - runtime_ratio) - weight_gbif usable <= 0:return 0return int(usable // kv_per_request_gb)# Example: 1,536 GB across eight GPUs, 1,400 GB of weights,# a 10% runtime reservation, and 1 GB of KV cache per request.print(max_concurrency(1536, 1400, 0.10, 1.0)) # Output: 0
Under these assumptions, the runtime reservation and weights already exceed available memory. There is no capacity left for request KV caches. This demonstrates why a configuration that appears large enough for the weights may still be unable to serve requests.
More GPUs or larger-memory accelerators increase the space available for KV caches.
Context length has a major effect on capacity. In the standard KV cache estimate, memory per request grows linearly with context length. Moving from a few thousand tokens to million-token contexts can sharply reduce the number of resident requests.
Concurrency planning must therefore use the expected distribution of context lengths, not hardware specifications alone.
4. Estimating Deployment Costs
4.1 Cost Components
A deployment budget typically includes:
- Hardware purchase or rental
- Electricity and cooling
- Data-center space, networking, and storage
- Operations and maintenance staff
- Redundant hardware
Redundancy is easy to overlook. If a single-node deployment fails, service stops. Production environments commonly require standby capacity, which should be included in the budget.
4.2 Cost per Million Output Tokens
One useful measure of deployment economics is cost per million output tokens:
def cost_per_million_tokens(monthly_cost, tok_per_sec, utilization):seconds = 30 * 24 * 3600tokens = tok_per_sec * seconds * utilizationreturn monthly_cost / tokens * 1_000_000# Example: 10,000 currency units per month, aggregate throughput# of 250 tokens/s, and 40% average utilization.print(round(cost_per_million_tokens(10000, 250, 0.4), 2))# Output: 38.58 currency units per million output tokens
The result uses the same currency as the monthly cost input. The monthly figure is an illustrative calculation input, not a hardware or hosting quote.
Utilization is a critical variable. When expensive hardware sits idle, the cost per token rises quickly. Use actual supplier quotes for purchase or rental pricing.
5. Practical Deployment Checklist
- Verify the model configuration. Confirm total parameters, active parameters, weight precision, and attention architecture before estimating memory.
- Benchmark single-user performance on the target hardware. Do not substitute theoretical bandwidth calculations for measured results.
- Test concurrency against realistic context lengths. Use the expected workload distribution rather than relying only on the maximum supported context.
- Reserve sufficient memory headroom. A model whose weights barely fit may still lack the capacity needed to serve requests.
- Calculate unit economics before committing. Evaluate cost per million output tokens at realistic utilization levels to determine whether the deployment budget is sustainable.
