Skip to content

Commit 6b10a82

Browse files
sprayandwipesid27
andauthored
kv-cache : fix reading llama_kv_cell_ext during state read (ggml-org#20273)
Co-authored-by: sid <sid@ragingfist.net>
1 parent d23355a commit 6b10a82

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

src/llama-kv-cache.cpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1953,6 +1953,12 @@ bool llama_kv_cache::state_read_meta(llama_io_read_i & io, uint32_t strm, uint32
19531953

19541954
cells.pos_set(i, pos);
19551955

1956+
if (hparams.n_pos_per_embd() > 1) {
1957+
llama_kv_cell_ext ext;
1958+
io.read_to(&ext, sizeof(ext));
1959+
cells.ext_set(i, ext);
1960+
}
1961+
19561962
for (uint32_t j = 0; j < n_seq_id; ++j) {
19571963
llama_seq_id seq_id;
19581964
io.read_to(&seq_id, sizeof(seq_id));

0 commit comments

Comments
 (0)