Local Deployment of Ultra-Large MoE Models: Cost and Performance Evaluation

    Local deployment of an ultra-large Mixture-of-Experts (MoE) model is less about whether it can run and more about the constraints, total cost of ownership, and whether performance is sustainable. This article uses a representative 377GB-weight configuration with 4-bit mixed quantization to explain how to interpret prefill/decode numbers, break down one-time and recurring costs, convert throughput into cost per million tokens, and outline hardware selection, POC steps, and local-vs-cloud trade-offs. It also stresses that expert-selection constraints, real request distribution, memory bandwidth, and load testing should drive the final decision.

    Local deployment of an ultra-large-scale MoE model is not primarily a question of whether it can run. The harder questions are: under what constraints will it run, what is the total cost of ownership, and is the performance sustainable? The following discussion treats this as a generic engineering problem: what does it cost to deploy a local MoE model with hundreds of gigabytes of weights?

    Understanding the reference performance numbers

    A representative publicly documented configuration includes a dual-socket server-grade CPU, a single consumer-grade GPU, 4-bit mixed quantization, and roughly 377GB of model weights. In that setup, prefill is around 200+ tokens/s and decode is around 14 tokens/s, with an expert-selection policy constraint.

    • Prefill affects first-token latency. It is influenced by input length, attention computation, and expert routing.
    • Decode affects sustained generation speed. It is more sensitive to memory bandwidth, expert weight loading, and KV Cache growth.
    • A decode rate of about 14 tokens/s is usually measured under specific load, concurrency, and expert-selection conditions. It may be a single-stream or limited-concurrency result, not a general production throughput guarantee.
    • “Expert-selection policy constraint” means hot experts are cached, routing scope is limited, or expert residency is optimized to reduce data movement. When request distribution changes, concurrency increases, or context becomes longer, effective throughput can drop significantly.

    A 377GB weight set is only the memory floor. Real planning must also account for KV Cache, runtime buffers, operating system overhead, and monitoring components. For a model with hundreds of gigabytes of weights, memory capacity should be at least 1.2 to 1.5 times the weight size. 512GB is tight; 1TB is safer.

    Cost structure: one-time and recurring

    Local deployment costs fall into three categories: one-time hardware, software adaptation, and ongoing operations.

    Using generic market prices as a rough budget baseline, in CNY:

    • Dual-socket server platform, motherboard, memory, power supply, and chassis: 50,000–120,000
    • Single high-end consumer GPU: 15,000–50,000
    • 512GB to 1TB server memory: 20,000–60,000
    • 4TB to 8TB local SSD: 5,000–20,000
    • Power, cooling, and chassis accessories: 5,000–20,000
    • Whole-machine initial hardware: 80,000–200,000
    • Enterprise-grade redundant power, spares, rack, UPS, and facility upgrades: 200,000–500,000

    Prices vary by market and time, so these ranges should be treated as order-of-magnitude budget references, not quotes.

    Recurring costs include electricity, colocation, maintenance, and optimization. Whole-system power consumption may be 500W to 1200W or higher. Running 24/7 at CNY 0.6–1.0 per kWh puts monthly electricity at hundreds to over a thousand CNY, and the real figure can be higher after cooling and power-supply losses. Maintenance labor, spare parts, system upgrades, monitoring, alerting, and fault handling are also long-term costs.

    Software adaptation is often underestimated. Quantization conversion, expert-residency strategy, service encapsulation, load testing, logging and monitoring, permission control, and data security management all require engineering effort.

    From decode throughput to cost per million tokens

    Cost accounting should not stop at hardware price. A decode rate of 14 tokens/s means about 50,400 tokens per hour. If the effective hourly cost of the whole system is around CNY 20–30, the per-million-token cost is roughly CNY 397–595. At 50% average utilization, the cost doubles. Prefill at 200+ tokens/s mainly improves first-token latency for long inputs; it does not directly determine sustained generation cost.

    A simple calculation can be expressed as follows:

    1. def cost_per_million(hardware_cost, years, power_cost, ops_cost,
    2. decode_tps, utilization):
    3. depreciation_hours = years * 365 * 24
    4. hourly = hardware_cost / depreciation_hours + power_cost + ops_cost
    5. effective_tokens_per_hour = decode_tps * 3600 * utilization
    6. return hourly / effective_tokens_per_hour * 1_000_000
    7. print(cost_per_million(200000, 3, 1.0, 5.0, 14, 0.5))

    Actual accounting should use effective throughput measured under load, not peak single-stream decode. Increasing concurrency can raise total throughput, but P95 latency, queueing, and KV Cache memory usage also increase. Throughput numbers that depend on an expert-selection policy must be validated with a real request distribution.

    Key selection decisions

    1. Memory capacity and bandwidth are first-class constraints. With hundreds of GB of weights, decode is often memory-bandwidth bound.
    2. GPU VRAM should be planned for hot experts, attention, and KV Cache, not simply by checking how many layers fit.
    3. Quantization format is a trade-off among capacity, speed, and model quality. 4-bit mixed quantization lowers the barrier, but quality regression testing is still required.
    4. Expert routing and caching strategy are central to MoE inference optimization. Hot expert residency reduces weight movement, but the strategy may limit generality.
    5. In a dual-socket CPU environment, pay attention to NUMA core binding and memory locality. Cross-node access can slow decode.
    6. Model loading depends on fast local storage. Use local SSD and leave enough free space.
    7. Power, cooling, and rack weight should be planned early. High-power systems need redundancy and temperature monitoring.

    Suggested POC process

    • Define the SLA first: concurrency, context length, output length, P95 latency, availability, and data security requirements.
    • Run baseline tests: single-request prefill/decode, peak memory, GPU VRAM usage, and model loading time.
    • Run concurrency tests with at least 1, 4, 8, and 16 concurrent requests. Record total throughput, P95 latency, and error rate.
    • Validate the expert-selection strategy with a realistic request distribution.
    • Perform cost accounting and then small-scale rollout.
    • Acceptance metrics should include cost per million tokens, peak memory, long-term stability, recovery time after failure, and monitoring coverage.

    Local vs. cloud comparison

    Cloud on-demand resources are suitable for short POCs and fluctuating workloads because they avoid hardware depreciation. However, large-memory instances may be scarce and relatively expensive. Local deployment is attractive for long-running stable workloads, data residency requirements, and deep customization.

    A simple crossover rule is: monthly running hours roughly equal local monthly total cost divided by the cloud hourly price for equivalent capacity. For example, if a local system costs CNY 200,000 and is depreciated over three years, plus power and operations, the monthly cost may be about CNY 6,000–8,000. If the equivalent cloud instance costs CNY 20 per hour, the crossover point is about 300–400 hours per month.

    For 24/7 operation with sensitive data, local deployment may be more economical. For initial validation, cloud on-demand resources, containers, object storage, and monitoring/alerting capabilities are useful for a short POC. If Baidu AI Cloud is used, its container platform, object storage, and monitoring/alerting capabilities can serve as a cloud-side reference, but the final choice should be based on actual load testing and billing rules.

    Risks and conclusion

    The public reference performance data includes expert-selection constraints and should not be treated as a production throughput commitment. Hardware prices, electricity conditions, and model versions all affect the final cost.

    Recommended budget bands are:

    • Validation POC: CNY 80,000–150,000
    • Small-scale production: CNY 200,000–500,000
    • High-availability, redundant, fully equipped production environment: above CNY 500,000

    A safer path is “rent first, buy later”: run a POC before scaling, use real request load tests to derive cost per million tokens, and only then decide whether local deployment is worthwhile.