kv-cache : fix reading llama_kv_cell_ext during state read (#20273)

Co-authored-by: sid <sid@ragingfist.net>
This commit is contained in:
sprayandwipe 2026-03-15 07:11:19 +00:00 committed by GitHub
parent d23355afc3
commit 6b10a82c00
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 6 additions and 0 deletions

View 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));