Local Deployment of Trillion-Parameter LLMs: VRAM, Architecture, and Cost

    This article explores the practical engineering considerations for locally deploying trillion-parameter Mixture-of-Experts (MoE) models. Using a hypothetical 2.8 trillion parameter model as a baseline, it breaks down VRAM calculation, the impact of MoE architecture on hardware requirements, the critical role of device interconnects, and Total Cost of Ownership (TCO). It also provides a step-by-step deployment guide to help engineering teams avoid common pitfalls and make informed hardware procurement decisions.

    1. Clarification: Deployment Methods, Not Specific Model Configurations

    When dealing with trillion-parameter large language models, there is no standard answer to “how much does local deployment cost” without specific conditions. Factors such as model weight availability, internal enterprise usage licenses, inference engine support for the specific architecture, and expected concurrency and response speed will all alter the final deployment plan.

    This article uses a hypothetical Mixture-of-Experts (MoE) model with a total parameter count of 2.8 trillion as the subject for capacity analysis, discussing general deployment methodologies. The associated numbers are used for engineering estimation and do not represent confirmation of any specific model parameters, quantization formats, hardware requirements, or official deployment recommendations.

    Before procurement, you should obtain the following materials:

    • Model configuration, actual weight files, and usage licenses;
    • Weight data types, quantization grouping methods, and scaling information;
    • Documentation on inference engine support for the model structure and operators;
    • Maximum context length, target concurrency, and response time requirements;
    • Measured VRAM, throughput, and communication overhead on target hardware.

    Missing any of these items can prevent a theoretically sound budget from materializing in reality.

    2. Why MoE VRAM Cannot Be Calculated by “Activation Ratio”

    2.1 Total Parameters vs. Active Parameters Solve Different Problems

    MoE models typically consist of shared computation components and multiple expert modules. When processing a token, the routing mechanism only selects a subset of experts to participate in the calculation, meaning the computational load does not scale proportionally with the total parameter count.

    Assuming the model has 896 experts and selects 16 experts per token, the activation ratio at the expert level is:
    16 ÷ 896 ≈ 1.79%.

    However, this figure cannot be directly interpreted as “only needing to load 1.79% of the parameters,” nor does it strictly equate to the total parameter activation ratio. Shared modules still participate in computation, and the parameter sizes of individual experts may not be identical.

    During deployment, three concepts must be distinguished:

    • Total parameters: Primarily determines the storage capacity for complete weights;
    • Per-token active parameters: Affects computational demand but does not independently determine actual throughput;
    • Weight residency location: Determines data access speed and transfer costs.

    Therefore, in a low-latency, full-VRAM deployment scheme, you typically must prepare enough device VRAM for the complete weights, rather than only provisioning capacity for the currently selected experts.

    2.2 Weights Can Be Offloaded, But Saving Capacity Comes at a Cost

    Not all deployments require complete weights to reside permanently in accelerator VRAM. Some weights can be stored in host memory or local storage and transferred on-demand during inference.

    This approach changes the storage tier where weights reside but does not eliminate the inherent capacity requirement of the weights themselves.

    If expert access exhibits strong locality, caching might reduce transfer frequency; if routing is dispersed with a low cache hit rate, weight transmission can become the primary bottleneck. Particularly in interactive services, frequently loading experts easily causes increased Time-To-First-Token (TTFT) latency and output speed fluctuations.

    Thus, “able to complete one inference” and “able to provide stable online service” must be verified separately.

    3. Calculating Actual VRAM from Weight Files

    3.1 Calculate Ideal Weight Data Size

    The foundational formula for weight capacity is:
    Weight Capacity = Parameter Count × Bits per Parameter ÷ 8

    If the total parameters are 2.8 trillion, all represented in 4-bit precision, the theoretical raw data capacity is:
    2.8×10¹² × 4 ÷ 8 = 1.4×10¹² bytes.

    In decimal units, this equates to 1,400 GB, or 1.4 TB.

    Decimal capacity units are used here. Hardware specifications, operating systems, and inference engines may display these differently, so capacity planning should standardize conversions rather than just comparing interface numbers.

    3.2 Low-Bitwidth Quantization Includes Auxiliary Information

    Actual quantization formats often require saving scaling factors, and some require zero-points, grouping indices, or other auxiliary data.

    Assuming a grouped format where every 32 4-bit weights share one 8-bit scaling value, the average bits per weight is:
    4 + (8 ÷ 32) = 4.25 bits.

    The corresponding capacity is:
    2.8×10¹² × 4.25 ÷ 8 = 1.4875×10¹² bytes, or 1,487.5 GB.

    This is merely a format capacity calculation under a specific assumption and cannot be generalized as the fixed overhead for all 4-bit quantization schemes. Actual deployment must cross-reference weight formats with the inference kernel implementation.

    3.3 Total VRAM is More Than Just Weights

    The VRAM requirement for an inference service can be broken down into:
    Total VRAM = Weights + Runtime State Cache + Intermediate Tensors & Workspace + Communication Buffers + Framework Overhead + Safety Margin

    Specifically, this includes:

    • Unquantized or higher-precision saved partial tensors;
    • Request context state caches (e.g., KV cache);
    • Temporary space for attention and expert computations;
    • Expert routing, rearrangement, and cross-card communication buffers;
    • Memory allocation fragmentation and runtime reserved space.

    For standard attention architectures, state caches typically grow with concurrency and context length; for models using compressed states, recurrent states, or hybrid architectures, measurements should be based on actual implementations rather than uniform formulas.

    Therefore, the most reliable capacity metrics should come sequentially from: actual weight files, VRAM usage after framework loading, and stress testing under target workloads.

    4. How Many Accelerators Are Needed? Beyond Simple Division

    Assume the use of accelerators with 80 GB of VRAM per card, and temporarily estimate based on the 1,487.5 GB weight capacity.

    If we completely ignore other overheads:
    1,487.5 ÷ 80 ≈ 18.6.

    Rounding up gives 19 cards, but this figure only represents the idealized lower bound for weight capacity, not a directly purchasable configuration.

    If preliminary planning assumes each card allocates only 75% of its VRAM for weights (leaving the rest for caches, workspaces, and runtime overhead), the available weight space per card is 60 GB:
    1,487.5 ÷ 60 ≈ 24.8.

    At this point, the estimated lower bound at the capacity level is about 25 cards. The actual plan might select a card count suitable for server layout and parallel splitting, such as 32, but this still requires verification.

    It must be emphasized: reserving 25% is merely a demonstrative planning assumption, not a universal safety standard. Long contexts, high concurrency, or specific operator implementations may require significantly more margin.

    Furthermore, even if total VRAM is sufficient, deployment may still fail due to:

    • Model dimensions cannot be split according to the predetermined parallel scale;
    • Unbalanced expert placement, causing a few devices to exhaust VRAM first;
    • Shared layers or partial modules being duplicated across multiple cards;
    • Specific operators not supporting the target data type;
    • Communication topology causing actual performance to fall below service requirements.

    Therefore, the card count should be determined jointly by capacity, splitting method, and performance goals.

    5. Why Large-Scale MoE Inference Heavily Relies on Interconnects

    Once experts are distributed across different devices, routing is not just selecting a computation branch; it also means sending intermediate representations to the devices hosting the relevant experts, and then gathering the results back.

    This process typically involves all-to-all communication across multiple devices. It is highly sensitive to both bandwidth and latency.

    5.1 High Single-Card Compute Does Not Equal High System Throughput

    If computation requires very little time but data movement takes longer, adding more compute devices may not yield proportional speedups. Increasing the number of devices can also expand the communication domain, making synchronization and scheduling more complex.

    When evaluating hardware, simultaneously check:

    • Intra-server device interconnects (e.g., PCIe, NVLink);
    • Cross-server network bandwidth and latency (e.g., InfiniBand, RoCE);
    • Network oversubscription ratios;
    • Actual efficiency of collective communication operations;
    • Whether expert distribution matches the physical topology.

    “Having the same number of cards” cannot be equated to “having the same deployment capability.”

    5.2 Large Communication Domains Have Value, But Bigger Isn’t Unconditionally Better

    A larger high-speed interconnect domain helps reduce cross-tier communication, but whether you need dozens or more devices depends on the actual model and service objectives.

    Single-user offline research, internal low-concurrency testing, and business-facing online services have vastly different requirements for latency, throughput, and reliability. A specific large-scale deployment recommendation cannot be mechanically applied to all scenarios.

    6. How Much Does Local Deployment Actually Cost?

    6.1 Distinguish Procurement Cost from Total Cost of Ownership (TCO)

    One-time procurement costs typically include:

    • Accelerators and servers;
    • Host memory and local high-speed storage;
    • Network equipment, adapters, and cables;
    • Racks, power supply, and necessary cooling modifications;
    • Installation, integration, and initial acceptance testing.

    Long-term costs also include electricity, cooling, datacenter space, maintenance, spare parts, operations personnel, and software adaptation.

    A viable budget structure is:
    TCO = Initial Procurement & Integration Cost + Energy, Datacenter, Maintenance, and Personnel Costs During Operation

    If you answer cost questions solely using “card count × price per card,” you will likely underestimate the true investment.

    6.2 Use Sensitivity Analysis Instead of Providing Pseudo-Precise Quotes

    The following merely demonstrates how a budget changes with unit pricing. Assume the procurement of 32 accelerators, with three hypothetical price tiers:

    Hypothetical Unit Price (USD) Cost for 32 Accelerators
    $15,000 $480,000
    $30,000 $960,000
    $45,000 $1,440,000

    These numbers are calculation examples, not market quotes, nor do they imply that hardware meeting requirements can be purchased at these prices. The table does not yet include servers, networking, datacenter, or operations costs.

    Actual budgets should be based on formal quotes for complete server and network solutions, with card counts finalized according to verification results. If two complete service instances are needed for failover, the investment will increase significantly, though the exact increment depends on the redundancy approach.

    6.3 Power Costs Can Be Calculated, But Power Consumption Must Be Measured First

    Annual electricity costs can be roughly estimated as:
    Average Equipment Power × Operating Hours × Datacenter PUE × Electricity Rate

    For example, purely for demonstration, assume an average equipment power of 40 kW, operating 8,760 hours a year, a datacenter PUE of 1.3, and an electricity rate of $0.10 per kWh. The annual power cost would be approximately:
    40 × 8760 × 1.3 × 0.10 = $45,552.

    This is not a measured result for any specific model or configuration. Real costs need to be calculated based on the power consumption of the entire machine and network equipment, as well as the actual datacenter billing method, ensuring cooling costs are not double-counted.

    7. Deployment Path from Scratch

    Step 1: Verify Licensing and Technical Support

    First, confirm whether weights are accessible, whether the license covers the target scenario, and whether the inference engine truly supports the model architecture.
    “Supporting a similar parameter scale” does not equal “supporting this specific model.” Model configuration, operators, quantization formats, and parallel implementations must all be compatible simultaneously.

    Step 2: Complete Small-Scale Compatibility Testing

    First verify weight parsing, shard loading, operator execution, and output correctness. Then check whether low-precision computation is actually in effect.
    Some schemes can read low-bitwidth weights but might upcast them to higher precision at runtime, causing VRAM and performance to deviate from expectations.

    Step 3: Design Parallelism and Expert Layout

    Choose a combination of Tensor Parallelism (TP), Pipeline Parallelism (PP), and Expert Parallelism (EP) based on network topology. Focus on checking shared module replication, expert load imbalance, cross-node communication, and pipeline bubble time.
    You should not just maximize one type of parallel scale, but optimize end-to-end performance under the target workload.

    Step 4: Conduct Capacity and Performance Stress Testing

    Cover at least short inputs, long inputs, long outputs, target concurrency, and burst requests.
    Recommended metrics to record:

    • Time-To-First-Token (TTFT) latency;
    • Inter-Token latency (time per output token);
    • Total throughput and per-request speed;
    • Peak VRAM and device utilization;
    • Communication time ratio;
    • Queue time, error rate, and timeout rate.
      Beyond averages, pay attention to high-percentile (tail) latency, as perceived service instability usually originates from tail requests.

    Step 5: Complete Production Readiness

    Enterprise deployment also requires access control, auditing, sensitive information management, monitoring and alerting, rate limiting, version rollback, and failure handling.
    Running locally does not inherently mean secure. Weights, logs, request caches, and management interfaces can also become risk vectors.

    8. Conclusion: Clarify Service Goals Before Procurement

    For the hypothetical 2.8 trillion parameter model, the raw capacity of 4-bit weights already reaches about 1.4 TB; factoring in grouped scaling information, it’s about 1.49 TB under the format assumptions in this article. Runtime also requires space for caches, workspaces, and communication, so raw weight capacity cannot directly determine procurement scale.

    The truly actionable decision sequence is:

    1. Confirm weight, licensing, and framework compatibility;
    2. Define concurrency, context length, and latency goals;
    3. Measure weights and runtime VRAM;
    4. Verify parallel splitting and interconnect performance;
    5. Obtain complete hardware solution quotes;
    6. Factor energy, datacenter, and operations into the long-term budget.

    If the goal is merely internal knowledge QA, coding assistance, or process automation, you should first verify whether smaller models, Retrieval-Augmented Generation (RAG), or task-specific models are sufficient. The value of local deployment lies not in hosting the largest possible model, but in continuously meeting quantifiable business requirements at a controllable cost.