From: Georgi Gerganov Date: Thu, 7 May 2026 13:37:26 +0000 (+0300) Subject: llama : remove unnecessary seq_id check during state restore (#22797) X-Git-Tag: upstream/0.0.10438~1380 X-Git-Url: https://git.djapps.eu/?a=commitdiff_plain;h=803627f121dca7d4ec5166178d89398f20d288c0;p=pkg%2Fggml%2Fsources%2Fllama.cpp llama : remove unnecessary seq_id check during state restore (#22797) --- diff --git a/src/llama-context.cpp b/src/llama-context.cpp index 61f267739..cbffe39da 100644 --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -2656,13 +2656,8 @@ size_t llama_context::state_seq_set_data(llama_seq_id seq_id, const uint8_t * sr throw std::runtime_error("wrong sequence state magic"); } - const bool need_seq_match = (flags & LLAMA_STATE_SEQ_FLAGS_PARTIAL_ONLY); - llama_seq_id seq_id_read; io->read(&seq_id_read, sizeof(seq_id_read)); - if (need_seq_match && seq_id != seq_id_read) { - throw std::runtime_error("wrong sequence id"); - } return state_seq_read_data(*io, seq_id, flags); } catch (const std::exception & err) {