feature: stream output for guanaco (#154)

This commit is contained in:
csunny 2023-06-04 21:47:21 +08:00
parent ff6cc05e11
commit e8a193ef46
3 changed files with 3 additions and 5 deletions

View File

@ -102,7 +102,6 @@ def guanaco_generate_stream(model, tokenizer, params, device, context_len=2048):
stopping_criteria=StoppingCriteriaList([stop]),
)
model.generate(**generate_kwargs)
out = ""

View File

@ -56,7 +56,6 @@ class BaseOutputParser(ABC):
# output = data["text"][skip_echo_len + 11:].strip()
output = data["text"][skip_echo_len:].strip()
elif "guanaco" in CFG.LLM_MODEL:
# NO stream output
# output = data["text"][skip_echo_len + 2:].replace("<s>", "").strip()