forked from deepspeedai/DeepSpeedExamples
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathchat.py
More file actions
24 lines (20 loc) · 685 Bytes
/
chat.py
File metadata and controls
24 lines (20 loc) · 685 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
# Copyright (c) Microsoft Corporation.
# SPDX-License-Identifier: Apache-2.0
# DeepSpeed Team
import argparse
import subprocess
if __name__ == "__main__":
parser = argparse.ArgumentParser()
parser.add_argument("--path",
type=str,
help="Directory containing trained actor model")
parser.add_argument(
"--max_new_tokens",
type=int,
default=128,
help="Maximum new tokens to generate per response",
)
args = parser.parse_args()
cmd = f"python3 ./inference/chatbot.py --path {args.path} --max_new_tokens {args.max_new_tokens}"
p = subprocess.Popen(cmd, shell=True)
p.wait()