Deploying Trillion-Parameter LLMs Locally: Configuration and Cost Estimation Guide

    Deploying trillion-parameter large language models locally is a complex engineering challenge that extends far beyond dividing parameter counts by per-GPU VRAM. This guide outlines a three-tier deployment framework—ranging from basic functional validation to multi-user concurrent services—to help teams accurately estimate capacity, hardware compatibility, communication bottlenecks, and total cost of ownership before making infrastructure investments.

    1. Define the Problem: Fitting, Running, and Running Fast are Three Different Things

    When discussing the local deployment of ultra-large models, the most common misconception is to simply divide the total parameter count by the VRAM of a single accelerator card to determine the number of cards to purchase.

    This method only estimates the lower bound for weight capacity. It cannot answer whether the inference framework is compatible, whether cross-GPU communication is fast enough, whether long contexts can be supported, or whether the system remains smooth under concurrent multi-user requests.

    For trillion-parameter models, it is recommended to divide requirements into three tiers:

    1. Functional Validation Tier: The model can be loaded and complete inference, with longer wait times being acceptable.
    2. Single-User Interaction Tier: With only one active request, the stable generation speed reaches 25 tokens per second.
    3. Multi-User Service Tier: 10 requests are continuously generating concurrently, and each request maintains an output speed of 25 tokens per second.

    Here, a token does not equal a Chinese character, nor does it equal an English word. Therefore, acceptance testing should use the actual number of output tokens generated by the model rather than estimating speed based on character length.

    It must also be emphasized: the following calculations use a hypothetical example with “approximately 2.8 trillion total parameters, about 104 billion active parameters per token, and 4-bit weight storage.” These numbers do not confirm any specific model specifications, precision support, or actual performance. In real deployments, refer to the model documentation, weight files, and inference implementation.

    2. Capacity Estimation: 4-bit Weights Can Still Reach Terabyte Levels

    1. Weight Size is Only the First Calculation

    The theoretical capacity for weights can be estimated using the following formula:

    Weight Capacity = Total Parameters × Bits per Parameter ÷ 8.

    Applying the above assumptions:

    2.8 trillion × 4 ÷ 8 = 1.4 trillion bytes.

    Calculated in decimal terms, this is approximately 1.4 terabytes (TB). Note that hardware-labeled capacity, operating system display capacity, and calculation formulas may use different unit standards. When creating a procurement spreadsheet, unify units to bytes before comparing to avoid confusing decimal and binary units.

    This result is only the idealized weight data size. Actual models may include scaling factors, group quantization metadata, unquantized layers, and alignment padding. Ultimately, you should prioritize using the actual weight file size and post-loading VRAM usage for calculations.

    2. Fewer Active Parameters Does Not Mean Loading Fewer Weights

    A key characteristic of sparse expert (MoE) architectures is that only a subset of experts is selected to participate in the computation for a given token. Therefore, the number of active parameters is typically significantly smaller than the total number of parameters.

    However, this primarily affects the computational path per token and does not mean the remaining experts can be unconditionally removed from storage. Different inputs may select different experts. Conventional high-performance deployments usually require the complete expert weights to reside in device VRAM or be quickly swapped in via tiered storage.

    Therefore, two metrics should be distinguished:

    • Total Parameters: Primarily affects weight storage scale.
    • Active Parameters: Affects the parameter scale involved in a single computation, but is insufficient to independently predict speed.

    Expert routing, cross-GPU communication, memory access efficiency, and operator implementation will further affect actual performance.

    3. Runtime VRAM Cannot Be Summarized by a Fixed Overhead

    A more comprehensive VRAM budget should include:

    Total VRAM Requirement = Weights + KV Cache/States + Activations/Temporary Workspaces + Communication Buffers + Framework Overhead + Safety Margin.

    For common attention architectures, the key-value (KV) cache typically grows with context length and the number of active sequences. Models using other architectures may have different state storage mechanisms, so the same formula cannot be mechanically applied.

    Even if the weight scale is determined, you cannot assume that “adding a small amount of VRAM can support all business needs.” A short single-person conversation and a 10-person long-document Q&A session may have vastly different runtime space requirements.

    3. Precision and Hardware Adaptation: Supporting 4-bit Storage ≠ Supporting Efficient 4-bit Compute

    “4-bit” does not necessarily describe the same numerical format. Different schemes may have different data representations, scaling methods, grouping granularities, and computation paths.

    When selecting hardware, at least the following issues need to be verified:

    • What numerical format the model weights use;
    • Whether the accelerator hardware supports compute for the corresponding format;
    • Whether the inference implementation provides adapted operators;
    • Whether upcasting to higher precision is required at runtime;
    • Whether the temporary data from upcasting increases VRAM and bandwidth pressure.

    If the hardware can only store low-bit-width weights but needs to expand them to higher precision formats before computation, actual performance may differ significantly from theoretical low-precision compute power.

    Similarly, “the model natively uses a low-precision format” and “re-quantizing high-precision weights” are not the same concept. The latter requires additional task quality checks, including whether capabilities in long-text understanding, structured output, code generation, and domain-specific Q&A experience unacceptable degradation.

    Therefore, precision requirements should be written as verifiable conditions, not just “no less than 4-bit.” A more rigorous description should simultaneously specify the allowed weight formats, computation methods, and task quality lower bounds.

    4. Tier 1: Minimum Configuration for Basic Execution

    1. Calculate the Capacity Lower Bound, Then Consider Deployable Topologies

    Let the actual weight footprint be W, the runtime extra overhead be R, and the VRAM available for this task on a single card be M. The lower bound for the number of cards required for capacity can be expressed as:

    Card Lower Bound = ceil[(W + R) ÷ M].

    Here, “available VRAM” must be used, rather than directly copying the hardware’s nominal capacity.

    More importantly, this is only an arithmetic lower bound. Model sharding may require a specific parallel scale, and some layers may be replicated across multiple cards. Even if total VRAM is sufficient, local memory pressure on a single card can still cause loading failures.

    The actual configuration must also satisfy the combined constraints of the chassis, power supply, cooling, interconnects, and inference implementation.

    2. Offloading Can Lower VRAM Thresholds, But With Clear Trade-offs

    If speed is completely irrelevant, you can evaluate placing some weights in host memory (RAM) and transferring them to the accelerator when needed, or having the host participate in partial computation.

    This method reduces device VRAM requirements but does not eliminate the total capacity requirement. It may increase host memory, data transfer, and software adaptation costs. If low-speed storage is accessed frequently, response latency may increase dramatically.

    Therefore, “it must be entirely in VRAM to run” is not universally true; however, “being able to run via offloading” does not equate to having interactive value.

    Tier 1 is best suited for verifying loading, numerical consistency, and end-to-end workflow. It should not be used directly as the configuration basis for production services.

    5. Tier 2: Single-User Validation at 25 Tokens/sec

    1. Clarify Speed Metrics First

    Single-user experience involves at least three metrics:

    • Time to First Token (TTFT): The time from when a request enters the service to when the first output token is produced.
    • Continuous Generation Speed: The number of tokens output per second once the generation phase begins.
    • End-to-End Latency: The total time including queuing, input processing, and output generation.

    Even if the continuous generation speed reaches 25 tokens per second, the wait caused by long input processing may still make the response feel slow to the user.

    Therefore, acceptance testing should not just have a single average speed figure. It should also specify input length, output length, whether streaming is used, and whether the service is in a hot-start state.

    2. Single-User Scenarios Can Also Be Limited by Communication

    Ultra-large models usually require cross-GPU sharding. Generating each token may involve multiple data exchanges. For sparse expert architectures, expert distribution and routing also introduce additional data transfers.

    This means that while increasing the number of devices may solve capacity issues, it does not necessarily improve single-user speed. In some configurations, more devices actually increase synchronization and communication overhead.

    During design, you should simultaneously check:

    • Actual interconnect bandwidth and latency between devices;
    • Whether the parallel sharding method fits the model architecture;
    • Whether the expert load is balanced;
    • Whether key operators are highly efficient;
    • Whether long contexts add significant cache read costs.

    “25 tokens per second” should be viewed as an engineering goal to be verified, not a result naturally derived from VRAM size.

    6. Tier 3: What 10 Concurrent Users at 25 Tokens/sec Implies

    Arithmetically, 10 requests generating simultaneously, with each outputting 25 tokens per second, means the service needs to provide an aggregate throughput of at least 250 output tokens per second.

    However, an aggregate throughput of 250 does not prove everyone is reaching 25. Some requests may be very fast, while others are noticeably slowed down due to queuing, scheduling, or overly long contexts.

    Therefore, multi-user acceptance testing must simultaneously cover:

    1. The number of continuously active generating requests;
    2. System aggregate output throughput;
    3. Generation speed per request;
    4. TTFT and its distribution;
    5. Error rate, timeout rate, and VRAM peak usage.

    Continuous batching usually improves throughput but may create trade-offs between throughput and single-request latency. When request lengths vary greatly, you must also evaluate whether new requests joining, long input processing, and ongoing generating requests interfere with each other.

    Furthermore, “10 sequences residing simultaneously,” “10 connections established,” and “10 requests generating stably at the same time” are three different states and should not be conflated.

    Whether a second server is needed should be determined by stress test results. If a single node already meets performance metrics, adding nodes may primarily be for high availability. If single-node throughput is insufficient, you need to further evaluate scaling methods and cross-node communication costs.

    7. Deployment Implementation: From Compatibility Verification to Stable Launch

    It is recommended to proceed in the following order to avoid buying hardware first and then discovering software incompatibilities.

    Step 1: Fix the Model and Business Boundaries

    Confirm the weight version, usage license, numerical format, target context length, and task quality requirements. The business side should simultaneously clarify daily request volume, peak concurrency, typical input/output lengths, and whether queuing is allowed.

    Step 2: Build a Compatibility Checklist

    Item-by-item verification of driver, device runtime environment, inference engine, model architecture, and low-precision operator compatibility. Specifically check whether expert routing, parallel sharding, and cache management are actually supported.

    Step 3: Complete Minimum Functional Validation

    First verify whether the model can be fully loaded, whether short inputs output normally, whether results are abnormal, and whether VRAM distribution meets expectations. Do not rush to pursue maximum throughput at this stage.

    Step 4: Incremental Stress Testing

    Start with single-request short contexts, and gradually increase input length, output length, and concurrency. Record speed, latency, VRAM, and communication metrics. Tests should run long enough to observe issues like thermal throttling, frequency drops, and memory fragmentation.

    Step 5: Complete Service Governance

    Before official use, the system should have identity authentication, rate limiting, timeout cancellation, log desensitization, monitoring alerts, and failover mechanisms. For long requests, reasonable context and output limits should be set to prevent a few requests from exhausting resources.

    8. Cost Estimation: Do Not Treat Hardware Prices as the Entire Budget

    1. Local Procurement Costs

    One-time investments typically include:

    Accelerator Devices + Server Host + Host Memory + Local Storage + High-Speed Interconnects + Rack Peripherals.

    Here, the host must be able to handle model loading and potential offloading strategies. Storage must not only hold the weights but also account for version backups, logs, and update space.

    Continuous costs include power, cooling, datacenter space, maintenance, personnel, and spare parts. For multi-GPU, high-power consumption devices, power supply and cooling conditions may directly determine whether the project can be implemented.

    Without specific quotes, procurement regions, and configuration lists, it is not advisable to provide seemingly precise total prices.

    2. Rental Costs

    Rental costs can be preliminarily estimated using the following formula:

    Compute Cost = Number of Devices × Hourly Price per Device × Billed Hours.

    For example, purely as a budget demonstration: assume a solution requires 8 devices, with a hypothetical unit price of 5 budget units per device per hour, running 24/7 for 30 days:

    8 × 5 × 24 × 30 = 28,800 budget units.

    This example is not a market quote, nor does it mean 8 devices can definitely host the aforementioned model. Actual billing may also include storage, network, system disk, and other resource fees. Whole-machine billing may not scale linearly with single-GPU prices.

    3. Measure Economics by Effective Business Output

    If the system is only used for a few hours a day, the unit output cost of occupying the entire set of devices long-term may be very high. Conversely, if it runs at high load year-round, local procurement may have different economics.

    It is recommended to compare:

    • Annual Total Cost of Ownership (TCO);
    • Effective utilization rate when meeting service metrics;
    • Comprehensive cost per million output tokens;
    • Business losses caused by fault redundancy and downtime;
    • The ability to reuse devices after model upgrades.

    Do not calculate unit costs using the theoretical peak throughput of the hardware. Use the actual throughput when meeting latency, quality, and stability requirements.

    9. Conclusion: Verify, Then Purchase, Then Scale

    Deploying trillion-parameter models is not a simple VRAM patchwork problem, but a systems engineering challenge jointly driven by weight capacity, numerical formats, compute efficiency, communication topologies, cache management, and service scheduling.

    The three tiers can be summarized as:

    • Just Run It: Focus on verifying capacity, compatibility, and offloading feasibility, allowing latency sacrifices.
    • Single-User 25 Tokens/sec: Focus on verifying single-request generation speed and TTFT, not just looking at hardware compute power.
    • 10 Concurrent Users at 25 Tokens/sec: In addition to the aggregate target of 250 output tokens/sec, per-request speed and tail latency must be checked.

    The safest investment path is to first clarify business metrics, then conduct short-term resource verification, and only after obtaining real capacity and performance data, decide whether to purchase, rent, scale out, or adopt a smaller model. For most teams, selecting a solution that “can stably complete the task with controllable total cost” is usually more valuable than purely pursuing the maximum parameter scale.