Local LLM Inference Speed: Benchmarking and Tuning Guide

    This guide explains why local LLM speed is more than a single tokens/s number and how to measure it reproducibly. It breaks benchmarking into cold start time, time to first token (TTFT), and steady-state decode throughput, then walks through the main variables that affect speed: quantization level, VRAM and system memory balance, context length and KV cache compression, speculative decoding, and inference engine launch parameters. It also outlines a cost-effective tuning path for older hardware, compares dense and sparse model designs, and offers practical advice for turning speed work into a repeatable baseline.

    1. Why “tokens/s” Deserves Its Own Discussion

    When deploying large language models locally, the most common question is about generation speed. Whether a model can fit into a daily workflow often has little to do with its benchmark scores and everything to do with how many tokens it can produce per second. When speed is too low, interactive coding, long-form rewriting, and multi-turn agent calls become unbearable. When speed is adequate, even a machine with dated hardware can handle primary workloads.

    It is worth stressing that speed is not a single number but a composite of at least three metrics: time to first token (TTFT), decode throughput (tokens/s), and throughput stability under long tasks. Many discussions report only an average, which is why reproduced results can vary enormously. To get comparable data, you must fix the measurement methodology.

    2. Build a Reproducible Benchmarking Methodology First

    Break the measurement into three parts and record each separately:

    1. Cold start time: the time from process launch to the point where model weights are fully loaded and the process can accept requests. This is significantly amplified on mechanical hard drives, network storage, or a first read that misses the page cache.
    2. Time to first token (TTFT): strongly correlated with prompt length and determined mainly by the compute of the prefill stage and VRAM bandwidth.
    3. Steady-state decode speed: the average of the latter half after generating several hundred tokens, which avoids counting warm-up fluctuations.

    A sample record structure could look like this:

    1. run_config:
    2. quantization: Q3 / Q4 / Q6
    3. context_length: 16384
    4. kv_cache_quant: none / 4bit
    5. speculative: off / n=3
    6. measured:
    7. cold_start_s:
    8. ttft_s:
    9. decode_tok_s_p50:
    10. decode_tok_s_long_task:
    11. vram_peak_gib:

    Speed numbers only mean something when peak VRAM, context length, and quantization level are recorded together.

    3. Core Variables That Affect Speed

    3.1 Quantization Level: A Three-Way Trade-off Among Size, Accuracy, and Bandwidth

    When model weights are stored as low-bit integers, the number of bytes moved per forward pass drops, and decode speed usually improves, because the decode stage is often limited by VRAM bandwidth rather than compute. The rule of thumb is that lower bit widths yield higher throughput, but there is an accuracy inflection point: going too low causes noticeable degradation on long-context, code, and math tasks. A common practice is to compare two adjacent levels (for example, 3-bit vs. 4-bit, or 4-bit vs. 6-bit) on the same fixed set of prompts, comparing output quality and speed, and then choose the inflection point rather than the lowest level.

    3.2 VRAM and Memory Working Together: Whether It “Fits” Determines the Speed Tier

    When weights plus cache cannot fit entirely in VRAM, the overflow spills to host memory, which runs at bandwidth orders of magnitude lower, and speed drops off a cliff. So VRAM capacity is not a case of “bigger is always better”; what matters most is “just enough to cover weights + KV cache + compute buffers.” A practical rule of thumb is:

    1. peak VRAM ≈ weight size + KV cache + activations/workspace + add-on modules such as vision

    If peak usage is close to the physical limit, prioritize compressing the KV cache and context rather than lowering the weight quantization level further.

    3.3 Context Length and KV Cache Compression

    The KV cache grows linearly with context length and is the main source of VRAM consumption in long-context scenarios. Applying low-bit quantization to the cache itself can bring long-context cost down a notch with almost no change to output style. Note that the attention computation and memory access overhead of very long contexts will also pull decode speed down at the same time. Therefore, “supports 200K or even longer” and “remains fast under long context” are two different claims, and any evaluation must state the actual occupied length at measurement time.

    3.4 Speculative Decoding and Multi-Token Prediction

    The basic idea of these methods is to use a lightweight draft or small-step prediction to propose several candidate tokens first, then have the main model verify them all at once, compressing multiple serial forward passes into fewer large-batch forward passes. The gains depend heavily on the task type: acceleration is obvious when output is highly predictable (templated code, repetitive structures), while on highly divergent creative tasks the gains are limited and can even regress due to verification failures. In addition, draft length needs tuning; setting it too large actually adds wasted computation. In engineering terms, treat it as a toggleable acceleration feature and run A/B comparisons on the same set of tasks.

    3.5 Inference Engine and Launch Parameters

    The difference for the same model across different inference implementations is often larger than the difference between quantization levels. The factors with the most impact are usually: batching and scheduling strategy, whether fused operators are enabled, KV cache layout, and whether incremental loading and fast cold start are supported. For older platforms, cold start speed is especially critical—a load speed three times faster than a typical implementation can significantly improve the experience of frequent start/stop usage.

    4. A Cost-Effective Path for Older Platforms

    A typical cost-effective approach is to not chase the newest hardware but instead put the entire budget into a “just enough” combination of VRAM and memory, then fill the gaps with software-layer optimization. The actionable order is:

    1. First determine the primary task type (interactive Q&A / long-document analysis / agent orchestration) and set context requirements accordingly;
    2. Do a small-scale quality comparison between adjacent quantization levels and select the inflection-point level;
    3. Enable low-bit KV cache quantization and trade the saved VRAM for longer context;
    4. Then evaluate whether speculative-decoding-style acceleration has a positive return for the target tasks;
    5. Finally, fine-tune batching and concurrency parameters and observe whether long-task throughput stays stable.

    An easily overlooked point is storage: placing weight files on a slow mechanical drive significantly lengthens cold start, and moving the model to faster local media often yields more direct gains than swapping the GPU.

    5. Choosing Model Form: Dense vs. Sparse

    Sparse structures with a smaller activated parameter count (larger total parameters but only a small subset activated per token) often show unexpected throughput on low-bandwidth platforms, because the decode bottleneck is memory access rather than multiply-add. The cost is a larger total weight size and higher VRAM and memory capacity requirements. So the selection logic should be: first measure bandwidth and capacity constraints, then decide between dense and sparse, rather than looking at parameter count first.

    6. Making Speed Engineering Repeatable

    • Build a fixed benchmark task set (several items each for short Q&A, long-document summarization, and code completion), and change only one variable at a time;
    • Record both peak VRAM and long-task throughput to avoid looking only at instantaneous peak speed;
    • Script and version launch parameters for easy rollback;
    • If you use cloud resources for comparison, you can leverage general-purpose container platforms, object storage, and monitoring/alerting capabilities to standardize the evaluation environment, model files, and metric collection into a repeatable baseline.

    7. Conclusion

    The essence of local inference speed is the balance among bandwidth, capacity, and scheduling. Quantization level, KV cache compression, context length, acceleration algorithms, and the inference implementation together determine the final tokens/s, and the value of hardware is only unlocked when the configuration matches. Instead of chasing a single peak number, build your own measurement methodology and tuning checklist—that is the key to keeping older equipment continuously producing usable compute.