]> git.djapps.eu Git - pkg/ggml/sources/llama.cpp/commitdiff
llama : remove unnecessary seq_id check during state restore (#22797)
authorGeorgi Gerganov <redacted>
Thu, 7 May 2026 13:37:26 +0000 (16:37 +0300)
committerGitHub <redacted>
Thu, 7 May 2026 13:37:26 +0000 (16:37 +0300)
src/llama-context.cpp

index 61f2677396abd66511602b3c793a4342a4e8020c..cbffe39da43eaa8f0a3681287c65ae66424a0aa4 100644 (file)
@@ -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) {