Skip to content

Commit a69d54f

Browse files
authored
context : fix graph not resetting when control vector changes (ggml-org#20381)
1 parent cf23ee2 commit a69d54f

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

src/llama-context.cpp

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1165,9 +1165,11 @@ bool llama_context::set_adapter_cvec(
11651165
int32_t il_end) {
11661166
LLAMA_LOG_DEBUG("%s: il_start = %d, il_end = %d\n", __func__, il_start, il_end);
11671167

1168-
// TODO: should we reserve?
1168+
bool res = cvec->apply(model, data, len, n_embd, il_start, il_end);
11691169

1170-
return cvec->apply(model, data, len, n_embd, il_start, il_end);
1170+
sched_need_reserve = true;
1171+
1172+
return res;
11711173
}
11721174

11731175
llm_graph_result * llama_context::process_ubatch(const llama_ubatch & ubatch, llm_graph_type gtype, llama_memory_context_i * mctx, ggml_status & ret) {

0 commit comments

Comments
 (0)