grammars: simpler syntax (no swap)
This commit is contained in:
parent
cb77a8db1d
commit
1e0f466920
1 changed files with 1 additions and 1 deletions
|
@ -12776,7 +12776,7 @@ void llama_grammar_accept_token(struct llama_context * ctx, struct llama_grammar
|
|||
std::vector<std::vector<const llama_grammar_element *>> tmp_new_stacks;
|
||||
for (auto it = code_points.begin(), end = code_points.end() - 1; it != end; ++it) {
|
||||
llama_grammar_accept(grammar->rules, grammar->stacks, *it, tmp_new_stacks);
|
||||
tmp_new_stacks.swap(grammar->stacks);
|
||||
grammar->stacks = tmp_new_stacks;
|
||||
}
|
||||
grammar->partial_utf8 = decoded.second;
|
||||
GGML_ASSERT(!grammar->stacks.empty());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue