gpu setup

KoboldCpp CUDA vs Vulkan for GGUF GPU Offload

Choose a KoboldCpp CUDA or Vulkan build for Windows or Linux, offload GGUF layers to one GPU, check the console, and recover from VRAM errors.

Illustrated title card for the guide: KoboldCpp CUDA vs Vulkan for GGUF GPU Offload

For GGUF offload in KoboldCpp, start with CUDA in the main build for NVIDIA or Vulkan in the nocuda build for AMD or Intel. Vulkan is also an option on NVIDIA cards that support it. GPU backends

Choose the Windows or Linux release file

Download the file that matches your system. KoboldCpp v1.125.1 release

When to use itWindows x64Linux x64Included GPU backends
NVIDIA on a newer PCkoboldcpp.exekoboldcpp-linux-x64CUDA 12 and Vulkan. Release files
AMD or Intel with Vulkan, or any Vulkan-capable card when you don’t need CUDAkoboldcpp-nocuda.exekoboldcpp-linux-x64-nocudaVulkan. Release files
Older NVIDIA card or older processor if the main build crasheskoboldcpp-oldpc.exekoboldcpp-linux-x64-oldpcCUDA 11 and Vulkan. Release files

For Vulkan on a CPU with AVX but no AVX2, select Use Vulkan (Old CPU). On a CPU with SSE3 and SSSE3 but no AVX, use the oldpc build and select Use Vulkan (Older CPU). Release files

Offload layers in the launcher

Start KoboldCpp without a model to open the launcher. Launcher tour

On Linux, first run chmod +x on the downloaded file, as shown in the terminal examples below. Linux installation

  1. On Quick Launch, set Backend to Use CUDA or Use Vulkan. Under GPU ID, pick your card by ID and check the name next to it. GPU backends
  2. Set GPU Layers to -1 for autofit or enter a positive count to set the number of GPU layers manually. A value of 0 disables layer offload. GPU layers
  3. Next to GGUF Text Model, click Browse and select your local .gguf file. Launcher tour
  4. For same-computer access, set Host to 127.0.0.1 on the Network tab. Click Launch to start with the current settings. Launcher tour

Start KoboldCpp from a terminal

Run one example from the folder containing your downloaded binary. Replace mymodel.gguf with your GGUF filename or path. Use the filename of the build you downloaded. Command line

The examples select GPU ID 0, use autofit with --gpulayers -1, and restrict access to the same computer with --host 127.0.0.1. Flag reference

Change the ID to match your card. For Vulkan, a set GGML_VK_VISIBLE_DEVICES takes priority over the ID in the command. Flag reference

Windows Command Prompt

CUDA

koboldcpp.exe --usecuda 0 --model mymodel.gguf --gpulayers -1 --host 127.0.0.1

Vulkan

koboldcpp-nocuda.exe --usevulkan 0 --model mymodel.gguf --gpulayers -1 --host 127.0.0.1

Linux terminal

On Linux, use chmod +x with the filename of the build you downloaded to make it executable. Linux installation

CUDA

chmod +x koboldcpp-linux-x64
./koboldcpp-linux-x64 --usecuda 0 --model mymodel.gguf --gpulayers -1 --host 127.0.0.1

Vulkan

chmod +x koboldcpp-linux-x64-nocuda
./koboldcpp-linux-x64-nocuda --usevulkan 0 --model mymodel.gguf --gpulayers -1 --host 127.0.0.1

For the Use Vulkan (Old CPU) equivalent, add --noavx2 to the Vulkan command. For Use Vulkan (Older CPU), use the oldpc binary and add --failsafe. Release files

Confirm offload in the console

  1. Check that the console reports your chosen backend. Look for the device in the model load log, such as CUDA0 or Vulkan0. GPU troubleshooting · GPU backends
  2. If you used autofit, read the value after -ngl in Autofit Result. A positive number is the chosen GPU layer count, and -1 means all layers. GPU layers
  3. Check how many layers the console reports went to the GPU during model load. GPU troubleshooting

If you see Auto Selected Default Backend, KoboldCpp selected the CPU. Choose the GPU backend explicitly and check that GPU Layers is set to -1 or a positive count. GPU troubleshooting · GPU layers

On NVIDIA, if Use CUDA is missing, check that you downloaded the main build or the oldpc build for an older card. If the correct backend loads but the console still reports zero offloaded layers, try a positive manual count. GPU troubleshooting

Recover from a VRAM error

Console errorMeaning
cudaMalloc failed: out of memoryCUDA failed to allocate GPU memory. Out of memory errors
ErrorOutOfDeviceMemoryVulkan failed to allocate GPU memory. Out of memory errors

Relaunch after each change below. Out of memory errors

  1. If you entered a layer count manually, try autofit or reduce the count by a few layers. If loading fails after autofit, switch to a manual count in GPU Layers or --gpulayers and lower it by a few layers if loading still fails. GPU layers · Out of memory errors
  2. Lower Context Size on Quick Launch, or pass a smaller value with --contextsize. Launcher tour · Out of memory errors
  3. Close other programs using the graphics card. Out of memory errors

Evidence and limits

This guide uses the KoboldCpp v1.125.1 release notes and the project’s documentation, including its flag reference for 1.122.1. Release notes · Flag reference

The documentation was checked on November 27, 2026. The guide covers setup and troubleshooting for one GPU. No hands-on testing was performed for this guide.

Sources

  1. KoboldCpp v1.125.1 release
  2. Release files and system requirements
  3. GPU backends: CUDA, Vulkan, ROCm, Metal, CPU
  4. Launcher tour
  5. GPU layers: how many to offload
  6. Command-line flags and options reference
  7. Command line
  8. Install on Linux, desktop or headless
  9. GPU not used or generation slow
  10. Out of memory errors (VRAM and RAM)

Related