update rwkv_generate

This commit is contained in:
josc146 2023-05-25 20:34:42 +08:00
parent 537f11cbf1
commit 06622b79aa
2 changed files with 0 additions and 3 deletions

View File

@ -14,7 +14,6 @@ from utils.ngrok import *
from routes import completion, config from routes import completion, config
import global_var import global_var
app = FastAPI() app = FastAPI()
app.add_middleware( app.add_middleware(

View File

@ -78,5 +78,3 @@ def rwkv_generate(model: RWKV, prompt: str, stop: str = None):
break break
yield response, delta yield response, delta
out_last = begin + i + 1 out_last = begin + i + 1
if i >= model.max_tokens_per_generation - 100:
break