Skip to content

Commit

Permalink
grammar : fix unnecessarily retained pointer to rules (ggerganov#6003)
Browse files Browse the repository at this point in the history
  • Loading branch information
gliptic authored and hodlen committed Apr 1, 2024
1 parent 97e4c04 commit fbe1a74
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10538,7 +10538,7 @@ struct llama_grammar * llama_grammar_init(

// loop over alternates of start rule to build initial stacks
std::vector<std::vector<const llama_grammar_element *>> stacks;
pos = rules[start_rule_index];
pos = vec_rules[start_rule_index].data();
do {
std::vector<const llama_grammar_element *> stack;
if (!llama_grammar_is_end_of_sequence(pos)) {
Expand Down

0 comments on commit fbe1a74

Please sign in to comment.