cpp on its own hardware, so this guide has no measured speed or memory figures. The steps and options come from the project's GitHub README and build guide, read on 2 December 2026. The project changes quickly, so check those pages for your version.
ik_llama.cpp is a free, MIT-licensed fork of llama.cpp. Its README describes it as a "llama.cpp fork with better CPU performance": it was started in June 2024, last synced with upstream in August 2024, and has "diverged substantially" since. It adds its own quantisation types and focuses on two backends: the CPU and NVIDIA CUDA.
That focus is why it's popular with people trying to run large mixture-of-experts (MoE) models on a home PC. In an MoE model only some of the "experts" run for each token, so a common trick is to keep the attention layers and shared weights in VRAM and leave the bulky expert weights in system RAM for the CPU to handle. If you've already tried this in mainline llama.cpp with --n-cpu-moe, our guide to running MoE models on low VRAM covers that route.
What you need
A CPU with AVX2 or better (or an Arm chip with NEON). The README says CPU and CUDA are "the only fully functional and performant compute backends". Not sure about AVX2? See how to check AVX2 support.
An NVIDIA GPU, ideally Turing (RTX 20-series) or newer. Pascal and Volta cards work, but the README says some flash-attention steps fall back to the CPU on them.
Plenty of system RAM if you plan to keep experts on the CPU. The model's expert weights have to fit there, and memory bandwidth matters a lot for CPU-side speed.
Build tools: the build guide lists cmake, a C++17 compiler and, for GPU support, the NVIDIA CUDA Toolkit.
AMD and Intel GPU owners: the README asks people not to file issues about ROCm, Vulkan, Metal, old NVIDIA GPUs or AVX-only CPUs, because the maintainers don't have time to support them. If you have a Radeon or Arc card, stick with mainline llama.cpp.
Step 1: Get the code
ik_llama.cpp is built from source. The README's quickstart starts with:
git clone https://github.com/ikawrakow/ik_llama.cpp
cd ik_llama.cpp
On Debian or Ubuntu, the README installs the build packages with:
apt-get update && apt-get install build-essential git libcurl4-openssl-dev curl libgomp1 cmake
On Windows, the build guide has a separate step-by-step section using the CUDA Toolkit and Visual Studio Build Tools 2022 with the clang tools. The README's Linux commands are written for Debian and Ubuntu. The ik_llama.cpp docs we read don't cover WSL2 specifically, but if you'd rather use a Linux environment on Windows, our WSL2 GPU set-up guide covers the general set-up.
Step 2: Build for CPU or for an NVIDIA GPU
For a CPU-only build, the README gives:
cmake -B build -DGGML_NATIVE=ON
cmake --build build --config Release -j$(nproc)
For NVIDIA GPU support, install the NVIDIA driver and CUDA Toolkit, then add -DGGML_CUDA=ON:
cmake -B build -DGGML_NATIVE=ON -DGGML_CUDA=ON
cmake --build build --config Release -j$(nproc)
AVX-512 CPUs: the README warns that on AMD Zen 4 and Intel Sapphire Rapids or newer, a plain Release build "silently falls back to the AVX2 path" unless you add the extra flags in the build guide's "CPU build flags for AVX-512" section. If your processor supports AVX-512, read that section before building.
Step 3: Download a GGUF model and start the server
ik_llama.cpp loads GGUF files, the same model format as llama.cpp. Our GGUF quantisation explainer covers what the Q4, Q5 and IQ labels mean.
The README's example starts the server like this on the CPU:
./build/bin/llama-server --model /my_local_files/gguf/Qwen_Qwen3-0.6B-IQ4_NL.gguf --ctx-size 4096
and like this with every layer on the GPU:
./build/bin/llama-server --model /my_local_files/gguf/Qwen_Qwen3-0.6B-IQ4_NL.gguf --ctx-size 4096 -ngl 999
Then open http://127.0.0.1:8080 in your browser to chat, or point another app at the server's API.
One warning from the README: don't use Unsloth quantised models with _XL in the name if they contain f16 tensors, because they're "likely to not work" with ik_llama.cpp. Other Unsloth files are fine.
Step 4: Keep the MoE experts on the CPU
For a big MoE model that won't fit in VRAM, the idea is to offload everything to the GPU with -ngl 999, then send the expert tensors back to system RAM. The README mentions three ways to do that: --cpu-moe (all experts on the CPU), --n-cpu-moe (experts of the first N layers on the CPU), or a tensor override such as:
-ot 'ffn_.*_exps=CPU'
According to the README's latest news, a recent change runs the MoE combine step on the CPU when experts are kept there with that override, which the project says cuts CPU-to-GPU copies by about nine times.
Two settings to avoid while you're doing this:
Don't add -rtr. The README says that if you run hybrid CPU/GPU inference with some experts on the CPU, you shouldn't use -rtr "unless you know what you are doing". It repacks the tensors left in RAM, and not every repacked type has a CUDA path.
If you use split mode graph with partial offload and get gibberish, the README suggests adding -cuda graphs=0.
Start with a small context, check how much VRAM is in use (see how to check VRAM usage on Windows), then lower the --n-cpu-moe number to move more layers' experts onto the GPU until VRAM is nearly full.
Optional: Run it in Docker
If you'd rather not compile anything, the README lists container images on ghcr.io for CPU, CUDA 12 and CUDA 13, each in swap, server and full versions, for example:
docker pull ghcr.io/ikawrakow/ik-llama-cpp:cu12-server
Our Ollama in Docker guide covers the basics of running GPU containers.
Which hardware makes sense
Because ik_llama.cpp only accelerates NVIDIA GPUs, a GeForce card is the obvious pairing. A 12 GB card such as the ASUS RTX 3060 12GB Dual Gaming OC V2 can hold a big MoE model's attention layers and some of its experts. At the top end, the NVIDIA GeForce RTX 5090 Founders Edition is a Blackwell card, and the README lists native NVFP4 and MXFP4 paths on the FP4 tensor cores of Blackwell (sm_120/sm_121) GPUs. For the CPU side, see our best CPUs for local AI.