Running LLMs Locally: How to Choose Laptop Memory and Quantization

    This article explains why local LLM inference on a laptop is usually constrained by memory capacity and memory bandwidth rather than compute. It clarifies three key concepts—file size versus parameter count, total versus active parameters in MoE models, and unified memory versus VRAM allocation—then walks through a practical capacity-planning workflow, quantization trade-offs, why bandwidth matters, storage and engineering setup, and a checklist of common mistakes and tuning steps.

    1. The Real Bottleneck in Local Inference Is Usually Not Compute

    When developers load a large model on a laptop for the first time, they often misjudge the situation: they assume the experience is determined by CPU core count or the GPU’s theoretical floating-point performance. In practice, the first constraint in local inference is usually memory capacity and memory bandwidth, followed by the storage precision of the weights (quantization), and only then by the number of compute units.

    The reason is straightforward. Autoregressive generation proceeds token by token, and for every token generated, the weights relevant to that computation must be moved from memory into the compute units and processed once. This means the number of weight reads is proportional to the output length, making data movement the dominant cost. So “whether it fits” is decided by capacity, “how fast it runs” is decided by bandwidth, and “how much fits” is decided by quantization.

    2. Three Concepts You Need to Clarify First

    2.1 File Size and Parameter Count

    Model parameters are stored at a certain bit width. Roughly estimating at an average of 4 bits per parameter (4-bit):

    • 8 billion parameters ≈ 4 GB
    • 30 billion parameters ≈ 15 GB

    The file you actually download is usually slightly larger than this estimate, because quantization schemes also store metadata such as scaling factors, and some layers (such as embedding and normalization layers) often keep higher precision. A more reliable engineering practice is therefore: plan capacity directly from the actual file size you are about to download, rather than back-calculating from the parameter count.

    2.2 Total Parameters and Active Parameters

    The total-active structure commonly seen in model names is easy to misread. Take a mixture-of-experts (MoE) model with “30 billion total / 3 billion active” parameters as an example: the total parameters determine how large the weight file is and how much memory it occupies; the active parameters determine the scale actually involved in computation per token, which affects speed rather than whether it fits.

    The conclusion is critical: an MoE model may have a small computational load but still need more than ten GB of memory to hold the full set of weights. Inferring “small footprint” from “small compute” is a common selection mistake.

    Illustration (only expressing naming semantics, not any specific product):

    1. <A>B-C D
    2. A = total parameter magnitude (determines weight size / memory usage)
    3. B = active parameter magnitude per token (determines per-computation scale / speed)

    2.3 Unified Memory and VRAM Allocation

    With a design where the processor and integrated GPU share the same physical memory, you need to explicitly set an upper limit on “memory available for graphics/acceleration.” This ratio can usually be adjusted in firmware or system graphics settings. When planning, do the subtraction:

    1. available weight space ≈ total physical memory − portion allocated to VRAM − OS and everyday software usage

    If physical memory is 32 GB and the VRAM limit is set to 24 GB, the space left for daily workloads such as browsers, editors, and image software is on the order of 8 GB. This margin determines whether you can “just run it” or “run it while getting work done.”

    3. A Practical Workflow for Capacity Estimation

    1. List the actual file size of the target model (not the parameter count).
    2. Add runtime overhead: the KV cache grows linearly with context length and the number of concurrent conversations, so long documents and multi-turn sessions need extra headroom.
    3. Add OS and resident software usage; it is recommended to keep 20%–25% of the total as margin.
    4. Apply an upper-bound constraint using the “VRAM allocation limit” to confirm it will not squeeze out daily workloads.
    5. If the margin is insufficient, reduce the quantization bit width or shorten the context first, rather than compressing the system margin.

    A practical decision table:

    Scenario Weight size magnitude Recommended physical memory VRAM allocation strategy
    Short Q&A, note organizing around 5 GB 16 GB and up Conservative allocation, leave ample system margin
    Long material processing, multi-turn sessions 15–20 GB 32 GB and up Raise the limit, but monitor for overflow
    Parallel multitasking (coding + browsing + image work) 5–15 GB 32 GB and above Balanced allocation, avoid maxing out the limit

    4. Engineering Trade-offs of Quantization

    The essence of quantization is to approximate stored parameters with fewer bits, trading size for capacity at the cost of precision loss. Practical recommendations:

    • Try medium bit widths first (the 4–8 bit range). For most everyday tasks, the quality difference within this range is acceptable, while the size savings are significant.
    • Run small-scale comparative evaluations for sensitive tasks: fix a set of representative questions, compare the output quality of different quantization versions, then decide which one to use in production.
    • Note that “size is not equal to VRAM requirement”: different quantization schemes are supported to different degrees by inference backends; if a scheme is not efficiently supported, you may see a speed regression or even no acceleration at all.
    • Do not treat quantization as a universal compression: context length and batch concurrency also consume memory and need to be included in the budget.

    5. Why Bandwidth Matters Just as Much

    In a shared-memory architecture, theoretical bandwidth is determined by memory width and frequency together; for example, four channels, a 256-bit width, and 8000 MT/s can correspond to roughly 256 GB/s of theoretical bandwidth. During sustained output, weights must be read repeatedly for every token generated, so bandwidth directly constrains how much weight data can be moved per unit time.

    Optimization directions include: keeping memory channels fully populated (do not install a single channel only), preventing background tasks from seizing bandwidth, and limiting the number of model instances loaded simultaneously. The number of compute units determines “how fast it computes,” while bandwidth determines “how fast it is fed”; when the two are mismatched, adding compute yields limited gains.

    6. Storage and Engineering Setup

    • Model and project files grow quickly, so plan local SSD capacity for “multiple models coexisting,” and keep an available second storage expansion slot for later upgrades.
    • It is recommended to maintain a model file inventory with checksums to avoid duplicate downloads and version confusion.
    • If local resources are insufficient, adopt a tiered strategy: keep a small model resident locally to guarantee responsiveness, and offload complex tasks to a cloud inference service or a containerized inference platform, with the local side handling only orchestration and result post-processing; use general logging services and monitoring/alerting capabilities to observe latency and failure rates.

    7. Common Mistakes and a Tuning Checklist

    Mistake 1: Looking only at parameter count and not file size.
    Mistake 2: Interpreting fewer active parameters as a smaller footprint.
    Mistake 3: Maxing out the VRAM limit, causing insufficient system-side memory and frequent paging.
    Mistake 4: Ignoring cache growth caused by context length.

    Tuning checklist:

    • Budget using actual file size and keep more than 20% margin
    • Balance the VRAM allocation limit against daily workloads; start conservative and raise later
    • Compare different quantization versions on a fixed evaluation set
    • Confirm memory channels are fully populated and background tasks are controlled
    • Record first-token latency and sustained output rate after each change, and verify with data regression

    8. Conclusion

    Choosing to run large models locally can be compressed into a single main line: first use the real file size to confirm it fits, then use bandwidth and quantization to confirm it runs, and finally use system margin to confirm it can run stably over the long term while you keep working. Turning these three steps into a repeatable process lets you avoid most “it starts but is unusable” traps before purchasing and deployment.