Running Large Parameter Models on Low-Cost Unified Memory Platforms

    When deploying large language models (LLMs) locally, memory capacity, bandwidth, and weight footprint often become the real bottlenecks rather than peak compute performance. This article explores a cost-effective approach to running large quantized models on low-power processors with integrated graphics using a unified memory architecture. It covers weight quantization, overcoming VRAM limits, optimizing compute backends, conducting comprehensive performance testing, and practical deployment steps. It also discusses extending local inference to AI agents and outlines the limitations of this setup, providing a complete guide to maximizing local AI capabilities on budget hardware.

    When deploying large language models (LLMs) locally, the most easily overlooked aspect is not the peak performance of the compute unit, but the conflict between VRAM capacity, memory bandwidth, and model weight footprint. Many entry-level devices possess available graphics computing power but only limited dedicated VRAM. When a model scales to billions or tens of billions of parameters, its weights can quickly exceed VRAM capacity, preventing the model from loading or causing frequent data swapping, which significantly slows down inference speed.

    A more cost-effective approach is to use a low-power processor with integrated graphics (iGPU) and leverage a unified memory architecture to run quantized large models. In such platforms, the CPU and GPU share system memory. Although the theoretical compute power and memory bandwidth of an iGPU are generally inferior to high-end discrete GPUs, it can directly access a much larger pool of system memory, bypassing the hardware limitation of having only a few gigabytes of VRAM. With proper model compression, memory allocation, and compute backend configuration, some models in the multi-billion parameter range can achieve usable interactive speeds on desktop mini PCs.

    1. The Core Bottleneck Is Weight Footprint, Not Just Parameter Count

    Parameter count is merely one metric of scale; the true determining factors for loading include weight precision, context length, runtime cache, and the overhead of the compute framework.

    Take uncompressed high-precision weights as an example: each parameter may require several bytes of storage. Once a model reaches 30 billion parameters, the weights alone could occupy tens of gigabytes of memory, not counting attention cache, temporary tensors, and runtime management space. For small devices, loading the original precision model directly is typically impractical.

    The basic idea of quantization is to represent model weights using lower-bit-width data. For instance, compressing each parameter from higher precision to 8-bit, 4-bit, or even lower can significantly reduce storage requirements. Quantization is not simply deleting data; it balances model size and output quality through scaling factors, grouping parameters, and error compensation.

    During actual deployment, focus on three key metrics:

    1. Model weight footprint: Determines if the model can fit entirely into system memory.
    2. Runtime cache footprint: Longer context requires larger attention cache.
    3. Compute and memory access efficiency: Lower precision models are not always faster; the final speed also depends on whether the hardware supports corresponding low-precision compute paths.

    Therefore, when selecting a model, do not look solely at “parameter count” but also verify the quantization format, context length, and the inference framework’s memory estimation.

    2. How Unified Memory Breaks Through VRAM Capacity Limits

    Traditional discrete GPUs usually have dedicated VRAM. If model weights exceed VRAM, data must be transferred back and forth between VRAM and system memory. This swapping is constrained by bus bandwidth and access latency, often leading to noticeable performance degradation.

    Unified memory architecture differs. The CPU and iGPU access system memory jointly, allowing graphics compute tasks to utilize a larger proportion of the memory space. Although the operating system still needs to reserve memory for system services, the available capacity for the model is typically much larger than the iGPU’s nominal dedicated VRAM.

    It is important to note that “shared system memory” does not mean all memory can be used efficiently without conditions. Inference speed is often limited by memory bandwidth, especially during text generation, where the workload is frequently bound by weight read speed rather than sheer compute power. Therefore, unified memory primarily solves the problem of “can it fit” but does not guarantee the throughput of a high-end discrete GPU.

    To reduce bandwidth pressure, you can take the following measures:

    • Use a reasonable low-bit quantization format to reduce the data read per generation.
    • Avoid setting an excessively large context window.
    • Limit the number of concurrent requests to prevent multiple sessions from competing for memory bandwidth.
    • Keep operations unsuitable for graphics processing on the CPU.
    • Use inference backends that support graphics acceleration and unified memory access.

    3. The Role of Graphics APIs and Inference Backends

    Local inference is typically achieved through the collaboration of model files, an inference framework, and a hardware compute backend. The model file provides weights, the inference framework organizes tensor calculations, cache management, and sampling logic, while the hardware backend determines whether these calculations are executed by the CPU or GPU.

    On desktop operating systems, general-purpose graphics APIs allow inference programs to call the iGPU for matrix operations, vector calculations, and tensor-related tasks. Compared to using only the CPU, the iGPU can process more compute tasks in parallel, which is particularly suitable for large-scale matrix multiplication.

    However, graphics acceleration is not a “flick a switch and it gets faster” solution. If the backend has incomplete support for certain operators, the program may frequently switch between the GPU and CPU, increasing overhead instead. During deployment, observe the following:

    • Whether GPU utilization changes steadily during inference.
    • Whether system memory usage keeps growing.
    • Whether generation speed drops significantly after the first output.
    • Whether frequent device synchronization or memory copying occurs.
    • Whether speed gradually decays during long text generation.

    A reliable configuration process usually involves: first running a benchmark on the CPU, then enabling the GPU backend for comparison, and subsequently gradually increasing the number of compute layers or tensor proportions handled by the GPU. Do not force all computations onto the iGPU from the start; judge based on stability and overall throughput.

    4. Performance Testing Beyond Tokens Per Second

    The performance of local models is usually represented by tokens generated per second (TPS), but a single number can be misleading. A comprehensive test should at least differentiate the following phases:

    1. Model loading time: Reflects storage device and memory read efficiency.
    2. Input processing speed: Long prompts increase prefill computation.
    3. Output generation speed: Closer to the actual chat experience.
    4. Time to first token (TTFT): Affects interaction fluidity.
    5. Long-context stability: Verifies cache and memory management reliability.
    6. Multi-turn dialogue performance: Observes if significant degradation occurs as context grows.

    Under appropriate quantization, reasonable context length, and single-user interaction, a low-cost unified memory platform might achieve a usable level of 10 to 20+ tokens per second. This number is not a fixed conclusion; it is affected by model architecture, quantization method, memory frequency, backend implementation, OS scheduling, and background programs.

    Therefore, when testing, fix the model file, prompt length, thread count, context size, and sampling parameters, and repeat multiple times. Comparisons are only valid under identical conditions.

    Step 1: Confirm hardware resources. Check total system memory, available memory, iGPU driver status, and memory bandwidth. For large parameter models, capacity is usually more important than CPU clock speed. If system memory is too small, even if the model can theoretically be compressed to fit, runtime cache and OS overhead may cause instability.

    Step 2: Choose a suitable quantized model. Prioritize well-verified low-bit versions and ensure the model architecture is recognized by the target inference framework. Over-pursuing the lowest bit-width may lead to noticeable degradation in response quality. It is recommended to start with moderate quantization and adjust based on memory headroom and speed.

    Step 3: Install an inference program supporting the graphics backend. Ensure compatibility among the graphics driver, runtime libraries, and inference backend versions during installation. If the program always runs on the CPU after launch, check driver recognition, backend compilation options, and device selection parameters.

    Step 4: Control context length. The larger the context, the higher the cache footprint. Daily Q&A can start with a small window, increasing only when long document analysis is explicitly needed. For knowledge base Q&A, prioritize segmented retrieval and summary compression rather than blindly expanding the context.

    Step 5: Establish a performance baseline. Record model loading time, TTFT, continuous generation speed, and peak memory. Compare every subsequent change in quantization format, backend, or parameters against this baseline to avoid judging optimization effects based on subjective feelings.

    6. Expanding from Chat Inference to Local Agents

    Once a local model has stable text generation capabilities, you can further build agent workflows. For example, let the model handle task decomposition, tool selection, result summarization, and multi-turn state management, while external programs execute file processing, script execution, information retrieval, or data transformation.

    However, agents demand more from hardware and system resources than standard chat. This is because a single task may involve multiple model invocations and require saving intermediate states. When deploying agents on low-cost devices, adopt the following strategies:

    • Break tasks into short steps to reduce single-turn context length.
    • Set timeouts and maximum retries for tool calls.
    • Perform structural validation on model outputs to avoid executing erroneous parameters directly.
    • Restrict file access scope and system command permissions.
    • Log each task to help locate failure causes.
    • Add manual confirmation for high-risk operations.

    The advantage of local execution is that data remains within the device, does not rely on remote APIs, and incurs no cumulative usage costs per call. However, this does not mean local deployment is inherently secure. Model outputs may still contain misinformation, and agent toolchains may perform unexpected operations, so permission isolation and audit mechanisms are indispensable.

    7. Applicable Scenarios and Limitations

    This approach is suitable for personal development, offline Q&A, code assistance, document summarization, lightweight data processing, and prototype validation. For services requiring long-term operation, multi-user concurrency, or high throughput, low-power iGPU platforms usually lack sufficient bandwidth and concurrency capabilities, requiring more specialized compute nodes or centralized deployment architectures.

    Furthermore, while unified memory expands available capacity, it introduces shared resource contention. During model execution, background system tasks, browsers, multimedia applications, and other programs will compete for memory bandwidth. In practice, close unnecessary background apps and reserve ample space for the model process.

    Overall, the key to running large parameter models locally at low cost is not simply stacking hardware, but establishing a complete optimization pipeline: using quantization to reduce weight footprint, unified memory to solve capacity issues, graphics compute backends to increase parallelism, and context control, cache management, and task orchestration to improve the interactive experience. As long as device boundaries are clearly defined and verifiable testing methods are adopted, budget mini PCs can also handle a substantial portion of local AI tasks.