mirror of
https://github.com/oobabooga/text-generation-webui.git
synced 2024-11-22 08:07:56 +01:00
Make exllama stoppable
This commit is contained in:
parent
7f06d551a3
commit
b27f83c0e9
@ -79,7 +79,7 @@ class ExllamaModel:
|
||||
for i in range(state['max_new_tokens']):
|
||||
token = generator.gen_single_token()
|
||||
yield (generator.tokenizer.decode(generator.sequence[0][initial_len:]))
|
||||
if token.item() == generator.tokenizer.eos_token_id:
|
||||
if token.item() == generator.tokenizer.eos_token_id or shared.stop_everything:
|
||||
break
|
||||
|
||||
def encode(self, string, **kwargs):
|
||||
|
Loading…
Reference in New Issue
Block a user