mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-11 09:34:37 +00:00
grammar sampling added for lite
This commit is contained in:
parent
0142760fc3
commit
c03409c1f6
2 changed files with 84 additions and 10 deletions
|
@ -535,7 +535,10 @@ static void load_grammar(const std::string & gammarstr)
|
|||
printf("\nIgnored invalid grammar sampler.");
|
||||
return;
|
||||
}
|
||||
grammar_parser::print_grammar(stderr, parsed_grammar);
|
||||
if(debugmode==1)
|
||||
{
|
||||
grammar_parser::print_grammar(stderr, parsed_grammar);
|
||||
}
|
||||
std::vector<const llama_grammar_element *> grammar_rules(parsed_grammar.c_rules());
|
||||
grammar = llama_grammar_init(grammar_rules.data(), grammar_rules.size(), parsed_grammar.symbol_ids.at("root"));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue