Running Large Language Models Locally on Low-Cost Mini PCs: A Practical Guide

    This guide explains how to run large language models locally on affordable, low-power mini PCs by combining MoE (Mixture of Experts) architectures with unified memory. It covers the VRAM bottleneck problem, how to use system RAM as GPU memory via shared memory mechanisms, configuration steps for Vulkan-based inference frameworks, quantization choices, dual-channel memory requirements, real-world performance benchmarks, and typical use cases from private RAG to agent workflows—giving budget-conscious developers a clear, technically grounded path to private, zero-cost local AI inference.

    1. Background: The VRAM Bottleneck vs. the Reality of Local Inference

    As open-source large language models have rapidly improved, more developers and businesses want to deploy them locally—for data privacy, zero API call costs, and offline availability. However, the biggest obstacle to local inference has always been VRAM: mainstream consumer GPUs typically offer only 4GB to 24GB of memory, while even a 35B-parameter model quantized to 4-bit needs around 20GB of memory just for its weights—far beyond what most graphics cards can hold.

    The traditional solutions boil down to three options: buy a GPU with more VRAM (expensive), run multiple GPUs in parallel (limited by motherboard slots and power), or call cloud APIs (which defeats the purpose of local deployment). But among the latest generation of small-parameter models, the MoE (Mixture of Experts) architecture offers a new opening. Models with roughly 35B total parameters but only 3B active parameters are representative: although the total weight footprint is large, each forward pass activates only a tiny fraction of the parameters, so compute requirements are actually very low. The only real bottleneck becomes “where do the weights live.”

    2. The Key Insight: Use System RAM as Model Memory

    Most modern SoCs and mainstream platforms support a “shared memory” mechanism: the integrated GPU (iGPU) has no dedicated VRAM and instead accesses system RAM directly through the memory controller. On Windows, drivers typically cap the shared memory available to the iGPU by default (e.g., 4GB), but this is merely a driver-level allocation policy, not a hard hardware limit.

    Real-world testing shows that with proper configuration, an inference framework can let the iGPU read model weights directly from system memory during computation, extending usable “VRAM” up to the physical memory limit. For example, a low-cost mini PC with 32GB of RAM can, after accounting for OS overhead, still allocate over 21GB of weight storage for a 35B-class MoE model. This is the core secret behind “running large models on thousand-dollar-class hardware.”

    This approach rests on four technical pillars:

    1. An integrated GPU that supports shared memory: the iGPU shares physical memory with the CPU, so there is no inherent VRAM wall;
    2. Ample system RAM: 32GB minimum, in a dual-channel configuration to guarantee bandwidth;
    3. A universal graphics abstraction layer: use cross-platform, open-standard graphics and compute APIs (such as Vulkan), so inference frameworks can schedule the GPU without vendor-specific proprietary compute libraries;
    4. An open-source inference framework that supports CPU/GPU hybrid inference: these frameworks typically allow flexible assignment of model layers across different compute units.

    3. Configuration Steps

    The following uses a common Vulkan-based local inference tool as an example. Since this guide is product-agnostic, only the general workflow is described—refer to your framework’s documentation for exact parameters.

    1. Lift the Shared Memory Limit

    Some motherboard BIOSes offer a “UMA Frame Buffer Size” or similar option to increase the memory pre-allocated to the iGPU. If the BIOS doesn’t expose this, most inference frameworks provide runtime overrides, for example:

    1. # Pseudo-code example: expand GPU-visible memory via environment variables or launch flags
    2. set GGML_VK_VISIBLE_DEVICES=0
    3. set VK_MAX_MEMORY_ALLOCATION=24000000000
    4. # Launch inference, offloading all layers to the iGPU
    5. llama-style-runner.exe ^
    6. -m model-Q4_K_M.gguf ^
    7. -ngl 99 ^
    8. -c 8192 ^
    9. --temp 0.7

    Here, -ngl 99 attempts to offload all model layers to the GPU. When the GPU’s actual available memory is insufficient, the framework automatically falls back to running the remaining layers on the CPU, forming a CPU/GPU hybrid pipeline.

    2. Choose the Right Quantization

    With roughly 21GB of usable space, a 35B-class MoE model works well with ~4-bit quantization formats (such as Q4_K_M), balancing quality and size. With 64GB of RAM, you can try 5-bit or 6-bit quantization for better generation quality. Note that the KV cache also consumes memory—the longer the context, the greater the overhead. For an 8K context, reserving 1GB–2GB is a safe bet.

    3. Dual-Channel Memory Is a Hard Requirement

    During each inference step, an MoE model reads the activated expert weights from memory, so memory bandwidth directly determines generation speed. Make sure the RAM runs in dual-channel mode (two identical sticks in the correct slots). Tests show that token generation speed can differ by nearly 2x between dual-channel and single-channel configurations.

    4. Performance and Optimization Headroom

    Typical measured results under this kind of setup:

    • 26B-class MoE model (4-bit quantization): about 19–20 tok/s—already a comfortable reading speed;
    • 35B total / 3B active MoE model (4-bit quantization): around 20 tok/s, with a good interactive experience;
    • Long-context scenarios: the prefill (prompt processing) stage is noticeably compute-bound and slower than the generation stage—this is normal.

    Further optimization directions:

    • Lower display resolution or shut down unnecessary graphics workloads to reduce contention between the iGPU and desktop rendering for memory bandwidth;
    • Tune the layer allocation ratio—not every layer runs fastest on the GPU; consider keeping bandwidth-sensitive layers on the CPU;
    • Close background memory hogs (browsers, real-time antivirus scanning, etc.) to free up contiguous memory for the model;
    • Use the framework’s built-in batching and caching mechanisms to reuse the KV cache for repetitive prompts.

    5. Why MoE Is the Biggest Win for Low-Cost Local Deployment

    The significance of this approach goes back to the MoE architecture itself. In traditional dense models, inference cost scales with total parameters—a 35B dense model computes all 35B parameters for every token. MoE models instead split the feed-forward layers into multiple “experts,” with a router selecting only a few experts per token. This means:

    • Total parameters determine the model’s knowledge capacity (a 35B “brain”), while active parameters determine compute per step (only ~3B per token);
    • For compute-weak iGPUs, small active parameter counts are the truly friendly property;
    • Although the weight footprint is large, unified memory architecture neatly compensates for it.

    MoE architecture and “large RAM + shared memory” budget hardware form a perfect complement—which is why the local deployment community has increasingly focused on these small-active-parameter models over the past year.

    6. Typical Use Cases: From Single Q&A to Full Agent Workflows

    The value of local inference goes beyond chat. Thanks to zero API costs and fully localized data, this approach fits particularly well with:

    1. Private knowledge base Q&A: combine with local vector retrieval (RAG) to keep sensitive internal documents entirely within the intranet;
    2. Agent workflows: with function-calling-capable models and open-source agent orchestration frameworks, automate multi-step task execution—without per-token billing, an agent can loop through dozens of calls without cost concerns;
    3. Batch data processing: text cleaning, classification, and summarization jobs can run overnight locally at zero marginal cost;
    4. Development debugging and offline environments: fully usable without network access, suitable for embedded development, field deployments, and similar scenarios.

    7. Conclusion and Recommendations

    “Running large models locally on a budget mini PC” is no longer a gimmick—it is a technically sound path: MoE models with small active parameters solve the compute problem, unified memory solves the capacity problem, universal graphics APIs solve ecosystem compatibility, and mature open-source inference frameworks glue everything together. For developers on a budget who still want private LLM capability, start with a mini PC equipped with 32GB of dual-channel RAM, prioritize MoE models with ~3B active parameters and 4-bit quantization, then gradually iterate on context length and agent workflows.

    That said, keep expectations realistic: this setup’s throughput still trails high-end discrete GPUs, long-text prefill is slow, and it is highly sensitive to memory capacity. But as a silent, low-power, zero-usage-cost “personal inference box,” it already covers the vast majority of everyday AI application needs—and represents a pragmatic path for local LLM deployment in terms of cost efficiency.