]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commit
kv-cache: Fix state restore fragmented cache (#17982)
authorssweens <redacted>
Mon, 15 Dec 2025 17:28:35 +0000 (09:28 -0800)
committerGitHub <redacted>
Mon, 15 Dec 2025 17:28:35 +0000 (19:28 +0200)
commit4529c660c89a8675686cbe2bd1839e85f223f3fc
treeebc2db1afe08522947a699bf887c98eea357468d
parent0f4f35e7be14d5ef8157aa710b66388e77e99bec
kv-cache: Fix state restore fragmented cache (#17982)

* kv-cache : fix state restore with fragmented cache (#17527)

Change find_slot to allow non-contiguous allocation during state restore. Fixes 'failed to find available cells in kv cache' error when restoring state to fragmented cache.

* tests : update logic

* cleanup: tightened state_read_meta sig, added is_contiguous case

* fix: state_read_meta arg reorder loose ends

---------

Co-authored-by: Georgi Gerganov <redacted>
src/llama-kv-cache.cpp
src/llama-kv-cache.h
tests/CMakeLists.txt
tests/test-state-restore-fragmented.cpp [new file with mode: 0644]