]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
kv-cache : fix reading llama_kv_cell_ext during state read (#20273)
authorsprayandwipe <redacted>
Sun, 15 Mar 2026 07:11:19 +0000 (07:11 +0000)
committerGitHub <redacted>
Sun, 15 Mar 2026 07:11:19 +0000 (09:11 +0200)
Co-authored-by: sid <redacted>
src/llama-kv-cache.cpp

index 82fe58fac46233505d51f72dd925324ae4a84afd..01166fac9ce19484b9631dfeddc76a77d83dd0c4 100644 (file)
@@ -1953,6 +1953,12 @@ bool llama_kv_cache::state_read_meta(llama_io_read_i & io, uint32_t strm, uint32
 
             cells.pos_set(i, pos);
 
+            if (hparams.n_pos_per_embd() > 1) {
+                llama_kv_cell_ext ext;
+                io.read_to(&ext, sizeof(ext));
+                cells.ext_set(i, ext);
+            }
+
             for (uint32_t j = 0; j < n_seq_id; ++j) {
                 llama_seq_id seq_id;
                 io.read_to(&seq_id, sizeof(seq_id));