Technical Pathways of Chinese LLMs: Architecture, Data, and Alignment Practices
This article explores the technical evolution of Chinese large language models (LLMs), detailing key advancements in architecture, data optimization, and alignment practices. It covers the engineering logic behind Mixture of Experts (MoE) architectures, the complementary relationship between principle-based alignment and data-level optimization, and the integration of knowledge graphs for enhanced factual accuracy. Additionally, it provides actionable guidelines for model selection, evaluation, and enterprise deployment.
Technical Pathways of Chinese LLMs: Architecture, Data, and Alignment Practices
1. Background: From Following to Multi-Route Exploration
In the past two years, the development of Chinese large language models (LLMs) has gone through distinct phases. Early teams primarily focused on replicating open-source architectures and benchmarking against public standards. As compute utilization, training data quality, and inference costs became the focal points of competition, teams began to form differentiated pathways in architecture, data, and alignment methodologies.
For engineering teams and enterprise users, understanding these pathways is more valuable than memorizing model rankings. The capability boundaries, response latency, deployment costs, and compliance requirements of a model are all dictated by its underlying technical choices. This article does not recommend specific products but rather deconstructs common technical approaches in the industry to help readers make informed decisions for their own scenarios.
2. Two Pathways to Controllability
The controllability of an LLM refers to its ability to consistently produce outputs that align with expected values, factual boundaries, and format requirements. Currently, there are two main approaches in the industry, focusing on different stages.
2.1 Principle-Based Constraint Alignment
The core of this method is to write behavioral guidelines as explicit text principles, allowing the model to critique and correct its own outputs based on these principles, and then training the model using these corrected results. Its advantage is that the rules are readable and auditable; modifying the principles can directly adjust behavioral directions. The challenge lies in potential conflicts between principles and the model’s potentially unstable understanding of them, which requires supporting evaluation sets to validate effectiveness.
2.2 Data-Level Localization Optimization
Another approach starts with the training data. Teams refine the model’s expression in specific cultural and linguistic environments through data cleaning, domain-specific corpus supplementation, and localized context annotation, making it more natural and compliant with local norms and common sense. This pathway relies on a high-quality data governance process, including deduplication, toxicity filtering, fact-checking, and annotation consistency checks.
2.3 The Complementary Relationship of the Two Pathways
These two pathways are not mutually exclusive. Constraint-based alignment provides an interpretable behavioral framework, while data-level optimization determines what the model learns in specific contexts. In practical engineering, a common practice is to first improve baseline performance through data-level optimization, and then use preference data and principle constraints for fine-tuning. Preference annotation typically relies on manual ranking, while fact-checking at the data level can be assisted by structured knowledge sources. The costs and error modes of both approaches differ.
3. Architecture: The Engineering Logic of Mixture of Experts
Mixture of Experts (MoE) is currently one of the mainstream architectures for reducing inference costs. Its basic idea is to split the feedforward network into multiple expert subnetworks, and then use a gating network to select a few experts to participate in the computation for each input token.
3.1 The Value of Sparse Activation
Sparse activation allows the total parameter count of the model to be very large, while only a portion is used for each forward pass. The benefit is that under similar inference compute, the model can retain a larger knowledge capacity. The trade-off is that VRAM usage still grows with total parameters, and issues like communication and load imbalance between experts must be addressed.
3.2 Gating Network and Softmax Temperature
The gating network is typically a linear layer followed by a softmax. For the $i$-th token, the gating output is:
$p_i = \text{softmax}\left(\frac{W_g x_i}{T}\right)$
Where $T$ is the temperature coefficient. It is important to note that the temperature does not determine the number of activated experts. The number of activations is directly determined by the top-K operation; the temperature affects the shape of the probability distribution:
- When the temperature is high, the probabilities of each expert tend to be uniform, the weight differences between selected experts become smaller, and gradients are more evenly distributed across experts.
- When the temperature is low, the probability distribution becomes sharper, weights concentrate on a few experts, and routing becomes more deterministic, but it is prone to the problem of experts being overused.
- When the temperature approaches zero, the gating degrades into a hard routing taking the maximum value, which is non-differentiable and is usually not set this way during training.
The following code demonstrates a top-K gating layer with temperature, which can be used to understand its mechanism directly:
import torchimport torch.nn as nnimport torch.nn.functional as Fclass TopKGate(nn.Module):def __init__(self, d_model: int, num_experts: int, k: int = 2, temperature: float = 1.0):super().__init__()self.proj = nn.Linear(d_model, num_experts, bias=False)self.k = kself.temperature = temperaturedef forward(self, x: torch.Tensor):# x: [num_tokens, d_model]logits = self.proj(x)probs = F.softmax(logits / self.temperature, dim=-1)topk_probs, topk_idx = torch.topk(probs, self.k, dim=-1)# Renormalize the weights of selected experts so they sum to 1topk_probs = topk_probs / topk_probs.sum(dim=-1, keepdim=True)return topk_idx, topk_probsif __name__ == "__main__":gate = TopKGate(d_model=16, num_experts=8, k=2, temperature=1.0)tokens = torch.randn(4, 16)idx, weights = gate(tokens)print("Selected expert indices:\n", idx)print("Corresponding weights:\n", weights)
3.3 Three Key Engineering Issues
Load Balancing. If the gating consistently favors a few experts, these experts will be overloaded while the rest are undertrained. A common practice is to add an auxiliary balancing term to the total loss to encourage an even distribution of tokens received by each expert.
Communication Overhead. When experts are distributed across multiple accelerator cards, tokens need to be dispatched and collected between cards. The communication volume is related to the number of activated experts and batch size, requiring parallel strategies and batch scheduling to reduce latency.
VRAM Planning. Although each computation step only involves a subset of experts, all expert weights still need to reside in memory or be loaded in tiers. Before deployment, VRAM should be estimated based on total parameters, and peak usage should be evaluated in conjunction with inference batch size.
4. Knowledge Enhancement: Fusion of Knowledge Graphs and Language Models
Language models excel at generating fluent text, but factual knowledge is implicitly contained in parameters in a probabilistic form, making it difficult to trace and update. Knowledge graphs explicitly store knowledge in the form of entities and relationships. Combining the two can compensate for each other’s weaknesses.
4.1 Common Fusion Methods
- Retrieval Augmentation: Retrieve relevant entries from a knowledge base before generation and concatenate them into the prompt. It is simple to implement, and updating knowledge only requires maintaining the index.
- Entity-Constrained Decoding: During the generation phase, use the graph to limit candidate entities, reducing fabricated names, organizations, and numerical values.
- Training-Time Injection: Convert triplets into training samples, allowing the model to learn structured relationships during the pre-training or fine-tuning phase.
4.2 Boundaries of Fusion
The determinism of a knowledge graph comes from manual or semi-automated construction, which has limited coverage and timeliness issues. When fusing, it should be clear which questions are answered by the graph and which are generated by the model, and the source of the basis should be annotated in the output for easy auditing.
5. Selection and Evaluation: Dimensions to Consider
When choosing a technical pathway, it is recommended to compare item by item from the following dimensions rather than just looking at a single comprehensive score.
| Dimension | Questions to Investigate | Common Metrics |
|---|---|---|
| Capability | Accuracy and stability on target tasks | Task-level eval set scores, manual spot-check pass rate |
| Cost | Compute and VRAM overhead per inference | Cost per 1,000 tokens, peak VRAM |
| Latency | Time to first token and throughput | TTFT, output tokens per second |
| Controllability | Constraint effects on format, boundaries, and values | Violation rate, refusal accuracy rate |
| Traceability | Whether factual outputs can provide evidence | Citation coverage rate, source correctness rate |
| Compliance | Whether data sources, logs, and privacy handling meet requirements | Audit item pass status |
6. Implementation Practice Recommendations
First, break down requirements. Classify business needs into types such as factual QA, content generation, structured extraction, and multi-turn interaction. Different types have varying sensitivities to accuracy, latency, and cost, and should have separate acceptance criteria.
Second, build proprietary evaluation sets. Public benchmarks only indicate general capabilities. Teams should extract samples from real business scenarios, covering normal, edge, and adversarial use cases, and update them regularly.
Third, start with small-scale pilots. Compare the effectiveness and cost of different solutions on the same evaluation set and record the types of failed samples. If failures concentrate on factual issues, prioritize retrieval augmentation; if on format or tone issues, prioritize prompt design and fine-tuning.
Fourth, establish security and compliance mechanisms. Filter sensitive content in inputs and outputs, retain necessary audit logs, and desensitize personal information in logs. For cross-border data or regulated industries, compliance assessments should be completed before going live.
Fifth, continuous monitoring. Track violation rates, user feedback, and cost changes post-launch. Model versions, prompt templates, and knowledge bases will change, and the evaluation set should be re-run after each change.
7. Summary
The technical exploration of Chinese LLMs has shifted from single-track catching up to parallel multi-route development. The Mixture of Experts architecture resolves the contradiction between parameter scale and inference cost, but requires engineering trade-offs in load balancing, communication, and VRAM. The temperature coefficient affects the shape of the gating weight distribution rather than the number of activated experts. Data-level optimization and principle-based constraint alignment are complementary, while knowledge graphs provide a traceable basis for factual outputs. For enterprises, model selection should be based on proprietary evaluation sets and business metrics, making clear trade-offs among capability, cost, latency, and compliance.
