Chinese Open-Source LLMs: How to Choose, Fine-Tune, and Deploy
This article explains how to evaluate and deploy open-source large language models from China. It covers ecosystem maturity, model architecture and licensing considerations, four selection dimensions, full-parameter versus parameter-efficient fine-tuning, GPU memory boundaries, quantization, and speculative sampling.
The ecosystem for Chinese open-source LLMs has moved from quantity expansion to quality improvement. Public industry statistics indicate that related downloads have reached the ten-billion level, but definitions vary widely—for example, whether mirror sites, repeat downloads, and supporting toolchains are included. When citing such figures, note the source and the time of the statistics.
1. Why the Ecosystem Can Run
1.1 Model Architecture
Most current mainstream models are improved Transformer architectures. Common approaches include sparse attention and mixture-of-experts (MoE). An MoE model activates only a subset of experts for each token, so as the total number of parameters increases, the computation per token can remain relatively stable. However, communication overhead from expert routing, memory footprint, and load imbalance do not disappear. Actual inference cost depends on the number of activated experts and the deployment method.
Long-context capability is also an important metric. Newer models extend the context window by improving rotary position embeddings (RoPE) and similar methods, making long-document analysis and codebase understanding more feasible. However, a nominal context length does not equal effective utilization. Test with your own long documents and observe the model’s accuracy on long-distance information.
1.2 Open-Source Licenses
Early many Chinese models used permissive licenses such as Apache 2.0 or MIT. As the ecosystem matures, more projects use custom licenses. Terms may include user-scale caps, prohibited use cases, and naming and redistribution requirements for derivative models.
| License type | Commercial use | Modification and redistribution | Terms to watch |
|---|---|---|---|
| Apache 2.0 | Allowed | Allowed | Retain copyright and NOTICE notices; include patent grant |
| MIT | Allowed | Allowed | Retain copyright and license notice |
| Custom license | Usually conditional | Mostly allowed, with restrictions | User-scale caps, usage policy, derivative model requirements |
| Copyleft (e.g., AGPL) | Allowed | Modified source must be released | May require source disclosure in network service scenarios |
Before commercial use, confirm the following checklist item by item:
- Whether commercial use has restrictions on user scale, revenue, or industry.
- Whether derivative models must be open-sourced under the same license.
- Whether responsibility for model outputs and usage policies are clearly defined.
- Whether there are requirements for using model names and trademarks.
2. Selection: Four Dimensions
- Task fit: First clarify whether the main task is code generation, general conversation, or domain question answering. The composition of pretraining data limits a model’s ceiling on certain tasks, so evaluate on your own task data rather than relying only on public leaderboards.
- Inference cost: Parameter count determines memory requirements. Quantized 7B to 14B models (INT8 or INT4) can run on consumer-grade GPUs, while 70B and larger models usually require multiple GPUs or cloud services.
- Community activity: Pay attention to issue response speed, the number of fine-tuning tutorials, and adaptation by third-party tools. GitHub stars are only a reference; recent code commits and issue-resolution records are more informative.
- License compliance: Review against the checklist in Section 1. If this item fails, the other three do not matter.
3. Fine-Tuning: Full-Parameter or Parameter-Efficient?
Full-parameter fine-tuning can maximize model performance in the target domain, but memory overhead is high. In mixed-precision training, each parameter’s training state (weights, gradients, Adam optimizer states) usually requires about 16 bytes. For a 7B model, training states alone require tens of GB of GPU memory.
Parameter-efficient fine-tuning (PEFT) methods such as LoRA and QLoRA freeze the original weights and train only low-rank matrices. The training output is usually an adapter file of a few hundred MB, which is convenient for version management and rollback. QLoRA further quantizes the base model to 4-bit to reduce memory usage.
Below are approximate memory boundaries for models of different sizes; actual results must be tested on your own configuration:
- 7B model: 4-bit weights take several GB. With gradient checkpointing, shorter sequences (1024 to 2048 tokens), and a small batch size, training usually fits on a 24GB GPU.
- 13B model: After controlling sequence length, a 24GB GPU can sometimes run it, but with little headroom.
- 70B model: 4-bit weights alone exceed 30GB, usually requiring 48GB or more of memory or multiple GPUs.
Practical advice: when data is limited and compute is constrained, QLoRA is a relatively safe starting point. On some instruction-following tasks, its results can approach full-parameter fine-tuning, but this depends on the task and data. If training data is small, or the task differs greatly from the pretraining distribution, the model may underfit. In that case, compare results item by item using a business validation set.
4. Inference Acceleration and Service Deployment
4.1 Quantization
After converting weights from FP16 to INT8, weight memory is about half. After INT4, it is about one quarter. Actual total memory also includes KV cache, activations, and framework overhead, so overall savings are usually less than the theoretical value. Algorithms such as AWQ and GPTQ can reduce accuracy loss during quantization. Speed gains depend on batch size, sequence length, kernel implementation, and hardware. Measure on your own workload; do not rely directly on a single number.
4.2 Speculative Sampling
A small draft model first generates a sequence of candidate tokens, and the large model then verifies them in one pass. Standard rejection sampling methods are used in this context.
