mirror of
https://github.com/csunny/DB-GPT.git
synced 2025-08-14 06:26:18 +00:00
feature: stream output for guanaco (#154)
This commit is contained in:
parent
ff6cc05e11
commit
e8a193ef46
@ -102,7 +102,6 @@ def guanaco_generate_stream(model, tokenizer, params, device, context_len=2048):
|
|||||||
stopping_criteria=StoppingCriteriaList([stop]),
|
stopping_criteria=StoppingCriteriaList([stop]),
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
model.generate(**generate_kwargs)
|
model.generate(**generate_kwargs)
|
||||||
|
|
||||||
out = ""
|
out = ""
|
||||||
|
@ -56,7 +56,6 @@ class BaseOutputParser(ABC):
|
|||||||
# output = data["text"][skip_echo_len + 11:].strip()
|
# output = data["text"][skip_echo_len + 11:].strip()
|
||||||
output = data["text"][skip_echo_len:].strip()
|
output = data["text"][skip_echo_len:].strip()
|
||||||
elif "guanaco" in CFG.LLM_MODEL:
|
elif "guanaco" in CFG.LLM_MODEL:
|
||||||
|
|
||||||
# NO stream output
|
# NO stream output
|
||||||
# output = data["text"][skip_echo_len + 2:].replace("<s>", "").strip()
|
# output = data["text"][skip_echo_len + 2:].replace("<s>", "").strip()
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user