Skip to content

Commit 11b05bb

Browse files
committed
Release a v0.2.28 with bug fixes and more test cases
1 parent 77aa4df commit 11b05bb

File tree

4 files changed

+20
-11
lines changed

4 files changed

+20
-11
lines changed

fastchat/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "0.2.27"
1+
__version__ = "0.2.28"

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
44

55
[project]
66
name = "fschat"
7-
version = "0.2.27"
7+
version = "0.2.28"
88
description = "An open platform for training, serving, and evaluating large language model based chatbots."
99
readme = "README.md"
1010
requires-python = ">=3.8"

tests/launch_openai_api_test_server.py

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,23 @@ def launch_process(cmd):
1313
launch_process("python3 -m fastchat.serve.openai_api_server")
1414

1515
models = [
16-
"lmsys/vicuna-7b-v1.5",
17-
"lmsys/fastchat-t5-3b-v1.0",
18-
"THUDM/chatglm-6b",
19-
"mosaicml/mpt-7b-chat",
16+
("lmsys/vicuna-7b-v1.5", "model_worker"),
17+
("lmsys/fastchat-t5-3b-v1.0", "model_worker"),
18+
("THUDM/chatglm-6b", "model_worker"),
19+
("mosaicml/mpt-7b-chat", "model_worker"),
20+
("meta-llama/Llama-2-7b-chat-hf", "vllm_worker"),
2021
]
2122

22-
for i, model_path in enumerate(models):
23-
launch_process(
24-
f"CUDA_VISIBLE_DEVICES={i} python3 -m fastchat.serve.model_worker "
25-
f"--model-path {model_path} --port {30000+i} --worker http://localhost:{30000+i}"
23+
for i, (model_path, worker_name) in enumerate(models):
24+
cmd = (
25+
f"CUDA_VISIBLE_DEVICES={i} python3 -m fastchat.serve.{worker_name} "
26+
f"--model-path {model_path} --port {30000+i} "
27+
f"--worker-address http://localhost:{30000+i} "
2628
)
29+
if worker_name == "vllm_worker":
30+
cmd += "--tokenizer hf-internal-testing/llama-tokenizer"
31+
32+
launch_process(cmd)
2733

2834
while True:
2935
pass

tests/test_openai_api.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,9 +106,12 @@ def test_openai_curl():
106106
print(f"===== Test {model} ======")
107107
test_completion(model)
108108
test_completion_stream(model)
109-
test_embedding(model)
110109
test_chat_completion(model)
111110
test_chat_completion_stream(model)
111+
try:
112+
test_embedding(model)
113+
except openai.error.APIError as e:
114+
print(f"Embedding error: {e}")
112115

113116
print("===== Test curl =====")
114117
test_openai_curl()

0 commit comments

Comments
 (0)