Skip to content

Commit

Permalink
Release a v0.2.28 with bug fixes and more test cases
Browse files Browse the repository at this point in the history
  • Loading branch information
merrymercy committed Sep 11, 2023
1 parent 77aa4df commit 11b05bb
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 11 deletions.
2 changes: 1 addition & 1 deletion fastchat/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = "0.2.27"
__version__ = "0.2.28"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"

[project]
name = "fschat"
version = "0.2.27"
version = "0.2.28"
description = "An open platform for training, serving, and evaluating large language model based chatbots."
readme = "README.md"
requires-python = ">=3.8"
Expand Down
22 changes: 14 additions & 8 deletions tests/launch_openai_api_test_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,17 +13,23 @@ def launch_process(cmd):
launch_process("python3 -m fastchat.serve.openai_api_server")

models = [
"lmsys/vicuna-7b-v1.5",
"lmsys/fastchat-t5-3b-v1.0",
"THUDM/chatglm-6b",
"mosaicml/mpt-7b-chat",
("lmsys/vicuna-7b-v1.5", "model_worker"),
("lmsys/fastchat-t5-3b-v1.0", "model_worker"),
("THUDM/chatglm-6b", "model_worker"),
("mosaicml/mpt-7b-chat", "model_worker"),
("meta-llama/Llama-2-7b-chat-hf", "vllm_worker"),
]

for i, model_path in enumerate(models):
launch_process(
f"CUDA_VISIBLE_DEVICES={i} python3 -m fastchat.serve.model_worker "
f"--model-path {model_path} --port {30000+i} --worker http://localhost:{30000+i}"
for i, (model_path, worker_name) in enumerate(models):
cmd = (
f"CUDA_VISIBLE_DEVICES={i} python3 -m fastchat.serve.{worker_name} "
f"--model-path {model_path} --port {30000+i} "
f"--worker-address http://localhost:{30000+i} "
)
if worker_name == "vllm_worker":
cmd += "--tokenizer hf-internal-testing/llama-tokenizer"

launch_process(cmd)

while True:
pass
5 changes: 4 additions & 1 deletion tests/test_openai_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,12 @@ def test_openai_curl():
print(f"===== Test {model} ======")
test_completion(model)
test_completion_stream(model)
test_embedding(model)
test_chat_completion(model)
test_chat_completion_stream(model)
try:
test_embedding(model)
except openai.error.APIError as e:
print(f"Embedding error: {e}")

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

0 comments on commit 11b05bb

Please sign in to comment.