Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Slow local AI responses and high memory use have different causes, so start by identifying where the delay or memory pressure occurs—not by changing every setting at once. Record your model, runtime and version, context setting, hardware, and exact symptom; then use logs and device-placement data to test one change at a time. The commands and settings below are specific to Ollama and LocalAI and may not apply to other runtimes.

Record the setup and pinpoint the symptom

Before changing settings, write down enough detail to distinguish a model-fit problem from a runtime or hardware configuration issue.

  • System: operating system, available system RAM, and GPU model and memory.
  • Runtime: tool name and version. Defaults and command behavior can change between releases.
  • Model: name and quantization, if known.
  • Context: configured context length.
  • Symptom: slow first response, slow token generation, slow model loading, memory growth during a session, or a specific out-of-memory error.
  • Evidence: the relevant log lines and any placement information the runtime reports.

These symptoms are not interchangeable: slow loading points toward model storage or initialization, while slow generation calls for checking device placement and workload configuration. A memory-fit error calls for examining the model, context, and available memory.

Check where the model actually loaded

Do not assume GPU acceleration is active because the computer has a GPU or the runtime supports one. Confirm actual placement before trying to optimize generation.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.
#1 Best Overall
MINISFORUM MS-02 Ultra Workstation Mini PC, Intel Core Ultra 9 285HX (24C/24T, up to 5.5GHz), PCIe 5.0 x16, 32GB RAM 1TB SSD,USB4 v2 80Gbps, Dual 25GbE+10GbE+2.5GbE, Wi-Fi 7, 350W PSU
  • High-Performance AI Processor:The MS-02 Ultra features an Intel Core Ultra 9 285HX (24C/24T, up to 5.5 GHz, 13 TOPS NPU), delivering fast and efficient performance for AI inference, algorithm development, and media workloads. A PCIe x16 expansion slot supports desktop-class GPU upgrades for advanced model training and accelerated computing tasks. It's ideal for creators, engineers, and teams handling intensive parallel workloads.
  • 4 × M.2 PCIe 4.0 + 4 × DDR5 SODIMM slots:Four DDR5 SODIMM slots support up to 256 GB of memory, while ECC helps maintain data integrity in mission-critical environments. Four PCIe 4.0 M.2 slots support up to 24 TB of storage, supporting RAID 0/1/5/10, combining high-speed performance with data protection. It allows for the creation of independent scratch disks, media libraries, and project drives, providing high-throughput for production workflows.
  • PCIe & USB 4.0 v2: Up to three PCIe slots can be equipped, including a dual-slot x16 GPU. The main slot supports PCIe 5.0, meeting the needs of high-bandwidth creative and computing workloads. USB 4.0 v2 (80Gbps) supports high-bandwidth external storage and displays.
  • Ultra-fast Networking: Wi-Fi 7 further enhances wireless performance with next-generation speeds and low-latency stability. Intelligent bandwidth switching optimizes throughput in different network environments, ensuring optimal performance for enterprise or local networks. Dual 25GbE ports (providing up to approximately 3.125 GB/s bandwidth, about 25 times faster than traditional 1GbE), enabling seamless large-scale file transfers and parallel computing. 10GbE and 2.5GbE ports, with support for Intel vPro technology, ensure enterprise-grade remote management and deployment flexibility.
  • Server-grade thermal architecture: Utilizing a dedicated CPU/GPU airflow design, equipped with a 6-pipe dual-fan cooler, it maintains stable performance even under sustained loads, delivering up to 140W Turbo power while maintaining a 100W TDP, and operating with noise levels as low as 36 dB. An integrated 350W power supply ensures stable and reliable output for demanding computing tasks and fully loaded extended configurations.

Ollama: inspect processor placement

Run ollama ps. The PROCESSOR column shows whether the model is using GPU, CPU, or a split between them. Ollama’s FAQ explains output such as 100% GPU, 100% CPU, and split CPU/GPU placement: Ollama FAQ.

LocalAI: inspect backend logs

Check LocalAI server and backend logs to confirm whether layers were offloaded to the GPU. A generic HTTP 500 alone does not explain the cause. LocalAI’s troubleshooting guide notes that debug output can expose backend stdout and stderr, load parameters, and per-token timing: LocalAI troubleshooting.

Test whether context length is driving memory use

Context length is the maximum number of tokens a model can access in memory. A larger context requires more memory, so a context setting larger than the task needs can contribute to memory pressure. Ollama documents this relationship in its context length guide.

If memory use is the main issue, reduce context length as a controlled test, then check whether the workload still fits and performs acceptably. Do not treat any one context value as a universal recommendation: the useful setting depends on the model, runtime version, available memory, and task.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

Ollama’s live context-length page lists defaults by VRAM tier, while its FAQ also describes a 4096-token default and ways to change context. Because the pages describe defaults differently, check the current documentation for your Ollama version and the method you use to set the value rather than assuming one default applies in every case. The listed defaults are Ollama configuration details, not universal hardware requirements.

Resolve GPU out-of-memory errors one change at a time

When LocalAI logs report a GPU out-of-memory failure, its troubleshooting guide identifies the model plus its KV cache as a possible cause. The guide lists several options; choose based on what your setup can afford, make one change, and verify the result in the logs.

Rank #2
GMKtec EVO-X2 AI Mini PC Ryzen Al Max+ 395 Superchip 128GB LPDDR5X 2TB SSD
  • EVOLUTION RYZEN AI MAX+ 395 MINI PC - GMKtec EVO-X2 is the next evolution in AI mini PC Ryzen Strix Halo series. Thanks to AMD Simultaneous Multithreading (SMT) the core-count is effectively doubled, to 32 threads. Ryzen AI Max+ 395 has 64 MB of L3 cache and can boost up to 5.1 GHz, depending on the workload. The Ryzen AI Max+ 395 is currently rated as the "most powerful x86 APU" on the market for AI computing.
  • AI NPU with XDNA 2 ARCHITECTURE - Powered by 16 “Zen 5” CPU cores, 50+ peak AI TOPS XDNA 2 NPU and a truly massive integrated GPU driven by 40 AMD RDNA 3.5 CUs, the Ryzen AI MAX+ 395 is a transformative upgrade and delivers a significant performance boost over the competition. The Ryzen AI Max+ 395 excels in consumer AI workloads like the llama.cpp-powered application: LM Studio. Shaping up to be the must-have app for client LLM workloads, LM Studio allows users to locally run the latest language model without any technical knowledge required and unleash their creativity and productivity.
  • AMD RADEON 8090S iGPU GAMING PC - The AMD Radeon RX 8060S offers all 40 CUs with up to 2.9 GHz graphics clock and uses the new RDNA 3.5 architecture. The powerful iGPU is positioned between an RTX 4060 and 4070 laptop GPU and therefore enables gaming in FHD at maximum details in most demanding games. The 8060S can also utilize the full 128GB pool, which is perfect for running LLMs such as Deepseek 70B Q8, which runs comfortably on this machine.
  • EIGHT CHANNEL LPDDR5X - LPDDR5X is a new ground breaking memory small form factor installed on-board. With blazing speeds up to to 8000MT/s, it runs 1.5x faster than the DDR5 SODIMMs; 90% better performance over DDR5 SODIMMs in video conferencing and photo editing; 30% better performance in productivity apps; 12% better performance in digital content workloads.
  • QUAD SCREEN 8K DISPLAY SUPPORT - EVO-X2 AI Mini PC support 4-screen 4K/8K output via HDMI 2.1 (8K@60Hz), DisplayPort 1.4 (4K@60Hz), and dual USB 4 40Gbps Transfer speed (supporting PD3.0/DP1.4/DATA). Ideal for gaming, video editing, and multitasking, it provides expansive and crisp multi-display support.
Possible change What it addresses Trade-off or check
Use a smaller quantization Reduce the model’s memory footprint. Quantization can affect model precision; check output quality for your use case.
Lower context_size Reduce memory used for context and KV cache. The model can use less conversational or prompt context.
Reduce gpu_layers Keep fewer model layers on the GPU. This may reduce GPU memory use, but can change how much work is offloaded.
Free VRAM used by other processes Make more GPU memory available to the model. Check what else is using the GPU before closing applications.

These are LocalAI-specific settings and remedies as described in its troubleshooting guide; confirm the relevant backend and configuration syntax for your installation.

Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Support on Ko-Fi

Investigate GPU discovery and CPU workload

If Ollama uses CPU when you expect GPU

Check runtime visibility and platform configuration before changing drivers. Ollama’s Linux NVIDIA guidance includes checking whether a container can see the GPU, whether the UVM driver is loaded, and whether current NVIDIA drivers are installed. Its AMD guidance discusses access permissions for /dev/kfd and driver compatibility. Follow the instructions for your platform in the Ollama GPU documentation; these are different checks for different configurations, not a reason to blindly reinstall drivers.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.

If LocalAI generation is slow

LocalAI’s performance guidance recommends avoiding CPU thread overbooking and says to ideally match --threads to the number of physical cores. Confirm which backend and runtime behavior apply before changing flags. Use debug mode and backend logs to inspect token timing and GPU offload rather than relying on a single overall response-time impression. See LocalAI troubleshooting.

Separate model loading delays from slow token generation

LocalAI recommends storing models on an SSD rather than an HDD. That advice is relevant when model storage or loading is the bottleneck: faster storage may help load time. It is not evidence that an SSD will fix high inference memory use or make tokens generate faster once the model is running. Check placement and timing before treating a storage upgrade as an inference fix.

Use a controlled troubleshooting loop

  1. Capture a baseline: note the model, quantization, context setting, runtime and version, system and GPU memory, symptom, and relevant logs.
  2. Verify placement: in Ollama, run ollama ps; in LocalAI, inspect backend logs for offloaded layers and timing.
  3. Match the change to the symptom: for memory pressure, test a lower context or an applicable LocalAI fit remedy; for unexpected CPU placement, investigate GPU visibility; for slow loading, check model storage.
  4. Change one setting or condition: avoid changing quantization, context, offload, and thread count together, because then you cannot tell which change mattered.
  5. Recheck the same evidence: inspect placement, logs, memory use, and the original symptom after each change. Keep a change only if it improves the relevant problem without making the workload unusable.

There is no single optimal setting established for every computer, model, runtime, and workload. For other local AI tools, use that runtime’s documentation for its own commands and defaults rather than assuming Ollama or LocalAI instructions transfer unchanged.

Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

Special offer. See more information about Outbyte and uninstall instructions. Please review EULA and Privacy policy.