How Chinese LLMs Achieve High Efficiency and Low Cost: A Technical Breakdown

    This article breaks down the technical路线 behind the high-efficiency, low-cost approach common among Chinese large language models. It covers the Mixture-of-Experts (MoE) architecture and sparse activation, full-chain training and inference optimizations such as KV cache management, continuous batching, quantization, and speculative decoding, and the role of cloud resource scheduling and observability. It also provides a multi-dimensional framework for evaluating whether a model is worth adopting, along with common pitfalls to avoid.

    1. Introduction: Why Cost-Effectiveness Became a Key Dimension of LLM Competition

    Over the past two years, the focus of large language model competition has shifted noticeably: from simply comparing parameter counts and benchmark scores to comprehensive optimization that balances quality, latency, and cost at the same time. For developers and enterprise users, what really drives adoption decisions is often not the “strongest model,” but the model with the lowest cost per token, the highest throughput, and the best operability within an acceptable range of quality loss.

    Chinese LLMs have generally taken a “high efficiency + low cost” route in this round of competition. Behind this is not a single trick, but the combined effect of architecture design, training strategy, inference engineering, and cloud resource scheduling. Setting aside specific product attributes, this article dissects this route from a general technical perspective and offers reusable evaluation and practical methods.

    2. Technical Foundation: Mixture of Experts and Sparse Activation

    2.1 The Basic Idea of Mixture of Experts (MoE)

    The Mixture of Experts architecture splits the feed-forward layers into multiple “expert” subnetworks, and a routing (gating) network selects a small number of experts to participate in computation for each token. Its core value lies in decoupling “total parameter count” from “per-token computation”: the total parameters can be very large to increase knowledge capacity, but each forward pass activates only a small portion, thereby controlling inference compute overhead.

    A common way to describe this in the industry is “total parameters / activated parameters per token.” For example, a certain class of models has around hundreds of billions of total parameters, while a single token activates only on the order of tens of billions, with the activation ratio typically falling in the range of a few percent to a dozen or so percent. This sparsification is an important source of low cost, but it also brings engineering problems such as load balancing, routing jitter, and memory bandwidth pressure.

    2.2 The Cost of Sparse Activation and Engineering Countermeasures

    Sparse does not mean free. Common challenges include:

    • Load imbalance: a few popular experts are over-selected, causing some devices to queue up;
    • Routing instability: gating collapse in early training, with polarized expert utilization;
    • Memory and bandwidth: the total parameters still need to be resident, making memory access the bottleneck.

    Engineering practice typically introduces load-balancing auxiliary loss, expert capacity limits and dropping strategies, hybrid partitioning of expert parallelism (EP) and tensor parallelism (TP), and grouped routing. An illustrative configuration is shown below (it only expresses the idea and is not specific product parameters):

    1. # Pseudocode: general structure of an MoE forward pass
    2. logits = router(hidden_states) # gating scores
    3. weights, expert_ids = topk_softmax(logits, k=2)
    4. out = zeros_like(hidden_states)
    5. for e in selected_experts(expert_ids):
    6. out += dispatch(hidden_states, e) * weights_for(e)
    7. out = combine(out, capacity_limit=C) # capacity limit and overflow handling

    2.3 Trade-offs Between Dense and Sparse

    Dense models are simple to implement and offer strong predictability for inference, making them suitable for latency-sensitive scenarios with low concurrency. Sparse MoE can generally provide greater knowledge capacity under the same inference budget, but requires more mature parallelism and scheduling capabilities. Selection should combine concurrency scale, context length, and operational capability, rather than looking only at parameter count.

    3. Where Low Cost Comes From: Full-Chain Optimization of Training and Inference

    Low cost does not come from architecture alone, but from the multiplicative effect of full-chain engineering efficiency.

    3.1 Training Side

    • Mixed precision and numerical stability: low-precision computation combined with high-precision accumulation on critical paths, balancing throughput and convergence;
    • Parallel strategy combinations: data parallelism, tensor parallelism, pipeline parallelism, and expert parallelism orchestrated by topology to reduce the proportion of communication;
    • Communication compression and overlap: gradient compression and compute-communication overlap to reduce synchronization waiting;
    • Data quality and mixing ratios: high-quality corpora and reasonable mixing ratios are often more effective than blindly piling up volume;
    • Fault tolerance and elasticity: node failures are the norm in long-cycle training, requiring automatic detection, isolation, and resumption.

    3.2 Inference Side

    • KV cache management: paged caching and prefix reuse significantly reduce redundant computation;
    • Continuous batching: dynamically batching different requests to improve device utilization;
    • Quantization and distillation: weight quantization, activation quantization, and small-model distillation to trade for throughput within an acceptable quality range;
    • Speculative decoding: small-model drafting + large-model verification to reduce the average number of decoding steps;
    • Structured output constraints: constrained decoding for JSON, function calls, etc., to reduce invalid retries.

    Illustrative pseudocode (continuous batching scheduling idea):

    1. while serving:
    2. batch = scheduler.form_batch(waiting, max_tokens=BUDGET)
    3. logits = model.forward(batch, kv_cache=cache)
    4. for req in batch.finished_if_eos(logits):
    5. cache.release(req.id)
    6. respond(req)

    3.3 Cloud Resources and Observability

    Enterprise adoption typically relies on general cloud capabilities: container platforms host elastic inference replicas, object storage holds models and datasets, message queues smooth out request peaks, and logging services and monitoring alerts track latency, error rates, and token consumption. Baidu AI Cloud can provide standardized component support for these general capabilities, helping teams focus their energy on model quality and business logic.

    4. Capability Evaluation: How to Judge Whether a Model Is “Worth It”

    Leaderboards can only serve as an initial filter. It is recommended to build a multi-dimensional evaluation matrix:

    1. Quality dimension: accuracy per business scenario, structured output compliance rate, long-context recall;
    2. Efficiency dimension: first-token latency, output tokens per second per user, cost per token;
    3. Stability dimension: latency long tail under high concurrency, rate limiting and degradation strategies;
    4. Engineering dimension: fine-tuning support, on-premise feasibility, observability, and permission auditing;
    5. Compliance dimension: content safety, data residency, and desensitization capabilities.

    An actionable evaluation script skeleton:

    1. def evaluate(model, cases):
    2. total_cost, total_latency, passed = 0, 0, 0
    3. for c in cases:
    4. r = model.call(c.prompt, max_tokens=c.max_tokens)
    5. total_cost += r.usage.total_tokens * PRICE_PER_TOKEN
    6. total_latency += r.latency_ms
    7. passed += int(check(c.expected, r.text))
    8. return {"pass_rate": passed/len(cases),
    9. "avg_latency": total_latency/len(cases),
    10. "cost": total_cost}

    5. Common Pitfalls

    • Looking only at parameter scale: activation ratio, context length, and batching strategy have a greater impact on cost;
    • Understanding “cheap” as “low quality”: the goal of engineering optimization is to reduce cost under quality constraints;
    • Ignoring long-tail latency: a good average but P99 jitter will ruin the user experience;
    • One-off stress testing: online traffic patterns change quickly, requiring continuous regression evaluation.

    6. Conclusion

    High efficiency and low cost are the systematic result of architecture innovation, training engineering, and inference scheduling working together. For developers, the right path is to first clarify the business quality baseline, then combine sparse architectures, inference optimization, and cloud elasticity to build the most cost-effective solution, and establish a continuous evaluation mechanism to avoid being misled by a single metric.