mirror of
https://github.com/ggerganov/llama.cpp.git
synced 2025-01-24 10:29:21 +01:00
grammar : fix unnecessarily retained pointer to rules (#6003)
This commit is contained in:
parent
44ca159faf
commit
5cdb371731
@ -10538,7 +10538,7 @@ struct llama_grammar * llama_grammar_init(
|
|||||||
|
|
||||||
// loop over alternates of start rule to build initial stacks
|
// loop over alternates of start rule to build initial stacks
|
||||||
std::vector<std::vector<const llama_grammar_element *>> stacks;
|
std::vector<std::vector<const llama_grammar_element *>> stacks;
|
||||||
pos = rules[start_rule_index];
|
pos = vec_rules[start_rule_index].data();
|
||||||
do {
|
do {
|
||||||
std::vector<const llama_grammar_element *> stack;
|
std::vector<const llama_grammar_element *> stack;
|
||||||
if (!llama_grammar_is_end_of_sequence(pos)) {
|
if (!llama_grammar_is_end_of_sequence(pos)) {
|
||||||
|
Loading…
Reference in New Issue
Block a user