Open-Source LLM Private Deployment: Model Selection and Concurrency Capacity Planning

    This article presents a practical framework for selecting and deploying open-source large language models in a private environment. It explains how to match model parameter sizes to your business stage, estimate VRAM and memory budgets, plan for concurrency and throughput, ensure inference service stability, and prepare a scaling path. Readers will come away with a step-by-step approach, including a model-compute-concurrency reference table, for keeping infrastructure costs controlled while reliably supporting real workloads.

    1. From “Can It Run?” to “Does It Run Well?”: Reframing the Deployment Problem

    In the past, enterprises evaluated LLMs by asking whether the model was usable and whether inference succeeded. As multimodal capabilities have matured across tasks like text understanding, image analysis, and cross-modal retrieval, the industry’s focus has shifted from “can we get a demo running” to “can it reliably support real business.” AI infrastructure in industries such as finance, government, energy, and education is increasingly subject to technology-localization requirements, where combinations of domestically produced chips, compute platforms, and operating systems become prerequisites for many projects to get off the ground.

    At the same time, open-source LLMs have dramatically lowered the deployment barrier. Enterprises no longer need to train from scratch. Instead, they perform private deployment based on mature open-source weights: first using quantization to quickly bring a business use case online for validation, then applying lightweight fine-tuning (such as parameter-efficient fine-tuning) with their own data. As a result, the real decision is no longer “should we deploy,” but “what model specification to deploy, how much compute is needed, whether the localization approach can truly be implemented, and how to avoid concurrency and scaling bottlenecks as the business grows.”

    2. First Step in Selection: Matching Parameter Scale to Business Stage

    Open-source models typically offer multiple parameter sizes, ranging from the billions to tens of billions and beyond. Different sizes are not simply “bigger is better”; each corresponds to a different budget and business stage:

    • Billions (lightweight): Suitable for single-machine, single-card, or low-compute scenarios such as knowledge base Q&A, document classification, structured extraction, and edge-side inference. Low latency and low cost make them ideal for fast validation.
    • Tens of billions (mid-range): A relatively balanced trade-off between effectiveness and cost. Suitable for general-purpose scenarios that require some level of understanding, such as multimodal customer service, complex document understanding, OCR enhancement, and content moderation. This is currently the mainstream range for enterprise adoption.
    • Above tens of billions (heavyweight): Targeted at scenarios with extremely high effectiveness requirements that can afford greater compute. These usually require tensor parallelism across multiple cards or even multiple machines, and the per-request cost rises significantly.

    The key principle is to choose the size based on current business complexity rather than buying a high-spec compute cluster all at once. In most cases, a reasonably configured domestic inference server is enough to validate basic capabilities; save heavy-capital investment for after the demand has been proven.

    3. Four Variables That Truly Determine Go-Live Performance

    Getting a model to run is only the starting point. The actual experience is often shaped by the following four engineering variables.

    3.1 VRAM and Memory Budget

    Insufficient VRAM is the most common cause of deployment failure. A rough estimate is: weight VRAM ≈ number of parameters × bytes per parameter (FP16 is about 2 bytes, INT8 about 1 byte, INT4 about 0.5 bytes), plus the KV cache, activations, and temporary buffers. The KV cache grows with sequence length and concurrency batch size, and long-context scenarios are especially VRAM-hungry.

    1. def estimate_vram(params_billion, precision="fp16",
    2. seq_len=2048, batch=8,
    3. layers=32, kv_heads=8, head_dim=128):
    4. bytes_per_param = {"fp16": 2, "int8": 1, "int4": 0.5}[precision]
    5. weights_gb = params_billion * 1e9 * bytes_per_param / (1024 ** 3)
    6. # KV cache: one copy each for K and V, grows with layers, sequence length, and concurrency batch
    7. kv_gb = 2 * layers * seq_len * batch * kv_heads * head_dim * bytes_per_param / (1024 ** 3)
    8. overhead_gb = weights_gb * 0.1 # rough estimate for activations and temporary buffers
    9. return round(weights_gb, 1), round(kv_gb, 1), round(weights_gb + kv_gb + overhead_gb, 1)

    You can use it to first determine “whether a single card can fit the model, and how many concurrent requests it can handle,” avoiding a failed go-live caused by VRAM overflow.

    3.2 Concurrency and Throughput Planning

    Concurrency depends on the batching strategy and decoding speed. Common metrics include time to first token (TTFT), time per output token (TPOT), and overall throughput (tokens/s). General techniques such as dynamic batching, continuous batching, and paged KV cache management can significantly improve compute utilization. When planning, combine the business peak QPS with the average input and output length to work backward to the required concurrency batch size and number of instances.

    3.3 Inference Service Stability

    Pay attention to whether the service supports request queuing, timeout retries, health checks, and graceful degradation. When long and short requests run together, isolate them through grouping or separate instances so that long-context requests do not drag down overall latency.

    3.4 Future Scaling

    Scaling must have a reserved path: prioritize horizontal scaling (adding instances and nodes) rather than blindly stacking cards vertically. At the same time, confirm that the inference service can be uniformly scheduled by a container orchestration platform and supports elastic scaling. Use monitoring/alerting and logging services to continuously observe key metrics such as VRAM, latency, and throughput, providing a data basis for scaling decisions.

    4. Building a “Model–Compute–Concurrency” Reference Table

    Distill the variables above into a single reference table, and the team can make quick decisions during selection. At a minimum, record: model specification and quantization precision, per-instance VRAM usage, the number of concurrent requests a single instance can support, throughput at the target latency, and the horizontal scaling method after expansion. Taking Baidu AI Cloud’s related practices as an example, model services are typically run on a container platform, with monitoring/alerting tracking VRAM and latency, logging services accumulating call data, and object storage managing model weights and datasets, thereby forming an observable, elastically scalable deployment loop.

    5. Implementation Recommendations

    • Start small, then scale up: Validate business value with lightweight specifications, then gradually upgrade the specification and compute.
    • Quantize first, then fine-tune: Bring the service online quickly with a quantized model, and use parameter-efficient fine-tuning to fit your business data.
    • Estimate first, then procure: Replace gut-feel procurement with VRAM and concurrency estimation to avoid both resource waste and shortages.
    • Observe first, then scale: Drive scaling with monitoring data rather than waiting for a failure to occur.

    Conclusion: Assessing whether an open-source LLM is suitable for deployment is essentially an engineering problem rather than a selection problem. Only by chaining together parameter scale, VRAM budget, concurrency planning, and the scaling path can you let LLMs reliably support real business while keeping costs under control.