From a69d54f990d0cd88786d5943632d6426dc9660b7 Mon Sep 17 00:00:00 2001 From: Andreas Obersteiner Date: Wed, 18 Mar 2026 07:10:13 +0100 Subject: [PATCH] context : fix graph not resetting when control vector changes (#20381) --- src/llama-context.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/llama-context.cpp b/src/llama-context.cpp index 1f7a52d789..dc61afb0bd 100644 --- a/src/llama-context.cpp +++ b/src/llama-context.cpp @@ -1165,9 +1165,11 @@ bool llama_context::set_adapter_cvec( int32_t il_end) { LLAMA_LOG_DEBUG("%s: il_start = %d, il_end = %d\n", __func__, il_start, il_end); - // TODO: should we reserve? + bool res = cvec->apply(model, data, len, n_embd, il_start, il_end); - return cvec->apply(model, data, len, n_embd, il_start, il_end); + sched_need_reserve = true; + + return res; } llm_graph_result * llama_context::process_ubatch(const llama_ubatch & ubatch, llm_graph_type gtype, llama_memory_context_i * mctx, ggml_status & ret) {