Six Engineering Capabilities You Must Cover Before Putting an LLM into Production

    This article explains why getting a large language model to run is only the starting point, and walks through six engineering capabilities that determine whether the service is actually production-ready: concurrency capacity, mixed short-and-long request scheduling, API authentication and quotas, logging and audit trails, monitoring and alerting, and restart and version rollback. It also covers why long-context cost comes from the KV cache rather than weights, how to select accelerators based on a workload profile, why max active sequences is not the same as online user count, which metrics to use for acceptance testing, and how tiered routing by task keeps the platform predictable under concurrency, failures, and version changes.

    1. Starting the Model Is Only the Beginning; Staying Reliably Available Is the Goal

    When companies evaluate LLM deployment options, the first questions are usually about hardware: how many accelerator cards are needed, how to choose between different tiers, whether million-token context can be enabled immediately, and whether low-bit quantization can be validated first. These questions matter, but they only answer “can it run at all.”

    In technical terms, “running” means very little: the driver and runtime work, the inference framework loads the weights successfully, and the basic inference endpoint returns results. It proves the pipeline is connected, not that the service is reliable. Once real production traffic arrives, user experience and operating cost are decided by a different set of questions: will concurrent access trigger a queue avalanche, will long and short requests slow each other down, are API permissions manageable, can call behavior be audited, will metric anomalies trigger timely alerts, and is there a defined path for upgrades and rollbacks.

    Capability maturity can be roughly divided into three layers: “runnable,” “concurrency-capable,” and “operable.” Most pilot projects declare success at the first layer and only expose the gaps when real traffic is connected. The pre-launch checklist should therefore focus on the second and third layers, covering at least six areas: concurrency capacity, mixed short-and-long request scheduling, API authentication and quotas, logging and audit, monitoring and alerting, and restart and version rollback. Missing any one of them means the service is still, in essence, a test environment.

    2. The Real Cost of Long Context Is the Cache, Not the Weights

    Long-context capability is often misunderstood as “every request can simply max out the window.” In fact, model weights are a fixed allocation, while the context cache (KV Cache) grows linearly with input length, output length, and concurrency. A single very long request can consume a large amount of GPU memory; when several long requests arrive together, the scheduler can only queue them, which shows up as a spike in time to first token and a drop in throughput, and in extreme cases triggers an out-of-memory failure.

    A more robust approach is tiered provisioning, routing requests of different lengths to different resource pools:

    1. Request length range Scheduling policy
    2. 0 — 32K Shared pool, elastic concurrency
    3. 32K — 128K Quota pool, limits per-tenant usage
    4. 128K — 512K Long-context pool, lower concurrency cap
    5. Near 1M Dedicated low-concurrency queue, separately rate-limited

    Once requests are tiered, capacity planning becomes meaningful: the shared pool optimizes for throughput, while the long-context pool optimizes for predictable latency. You should also set an upper limit on output length per request, since output keeps occupying cache as it is generated, and configure queue timeouts and fast-fail policies so requests do not pile up indefinitely. If the platform offers general-purpose capabilities such as object storage or a message queue, parsing and preprocessing of very long documents can be moved ahead into an asynchronous pipeline to reduce instantaneous pressure on inference nodes.

    3. Choosing Accelerators Is Not Simply “Which One Replaces Which”

    Under a common single-node deployment recipe in the industry, an eight-card tier of accelerators can serve as a reference starting point for medium-sized models, while machines with higher bandwidth and more memory are better suited to full million-token context scenarios. But selection cannot be based on memory numbers alone. At minimum, evaluate the task mix (chat, extraction, generation, tool calling), the distribution of context lengths, concurrency scale, average output length, whether structured output is heavily relied on, the operator and quantization support of the inference framework, intra-node interconnect bandwidth, and the power and cooling headroom in the data center.

    A practical principle is “define the workload profile first, then the hardware.” If the business is mostly short question answering, a high-bandwidth machine may not be worth the cost; if long-document review makes up a large share, memory capacity and interconnect become hard constraints. Data center conditions are also frequently underestimated: power draw and noise at full load on a multi-card node, and whether the cooling design is adequate, directly affect whether the system can run stably for long periods.

    4. Concurrency Parameters Are Not the Number of Online Users

    The two parameters set most often at deployment are the maximum context window and the maximum number of active sequences. The former determines how long a single request can be; the latter determines how many sequences advance in parallel in one scheduling round. The latter is often misread as “number of online users,” which is a conceptual mismatch.

    Real concurrency capacity is determined by several factors together: the arrival distribution of requests, input and output lengths, the queuing policy, and rate-limit thresholds. A common practice is to set the active sequence count conservatively when long requests make up a large share, prioritizing controllable latency, and to raise it gradually when short requests dominate while watching GPU memory levels and the latency curve. The following illustrative configuration expresses this conservative stance:

    1. # Illustrates parameter semantics only; not a specific product interface
    2. max_model_len: 131072
    3. max_num_seqs: 32 # Use a small value when long requests dominate
    4. gpu_memory_utilization: 0.85
    5. enable_chunked_prefill: true

    Combined with rate limiting and a priority queue, this prevents a small number of very long requests from occupying the entire pool.

    5. Acceptance Should Be Based on Metrics, Not Screenshots

    A proper pilot acceptance leaves reproducible data, not a few screenshots of successful responses. At minimum, include: real task completion rate, time to first token and per-token output latency, P95 and P99 percentiles, tiered load-test results at 32K/128K/512K/near 1M, behavior in mixed long-and-short request scenarios, GPU memory level curves, tool-calling success rate, service restart and failure recovery time, and a comparison of output quality between low-bit quantization and higher-precision options.

    Metrics must be tied to business definitions. For example, “task completion rate” should be judged by business rules rather than by whether the API returns 200; latency metrics should separate the first-token stage from overall generation, since the two are affected by different factors. Only by moving quantified acceptance earlier can you avoid repeated parameter tuning after launch.

    6. Tier by Task and Avoid a One-Size-Fits-All Approach

    LLMs are good at complex reasoning and multi-step tasks, but sending every request to the largest model is neither economical nor necessary. A more robust architecture is tiered routing: high-frequency simple Q&A goes to a smaller model or a cache; medium-complexity tasks go to the main model; only long-document and multi-tool collaboration tasks enter the long-context pool. The routing layer can decide based on length, intent, and confidence, and trigger an escalated retry for low-confidence results.

    When deploying on platforms such as Baidu AI Cloud, you can combine general-purpose capabilities like a container platform, log service, monitoring and alerting, object storage, and a message queue to standardize canary releases, metric collection, audit trails, and asynchronous preprocessing. The end goal is that the model not only returns results but also behaves predictably under concurrency, failures, and version changes — that is the real dividing line between “it runs” and “it can go live.”