How to Choose an Open-Source LLM for Local Deployment: Speculative Decoding, Throughput, and Configuration

    Choosing an open-source model for local deployment depends less on benchmark rankings than on four constraints: GPU memory capacity and bandwidth, concurrency, context length, and interaction mode. This article explains why speculative decoding can roughly double decoding throughput at low concurrency yet regress under high concurrency, how draft sources differ, and how to run a reproducible deployment and layered load test. It also covers practical parameter guidance and a decision framework for interactive, high-concurrency, and research use cases.

    1. Clarify the Problem First: The Real Constraints of Local Selection

    The question “which open-source option should I use for a local LLM deployment” cannot be answered without constraints. What actually determines the experience is usually not a model’s score on a leaderboard, but four things: GPU memory capacity and bandwidth, concurrency, context length, and interaction mode (script-based batch processing versus human-facing chat and code completion).

    A more reasonable approach is to split selection into two layers: the first layer chooses the model architecture and parameter scale; the second layer chooses the decoding acceleration strategy of the inference stack. Most confusion arises in the second layer, where a particular acceleration technique is treated as a universally faster switch, even though its benefit can point in the opposite direction across different concurrency ranges.

    2. Speculative Decoding: Why It Speeds Things Up, and Why It Fails

    The bottleneck of autoregressive decoding is that generating each token requires moving all weights from GPU memory to the compute units once, which is a typical memory-bound process. Speculative decoding lets a lightweight “draft” source guess several consecutive tokens, then the main model verifies them in a single parallel forward pass. Accepted tokens are committed directly, compressing multiple serial memory accesses into one.

    Two key implications are often overlooked in discussions:

    1. The speedup is determined by the acceptance rate, not by the draft length. The longer the draft, the more compute is wasted once it is rejected, so draft length must be matched to the acceptance rate.
    2. The benefit range is governed by concurrency. At low concurrency, a large amount of GPU compute sits idle, so trading compute for memory access is worthwhile. At high concurrency, compute is already saturated, and the extra forward passes from speculation crowd out the compute budget of the main requests.

    Draft sources generally come in two implementations. One is a lightweight prediction head built into the main model, sharing hidden states with it and consuming almost no additional GPU memory. The other is an external, standalone small model that works alongside the main model through a mounting mechanism; its acceptance rate usually depends more on the data distribution, but it is more flexible to swap.

    3. Reading the Benchmark Results: Doubling at Single Concurrency, Regression at High Concurrency

    A typical set of comparison results illustrates the issue: on a single node with eight GPUs at single concurrency, the external draft approach delivered roughly a 2.2x improvement in decoding throughput over the native approach. In a high-pressure scenario with long inputs, short outputs, and 64-way concurrency, however, its output throughput was clearly lower than the built-in approach, showing a regression.

    The reasons are not mysterious. First, the randomly constructed dataset differs substantially from real business text distribution, which significantly lowered the draft hit rate. Second, under high concurrency, batching had already saturated compute, making speculative verification a net overhead. Third, long context increased KV cache occupancy, compressing the space left for drafts and extra batch slots and making queuing more likely in scheduling.

    The methodology matters here: such conclusions hold only for “this draft + this main model + this dataset” and cannot be extrapolated into an upper bound for the approach. An evaluation should cover at least three levels — single concurrency, medium concurrency, and saturated concurrency — and record time to first token, decoding throughput, acceptance rate, and peak GPU memory for each.

    4. Deployment Configuration: A Reproducible Workflow

    Taking a containerized inference platform as an example, the workflow can be abstracted into four steps, independent of any specific product:

    1. Register a new inference backend version. A pluggable architecture allows registering a new runtime image version without touching the main service; once the framework type is specified, it can be selected at deployment time.
    2. Create a deployment and choose the weight source. Enter the model repository identifier, then select the inference backend and the version just registered.
    3. Fill in the backend parameters. An example is shown below (eight GPUs, context length 131072):
    1. --max-model-len 131072
    2. --tensor-parallel-size 8
    3. --enable-expert-parallel
    4. --gpu-memory-utilization 0.90
    5. --max-num-batched-tokens 32768
    6. --max-num-seqs 16
    7. --trust-remote-code
    8. --speculative-config '{"method":"external_draft","num_speculative_tokens":7,"draft_path":"/models/draft"}'
    1. Run layered load tests. Fix the input and output lengths and the random seed, increase concurrency level by level, and record the throughput and acceptance rate curves.

    Three rules of thumb apply to the parameters. GPU memory utilization should not be maxed out blindly; leave headroom for the draft and communication buffers. The maximum number of batched tokens and the maximum number of sequences must match the business length distribution. The tensor parallelism degree is constrained by the interconnect bandwidth of a single node, and the gains from scaling across nodes often decline non-linearly.

    5. Selection Guidance and the Baidu AI Cloud Perspective

    Here are actionable decision rules. For interactive, low-concurrency scenarios that are sensitive to time to first token, try speculative decoding first, preferably with a lightweight draft head that shares the same origin and state as the main model. For high-concurrency offline batch processing, prioritize batching efficiency and GPU memory utilization, and focus acceleration on quantization formats, operator fusion, and scheduling strategies. For research validation, treat the external draft as a control variable in experiments.

    In related practice at Baidu AI Cloud, the common recommendation is to combine the model repository, container platform, monitoring and alerting, and logging services: store weights and draft files in object storage with version management, run the inference service on a container platform for elastic scaling, and focus monitoring on throughput, latency percentiles, GPU memory, and acceptance rate. Any acceleration approach should use continuous load-test data as the gate for going live, rather than a conclusion from a single demonstration.