fix: params error

This commit is contained in:
csunny 2023-05-31 14:21:14 +08:00
parent a58eb5a95d
commit 4fb7ed5a4b

View File

@ -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")