mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2025-09-10 17:14:36 +00:00
fixed race condition when generating
This commit is contained in:
parent
7ee359a59b
commit
c1ae350e5b
2 changed files with 6 additions and 9 deletions
|
@ -1941,6 +1941,9 @@ generation_outputs gpttype_generate(const generation_inputs inputs)
|
|||
llama_reset_timings(llama_ctx_v4);
|
||||
}
|
||||
|
||||
generation_finished = false; // Set current generation status
|
||||
generated_tokens.clear(); // New Generation, new tokens
|
||||
|
||||
concat_output_mtx.lock();
|
||||
concat_output = "";
|
||||
concat_output_reader_copy_poll = "";
|
||||
|
@ -2140,8 +2143,6 @@ generation_outputs gpttype_generate(const generation_inputs inputs)
|
|||
|
||||
bool allow_regular_prints = (debugmode!=-1 && !inputs.quiet) || debugmode >= 1;
|
||||
|
||||
generation_finished = false; // Set current generation status
|
||||
generated_tokens.clear(); // New Generation, new tokens
|
||||
|
||||
std::string grammarstr = inputs.grammar;
|
||||
bool grammar_retain_state = inputs.grammar_retain_state;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue