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 NeoZhangJianyu committed Mar 12, 2024
1 parent fd2340d commit 4c26dea
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion llama.cpp
Expand Up @@ -10548,7 +10548,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 4c26dea

Please sign in to comment.