-
Notifications
You must be signed in to change notification settings - Fork 549
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[Examples] Fix Vicuna serve example and add OpenAI Example for Vicuna (…
…#2791) upd & add openai
- Loading branch information
Showing
3 changed files
with
43 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
resources: | ||
ports: 8080 | ||
accelerators: A100:1 | ||
disk_size: 1024 | ||
disk_tier: high | ||
|
||
setup: | | ||
conda activate chatbot | ||
if [ $? -ne 0 ]; then | ||
conda create -n chatbot python=3.9 -y | ||
conda activate chatbot | ||
fi | ||
# Install dependencies | ||
pip install "fschat[model_worker,webui]==0.2.24" | ||
pip install protobuf | ||
run: | | ||
conda activate chatbot | ||
echo 'Starting controller...' | ||
python -u -m fastchat.serve.controller > ~/controller.log 2>&1 & | ||
sleep 10 | ||
echo 'Starting model worker...' | ||
python -u -m fastchat.serve.model_worker \ | ||
--model-path lmsys/vicuna-${MODEL_SIZE}b-v1.3 2>&1 \ | ||
| tee model_worker.log & | ||
echo 'Waiting for model worker to start...' | ||
while ! `cat model_worker.log | grep -q 'Uvicorn running on'`; do sleep 1; done | ||
echo 'Starting openai api server...' | ||
python -u -m fastchat.serve.openai_api_server --host 0.0.0.0 --port 8080 | tee ~/openai_api_server.log | ||
envs: | ||
MODEL_SIZE: 13 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters