KoboldCpp error messages and what they mean

Search for the message, or paste your whole console log into the analyzer: it runs in your browser and finds the real cause, which is often a few lines above the last error. Messages such as Failed to execute script, Could not load text model and Failed to fetch are wrappers: they only say that something failed earlier. Each row gives the meaning, the likely causes in order, and the fix.

Checked against KoboldCpp 1.124.2 · updated 13 Nov 2026
  • lab-lnx: Linux test VM · 4 vCPU · 15 GB · no GPU
  • gha-w25: Windows Server 2025 test machine · 4 vCPU · 16 GB · no GPU
  • gha-w22: Windows Server 2022 test machine · 4 vCPU · 16 GB · no GPU
  • gha-u24: Ubuntu 24.04 test machine · 4 vCPU · 16 GB · no GPU
  • gha-mac15: macOS 15 test VM (Apple Silicon) · 3 vCPU · 7 GB · paravirtual Metal
How we test
On this page
  1. Why the last line is often not the real error
  2. Where to find the KoboldCpp error log
  3. Exit codes we observed
  4. Messages you can ignore
  5. “Internal server error” and API errors in apps
  6. Your error isn’t listed?

The result appears here. Nothing you paste leaves this page.

Failed to execute script 'koboldcpp' due to unhandled exception!crashfatalF49

Wrapper message. It says that something failed, not why. The real cause is printed above it. Why the last line is often not the real error.

This line only says that KoboldCpp's launcher stopped with an unhandled error. It never says why: the real cause is printed above it.

Likely causes, most likely first

  1. Read the lines just above for the real error (port in use, missing DLL, out of memory, a crash while loading the model)
  2. An old CPU without AVX2 running a normal build
  3. Antivirus removed a file that KoboldCpp unpacks at start

What to do

  1. Scroll up to the first error line above this message and look that one up
  2. Start KoboldCpp from a terminal so the window stays open
  3. On a CPU older than about 2013, try the oldpc file or --noavx2
Seen in our testsr1-lnx/err-port-in-use · KoboldCpp 1.124.2
OSError: Cannot start the server: no socket could bind.[PYI-10566:ERROR] Failed to execute script 'koboldcpp' due to unhandled exception!Warning: Port 45327 already appears to be in use by another program.

Tested by us: F49 and users report it too · #56 · #42 · #1584 · #1608

Link to this error

OSError: Cannot start the server: no socket could bind.networkfatalF49

KoboldCpp could not open its port because another program is already using it, most often another KoboldCpp window.

Likely causes, most likely first

  1. A second KoboldCpp is still running (check the system tray, Task Manager or ps)
  2. Another program uses port 5001
  3. Your PC blocks the port

What to do

  1. Close the other KoboldCpp window, or end its process
  2. Start this one on another port with --port 5002
  3. Check what holds the port: netstat -ano (Windows) or ss -ltnp (Linux)
Seen in our testsr1-lnx/err-port-in-use · KoboldCpp 1.124.2
  File "koboldcpp.py", line 9178, in RunServerMultiThreaded    raise OSError("Cannot start the server: no socket could bind.")OSError: Cannot start the server: no socket could bind.

Tested by us: F49

Link to this error

OSError: exception: access violation reading 0x…crashfatalusers report · 57

The model loader crashed while reading memory. It points to a model the build cannot handle, a memory problem, or a CPU instruction the build assumes.

Likely causes, most likely first

  1. A model architecture that is newer than your KoboldCpp
  2. A broken or incomplete model file
  3. Not enough RAM or VRAM for the model plus context
  4. A CPU without AVX2 using a normal build

What to do

  1. Update to the latest KoboldCpp release
  2. Check the model file size against its Hugging Face page, then download it again
  3. Try a smaller quantisation or a lower context
  4. On an old CPU use the oldpc file or --noavx2

Users report: 57 issues · #1584 · #761 · #2211 · #2522 · #1584

Link to this error

llama_model_load_from_file_impl: failed to load modelloadfatalF21

Wrapper message. It says that something failed, not why. The real cause is printed above it. Why the last line is often not the real error.

The model could not be loaded. The reason is printed a few lines above this message.

Likely causes, most likely first

  1. The model file is damaged or the download stopped early
  2. The model architecture is newer than this KoboldCpp
  3. A split model was loaded from the wrong part

What to do

  1. Look at the lines above for tensor, architecture or bounds errors
  2. Compare the file size with the one on Hugging Face and download again if it differs
  3. Update KoboldCpp if the log says unknown model architecture
Seen in our testsrun1/lab-lnx/fail-truncated · KoboldCpp 1.124.2
llama_model_load: error loading model: tensor 'output.weight' data is not within the file bounds, model is corrupted or incompletellama_model_load_from_file_impl: failed to load modelgpttype_load_model: error: failed to load model '/home/<user>/lab/results/run1-2026-11-13-local/lab-lnx/_files/truncated.gguf'

Tested by us: F21 and users report it too · #2262 · #2211 · #1789 · #2032

Link to this error

Error: Could not load text model: <path>loadfatalF19F20

Wrapper message. It says that something failed, not why. The real cause is printed above it. Why the last line is often not the real error.

KoboldCpp gives up after the loader failed. This is the last line of a failed load, not the cause.

Likely causes, most likely first

  1. See the error printed above this line

What to do

  1. Find the first error above this line and look it up
  2. If the file is missing or not a GGUF, check the path and the file
Seen in our testsrun1/lab-lnx/fail-not-gguf · KoboldCpp 1.124.2
Could not load text model: /home/<user>/lab/results/run1-2026-11-13-local/lab-lnx/_files/not-a-model.gguf

Tested by us: F19 F20 F21 · #744 · #2003 · #2586 · #1882

Link to this error

Cannot find text model file: <path>loadfatalF19

The path you gave for --model does not point to a file.

Likely causes, most likely first

  1. A typo or a wrong folder in the path
  2. A path with spaces that was not quoted
  3. The file was moved or deleted

What to do

  1. Check the path and put it in quotes if it has spaces
  2. Use the launcher's Browse button instead of typing the path
Seen in our testsrun1/lab-lnx/fail-missing-model · KoboldCpp 1.124.2
Cannot find text model file: /home/<user>/lab/models/does-not-exist.gguf

Tested by us: F19

Link to this error

load_model: error: invalid or unsupported model file '<path>'loadfatalF20

The file you chose is not a GGUF model that KoboldCpp can read.

Likely causes, most likely first

  1. A different format such as safetensors, bin or a zip
  2. An HTML page saved instead of the model (a failed download)
  3. A wrong file picked in the launcher

What to do

  1. Use a .gguf file; find one on the model's Hugging Face Files tab
  2. Check the file size: a few kilobytes means a saved web page, not a model
Seen in our testsrun1/lab-lnx/fail-not-gguf · KoboldCpp 1.124.2
Loading Text Model: /home/<user>/lab/results/run1-2026-11-13-local/lab-lnx/_files/not-a-model.ggufload_model: error: invalid or unsupported model file '/home/<user>/lab/results/run1-2026-11-13-local/lab-lnx/_files/not-a-model.gguf'Load Text Model OK: False

Tested by us: F20

Link to this error

llama_model_load: error loading model: tensor '…' data is not within the file bounds, model is corrupted or incompleteloadfatalF21

The model file is cut short. The download stopped before the end.

Likely causes, most likely first

  1. The download was interrupted
  2. The disk filled up while saving
  3. A browser saved only part of the file

What to do

  1. Download the file again and compare its size with the Hugging Face page
  2. Free disk space before downloading
Seen in our testsrun1/lab-lnx/fail-truncated · KoboldCpp 1.124.2
Loading Text Model: /home/<user>/lab/results/run1-2026-11-13-local/lab-lnx/_files/truncated.ggufllama_model_load: error loading model: tensor 'output.weight' data is not within the file bounds, model is corrupted or incompletellama_model_load_from_file_impl: failed to load model

Tested by us: F21

Link to this error

unknown model architecture: '<arch>'loadfatalusers report · 17

The model is built on a design this KoboldCpp does not know yet.

Likely causes, most likely first

  1. Your KoboldCpp is older than the model
  2. The model needs a newer or rolling build

What to do

  1. Update to the latest release
  2. Check the release notes for the architecture name

Users report: 17 issues · #638 · #2032 · #1306 · #2487 · #2570

Link to this error

missing tensor 'blk.N.…'loadfatalusers report · 4

The model file lacks a part this build expects.

Likely causes, most likely first

  1. A model variant that this build does not support yet
  2. A broken quantisation

What to do

  1. Update KoboldCpp, then try a different quant of the same model

Users report: 4 issues · #2211 · #1773 · #1219 · #2211 · #1773

Link to this error

tensor '…' has wrong shape; expected … got …loadfatalusers report · 10

A part of the file has a different size than the loader expects.

Likely causes, most likely first

  1. An old-format or modified model
  2. The wrong kind of model in a slot, for example an image model in the text slot

What to do

  1. Check that each file is in the right slot of the launcher
  2. Download the original GGUF again

Users report: 10 issues · #2300 · #2435 · #370 · #2300 · #2435

Link to this error

mtmd_init_from_file: error: mismatch between text model (n_embd = N) and mmproj (n_embd = M)visionfatalF50

The vision projector (mmproj) belongs to a different model than the text model you loaded.

Likely causes, most likely first

  1. The mmproj was downloaded for another model
  2. Two different model sizes of one family were mixed

What to do

  1. Download the mmproj that sits in the same Hugging Face repo as your model
  2. Or remove the mmproj if you do not need vision
Seen in our testsr1-lnx/err-wrong-mmproj · KoboldCpp 1.124.2
get_dummy_batch: warmup with image size = 512 x 512mtmd_init_from_file: error: mismatch between text model (n_embd = 896) and mmproj (n_embd = 576)hint: you may be using wrong mmproj

Tested by us: F50

Link to this error

key clip.vision.… not found in filevisionfatalusers report · 2 (from issue bodies)

The projector file is in a format this build does not read.

Likely causes, most likely first

  1. An mmproj that does not match the model
  2. An old projector with a new build or the other way round

What to do

  1. Download the matching mmproj for your model

Users report: 2 (from issue bodies) issues · #1451 · #1420 · #2100

Link to this error

Unable to detect VRAM, please set layers manually.gpuwarningF18

KoboldCpp could not read how much video memory you have, so automatic layer choice is not possible. It continues, usually on CPU.

Likely causes, most likely first

  1. No GPU, or no working GPU driver
  2. An integrated or Intel GPU the tools cannot query
  3. A tool such as nvidia-smi is missing

What to do

  1. Choose a GPU backend in the launcher and set GPU layers yourself
  2. Check the model buffer lines to see where the model really went
Seen in our testsrun1/lab-lnx/api-parallel-2 · KoboldCpp 1.124.2
No GPU or CPU backend was selected. Trying to assign one for you automatically...Unable to detect VRAM.Auto Selected Default Backend (flag=0)

Tested by us: F18 and users report it too · #1748 · #1413 · #1302 · #2585

Link to this error

Unable to determine GPU Memorygpuwarningusers report · ~12 (from issue bodies)

Same situation as 'Unable to detect VRAM': the free video memory was not readable.

Likely causes, most likely first

  1. No working GPU driver
  2. An unsupported GPU for the memory query

What to do

  1. Set --gpulayers by hand
Seen in our testsrun1/lab-lnx/api-parallel-2 · KoboldCpp 1.124.2
System: Linux #1 SMP PREEMPT_DYNAMIC @0 x86_64 x86_64Unable to determine GPU MemoryDetected Available RAM: 15260 MB

Users report: ~12 (from issue bodies) issues · #1921 · #2100 · #2325 · #1921 · #2100

Link to this error

No GPU backend found, or could not automatically determine GPU layers. Please set it manually.gpuwarningusers report · 4

KoboldCpp could not pick a GPU backend or a layer count and falls back to CPU.

Likely causes, most likely first

  1. A build without GPU support, or no backend chosen
  2. Missing drivers

What to do

  1. Pick CUDA or Vulkan in the launcher, or use the right file for your GPU
Seen in our testsrun1/lab-lnx/api-parallel-2 · KoboldCpp 1.124.2
Unable to detect VRAM.No GPU backend found, or could not automatically determine GPU layers. You may prefer to set layers manually.System: Linux #1 SMP PREEMPT_DYNAMIC @0 x86_64 x86_64

Users report: 4 issues · #1146 · #1260 · #1652 · #1146 · #1260

Link to this error

Auto Selected Default Backend (flag=0)gpuharmlessF18

No GPU backend was chosen, so everything runs on the CPU.

Likely causes, most likely first

  1. No GPU flag was given and none was detected
  2. The GPU flag was ignored because the build has no such backend

What to do

  1. If you expected the GPU, choose CUDA or Vulkan and set GPU layers
  2. Check the KV buffer line: CPU means CPU
Seen in our testsrun1/lab-lnx/api-parallel-2 · KoboldCpp 1.124.2
Unable to detect VRAM.Auto Selected Default Backend (flag=0)

Tested by us: F18

Link to this error

ggml_vulkan: vk::Device::allocateMemory: ErrorOutOfDeviceMemorymemoryfatalusers report · 11

The Vulkan driver refused to give KoboldCpp more video memory.

Likely causes, most likely first

  1. Too many layers or too much context for the card
  2. Another program uses the video memory

What to do

  1. Lower --gpulayers, the context size, or quantise the KV cache
  2. Use the VRAM calculator to see what fits

Users report: 11 issues · #1805 · #1619 · #1054 · #1882 · #1805

Link to this error

ggml_vulkan: Device memory allocation of size N failed.memoryfatalusers report · 3 (from issue bodies)

A single large block of video memory could not be reserved on a Vulkan device.

Likely causes, most likely first

  1. Not enough free video memory
  2. A driver limit on the size of one allocation

What to do

  1. Reduce layers, context or batch size

Users report: 3 (from issue bodies) issues · #1805 · #1789 · #1493 · #1805 · #1789

Link to this error

cudaMalloc failed: out of memorymemoryfatalusers report · 15

The NVIDIA card has no room for what KoboldCpp asked for.

Likely causes, most likely first

  1. Too many layers, too much context, or a large batch size
  2. Another program uses VRAM
  3. With two GPUs, an uneven split

What to do

  1. Lower --gpulayers or --contextsize
  2. Quantise the KV cache with --quantkv
  3. With several GPUs check the tensor split

Users report: 15 issues · #1882 · #2423 · #1590 · #2593 · #1882

Link to this error

failed to allocate compute (pp) buffersmemoryfatalusers report · 8

The working memory for processing the prompt did not fit.

Likely causes, most likely first

  1. A large context or a large batch size with too little free memory

What to do

  1. Lower the context size or --batchsize

Users report: 8 issues · #1054 · #1882 · #1805 · #1054 · #1882

Link to this error

llama_init_from_model: failed to initialize the context: failed to allocate buffer for kv cachememoryfatalF55

The context memory (KV cache) could not be created. The context you asked for is too big for the free memory.

Likely causes, most likely first

  1. A very large --contextsize
  2. Little free RAM or VRAM
  3. Other programs using memory

What to do

  1. Lower --contextsize; every doubling doubles the KV cache
  2. Quantise the KV cache with --quantkv
  3. Check the number with the VRAM calculator
Seen in our testsr1-lnx/host-oom-huge-context · KoboldCpp 1.124.2
ggml_backend_buft_alloc_buffer_n_default: failed to allocate CPU buffer of size 6445596672llama_init_from_model: failed to initialize the context: failed to allocate buffer for kv cachegpttype_load_model: error: failed to load model '<models>/qwen2.5-0.5b-instruct-q4_k_m.gguf'

Tested by us: F55

Link to this error

ggml_cuda_host_malloc: failed to allocate N MiB of pinned memory: out of memorymemorywarningusers report · 22

KoboldCpp could not lock host memory for faster transfers. It usually continues without it.

Likely causes, most likely first

  1. A system limit on locked memory
  2. --usemlock with a large model

What to do

  1. Ignore it if the model loads; otherwise drop --usemlock

Users report: 22 issues · #1158 · #1054 · #2045 · #1158 · #1054

Link to this error

ggml_new_tensor_impl: not enough space in the context's memory poolmemoryfatalusers report · 8

An old allocation error: the loader ran out of its working space.

Likely causes, most likely first

  1. An old KoboldCpp version
  2. A model that is too large for the build

What to do

  1. Update KoboldCpp

Users report: 8 issues · #563 · #141 · #258 · #563 · #141

Link to this error

CUDA error: an illegal memory access was encounteredgpufatalusers report · 8

The GPU code touched memory it should not. This is a bug or an unsupported combination.

Likely causes, most likely first

  1. ContextShift together with a quantised KV cache
  2. A backend bug in this version

What to do

  1. Turn off --quantkv, or use the f16 KV cache
  2. Update, or go back one version

Users report: 8 issues · #1469 · #1412 · #1480 · #1469 · #1412

Link to this error

ggml-cuda was compiled without support for the current GPU architecturegpufatalusers report · 1 (28 comments)

Your NVIDIA card is older than the GPUs this build supports.

Likely causes, most likely first

  1. A GPU from before the Pascal/Turing era with the normal CUDA build

What to do

  1. Use the oldpc file, or the Vulkan backend

Users report: 1 (28 comments) issues · #610 · #610

Link to this error

CUDA kernel mul_mat_vec has no device code compatible with CUDA arch 520gpufatalusers report · 1 (27 comments)

The same cause as the previous message: the build has no code for your GPU generation.

Likely causes, most likely first

  1. An older NVIDIA GPU such as Maxwell

What to do

  1. Use the oldpc file or Vulkan

Users report: 1 (27 comments) issues · #1362 · #1362

Link to this error

CUDA error: no kernel image is available for execution on the devicegpufatalusers report · 1 + 2 (from issue bodies)

The installed CUDA build has nothing that runs on your GPU.

Likely causes, most likely first

  1. A very old GPU such as Kepler
  2. A driver too old for the CUDA version

What to do

  1. Use Vulkan instead of CUDA
  2. Update the NVIDIA driver

Users report: 1 + 2 (from issue bodies) issues · #1409 · #2423 · #1409 · #2423

Link to this error

Illegal instruction (core dumped)crashfatalusers report · 10

The CPU was asked to run an instruction it does not have.

Likely causes, most likely first

  1. A CPU without AVX2 (before about 2013) with a normal build
  2. An ARM device with a build for another CPU

What to do

  1. Use the oldpc file, or add --noavx2
  2. Last resort: --failsafe

Users report: 10 issues · #624 · #1350 · #46 · #624 · #1350

Link to this error

PrefetchVirtualMemory not found in KERNEL32.dllcrashfatalusers report · 2 (22 comments)

The program needs a Windows function that older Windows versions lack.

Likely causes, most likely first

  1. Windows 7

What to do

  1. Use Windows 10 or newer, or Linux

Users report: 2 (22 comments) issues · #68 · #68

Link to this error

PyInstallerImportError: Failed to load dynlib/dll '…'crashfatalusers report · 10

A file KoboldCpp unpacks into a temporary folder is missing or blocked.

Likely causes, most likely first

  1. Antivirus removed or quarantined a file
  2. An old temporary folder left over from a crash

What to do

  1. Delete the _MEI folders in your temp directory and start again
  2. Add the folder to your antivirus exclusions, or check the quarantine list

Restore a quarantined file only after checking its hash. Always download KoboldCpp from GitHub only; lookalike sites exist. How to tell.

Seen in our testsci-1/ubuntu-24.04-cuda/fail-usecuda-on-nocuda · KoboldCpp 1.124.2
  File "PyInstaller/loader/pyimod03_ctypes.py", line 55, in __init__pyimod03_ctypes.PyInstallerImportError: Failed to load dynlib/dll '/tmp/_MEIpicf7w/koboldcpp_cublas.so'. Most likely this dynlib/dll was not found when the application was frozen.[PYI-4225:ERROR] Failed to execute script 'koboldcpp' due to unhandled exception!

Users report: 10 issues · #1555 · #705 · #785 · #778 · #1555

Link to this error

OSError: [WinError 1114] A dynamic link library (DLL) initialization routine failedcrashfatalusers report · 11 (DLL load failed)

A DLL started but failed to initialise, often because of the GPU driver.

Likely causes, most likely first

  1. An outdated or broken NVIDIA driver
  2. The CUDA build on a PC without a matching GPU

What to do

  1. Update the GPU driver
  2. Try the -nocuda file

Restore a quarantined file only after checking its hash. Always download KoboldCpp from GitHub only; lookalike sites exist. How to tell.

Users report: 11 (DLL load failed) issues · #1555 · #599 · #785 · #1555 · #599

Link to this error

FileNotFoundError: Could not find module '…koboldcpp_cublas.dll'crashfatalF56

KoboldCpp could not load its CUDA library. The most common reason on a PC without an NVIDIA driver is that the CUDA build was told to use CUDA; antivirus removing the file is the other.

Likely causes, most likely first

  1. No NVIDIA driver on this PC: the CUDA build was started with --usecuda (tested)
  2. Antivirus quarantined the library
  3. The unpacking was interrupted

What to do

  1. No NVIDIA GPU or driver: use the -nocuda file, or remove --usecuda
  2. With an NVIDIA GPU: install or update the NVIDIA driver
  3. Otherwise check your antivirus quarantine and restore the file

Restore a quarantined file only after checking its hash. Always download KoboldCpp from GitHub only; lookalike sites exist. How to tell.

Seen in our testsci-1/windows-2022-cuda/fail-usecuda-on-nocuda · KoboldCpp 1.124.2
  File "ctypes\__init__.py", line 373, in __init__FileNotFoundError: Could not find module 'C:\Users\<user>\AppData\Local\Temp\_MEI22122\koboldcpp_cublas.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Tested by us: F56 and users report it too · #778 · #599

Link to this error

OSError: [WinError 4551]safetyfatalusers report · 2

Windows blocked the file under its Smart App Control policy.

Likely causes, most likely first

  1. Smart App Control is on and does not trust the file

What to do

  1. Read how Smart App Control works before changing it
  2. Run KoboldCpp from source instead

Restore a quarantined file only after checking its hash. Always download KoboldCpp from GitHub only; lookalike sites exist. How to tell.

Users report: 2 issues · #2590 · #1946 · #2590 · #1946

Link to this error

GGML_ASSERT(…) failedcrashfatalusers report · 66

An internal check failed. The text inside GGML_ASSERT names what was wrong.

Likely causes, most likely first

  1. A model or setting combination this build cannot handle

What to do

  1. Note the text inside the brackets and search for it
  2. Update, or go back one version

Users report: 66 issues · #1973 · #2300 · #2593 · #1047

Link to this error

Segmentation fault (core dumped)crashfatalusers report · 23

The program crashed in native code (Linux and macOS).

Likely causes, most likely first

  1. --usemlock without mmap
  2. An unsupported GPU or driver
  3. A version bug

What to do

  1. Remove --usemlock and try again
  2. Try another backend, or update

Users report: 23 issues · #2215 · #2423 · #1323 · #398 · #1323

Link to this error

double free or corruptioncrashfatalusers report · 3

A memory bug inside the program.

Likely causes, most likely first

  1. A version bug

What to do

  1. Go back to the last version that worked and report the version

Users report: 3 issues · #2418

Link to this error

Aborted (core dumped)crashfatalusers report · ~6 (from issue bodies)

Wrapper message. It says that something failed, not why. The real cause is printed above it. Why the last line is often not the real error.

The process was stopped after a previous error. The cause is the line above.

Likely causes, most likely first

  1. A GGML_ASSERT or a CUDA error

What to do

  1. Read the line above this one

Users report: ~6 (from issue bodies) issues · #475 · #2135 · #1216

Link to this error

Warning, GUI failed to start: Reason: no display name and no $DISPLAY environment variableguifatalF51

The launcher window needs a screen, and this session has none (a server over SSH, a container or Colab).

Likely causes, most likely first

  1. No desktop session
  2. A headless machine

What to do

  1. Pass --model (and --skiplauncher) on the command line
Seen in our testsr1-lnx/err-gui-no-display · KoboldCpp 1.124.2
***Warning, GUI failed to start: Reason: no display name and no $DISPLAY environment variableFile selection GUI unsupported.

Tested by us: F51 · #2066 · #716 · #1435

Link to this error

Exception in Tkinter callbackguifatalusers report · 27 (Tkinter)

The launcher window hit an error while handling a click.

Likely causes, most likely first

  1. A launcher bug in this version

What to do

  1. Use command-line flags, or save a .kcpps file
  2. Update KoboldCpp

Users report: 27 (Tkinter) issues · #1486 · #1782 · #806

Link to this error

exo-open: symbol lookup error: … libharfbuzz.so.0: undefined symbol: FT_Get_Transformguiwarningusers report · 1 (30 comments)

KoboldCpp tried to open your browser and a library from the bundle clashed with the system's. It is harmless.

Likely causes, most likely first

  1. Auto-open of the browser on some Linux desktops

What to do

  1. Open http://localhost:5001 yourself and ignore the message

Users report: 1 (30 comments) issues · #1302

Link to this error

[PYI-…:ERROR] Failed to extract koboldcpp-launcher: decompression resulted in return code -1!crashfatalusers report · 1

The single-file program could not unpack itself.

Likely causes, most likely first

  1. A full or dirty temp folder
  2. A damaged download

What to do

  1. Free disk space and delete old _MEI folders in the temp directory
  2. Download the file again and check its hash

Users report: 1 issues · #2342

Link to this error

Error: KoboldCpp HTTP Server is running, but this endpoint does not exist. Please check the URL.apifatalF52F23

The server works, but the app asked for a URL or method it does not serve. A missing /v1 is usually not the cause.

Likely causes, most likely first

  1. The wrong method, for example GET on /v1/chat/completions
  2. A path under /api that does not exist

What to do

  1. Compare the app's URL with the endpoint list
  2. Test the same URL with the API tester

Tested by us: F52 F23 · #1859 · #1697

Link to this error

Error while submitting prompt: TypeError: Failed to fetchapifatalusers report · 5

The browser lost contact with the server while Lite was sending your prompt.

Likely causes, most likely first

  1. KoboldCpp stopped or crashed
  2. A tunnel link expired
  3. An https page calling an http server

What to do

  1. Check that the KoboldCpp window is still running and read its last lines
  2. Reload the page and the tunnel link

Users report: 5 issues · #211 · #1711 · #499 · #589

Link to this error

Whisper Transcribe Generating...error: failed to open WAV file from stdinvoicefatalusers report · 2 (24 comments)

The speech-to-text input was not a WAV file the program could read.

Likely causes, most likely first

  1. An unsupported audio format

What to do

  1. Send a plain WAV file

Users report: 2 (24 comments) issues · #1289 · #1561

Link to this error

Error: KCPP SD Failed to create context!imagefatalusers report · 6

The image model could not start, most often because companion files are missing.

Likely causes, most likely first

  1. Flux or SD3 without its text encoders and VAE
  2. Not enough memory

What to do

  1. Load the model from its .kcppt template, which lists every file

Users report: 6 issues · #1217 · #1976 · #2258 · #2216

Link to this error

Warning: OpenBLAS library file not found. Non-BLAS library will be used.infoharmlessusers report · 7 (from issue bodies)

An informational note. It does not cause a crash.

Likely causes, most likely first

  1. A build that does not ship OpenBLAS

What to do

  1. Ignore it and look for a different error line

Users report: 7 (from issue bodies) issues · #744 · #301 · #715

Link to this error

load_tensors: offloaded N/N layers to GPUgpuharmlessF17

This line counts layers assigned to the GPU path. On a machine with no GPU it can still say all layers were offloaded.

Likely causes, most likely first

  1. The flag was accepted but no GPU backend exists

What to do

  1. Read the buffer lines (CUDA0, Vulkan0, MTL0) instead of this one
Seen in our testsrun1/lab-lnx/api-parallel-2 · KoboldCpp 1.124.2
load_tensors: offloading 0 repeating layers to GPUload_tensors: offloaded 0/25 layers to GPUload_tensors:          CPU model buffer size =   434.91 MiB

Tested by us: F17

Link to this error

error: argument --contextsize/--ctx-size/-c: must be within [256, 524288]configfatalF22

The context size is outside the allowed range.

Likely causes, most likely first

  1. A typo in the number

What to do

  1. Use a value from 256 to 524288
Seen in our testsrun1/lab-lnx/fail-ctx-too-big · KoboldCpp 1.124.2
                                  [model_param] [port_param]koboldcpp-linux-x64-nocuda: error: argument --contextsize/--ctx-size/-c: must be within [256, 524288]

Tested by us: F22

Link to this error

OSError: libcuda.so.1: cannot open shared object file: No such file or directorygpufatalF56

The NVIDIA driver library is not installed, so the CUDA build cannot start with CUDA.

Likely causes, most likely first

  1. No NVIDIA driver on this Linux machine
  2. A container without the NVIDIA runtime
  3. Using --usecuda on a machine without an NVIDIA GPU

What to do

  1. Install the NVIDIA driver, or in Docker use the NVIDIA container runtime
  2. Without an NVIDIA GPU use the -nocuda file or drop --usecuda
Seen in our testsci-1/ubuntu-24.04-cuda/fail-usecuda-on-nocuda · KoboldCpp 1.124.2
  File "ctypes/__init__.py", line 373, in __init__OSError: libcuda.so.1: cannot open shared object file: No such file or directory

Tested by us: F56

Link to this error

FileNotFoundError: Could not find module '…\koboldcpp_common.dll' (or one of its dependencies)gpufatalF57

KoboldCpp's library needs a system library that is missing. With --usevulkan this is the Vulkan runtime that the graphics driver installs.

Likely causes, most likely first

  1. No graphics driver, or a broken one
  2. --usevulkan on a machine without Vulkan

What to do

  1. Install or update your GPU driver, then start again
  2. Start without --usevulkan to run on the CPU
Seen in our testsci-1/windows-2022-cuda/fail-usevulkan-no-gpu · KoboldCpp 1.124.2
  File "ctypes\__init__.py", line 373, in __init__FileNotFoundError: Could not find module 'C:\Users\<user>\AppData\Local\Temp\_MEI28282\koboldcpp_common.dll' (or one of its dependencies). Try using the full path with constructor syntax.

Tested by us: F57

Link to this error

EOS token triggered!apiharmlessusers report · 1

The model wrote its end-of-text token, so the reply ended normally. It is not an error.

Likely causes, most likely first

  1. A normal end of a reply
  2. If replies end too early, a chat template that does not match the model

What to do

  1. Ignore it if replies look complete
  2. If replies are cut short, check the chat template

Users report · #1177

Link to this error

Note that using SWA Mode cannot be used with Context Shiftingloadharmlessusers report · 2

The model uses sliding-window attention, and ContextShift is not used with it. Long chats then reprocess more of the prompt.

Likely causes, most likely first

  1. A sliding-window model such as the Gemma family

What to do

  1. Nothing to fix; keep the context no larger than you need

Users report · #2211 · #2171

Link to this error

device vulkan0 does not support async, host buffers or eventsgpuharmlessusers report · 1

An informational line: the Vulkan device lacks some optional transfer features, so KoboldCpp does without them.

Likely causes, most likely first

  1. The Vulkan driver's feature set

What to do

  1. Ignore it if the model loads

Users report · #1413

Link to this error

Could not find suitable download software, or all download methods failed.networkfatalusers report · 1

KoboldCpp tried to fetch a model from a web address and every method it knows failed.

Likely causes, most likely first

  1. No network or a blocked connection
  2. A link that needs a login
  3. A missing downloader tool on the system

What to do

  1. Download the file in your browser, then load it from disk

Upstream says: official troubleshooting page

Link to this error

Generate Image: The response could not be sent, maybe connection was terminated?networkwarningusers report · 2

The app that asked for the image closed the connection before the image was ready.

Likely causes, most likely first

  1. A client time-out shorter than the generation time
  2. The app was closed

What to do

  1. Raise the app's time-out, or use a smaller image or fewer steps

Users report · #1910 · #2326

Link to this error

IPv6 Socket Failed to Bind. IPv6 will be unavailable.networkharmlessusers report · 2

KoboldCpp could not listen on IPv6, so it uses IPv4 only. Local use is not affected.

Likely causes, most likely first

  1. IPv6 is turned off or unavailable on this machine

What to do

  1. Ignore it; use http://localhost:5001

Users report · #1289 · #1348

Link to this error

Why the last line is often not the real error

KoboldCpp ends a failed start with general messages. They are true, but they do not say why. Our own log of a truncated model file shows the pattern: the cause comes first, and every line after it is a wrapper.

Incomplete model filerun1 · lab-lnx · fail-truncated · KoboldCpp 1.124.2 · exit code 3
llama_model_load: error loading model: tensor 'output.weight' data is not within the file bounds, model is corrupted or incomplete1llama_model_load_from_file_impl: failed to load model2gpttype_load_model: error: failed to load model '<path>'3Load Text Model OK: FalseCould not load text model: <path>4
  1. llama_model_load: error loading model: tensor 'output.weight' data is : This is the cause: the file is cut short. Read upward from the last error until you reach the first one.
  2. llama_model_load_from_file_impl: failed to load model: A generic wrapper from the loader.
  3. gpttype_load_model: error: failed to load model '<path>': KoboldCpp reports the loader failed.
  4. Could not load text model: <path>: The final wrapper. It only says the load failed.

The wrappers to recognise are Failed to execute script, llama_model_load_from_file_impl: failed to load model, Could not load text model, Aborted (core dumped) and, in the Lite browser app, Failed to fetch. Rows marked “Wrapper message” in the list above point back here. The log analyzer does this reading for you and shows the earliest real cause.

Where to find the KoboldCpp error log

The console window is the log. In our test KoboldCpp wrote no log file by default F58, so if the window closes, the text is gone. Start KoboldCpp from a terminal so it stays open (how, in Will not start). Then select the text and copy it with your terminal’s copy command, or choose the whole window with select all.

To save the output to a text file, use your shell’s redirect to a file when you start KoboldCpp, and keep the window open to read it too. Set when you are asked for more detail. Before you post a log anywhere, redact it: the log analyzer does that and gives you a copy that is safe to share.

Exit codes we observed

When KoboldCpp stops at start-up, the exit code separates a bad argument from a bad file. These came from our own runs, identical on Windows, Linux and macOS where we tested both.

Exit codes we observed
1Start-up crash: second server on a busy portOSError: Cannot start the server: no socket could bind.F49
1CUDA build with --usecuda and no NVIDIA driver (Linux, Windows)libcuda.so.1: cannot open shared object file / Could not find module '…koboldcpp_cublas.dll'F56
1--usevulkan on Windows without a graphics driverCould not find module '…koboldcpp_common.dll' (or one of its dependencies)F57
2Model file missingCannot find text model file: <path>F19
2Context size out of rangeargument --contextsize/--ctx-size/-c: must be within [256, 524288]F22
2Launcher with no displayGUI failed to start: Reason: no display name and no $DISPLAY environment variableF51
3File is not a GGUFinvalid or unsupported model file '<path>'F20
3Incomplete downloadtensor 'output.weight' data is not within the file bounds, model is corrupted or incompleteF21
3Projector does not match the modelmismatch between text model (n_embd = 896) and mmproj (n_embd = 576)F50
3KV cache cannot be allocated in RAMfailed to allocate buffer for kv cacheF55

Messages you can ignore

These lines look alarming and are not the cause of a problem. Rows are in the list above under the “harmless” filter.

  • Warning: OpenBLAS library file not found. Non-BLAS library will be used. is informational on older builds.
  • ggml_cuda_host_malloc: failed to allocate … pinned memory is usually a harmless fallback unless you use .
  • IPv6 Socket Failed to Bind. IPv6 will be unavailable. means local use through IPv4 is unaffected.
  • device vulkan0 does not support async, host buffers or events is informational.
  • Note that using SWA Mode cannot be used with Context Shifting is expected for sliding-window models.
  • EOS token triggered! is a normal end of a reply.
  • exo-open: symbol lookup error … libharfbuzz is a clash when KoboldCpp tries to open your browser; open the address yourself.
  • Unable to detect VRAM on a machine that really has no GPU is correct F18.

“Internal server error” and API errors in apps

Apps such as SillyTavern or a browser page show their own short message, and the real one is in KoboldCpp’s console. Check the console first.

  • A 404 with KoboldCpp HTTP Server is running, but this endpoint does not exist means the wrong method or a path under /api/ that does not exist. KoboldCpp accepted /v1/v1/models, /models and a missing /v1 in our probes, so a missing /v1 is rarely the cause F52.
  • A 401 means the server has a password and the request has no key; the web page and model name stay reachable without it F25.
  • If a reply stops early, finish_reason: length means the token limit was reached; in our test a prompt larger than the server’s context was cut from the start without any error F53.

The API tester shows which URL and method work on your server, and the OpenAI API page lists the endpoints.

Your error isn’t listed?

Paste the whole log into the analyzer. Search the GitHub issues with the stable part of the message only: drop paths, numbers and hex addresses. When you report it, follow what to include. If a message should be on this page, send the redacted line to hello@koboldcpp.dev through the contact page and we will add it.

Frequently asked questions

What does "Failed to execute script 'koboldcpp'" mean?

It is a wrapper from the launcher: something stopped KoboldCpp with an unhandled error, and this line does not say what. The reason is printed above it. In our tests it appeared after a busy port, a missing CUDA library and other start-up failures. Read upward to the first error line, or paste the whole log into the analyzer.

Where does KoboldCpp save its log?

It does not save one by default. In our Linux test no log file appeared in the working folder, the home folder or the temp folder. The console window is the log, so copy its text or start KoboldCpp from a terminal so the window stays open.

What does "EOS token triggered" mean?

The model wrote its end-of-text token, so the reply ended normally. Users report it as a harmless line. If replies end too early, check that the chat template matches the model.

Is "Unable to detect VRAM" a problem?

Only if you expected to use a GPU. KoboldCpp could not read your video memory, so automatic layer choice is off and it usually continues on the CPU. On a machine with no GPU, our logs show this line on a normal start.

Why does my app say "internal server error" when KoboldCpp is running?

The app shows a generic message and the real one is in KoboldCpp's console. Check the console window first. A 404 from KoboldCpp usually means the wrong method or a path that does not exist, not a missing /v1.