Skip to content

Commit 5cdb371

Browse files
authored
grammar : fix unnecessarily retained pointer to rules (ggml-org#6003)
1 parent 44ca159 commit 5cdb371

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

llama.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10538,7 +10538,7 @@ struct llama_grammar * llama_grammar_init(
1053810538

1053910539
// loop over alternates of start rule to build initial stacks
1054010540
std::vector<std::vector<const llama_grammar_element *>> stacks;
10541-
pos = rules[start_rule_index];
10541+
pos = vec_rules[start_rule_index].data();
1054210542
do {
1054310543
std::vector<const llama_grammar_element *> stack;
1054410544
if (!llama_grammar_is_end_of_sequence(pos)) {

0 commit comments

Comments
 (0)