Running Large Language Models on a Low-Cost Mini PC with Integrated Graphics: A Practical Guide

    This article explains how to run large language models (LLMs) and mixture-of-experts (MoE) models locally on a low-cost mini PC equipped with integrated graphics and system RAM. It covers the core technical approach—using unified memory and a cross-platform compute backend like Vulkan—along with practical steps for building a lightweight inference framework, loading quantized models, and setting up a local API service for agent workflows. The guide highlights how MoE architectures fit well with this setup and offers a cost-effective, privacy-preserving alternative to cloud-based inference.

    Running large language models locally has traditionally required expensive discrete GPUs with large VRAM capacities. Models with 30B+ parameters often exceed the memory limits of consumer graphics cards, forcing users to rely on multi-GPU setups or cloud services. However, a combination of integrated graphics (iGPU), unified memory architecture, and a cross-platform compute backend can break through the VRAM barrier—allowing developers to run large and mixture-of-experts (MoE) models smoothly on a low-cost mini PC.

    The Core Problem and the Workaround

    In standard local inference, VRAM capacity is the main bottleneck. For example, a 35B-class model quantized to 4-bit may require roughly 20GB of storage for its weights. Consumer discrete GPUs typically do not offer that much VRAM unless you invest in multiple cards or expensive hardware.

    The key workaround lies in unified memory architecture. Modern high-performance iGPUs share the same physical system memory pool as the CPU. If the inference engine can bypass the traditional VRAM isolation and load model weights directly into system RAM while letting the iGPU perform tensor computations, then a low-cost machine with 32GB or 64GB of RAM can easily host a large model locally.

    How It Works Under the Hood

    Unified Memory and Compute Backend Coordination

    To let an iGPU access system RAM, the software must rely on a cross-platform graphics and compute API such as Vulkan. Vulkan provides a low-level hardware abstraction layer that lets applications manage memory mappings directly and execute compute-intensive tasks on heterogeneous devices (like an iGPU).

    On the inference framework side, when this compute backend is enabled, the engine allocates quantized model tensor data directly in system memory, then dispatches computation instructions to the iGPU’s stream processors. Because there is no need to copy data between dedicated VRAM and main memory, this architecture is naturally efficient in memory utilization.

    Memory Allocation Strategy

    Consider a host with 32GB of system RAM. The operating system and background services typically consume about 4–6GB. During inference, you can safely allocate more than 21GB of contiguous memory to hold model weights and context caches. This flexible memory allocation is what makes it feasible to run large MoE models on low-cost hardware.

    Setting Up a Lightweight Inference Framework

    To achieve this on a standard operating system, developers often use a lightweight inference framework written in C/C++. These frameworks are highly efficient and support common quantized formats such as GGUF.

    Environment Preparation and Compilation

    First, ensure the system has the necessary build tools and the SDK for the target compute API (e.g., Vulkan). Then clone the inference framework source code and compile it, explicitly enabling the compute backend in the CMake configuration.

    Example commands:

    1. # Clone the repository and update submodules
    2. git clone https://example.com/inference-framework.git
    3. cd inference-framework
    4. git submodule update --init --recursive
    5. # Configure the build with the Vulkan backend enabled
    6. mkdir build
    7. cd build
    8. cmake .. -DGGML_VULKAN=ON -DCMAKE_BUILD_TYPE=Release
    9. cmake --build . --config Release -j 8

    Loading the Model and Starting Inference

    After compilation, launch inference from the command line. Key parameters include:

    • -m — path to the model file
    • -ngl — number of layers to offload to the compute device (set to a large value like 99 to offload as many layers as possible to the iGPU)
    • -c — context length
    1. ./main -m ./models/moe-35b-q4_k_m.gguf \
    2. -ngl 99 \
    3. -c 4096 \
    4. --color \
    5. -i \
    6. --prompt "Explain the advantages of unified memory architecture"

    During execution, monitoring tools will show a significant increase in iGPU utilization while system memory usage grows—confirming that the model weights are being processed by the integrated GPU.

    Why MoE Architectures Fit Local Inference

    Mixture-of-experts (MoE) models use sparse activation: only a subset of the expert networks is active for each token. This increases total parameter count and knowledge density without a proportional increase in inference-time computation. That property makes MoE models highly compatible with iGPU-based local deployment.

    While unified memory solves the capacity problem, system memory bandwidth is usually lower than that of high-end GDDR VRAM, which can limit token generation speed. MoE models mitigate this by activating only a portion of their parameters during each forward pass. In practice, a 35B-class MoE model at a reasonable quantization level can achieve about 20 tokens per second on an iGPU-based platform—sufficient for smooth local chat and text generation.

    Advanced Use Case: Building a Local Agent Workflow

    Running a model locally is not limited to simple text chat. For enterprise scenarios, a low-cost local host can power a fully self-contained agent workflow.

    Exposing a Local API

    Modern lightweight inference frameworks include a built-in HTTP server that is compatible with mainstream API standards. You can start a local RESTful API service with a few command-line flags:

    1. ./server -m ./models/moe-35b-q4_k_m.gguf -ngl 99 --port 8080

    Connecting to an Agent Framework

    Because the API is standardized, you can easily connect it to open-source agent orchestration tools or your own backend. By enabling function calling, the local model can autonomously invoke local scripts, query databases, or make network requests based on user intent.

    This architecture offers two significant benefits:

    • Zero API cost: All inference happens locally—no per-token cloud API fees.
    • Data privacy: Sensitive data never leaves the premises, which is critical for regulated industries such as finance and healthcare.

    Conclusion

    By combining a high-performance integrated GPU, unified memory architecture, and a cross-platform compute backend, developers can run large and even 35B-class mixture-of-experts models on low-cost local hardware. This approach removes the traditional VRAM capacity limit and, through a standardized API layer, enables cost-effective and privacy-preserving agent workflows. As hardware interconnect technology and model quantization methods continue to improve, the potential for low-cost edge devices in AI inference will only expand.