From 5cdb371731caa2c41fcca42d4d2d43f94f6883b4 Mon Sep 17 00:00:00 2001 From: gliptic Date: Mon, 11 Mar 2024 20:59:03 +0100 Subject: [PATCH] grammar : fix unnecessarily retained pointer to rules (#6003) --- llama.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/llama.cpp b/llama.cpp index 98ec147ae..ad7b7b7d4 100644 --- a/llama.cpp +++ b/llama.cpp @@ -10538,7 +10538,7 @@ struct llama_grammar * llama_grammar_init( // loop over alternates of start rule to build initial stacks std::vector> stacks; - pos = rules[start_rule_index]; + pos = vec_rules[start_rule_index].data(); do { std::vector stack; if (!llama_grammar_is_end_of_sequence(pos)) {