Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add test for loading multiple vllm models at once (#11) #12

Merged
merged 1 commit into from
Oct 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 22 additions & 1 deletion ci/L0_backend_vllm/test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -90,14 +90,35 @@ fi

kill $SERVER_PID
wait $SERVER_PID

rm -rf "./models"

COUNT=$(grep -c "default-max-batch-size\":\"8" "$SERVER_LOG")
if [[ "$COUNT" -ne 2 ]]; then
echo "Cmdline parameters verification Failed"
fi

# Test loading multiple vllm models at the same time
SERVER_ARGS="--model-repository=`pwd`/models --backend-directory=${BACKEND_DIR}"
SERVER_LOG="./vllm_test_multi_model.log"

# Create two models, one is just a copy of the other, and make sure gpu
# utilization is low enough for multiple models to avoid OOM
MODEL1="vllm_one"
MODEL2="vllm_two"
mkdir -p models/${MODEL1}/1/
cp ../qa_models/vllm_opt/config.pbtxt models/${MODEL1}/
echo '{"model":"facebook/opt-125m", "disable_log_requests": "true", "gpu_memory_utilization":0.3}' > models/${MODEL1}/1/model.json
cp -r models/${MODEL1} models/${MODEL2}

run_server
if [ "$SERVER_PID" == "0" ]; then
cat $SERVER_LOG
echo -e "\n***\n*** Failed to start $SERVER\n***"
exit 1
fi

kill $SERVER_PID
wait $SERVER_PID
rm -rf "./models"

if [ $RET -eq 1 ]; then
Expand Down
1 change: 0 additions & 1 deletion ci/qa_models/vllm_opt/config.pbtxt
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

name: "vllm_opt"
backend: "vllm"
max_batch_size: 0

Expand Down