support batch infer in vllm

Former-commit-id: 1324d158f9
This commit is contained in:
hiyouga
2024-12-04 13:50:00 +00:00
parent b2c67a989a
commit 235cdcacee
29 changed files with 148 additions and 407 deletions

View File

@@ -35,7 +35,7 @@ if is_gradio_available():
def create_ui(demo_mode: bool = False) -> "gr.Blocks":
engine = Engine(demo_mode=demo_mode, pure_chat=False)
hostname = os.getenv("HOSTNAME", os.getenv("COMPUTERNAME", platform.node())).split('.')[0]
hostname = os.getenv("HOSTNAME", os.getenv("COMPUTERNAME", platform.node())).split(".")[0]
with gr.Blocks(title=f"LLaMA Board ({hostname})", css=CSS) as demo:
if demo_mode: