Essential llama.cpp Command Line Flags for Local AI in 2026

TL;DR llama.cpp remains the fastest way to run quantized LLMs locally in 2026, but choosing the right command-line flags makes the difference between a sluggish 2 tokens/second and a responsive 30+ tokens/second experience. This guide covers the essential flags you need for optimal performance on consumer hardware. The most impactful flags control resource allocation: --n-gpu-layers offloads model layers to your GPU (start with -ngl 35 for 8GB VRAM), --threads sets CPU cores for processing (use physical cores minus 2), and --ctx-size defines context window length (2048 for chat, 8192 for document analysis). Getting these three right solves most performance issues. ...

June 15, 2026 · 9 min · Local AI Ops

Llama Models on AMD ROCm: Complete Self-Hosting Setup Guide

TL;DR Running Llama models on AMD GPUs requires ROCm-specific optimizations that differ significantly from NVIDIA CUDA workflows. This guide covers the complete setup for self-hosting Llama 2, Llama 3, and Code Llama variants on AMD hardware using ROCm 6.0+, with focus on memory management, compilation flags, and performance tuning that existing NVIDIA guides do not address. ...

May 25, 2026 · 9 min · Local AI Ops

llama.cpp Multi-GPU Support for Mixed Graphics Cards in 2026

TL;DR llama.cpp supports heterogeneous multi-GPU configurations, letting you mix NVIDIA, AMD, and even Intel Arc cards in the same system for local LLM inference. Unlike Ollama’s automatic GPU detection, llama.cpp requires explicit layer distribution using the -ngl flag combined with --split-mode and --tensor-split parameters. This gives you fine-grained control over which layers run on which card, essential when mixing a high-VRAM card with lower-capacity GPUs. ...

May 11, 2026 · 9 min · Local AI Ops

Fix Ollama Model Switching Causing 100% SSD Usage in 2026

TL;DR When you switch between models in Ollama, the service unloads the current GGUF file from memory and loads the new one from disk. Large models like llama3.1:70b or mixtral:8x7b can exceed 40GB, causing sustained disk reads that pin your SSD at maximum utilization. This becomes especially problematic when multiple users or applications trigger rapid model switches, creating a cascade of disk I/O that degrades system responsiveness. ...

May 4, 2026 · 9 min · Local AI Ops

Setting OLLAMA_NUM_GPU for Multi-GPU Local AI in 2026

TL;DR The OLLAMA_NUM_GPU environment variable controls how many GPUs Ollama uses for inference, but setting it correctly requires understanding your hardware topology and workload patterns. Unlike single-GPU setups where Ollama auto-detects your card, multi-GPU configurations demand explicit tuning to avoid memory fragmentation and PCIe bottlenecks. Set OLLAMA_NUM_GPU=2 to split model layers across two GPUs, or OLLAMA_NUM_GPU=4 for quad-GPU systems. Ollama distributes transformer layers sequentially – GPU 0 handles the first N layers, GPU 1 takes the next batch, and so on. This differs from data parallelism where each GPU processes different prompts simultaneously. ...

April 29, 2026 · 9 min · Local AI Ops

Running Llama.cpp with Inverse Kinematics AI Models in 2026

TL;DR llama.cpp now handles inverse kinematics calculations through specialized GGUF models that generate joint angles and motion paths for robotic systems. You run llama-server with an IK-trained model, send it target positions as JSON prompts, and receive executable motion commands. This works entirely offline without cloud dependencies. The typical workflow involves loading a quantized IK model (Q4_K_M or Q5_K_M recommended for speed), sending coordinate targets through the OpenAI-compatible HTTP API, and parsing the structured output into robot control commands. Models like CodeLlama-IK and specialized Llama variants trained on robotics datasets handle 6-DOF arm calculations, path planning with obstacle avoidance, and real-time trajectory adjustments. ...

April 26, 2026 · 9 min · Local AI Ops

Running Local AI Models on Kubernetes with Ollama in 2026

TL;DR Deploying Ollama on Kubernetes transforms local AI inference into a production-grade service with horizontal scaling, persistent model storage, and service mesh integration. This guide covers container orchestration patterns specifically for LLM workloads running on self-hosted infrastructure. The core deployment uses StatefulSets rather than Deployments to maintain stable network identities and persistent volume claims for model storage. Each Ollama pod serves the REST API on port 11434 and requires GPU node affinity when using NVIDIA runtime. Configure OLLAMA_HOST=0.0.0.0:11434 to bind the service to all interfaces within the pod network, and set OLLAMA_MODELS=/models pointing to your PersistentVolume mount path. ...

April 25, 2026 · 8 min · Local AI Ops

Self-Hosted AI Image Generation with Stable Diffusion in

TL;DR This guide walks you through deploying Stable Diffusion on your own Linux machine using ComfyUI and Automatic1111 (A1111), giving you complete control over your image generation pipeline without sending prompts or outputs to third-party services. You need an NVIDIA GPU with at least 6GB VRAM for basic operation. Cards like the RTX 3060 work well for standard 512x512 images, while RTX 4090 or A6000 cards handle larger resolutions and batch processing. AMD GPUs work through ROCm but require additional configuration. CPU generation is possible but extremely slow. ...

April 23, 2026 · 9 min · Local AI Ops

Qwen 3.5 Local Setup Guide: Ollama vs LM Studio Performance

TL;DR Running Qwen 3.5 locally requires choosing between Ollama’s CLI-first approach and LM Studio’s GUI-driven workflow. Both tools serve the same GGUF model files but differ significantly in performance characteristics and operational overhead. Ollama excels at automated deployments and scripting. Install with curl -fsSL https://ollama.com/install.sh | sh, pull the model using ollama pull qwen2.5-coder:7b, and start serving on port 11434. Memory usage stays consistent across inference requests, making it predictable for containerized environments. The CLI interface integrates cleanly with shell scripts and CI/CD pipelines. ...

April 21, 2026 · 9 min · Local AI Ops

How to Install LM Studio on Ubuntu 2026: Complete Setup

TL;DR LM Studio is a desktop GUI application for running large language models locally on Ubuntu 2026. Unlike command-line tools, it provides a graphical interface for downloading models from Hugging Face and running them without sending data to external servers. The application includes a local OpenAI-compatible API server, making it useful for developers who want to test AI integrations privately. ...

April 16, 2026 · 9 min · Local AI Ops
Buy Me A Coffee