Local Deployment of Trillion-Parameter Models: Hardware Requirements and Cost Estimation
Deploying a trillion-parameter model locally requires more than calculating whether the weights fit into GPU memory. This article estimates capacity, performance, concurrency, rental, and self-hosting costs using a hypothetical 2.8-trillion-parameter mixture-of-experts model with approximately 104 billion active parameters per token and 4-bit weights. It distinguishes minimum runnable deployments from single-user and multi-user serving targets, and presents a practical validation process before long-term investment.
1. Deployment Cost Depends on More Than Parameter Count
When discussing local deployment of an extremely large model, it is important to distinguish between loading the model, generating output, and providing stable service.
Successfully loading a model means that its weights and required runtime data fit within the available hardware. Being able to generate output indicates that the computation path and inference implementation are basically functional. Stable service requires additional guarantees for response speed, concurrency, context length, and failure recovery. The hardware and engineering costs for these three stages can differ substantially.
This article considers three deployment targets:
- Minimum runnable deployment: The model can perform inference, with no specific generation-speed guarantee.
- Single-user interaction: One active request can continuously generate at 25 tokens per second.
- Multi-user service: Ten requests generate simultaneously, with each request sustaining 25 tokens per second.
A token is the basic unit processed by a language model. It is not equivalent to a Chinese character, an English word, or a character. The reading experience produced by the same token rate can vary across languages and tokenization methods.
To demonstrate the calculation method, the examples below use a hypothetical mixture-of-experts model with 2.8 trillion total parameters, approximately 104 billion active parameters per token, and 4-bit weights. These figures are for capacity planning only. They do not confirm the specifications, precision support, or deployment capability of any specific model.
2. Why Sparse Activation Still Requires Large GPU Memory
The core idea of a mixture-of-experts architecture is that each token passes through only a subset of the available experts instead of using every parameter for computation.
This reduces the computation required for an individual token, but it does not mean that only the active parameters need to be stored.
Different inputs may select different experts, and requests in the same batch may access different parts of the model. To avoid repeatedly loading weights from host memory or storage, deployments generally need to keep the complete model weights within the accelerator cluster.
Two metrics must therefore be separated:
- Total parameter count: Primarily affects weight capacity, storage, and loading costs.
- Active parameter count: Affects the computation required for each token, but does not independently determine actual speed.
Performance also depends on expert placement, routing balance, communication patterns, memory access, and implementation efficiency. The active-parameter ratio cannot be directly treated as the expected speedup ratio.
1. Basic Weight-Capacity Formula
The theoretical weight capacity can be estimated as:
Weight capacity = total parameters × average storage bits ÷ 8
Under the assumptions above:
2.8 trillion × 4 ÷ 8 = 1.4 trillion bytes
That is approximately 1.4 TB, or about 1.27 TiB after binary conversion.
Units must be used consistently. TB is decimal, while TiB is binary. Mixing them can introduce errors into capacity planning.
In addition, “4-bit weights” does not necessarily mean that every parameter occupies exactly four bits in the model file. Quantization scales, group metadata, and tensors retained at higher precision can all add overhead. Therefore, 1.4 TB represents an idealized lower bound for the weights.
2. 4-Bit Storage Does Not Guarantee Efficient Computation
Before deployment, verify at least three layers of compatibility:
- The numerical format and grouping method used by the weights;
- Whether the hardware supports the corresponding low-precision execution path;
- Whether the inference implementation provides matching computational kernels.
A device may be able to store weights in a particular format without being able to execute that format directly or efficiently. Dequantization, conversion, or higher-precision intermediate data may add computation, temporary buffers, and GPU memory usage.
For this reason, hardware should not be considered suitable merely because it “supports low precision.”
3. Total GPU-Memory Budget: What Must Be Reserved Beyond Weights
A more practical estimate is:
Total GPU memory = resident weights + sequence-state cache + activations and workspaces + communication buffers + runtime overhead + safety margin
These components cannot be replaced with a single fixed percentage, especially for long-context and high-concurrency workloads.
1. Sequence-State Cache
For models using common attention mechanisms, inference usually stores the keys and values associated with previously processed tokens. This avoids recomputing the entire history at every generation step.
The required capacity generally increases with:
- The number of sequences held simultaneously;
- The number of tokens already processed for each sequence;
- The number of model layers;
- The number and dimensions of key-value heads;
- The precision used for cached data.
Different attention architectures, cache-compression methods, and state representations change the calculation. Cache size cannot be inferred from total parameter count alone.
The maximum context length configured for a service is also not the same as the context length actually used by a request. Whether the system preallocates memory or allocates it on demand affects the number of concurrent requests it can serve.
2. Workspaces and Communication Buffers
Matrix operations, expert routing, parallel communication, and execution strategies may require additional workspace. Some configurations load successfully but run out of memory during long-input preprocessing or larger batches.
Capacity planning should therefore use peak memory consumption under realistic workloads rather than idle or model-loading measurements.
3. Safety Margin
The theoretical requirement should not be set equal to physical capacity. Runtime behavior may be affected by memory fragmentation, variable request lengths, and differences between implementation versions.
The safety margin should be determined through load testing. The service should also define maximum input length, maximum generation length, maximum resident sequences, and queueing policies so that a small number of unusually long requests cannot consume all available resources.
4. Tier One: Running the Model Without a Speed Target
This tier focuses first on capacity and compatibility.
Option One: Keep All Weights on Accelerators
Assume that each device provides 192 GB of memory. Using only the theoretical 1.4 TB weight capacity:
1400 ÷ 192 ≈ 7.29
Rounding up gives eight devices.
However, eight devices provide a combined 1,536 GB, only about 136 GB more than the theoretical weight capacity. That space must also accommodate quantization metadata, caches, workspaces, and other runtime overhead. Therefore, this calculation only shows that the weight capacity is close to fitting. It does not prove that the complete service will run successfully.
For an initial estimate with another device capacity, use:
Minimum device count = ceiling(total GPU-memory requirement ÷ usable memory per device)
You must then verify whether the model can be partitioned across the devices, whether the workload can be balanced, and whether the interconnect is fast enough. The actual device count cannot always be chosen freely based on capacity alone.
Option Two: Offload Part of the Weights to Host Memory
If speed is not a priority, part of the model can potentially be placed in host memory and read or transferred to accelerators as needed.
This reduces the total accelerator-memory requirement, but it does not eliminate the capacity requirement. It simply moves part of the requirement to the host. The resulting performance may be limited by host-memory bandwidth, device-transfer bandwidth, and access patterns.
For latency-sensitive interactive applications, frequent weight movement can significantly degrade the user experience. Relying on storage devices for on-demand reads generally creates even more serious latency problems.
“Running at the lowest possible cost” should therefore be treated as an experimental or functional-validation objective, not automatically as a viable online-service architecture.
5. Tier Two: 25 Tokens per Second for One User
Reaching 25 tokens per second for a single user requires more than fitting the model into memory. Each generation step must also complete quickly enough.
During steady-state decoding, 25 tokens per second corresponds roughly to an average of 40 milliseconds per generated token. This conversion does not include the complete input-processing time and cannot replace a time-to-first-token metric.
The following measurements should be reported separately:
- Time to first token: The time from request submission until the first output token is received;
- Steady-state output speed: Average token speed after generation begins;
- Inter-token latency: Useful for evaluating output smoothness;
- End-to-end latency: Total time including queueing, input processing, and generation.
Key factors affecting single-user speed include:
- Weight-loading and cache-access efficiency;
- Optimization of the low-precision computation path;
- Multi-device communication overhead;
- Expert-routing imbalance;
- Input length and preprocessing cost.
Without benchmark results using the same context length, precision, and deployment configuration, it is not possible to guarantee that a particular device count will achieve 25 tokens per second.
A practical approach is to obtain short-term access to representative hardware, test realistic requests, and then decide whether to purchase or permanently rent the required resources.
6. Tier Three: Ten Concurrent Requests at 25 Tokens per Second Each
Arithmetically, this target requires at least 250 generated tokens per second of aggregate throughput.
However, total throughput of 250 tokens per second does not mean that all ten users will receive 25 tokens per second. Some requests may generate quickly while others wait because of queueing or scheduling.
Multi-user service requires solving two separate problems.
1. Is There Enough Capacity?
The system must support ten active sequences and their context states at the same time. Short and long contexts can create significantly different memory pressure, so concurrency cannot be evaluated based on request count alone.
A fixed claim such as “one node supports a specific number of concurrent users” is not meaningful without specifying the model architecture and context conditions.
2. Are Scheduling and Compute Capacity Sufficient?
Batching can improve accelerator utilization, but it may also increase waiting time. Preprocessing long inputs can interfere with requests that have already entered the generation phase.
Service acceptance criteria should specify:
- Whether all ten requests are genuinely generating at the same time;
- The measurement interval for each request’s speed;
- Whether queueing time is included;
- The distribution of input and output lengths;
- Tail-latency requirements for slower requests.
If a single node fails to meet the target, adding more nodes should not be the first assumption. Check parallelism, batching strategy, cache management, routing balance, and interconnect bottlenecks before determining whether scaling out will help.
7. How Much Will It Cost? Separate Rental from Self-Hosting
1. Rental Cost
If the hourly price per device is P, the number of devices is N, and the usage duration is H, then:
Compute cost = P × N × H
As a purely illustrative example, assume each device costs $5 per hour and eight devices are used. The hourly cost is $40.
- Continuous operation for 24 hours: $960;
- Continuous operation for 30 days: $28,800;
- Continuous operation for 365 days: $350,400.
These figures are not real-time market quotes and do not correspond to any specific provider. They only demonstrate how quickly annual costs accumulate when expensive resources remain allocated continuously.
Also check storage, snapshots, network transfer, taxes, and whether the resources can be released on demand. Long-term commitment pricing and short-term on-demand pricing should not be treated as interchangeable.
2. Self-Hosting Cost
Self-hosting involves more than the purchase price of the accelerators. The budget should also include:
- Server chassis, CPUs, and large-capacity system memory;
- Local storage and model-distribution capacity;
- High-speed interconnects and switching equipment;
- Rack space, power delivery, and cooling;
- Electrical upgrades, maintenance, spare parts, and staff time.
Electricity costs can be estimated as:
Electricity cost = average power × operating hours × electricity price
For example, if the complete system consumes an average of 12 kW and operates continuously for a year, its hardware electricity consumption is approximately 105,120 kWh. This is only an example. Actual planning should use measured workload power and separately account for cooling and power-distribution losses.
Total annual cost also includes hardware depreciation, maintenance, software adaptation, downtime risk, and capital costs. Utilization is therefore a key factor in determining whether self-hosting is economical. An expensive cluster used only occasionally may have a very high cost per effective inference.
8. Recommended Implementation Order: Validate Before Scaling
A lower-risk deployment process is:
Step 1: Verify the model conditions. Confirm that the weights are available, the license permits the intended use, the actual weight format and file size are known, and the architecture is supported. If the model is unavailable or its runtime implementation is incomplete, hardware budgeting has little practical value.
Step 2: Define fixed business metrics. Specify input length, output length, concurrency, time to first token, and per-request generation speed instead of simply stating that “high performance” is required.
Step 3: Build a capacity inventory. Calculate weights, cache, runtime overhead, and workspaces separately, using consistent capacity units.
Step 4: Run small-scale validation. First verify loading and correctness, then measure single-request performance before gradually increasing concurrency and context length.
Step 5: Test with realistic traffic. Include a mixture of short and long requests, bursts, cancellations, and long-duration stability tests. Monitor tail latency, error rates, and peak resource usage.
Step 6: Compare alternatives. If the application does not require the full capability of an extremely large model, evaluate smaller models, retrieval-augmented generation, or task decomposition. The deployment target should be determined by business value rather than parameter count.
Conclusion
Local deployment of extremely large models is fundamentally a systems-engineering problem constrained by capacity, speed, concurrency, and reliability.
If the only requirement is that the model runs, slower host-memory offloading may be acceptable for experimentation. Reaching 25 tokens per second for one user requires validating the full computation and communication path. Supporting ten concurrent requests at that rate requires checking aggregate throughput, per-request speed, and tail latency at the same time.
The most reliable budget is not a simple statement such as “the system needs a certain number of GPUs.” It is a reproducible capacity calculation, a clearly defined workload, a performance report, and a total-cost-of-ownership estimate. Measuring first and making long-term commitments afterward is usually safer than purchasing hardware based solely on theoretical parameter counts.
