interactive generate

This commit is contained in:
Michael Yang
2023-06-28 11:21:05 -07:00
parent 52beb0a99e
commit db5508209b
2 changed files with 32 additions and 4 deletions

View File

@@ -27,7 +27,7 @@ def generate(model, prompt, models_home=".", llms={}, *args, **kwargs):
kwargs.update({"max_tokens": 16384})
if "stop" not in kwargs:
kwargs.update({"stop": ["Q:", "\n"]})
kwargs.update({"stop": ["Q:"]})
if "stream" not in kwargs:
kwargs.update({"stream": True})