From 4fb7ed5a4bdd3945b50ade1c20dd2a4bc7d828df Mon Sep 17 00:00:00 2001 From: csunny Date: Wed, 31 May 2023 14:21:14 +0800 Subject: [PATCH] fix: params error --- pilot/model/guanaco_llm.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pilot/model/guanaco_llm.py b/pilot/model/guanaco_llm.py index df4f86dce..ba10b4f56 100644 --- a/pilot/model/guanaco_llm.py +++ b/pilot/model/guanaco_llm.py @@ -7,7 +7,7 @@ from transformers import GenerationConfig from pilot.model.llm_utils import Iteratorize, Stream -def guanaco_generate_output(model, tokenizer, params, device): +def guanaco_generate_output(model, tokenizer, params, device, context_len=2048, stream_interval=2): """Fork from fastchat: https://github.com/KohakuBlueleaf/guanaco-lora/blob/main/generate.py""" prompt = params["prompt"] inputs = tokenizer(prompt, return_tensors="pt")