mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-25 17:29:22 +01:00
Stop generation immediately when using "Maximum tokens/second" (#3952)
--------- Co-authored-by: oobabooga <112222186+oobabooga@users.noreply.github.com>
This commit is contained in:
parent
b7c55665c1
commit
893a72a1c5
@ -96,7 +96,7 @@ def _generate_reply(question, state, stopping_strings=None, is_chat=False, escap
|
|||||||
last_update = cur_time
|
last_update = cur_time
|
||||||
yield reply
|
yield reply
|
||||||
|
|
||||||
if stop_found:
|
if stop_found or (state['max_tokens_second'] > 0 and shared.stop_everything):
|
||||||
break
|
break
|
||||||
|
|
||||||
if not is_chat:
|
if not is_chat:
|
||||||
|
Loading…
Reference in New Issue
Block a user