Llama.cpp - failed to restore kv cache
Anyone else getting these errors?
Was running the aider benchmark with gpt120. It seemed to be taking far too long, IMHO.
Checked the logs, not sure if this is related?
state_read_meta: failed to find available cells in kv cache
state_seq_set_data: error loading state: failed to restore kv cache
slot update_slots: id 3 | task 27073 | failed to restore context checkpoint (pos_min = 1144, pos_max = 2040, size = 31.546 MiB)
slot update_slots: id 3 | task 27073 | forcing full prompt re-processing due to lack of cache data (likely due to SWA or hybrid/recurrent memory, see https://github.com/ggml-org/llama.cpp/pull/13194#issuecomment-2868343055)
slot update_slots: id 3 | task 27073 | n_tokens = 0, memory_seq_rm [0, end)
slot update_slots: id 3 | task 27073 | prompt processing progress, n_tokens = 2048, batch.n_tokens = 2048, progress = 0.591566
slot update_slots: id 3 | task 27073 | n_tokens = 2048, memory_seq_rm [2048, end)
slot update_slots: id 3 | task 27073 | prompt processing progress, n_tokens = 3398, batch.n_tokens = 1350, progress = 0.981514
slot update_slots: id 3 | task 27073 | n_tokens = 3398, memory_seq_rm [3398, end)
slot update_slots: id 3 | task 27073 | prompt processing progress, n_tokens = 3462, batch.n_tokens = 64, progress = 1.000000
slot update_slots: id 3 | task 27073 | prompt done, n_tokens = 3462, batch.n_tokens = 64
slot update_slots: id 3 | task 27073 | created context checkpoint 2 of 8 (pos_min = 2501, pos_max = 3397, size = 31.546 MiB)
decode: failed to find a memory slot for batch of size 1
srv try_clear_id: purging slot 2 with 3084 tokens
slot clear_slot: id 2 | task -1 | clearing slot with 3084 tokens
srv update_slots: failed to find free space in the KV cache, retrying with smaller batch size, i = 0, n_batch = 2048, ret = 1
slot print_timing: id 3 | task 27073 |
prompt eval time = 1953.53 ms / 3462 tokens ( 0.56 ms per token, 1772.18 tokens per second)
eval time = 338133.36 ms / 37498 tokens ( 9.02 ms per token, 110.90 tokens per second)
total time = 340086.89 ms / 40960 tokens
slot release: id 3 | task 27073 | stop processing: n_tokens = 40959, truncated = 1
srv update_slots: all slots are idle
srv log_server_r: request: POST /v1/chat/completions 172.17.0.2 200
srv params_from_: Chat format: GPT-OSS
Version:
$ llama-server --version
ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no
ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no
ggml_cuda_init: found 4 CUDA devices:
Device 0: NVIDIA GeForce RTX 3090 Ti, compute capability 8.6, VMM: yes
Device 1: NVIDIA GeForce RTX 3090 Ti, compute capability 8.6, VMM: yes
Device 2: NVIDIA GeForce RTX 3090 Ti, compute capability 8.6, VMM: yes
Device 3: NVIDIA GeForce RTX 3090 Ti, compute capability 8.6, VMM: yes
version: 7320 (51e0c2d91)
built with GNU 13.3.0 for Linux x86_64
Posted Dec 9, 2025, 9:51 AM UTC
111