Putting Chinese Open-Source LLMs to Work: Model Selection, Deployment, Governance, and Cost

    A practical guide for developers and architects on running Chinese open-weight large language models. It covers capability changes, model selection, GPU memory estimation, deployment with vLLM, an evaluation script, data governance, cost estimation, and open-source risks, with runnable examples.

    Chinese open-source large language models have advanced quickly over the past two years. Several teams have publicly released complete model weights, so developers can run inference and fine-tuning on their own hardware. Open models are no longer just low-cost alternatives to closed APIs. In some scenarios, they can support formal business workloads. This article is written for developers and architects. It covers capability changes, model selection, deployment, data governance, and cost, and includes examples you can run directly.

    1. What Problems Do Open Weights Solve for Enterprises?

    “Open weights” means that all of a model’s parameters can be downloaded. Enterprises can run the model on their own servers and gain three main benefits.

    First, data stays within the local environment. Industries such as finance, healthcare, and government have strict data compliance requirements, and this is often the primary factor in choosing a technical approach.

    Second, call costs are determined by hardware and operations. Pay-per-token APIs can be hard to forecast under high concurrency or long-context workloads. Private deployment, by contrast, can be costed by hardware runtime.

    Third, the model can be fine-tuned and audited. Teams can track how behavior changes across model versions and rely less on the interface changes of a single provider.

    Open source does not mean free commercial use. License terms for commercial use, redistribution, and user-scale limits vary widely between models. Check each clause before launch.

    2. How Open Models Have Changed Over the Past Two Years

    The following model families are commonly used by developers in China. For specific versions, refer to the official model cards.

    The Qwen2.5 series, released by Alibaba Cloud’s Tongyi Qianwen team, ranges from 0.5B to 72B parameters. Most versions support a 128K context window. To go beyond the default length, you need to configure YaRN extension.

    DeepSeek-V3 uses a Mixture-of-Experts (MoE) architecture with 671B total parameters. Each inference activates about 37B parameters, and its context length is 128K.

    The GLM-4 series is released by Zhipu. InternLM2.5 is released by the Shanghai Artificial Intelligence Laboratory. Both also have open-source versions available.

    Capabilities have changed in four main ways.

    Instruction following is more stable. The rate of output format errors under complex constraints has dropped compared with earlier generations, and structured output such as JSON is easier for programs to parse directly.

    Long context lets an entire contract or code repository fit into a single inference. However, as input grows, retrieval accuracy for content in the middle of the context usually falls. Test with your own long documents.

    Tool calling and multi-step planning have improved, but the models are still far from completing complex tasks without supervision. For any step involving external actions, keep a human confirmation step.

    On public benchmarks for math and code reasoning, some scores are approaching those of leading closed models. This article does not cite specific leaderboard scores, because each vendor uses different evaluation versions and settings, so direct comparisons can be misleading. Leaderboard scores should serve only as an initial screen.

    3. How Should Enterprises Select, Deploy, Govern, and Control Costs?

    (1) How to Choose a Model

    Start by defining requirements for each business task. Then set the minimum acceptable accuracy, and test models from smallest to largest. The common size categories are below.

    Models with 7B to 14B parameters can run on a single consumer-grade or data-center GPU. They suit tasks with clear boundaries, such as classification, information extraction, and standard customer service Q&A, and they have the lowest cost.

    Models with 32B to 72B parameters suit complex reasoning and long-document summarization. They usually need multiple GPUs or quantization to run.

    MoE models with 10 billion or more parameters are very capable, but they require a large amount of GPU memory. They suit teams with existing clusters or teams willing to invest in higher-end hardware.

    When selecting a model, also compare licenses, community activity, and release frequency. Frequent updates can bring capability gains, but they also mean more frequent regression testing.

    (2) How Much GPU Memory Does Private Deployment Need?

    Estimate weight memory with this formula:

    Weight memory (GB) ≈ parameter count (in billions) × bytes per parameter

    FP16 uses 2 bytes per parameter, INT8 uses 1 byte, and INT4 uses about 0.5 bytes.

    For example, a 7B model loaded in FP16 needs about 14 GB, and the same model in INT4 needs about 3.5 GB.

    Actual deployment also needs memory for the KV cache and runtime overhead. Reserve 20% to 30% headroom. Higher concurrency and longer context increase KV cache usage, which can sometimes exceed the size of the weights themselves.

    For MoE models, memory is calculated from total parameters because all experts must be loaded. Each computation uses only the active parameters, so estimate throughput separately.

    Inference services can use frameworks such as vLLM. After startup, vLLM provides an OpenAI-compatible API, so existing applications usually only need their endpoint address changed to connect. An example startup command:

    1. vllm serve Qwen/Qwen2.5-7B-Instruct --port 8000

    (3) How to Evaluate Model Quality

    Do not rely only on leaderboards. Evaluate models with your own business samples. The script below shows how to calculate accuracy and format compliance rate. Before running it, start the vLLM service above and install the dependency with pip install openai.

    ```python
    import json
    from openai import OpenAI

    client = OpenAI(base_url=”http://localhost:8000/v1“, api_key=”EMPTY”)
    MODEL = “Qwen/Qwen2.5-7B-Instruct”

    def generate(prompt):
    resp = client.chat.completions.create(
    model=MODEL,
    messages=[{“role”: “user”, “