Local LLM Inference on Integrated GPUs: Troubleshooting Low Performance
This article explains why large language models often run slowly on integrated GPUs and how to find the cause. It covers shared memory limits, memory bandwidth, backend support, and thermal throttling, then walks through a five-step troubleshooting process and compares deployment options.
1. Background
An integrated GPU has no dedicated video memory. It shares physical memory with the system RAM. Its performance in large model inference therefore depends on its compute units, as well as on memory capacity, memory bandwidth, and software support. Many developers have only a laptop or small desktop with an integrated GPU. They want to run language models locally, but generation is much slower than expected, and inference may run almost entirely on the CPU.
Common symptoms include low GPU utilization over long periods, fans running at high speed continuously, generation speed that drops over time, or large speed differences for the same model across different tools. These symptoms usually come from several factors combined, so troubleshooting needs to proceed layer by layer.
2. Key Factors Affecting Inference Performance
2.1 VRAM Capacity and Unified Memory
The reserved video memory on an integrated GPU is typically a region set aside by the BIOS or system settings. The driver borrows additional memory from shared system RAM when needed. Whether a model can load depends on the sum of these two parts.
You can roughly estimate the memory needed to load a model as:
Required memory ≈ model weight size + KV cache + runtime overhead
Take a 7B parameter model as an example. With 4-bit quantization, the weights need about 3.5 GB. The KV cache and framework overhead add to the actual usage. The longer the context, the larger the KV cache. This part is often overlooked.
A larger reserved video memory region is not always better. The bigger the dedicated region, the less system memory remains available, so overall performance can drop. Some practitioners report that when dedicated VRAM is set too high, the framework behaves abnormally when loading large models. Whether this happens widely needs to be verified independently and should not be taken as a settled conclusion.
2.2 Memory Bandwidth Determines Generation Speed
LLM inference has two phases: processing the input prompt, and generating tokens one by one. The second phase reads nearly all the weights once for each token generated. This makes it a typical memory-bound workload. Generation speed therefore depends mainly on memory bandwidth, not on the number of compute units.
You can estimate the theoretical upper limit with:
Maximum tokens per second ≈ effective memory bandwidth ÷ weight bytes read per token
Assume an effective bandwidth of 60 GB/s and weights of about 4 GB. The theoretical upper limit is about 15 tokens per second. Actual speed is usually lower, because computation, scheduling, and cache access add extra overhead.
Memory bandwidth depends on channel count, memory frequency, and bus width. A dual-channel configuration usually provides much higher bandwidth than a single-channel one. When choosing a device, the number of memory slots, the maximum capacity per module, and the supported frequencies are the hardware factors that set this limit.
2.3 Compute Backend and Driver Support
Detecting the GPU does not mean the inference framework actually uses it. The framework may run only on the CPU, or it may run only some layers on the GPU.
To check, read the log printed when the model loads, and confirm which device each layer or block is assigned to. If most layers are still on the CPU, fix device detection and backend support before tuning parameters.
Support for integrated GPU architectures varies widely between framework versions. Some versions do not ship precompiled compute kernels for a specific architecture. In that case, update to a version that supports the architecture, or check the hardware support list in the official release notes.
2.4 Thermal and Power Limits
Laptops have limited cooling capacity. Sustained high load triggers power limits and temperature protection, which lowers clock frequencies. A typical symptom is normal speed for the first few minutes, followed by a gradual slowdown.
Do not judge performance from the first few generations alone. Run the model continuously for at least 30 minutes, and record temperature, clock frequency, and generation speed every minute to see whether performance stays stable.
3. Step-by-Step Troubleshooting
Step 1: Confirm Which Device the Model Runs On
Check the framework’s startup and model loading logs for the device type and layer assignments. Use the system’s built-in performance monitor to watch GPU utilization and shared memory usage. If GPU utilization stays near zero, computation is not running on the GPU.
Step 2: Adjust Video Memory Allocation in Small Steps
Change only one parameter at a time. Start from a small dedicated VRAM value and increase it gradually. After each change, record three results: whether the model loads, the latency of the first token, and the speed during stable generation.
Do not set a very large value at once. An oversized dedicated region reduces the system memory available, which can cause frequent paging and slow things down.
Step 3: Choose a Suitable Quantized Version
Quantization significantly reduces the size of model weights. Lower-bit quantized versions use less memory and put less pressure on bandwidth, but output quality may decline. Balance quality and speed based on your task requirements.
Test with a medium quantization level first. Once speed meets your target, try higher-precision versions.
Step 4: Verify the Software Version and Source
Prefer official framework releases, and read the hardware support notes in the changelog. Use modified versions from unknown sources with caution. Such files may contain malicious code or unreliable memory handling logic. After downloading, verify the checksum provided by the official source.
Step 5: Control Context Length and Concurrency
The longer the context, the larger the KV cache and the higher the first-token latency. In knowledge-base Q&A, pass only the fragments relevant to the question, so unrelated content does not inflate the context. Also keep concurrent requests within a reasonable limit based on available memory.
4. Choosing a Deployment Method
4.1 Graphical Desktop Tools
These tools are quick to set up and suit personal testing and model comparison. Their drawback is that inference is tied to the interface. This makes them hard to keep running stably over the long term and hard for other programs to call.
4.2 Inference Service with a Client
This approach works better for long-term use. The inference service runs in the background and exposes an HTTP interface. A knowledge-base front end, scripts, or other applications call the model through that interface. Because the two are separate, you can change models, adjust parameters, or update the service without modifying the front end.
The following example shows how to call a local inference service. Check the documentation for your service for the exact port and path:
import requests
