Running a Trillion-Parameter Open-Source Model Locally: VRAM Calculation and Hardware Thresholds
This article explains how to estimate VRAM needs for a trillion-parameter open-source model deployed locally. It covers why Mixture-of-Experts (MoE) models are fast but still memory-heavy, how to convert weight size into VRAM requirements, how to split the model across GPUs, when an 8-GPU setup could work, the steps from download to production, and how local deployment compares with hosted API services.
This article is intended for engineering teams that want to run a trillion-parameter open-source model locally. It explains why MoE models compute quickly but still use a lot of memory, how to convert weight size into VRAM requirements, how to split the model across devices, and under what conditions an 8-GPU setup is feasible.
1. MoE Sparse Activation: Saves Compute, Not Memory
Consider a model with about 2.8 trillion total parameters and about 100 billion activated parameters per token. The exact figures should be taken from the model’s official config file. Parameter combinations like this one are not universal. In an MoE model, the gating network selects the Top-K experts for each token. As a result, the compute for a single forward pass is close to that of a dense model with about 100 billion parameters.
The routing result is known only when a token is generated, so it is impossible to know in advance which experts will be used. Every expert’s weights must therefore stay resident in VRAM or system memory. For example, in the hypothetical setup used in this article with 896 experts, any expert may be called, so all of the weights must be kept. Inference speed is comparable to a dense model, but the memory requirement is determined by the total parameter count.
2. Weight Size and VRAM Estimation
The number of bytes per parameter equals the number of bits per parameter divided by 8. The estimation formula is:
VRAM requirement ≈ total parameters × bits per parameter ÷ 8 + KV Cache + runtime overhead
The KV Cache grows with context length and the number of concurrent requests. Runtime overhead is usually reserved at 10% to 20%. The longer the context, the larger the share of the KV Cache, so the actual figure should be measured under a real workload.
Applying this formula to 2.8 trillion parameters gives the following results:
- Uniform FP8 (8 bits): about 2.8 TB.
- Uniform INT4 (4 bits): 2.8T × 4 ÷ 8 = 1.4 TB.
- The 1.56 TB release version: 1.56 TB × 8 ÷ 2.8T ≈ 4.5 bits per parameter. This indicates that the release is not uniform FP8. It is either mixed precision or already quantized.
The table below compares the three weight formats across different VRAM configurations.
| Hardware configuration | Total VRAM | 1.56 TB release version | Uniform INT4 (about 1.4 TB) |
|---|---|---|---|
| 8 × 80 GB | 640 GB | Does not fit | Does not fit |
| 8 × 141 GB | 1128 GB | Does not fit | Does not fit |
| 16 × 141 GB | 2256 GB | Fits, with about 0.7 TB of headroom | Fits, with about 0.86 TB of headroom |
The headroom in the table must also cover the KV Cache and runtime overhead, so the usable space is smaller than the listed numbers. To fit the entire model on eight 141 GB GPUs, the weights must average about 2.5 bits per parameter or less (about 900 GB). This precision loss must be verified through actual evaluation. An 8-GPU setup is only viable if the weights are compressed substantially and the compressed model passes evaluation at acceptable accuracy.
3. Parallelism Strategies for Distributed Inference
These three parallelism methods are usually combined.
Tensor parallelism splits the matrix multiplications inside a single expert across multiple GPUs. It requires frequent communication, so it suits high-bandwidth interconnects within a node, such as NVLink. For MoE models, pure tensor parallelism does not take advantage of the large number of experts, so it is generally used only on a small scale within a single node.
Expert parallelism assigns experts to devices. With 896 experts, each GPU holds about 112 experts on an 8-GPU setup and about 56 experts on a 16-GPU setup. After routing, each token is sent via All-to-All communication to the device that hosts its selected experts.
The All-to-All communication volume per token per layer can be roughly estimated as:
Communication volume per token per layer ≈ K × H × bytes per element × 2 × (N − 1) ÷ N
Here, K is the number of activated experts, H is the hidden dimension, N is the number of participating GPUs, and the factor of 2 accounts for two communication steps: dispatch and combine. With K = 16, H = 8192 (an assumed value), BF16 (2 bytes per element), and N = 8, the volume is about 0.46 MB per token per layer, or about 41 MB across 90 layers. The actual traffic also depends on batch size, the deduplication strategy, and the specific implementation. Communication volume grows linearly with the number of activated experts, so inter-node interconnect bandwidth is the main bottleneck.
Pipeline parallelism splits the model by layers. It requires little communication but introduces pipeline bubbles. It is commonly used for deployments across multiple nodes.
In practice, tensor parallelism and expert parallelism are combined within a node, pipeline parallelism is used across nodes, and an inference framework with MoE-aware scheduling is selected. Framework versions should be checked against their official release notes.
4. Steps From Download to Production
- Storage planning: Prepare high-speed storage equal to twice the weight size. The 1.56 TB of weights requires about 3.1 TB, which covers the original files and any converted or quantized copies. NVMe arrays are recommended.
Download and verification: Use a download tool that supports resuming, such as aria2c with the -c option. After downloading, verify every shard against the hash manifest published by the model provider:
sha256sum -c SHA256SUMS
Re-download any shard that fails verification. Do not skip it, or the full model will fail to load.
- Format conversion and quantization: Convert the weight layout as required by the inference framework. If you quantize the model again, perform offline calibration and compare accuracy changes on your target tasks.
- Service configuration: Set the parallelism strategy, maximum batch size, the share of VRAM allocated to the KV Cache, and the context length limit.
- Load testing and monitoring: Replay real traffic and measure time to first token (TTFT) and throughput (tokens/s). Monitor VRAM usage and cross-GPU communication time.
Loading time can be estimated with the following formula:
Loading time ≈ total weight size ÷ effective read bandwidth + verification and conversion time
For the 1.56 TB release, the theoretical read time is about 312 seconds (about 5 minutes) at 5 GB/s and about 26 minutes at 1 GB/s. Effective bandwidth is often lower than the rated value, especially with concurrent reads from multiple processes. Verification and conversion time must also be added.
Rollback plan: Keep the weight directory and service configuration of the previous version. If the new version has problems, switch back to the old version through configuration. Delete the old directory only after the new version passes load testing and runs stably.
5. Local Deployment or Hosted Services
The annual cost of local deployment can be estimated as follows:
Annual total cost ≈ hardware purchase price ÷ depreciation period + server power draw (kW) × 8760 × PUE × electricity price + networking and storage + operations staff cost
Unit cost ≈ annual total cost ÷ annual effective tokens
The hardware scope is 16 data center GPUs with 141 GB each. This is usually two 8-GPU servers, including the servers, high-speed storage, and networking. Data center construction is not included. Use the current quote from your supplier for the purchase price. This article does not give fixed prices, since prices change with the market.
| Decision factor | Favors local deployment | Favors general-purpose API | Favors elastic cloud GPUs |
|---|---|---|---|
| Daily call volume | Sustained high load, with utilization close to full capacity for long periods | Low or highly variable call volume | Clear peaks and troughs that require scaling on demand |
| Data compliance | Data must not leave the organization’s domain | Data may leave the domain | Data may leave the domain, but requires isolated private networking |
| Latency requirements | High requirements for internal network latency and stability | Public network access is acceptable | Region can be chosen close to users |
| Operations capability | Has a GPU cluster and a team that handles failures | No operations required | Has basic container and cloud operations skills |
Most teams can adopt these options in stages. Start with a general-purpose API to validate capabilities and build a product prototype. Then move requests involving sensitive data to a privately deployed smaller model, and keep general requests in the cloud. Purchasing a full trillion-parameter model deployment is worthwhile only when utilization is stable and compliance requirements are clear.
