Skip to content

Commit

Permalink
Remove enforce-eager to enable HPU graphs for better vLLM perf (opea-…
Browse files Browse the repository at this point in the history
…project#954)

* remove enforce-eager to enable HPU graphs

Signed-off-by: Wang, Kai Lawrence <[email protected]>

* Increase the llm max timeout in ci for fully warmup

Signed-off-by: Wang, Kai Lawrence <[email protected]>

---------

Signed-off-by: Wang, Kai Lawrence <[email protected]>
  • Loading branch information
wangkl2 authored Dec 10, 2024
1 parent 5ed041b commit ddd372d
Show file tree
Hide file tree
Showing 8 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
cap_add:
- SYS_NICE
ipc: host
command: --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80
command: --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80
llm:
image: opea/llm-faqgen-vllm:latest
container_name: llm-faqgen-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
cap_add:
- SYS_NICE
ipc: host
command: --enforce-eager --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80
command: --model $LLM_MODEL_ID --tensor-parallel-size 1 --host 0.0.0.0 --port 80
llm:
image: opea/llm-docsum-vllm:latest
container_name: llm-docsum-vllm-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ volume=$PWD/data

# Build the Docker run command based on hardware mode
if [ "$hw_mode" = "hpu" ]; then
docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} opea/vllm-gaudi:latest --enforce-eager --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture
docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} opea/vllm-gaudi:latest --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture
else
docker run -d --rm --name="vllm-service" -p $port_number:80 --network=host -v $volume:/data -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HF_TOKEN} -e VLLM_CPU_KVCACHE_SPACE=40 opea/vllm-cpu:latest --model $model_name --host 0.0.0.0 --port 80
fi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
cap_add:
- SYS_NICE
ipc: host
command: --enforce-eager --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80
command: --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80
llm:
image: opea/llm-vllm:latest
container_name: llm-vllm-gaudi-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ volume=$PWD/data

# Build the Docker run command based on hardware mode
if [ "$hw_mode" = "hpu" ]; then
docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} opea/vllm-gaudi:latest --enforce-eager --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture
docker run -d --rm --runtime=habana --name="vllm-service" -p $port_number:80 -e HABANA_VISIBLE_DEVICES=all -e OMPI_MCA_btl_vader_single_copy_mechanism=none --cap-add=sys_nice --ipc=host -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} opea/vllm-gaudi:latest --model $model_name --tensor-parallel-size $parallel_number --host 0.0.0.0 --port 80 --block-size $block_size --max-num-seqs $max_num_seqs --max-seq_len-to-capture $max_seq_len_to_capture
else
docker run -d --rm --name="vllm-service" -p $port_number:80 --network=host -v $volume:/data -e HTTPS_PROXY=$https_proxy -e HTTP_PROXY=$https_proxy -e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} -e VLLM_CPU_KVCACHE_SPACE=40 opea/vllm-cpu:latest --model $model_name --host 0.0.0.0 --port 80
fi
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ services:
cap_add:
- SYS_NICE
ipc: host
command: --enforce-eager --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80
command: --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80
llm:
image: opea/llm-vllm-llamaindex:latest
container_name: llm-vllm-gaudi-server
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function start_service() {
--ipc=host \
-e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} \
opea/vllm-gaudi:comps \
--enforce-eager --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048
--model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048

export vLLM_ENDPOINT="http://${ip_address}:${port_number}"
docker run -d --rm \
Expand All @@ -62,7 +62,7 @@ function start_service() {

# check whether vllm ray is fully ready
n=0
until [[ "$n" -ge 120 ]] || [[ $ready == true ]]; do
until [[ "$n" -ge 160 ]] || [[ $ready == true ]]; do
docker logs test-comps-vllm-service > ${WORKPATH}/tests/test-comps-vllm-service.log
n=$((n+1))
if grep -q throughput ${WORKPATH}/tests/test-comps-vllm-service.log; then
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ function start_service() {
--ipc=host \
-e HF_TOKEN=${HUGGINGFACEHUB_API_TOKEN} \
opea/vllm-gaudi:comps \
--enforce-eager --model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048
--model $LLM_MODEL --tensor-parallel-size 1 --host 0.0.0.0 --port 80 --block-size 128 --max-num-seqs 256 --max-seq_len-to-capture 2048

export vLLM_ENDPOINT="http://${ip_address}:${port_number}"
docker run -d --rm \
Expand All @@ -62,7 +62,7 @@ function start_service() {

# check whether vllm ray is fully ready
n=0
until [[ "$n" -ge 120 ]] || [[ $ready == true ]]; do
until [[ "$n" -ge 160 ]] || [[ $ready == true ]]; do
docker logs test-comps-vllm-service > ${WORKPATH}/tests/test-comps-vllm-service.log
n=$((n+1))
if grep -q throughput ${WORKPATH}/tests/test-comps-vllm-service.log; then
Expand Down

0 comments on commit ddd372d

Please sign in to comment.