Local Deployment of Trillion-Parameter Models: VRAM Requirements and Cost Planning
This article explains how to evaluate local deployment for trillion-parameter-class models, using a hypothetical 2.8-trillion-parameter mixture-of-experts model to estimate weight storage, runtime VRAM overhead, accelerator count, network constraints, and budget. It emphasizes phased validation, representative load testing, and total cost of ownership instead of relying on a single hardware price or parameter count.
1. Clarify First: Local Deployment Does Not Mean Single-Machine Operation
When discussing local deployment of very large models, it is necessary to distinguish three scenarios: offline operation on a personal workstation, deployment inside an enterprise data center, and a self-managed dedicated compute cluster. All three can provide a certain degree of data autonomy, but they differ significantly in supported model scale, inference speed, and construction cost.
For trillion-parameter-class models, the real difficulty is not whether the weights can be downloaded. The difficulty is whether the full weights, inference cache, and compute workspace can fit into an accessible storage tier and continuously serve requests at a speed acceptable to the business.
This article uses a hypothetical 2.8-trillion-parameter mixture-of-experts model for capacity estimation. The numbers are calculation examples only. They do not mean that any specific model already has the corresponding architecture, quantization format, or deployment capability.
Before deployment, the following prerequisites must also be confirmed:
- Whether the weights can be obtained and whether the license permits the intended use.
- Whether the model structure, tokenizer configuration, and required runtime configuration are complete.
- Whether the inference engine supports the relevant operators, weight formats, and distributed execution methods.
- Whether the target accelerators can handle these computations efficiently.
- Whether the organization has the staff and facilities to maintain a large-scale cluster.
If these conditions are not met, a usable service cannot be created directly even with a sufficient budget.
2. Mixture-of-Experts Saves Compute, Not Automatically Weight Storage
A mixture-of-experts (MoE) model usually consists of a shared network, a routing module, and multiple expert subnetworks. When processing an input token, the routing module selects only some experts for execution, so the number of parameters actually involved in computation per token may be significantly lower than the total parameter count.
However, three metrics must be distinguished:
- Total parameter count: determines the approximate storage requirement for the full weights.
- Activated parameter count: affects the actual compute volume of one inference pass.
- Expert selection ratio: the number of selected experts divided by the total number of experts.
The third metric cannot be directly equated with the second. Shared layers still participate in computation, and different experts do not necessarily have the same size. Therefore, “selecting a small number of experts” does not mean that the entire model uses only the same proportion of parameters.
In a common full-weight-resident deployment, all expert weights must be distributed and stored in accelerator VRAM. The fact that an expert is not currently selected does not mean that it can be deducted from deployment capacity.
Another approach is to place some weights in host memory or local storage and load them when needed. This can reduce VRAM requirements, but it shifts the problem to data transfer and access latency. For models whose expert routing changes with the input, weight loading may not be fully predictable, and interactive services are prone to long-tail latency.
Therefore, a low activation ratio mainly means that “compute has an opportunity to be saved.” It does not mean that an ordinary workstation can run the full model.
3. How Much VRAM Does a 2.8-Trillion-Parameter Model Need?
3.1 Calculate the Bare Weight Lower Bound First
Weight storage can first be estimated with the following formula:
Weight bytes = number of parameters × average storage bits per parameter ÷ 8
For 2.8 trillion parameters, if all parameters are represented with 4 bits:
2.8 × 10^12 × 4 ÷ 8 = 1.4 × 10^12 bytes
In decimal units, this is about 1400 GB, or 1.4 TB.
But this is only an idealized bare-data lower bound. It assumes that all parameters can use the same low-bit-width format, that there is no auxiliary information, and that runtime processes are not considered.
3.2 Low-Precision Formats Also Need Scaling Information
Low-bit-width weights usually cannot store only the values themselves. They also need scaling factors and sometimes zero points or other auxiliary information.
Assume a block quantization representation attaches one 8-bit scaling factor to every 32 4-bit values. Then the average storage per parameter is:
4 + 8 ÷ 32 = 4.25 bits
The corresponding weight capacity is:
2.8 × 10^12 × 4.25 ÷ 8 = 1.4875 × 10^12 bytes
That is about 1487.5 GB, or approximately 1.35 TiB. GB and TiB use different bases, so they must not be mixed in procurement and capacity planning.
This is still not the final VRAM requirement. Additional items must be added:
- Weight tensors not represented in 4 bits;
- Quantization metadata and storage alignment overhead;
- Temporary buffers used by operator execution;
- Distributed communication buffers;
- Request state and input/output tensors;
- Attention cache or other sequence state;
- Necessary capacity headroom.
In addition, if the hardware or inference engine cannot directly use the compressed format, some weights may need to be expanded or conversion buffers may need to be created. A small disk file does not directly prove that runtime VRAM will be equally small.
3.3 Cache Depends on Model Structure and Service Load
For models using standard attention mechanisms, the key-value cache usually grows with the number of concurrent sequences and context length. Its rough scale depends on the number of layers, number of key-value heads, head dimension, and cache precision.
However, different attention structures and sequence modeling methods do not necessarily have the same state-storage pattern. The same cache formula cannot be applied to every model.
The correct approach is to measure according to the actual structure and validate with the target load. For example, the same model may start successfully in a short-text single-user test, but that does not mean it remains stable with long context and multiple concurrent user requests.
4. How Many Accelerators Are Needed? The Capacity Lower Bound Is Not the Deployment Answer
The number of accelerators can first be estimated as follows:
Lower bound = ceiling [total runtime VRAM requirement ÷ VRAM usable for model service per device]
Note that the denominator should use “capacity usable for model service,” not the device’s nominal VRAM. The runtime environment, communication components, and temporary workspace all consume capacity.
Consider a pure capacity example: if a device has 80 GB of VRAM and only 64 GB is allocated to weights during planning, then merely holding 1487.5 GB of weights requires:
1487.5 ÷ 64 ≈ 23.24
That is at least 24 devices.
This result is not a complete deployment recommendation, because it has not yet proven that the following conditions can be met:
- All model layers and experts can be distributed evenly;
- The inference engine supports this level of parallelism;
- Cache and temporary workspace have sufficient headroom;
- Devices have sufficient communication bandwidth between them;
- The latency of a single request meets business requirements.
Sometimes the weights fit, but communication is too slow. Sometimes average VRAM is sufficient, but some devices are exhausted early because of expert distribution or cache allocation. The actual cluster size must satisfy capacity, compute, and communication requirements at the same time.
It is also impossible to derive a fixed device count directly from the total parameter count. Hardware capability, weight precision, parallelism strategy, business concurrency, and response targets all change the result.
5. Why the Communication Network May Become the Main Bottleneck
When a mixture-of-experts model is deployed across devices, one expert computation usually includes the following process:
- The routing module selects experts for input tokens.
- The system sends the relevant intermediate representations to the devices hosting those experts.
- The experts perform computation.
- The results are sent back, combined, and passed to subsequent network processing.
This process involves many-to-many data exchange. The higher the concurrency, the more tokens there are, and the more dispersed the experts are, the greater the communication pressure.
Therefore, it is not enough to connect multiple servers with accelerators to an ordinary office network and assume that this creates one “large-VRAM machine.” Bandwidth, latency, topology, and congestion control between compute devices all affect final performance.
Deployment checks should focus on:
- Whether devices within a node have high-speed interconnect.
- Whether the cross-node network can support sustained large-scale data exchange.
- Whether experts are distributed evenly and whether local hotspots appear.
- Whether communication and computation can overlap effectively.
- Whether obvious long-tail latency appears under high concurrency.
- Whether the service can recover promptly after a node failure.
For large-scale expert-parallel systems, improving network quality may be more effective than simply adding more devices.
6. How Much Does It Actually Cost? Use a Budget Model, Not a Quote Based on Parameter Count
Without hardware quotes, data center conditions, and performance targets, it is not possible to give a rigorous fixed price. The budget for local deployment of a very large model should be divided into one-time construction costs and ongoing operating costs.
6.1 One-Time Construction Costs
These mainly include:
- Accelerators or complete servers;
- Host memory, local storage, and storage servers;
- High-speed network equipment, cables, and supporting components;
- Racks, power supply, power distribution, and cooling modifications;
- Deployment implementation, performance optimization, and acceptance testing;
- Spare parts and necessary redundancy resources.
Avoid double counting in the budget. For example, if a supplier quotes a complete server, the accelerators already included in that server should not be added to the total price again.
6.2 Ongoing Operating Costs
These mainly include:
- Electricity and cooling;
- Hardware maintenance and warranty;
- Data center rent or allocation of internal facilities;
- Operations staff and performance optimization staff;
- Security audits, backups, and monitoring;
- Costs caused by downtime and idle equipment.
Electricity cost can be estimated as follows:
Monthly electricity cost ≈ average IT power × monthly operating hours × power usage effectiveness × electricity price
For example, assume the average IT power of the entire cluster is 40 kW, it runs 720 hours per month, the power usage effectiveness is 1.4, and the electricity price is CNY 0.8/kWh. Then:
40 × 720 × 1.4 × 0.8 = CNY 32,256 per month
These values are arithmetic examples only. They are not measured power consumption or actual electricity prices for any specific cluster.
6.3 A Replaceable Procurement Budget Example
Assume capacity and performance testing ultimately determines that 32 accelerators are needed, and procurement planning temporarily uses CNY 100,000 per accelerator. Other server components, network, storage, and data center supporting facilities are estimated at CNY 1.5 million in total. The base construction budget is then:
32 × CNY 100,000 + CNY 1,500,000 = CNY 4.7 million
If an additional 15% risk budget is reserved, the result is about CNY 5.405 million.
This example is only intended to illustrate the accounting method. It does not represent a market quotation, and it does not prove that 32 devices are sufficient to run the target model. Actual procurement must use quotation results and determine the device count through complete load testing.
Long-term evaluation should also calculate:
Total cost of ownership = construction cost + operating cost over the evaluation period + maintenance and upgrade costs
Only by further dividing total cost of ownership by the actual volume of effective requests or output can one judge whether local deployment has an economic advantage.
7. Use Phased Deployment Instead of One-Time Procurement
Phase 1: Validate Deployability
Confirm weight licensing, model configuration, quantization method, and inference engine compatibility. Focus on whether low-precision operators are actually usable, not merely whether weight files can be read.
If these basic conditions have gaps, resolve compatibility issues before moving to large-scale procurement.
Phase 2: Complete Capacity and Network Design
Calculate capacity based on actual weight files, and estimate runtime VRAM according to the target context length and concurrency. Then design weight sharding, expert distribution, and communication topology.
On the storage side, also consider model replicas, upgrade rollback, and download verification. Preparing disk space for only one copy of the weights is usually insufficient to support a complete maintenance process.
Phase 3: Conduct Representative Load Testing
Testing cannot stop at “successfully generating a piece of text.” At minimum, record:
- Time to first output;
- Sustained generation speed;
- Throughput and concurrency capability;
- Peak VRAM;
- Network load;
- High-percentile response latency;
- Failure recovery time;
- Changes in task quality after quantization.
These metrics should be measured under the real business input distribution, especially covering long text, burst requests, and complex tasks.
Phase 4: Improve Production Readiness
Before official launch, configure access control, request rate limiting, log redaction, monitoring and alerting, version rollback, and capacity alerts. A business degradation strategy should also be defined to avoid long-term unavailability of all requests after a single node failure.
Local deployment solves resource and data control problems. It does not automatically solve service reliability and security governance problems.
8. When Is Self-Building Worth It?
Local deployment of trillion-parameter models is more suitable for scenarios where data must remain in the internal environment, the load is stable over the long term, high-density compute facilities already exist, and the team has distributed inference and cluster operations capabilities.
If the goal is only to validate a business idea, or if daily request volume is very low, building a complete very large cluster is often difficult to amortize. A more reasonable order is to first use a smaller model that meets quality requirements to validate the business, then decide whether to upgrade based on task results and stable load.
Model pressure can also be reduced through retrieval augmentation, context governance, task decomposition, and cache reuse. However, these methods cannot be treated as a guarantee that an arbitrarily smaller model will maintain the same capability.
Ultimately, two judgment criteria should be maintained: technically, whether the model can run stably under the target load; economically, whether the long-term cost per unit of effective output is reasonable. For trillion-parameter models, weight capacity is only the starting point. Communication, service load, and ongoing operations determine whether local deployment is truly feasible.
