[Bug]: Error in benchmark model with vllm backend for endpoint /v1/chat/completions
Your current environment
The output of `python collect_env.py`
Your output of `python collect_env.py` here
Model Input Dumps
No response
๐ Describe the bug
vllm benchmark script is falling for endpoint v1/chat/completions
Namespace(backend='vllm', base_url=None, host='10.244.2.102', port=8000, endpoint='/v1/chat/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='Meta-Llama-3.1-70b-instruct', tokenizer='/mnt/models/meta-llama-3-1-70b-instruct/', best_of=1, use_beam_search=False, num_prompts=1000, logprobs=None, request_rate=3.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=True, profile=False, save_result=True, metadata=None, result_dir='result/Meta-Llama-3.1-70b-instruct/RR-3-TP-2-PP-1/IL-10', result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=10, random_output_len=512, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None)
ERROR
Starting initial single prompt test run...
Traceback (most recent call last):
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 1136, in
But it works fine for endpoint as 'v1/completions'
Before submitting a new issue...
- [X] Make sure you already searched for relevant issues, and asked the chatbot living at the bottom right corner of the documentation page, which can answer lots of frequently asked questions.
Can you show the full logs?
cc @ywang96
(myenv) root@3-1-70-benchmark-pod:/benchmarking# ./benchmark_serving.sh -m Meta-Llama-3.1-70b-instruct -r 3 -t 2 -i 10 -d result --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --tokenizer-path /mnt/models/meta-llama-3-1-70b-instruct/ --endpoint /v1/completions --save-result True --host 10.244.2.102 --port 8000
Using dataset: sharegpt at ShareGPT_V3_unfiltered_cleaned_split.json
Running: python3 vllm/benchmarks/benchmark_serving.py --host 10.244.2.102 --port 8000 --endpoint /v1/completions --model Meta-Llama-3.1-70b-instruct --tokenizer /mnt/models/meta-llama-3-1-70b-instruct/ --random-input-len 10 --random-output-len 512 --request-rate 3 --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1000 --backend vllm --disable-tqdm --save-result --result-dir result/Meta-Llama-3.1-70b-instruct/RR-3-TP-2-PP-1/IL-10
Namespace(backend='vllm', base_url=None, host='10.244.2.102', port=8000, endpoint='/v1/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='Meta-Llama-3.1-70b-instruct', tokenizer='/mnt/models/meta-llama-3-1-70b-instruct/', best_of=1, use_beam_search=False, num_prompts=1000, logprobs=None, request_rate=3.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=True, profile=False, save_result=True, metadata=None, result_dir='result/Meta-Llama-3.1-70b-instruct/RR-3-TP-2-PP-1/IL-10', result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=10, random_output_len=512, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None)
Starting initial single prompt test run...
Initial test run completed. Starting main benchmark run...
Traffic request rate: 3.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
============ Serving Benchmark Result ============
Successful requests: 836
Benchmark duration (s): 442.76
Total input tokens: 142455
Total generated tokens: 179340
Request throughput (req/s): 1.89
Output token throughput (tok/s): 405.05
Total Token throughput (tok/s): 726.79
---------------Time to First Token----------------
Mean TTFT (ms): 51604.09
Median TTFT (ms): 59053.37
P99 TTFT (ms): 86353.16
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 134.60
Median TPOT (ms): 133.32
P99 TPOT (ms): 234.13
---------------Inter-token Latency----------------
Mean ITL (ms): 131.78
Median ITL (ms): 103.53
P99 ITL (ms): 669.26
==================================================
(myenv) root@3-1-70-benchmark-pod:/benchmarking# ./benchmark_serving.sh -m Meta-Llama-3.1-70b-instruct -r 3 -t 2 -i 10 -d result --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --tokenizer-path /mnt/models/meta-llama-3-1-70b-instruct/ --endpoint /v1/chat/completions --save-result True --host 10.244.2.102 --port 8000
Using dataset: sharegpt at ShareGPT_V3_unfiltered_cleaned_split.json
Running: python3 vllm/benchmarks/benchmark_serving.py --host 10.244.2.102 --port 8000 --endpoint /v1/chat/completions --model Meta-Llama-3.1-70b-instruct --tokenizer /mnt/models/meta-llama-3-1-70b-instruct/ --random-input-len 10 --random-output-len 512 --request-rate 3 --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1000 --backend vllm --disable-tqdm --save-result --result-dir result/Meta-Llama-3.1-70b-instruct/RR-3-TP-2-PP-1/IL-10
Namespace(backend='vllm', base_url=None, host='10.244.2.102', port=8000, endpoint='/v1/chat/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='Meta-Llama-3.1-70b-instruct', tokenizer='/mnt/models/meta-llama-3-1-70b-instruct/', best_of=1, use_beam_search=False, num_prompts=1000, logprobs=None, request_rate=3.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=True, profile=False, save_result=True, metadata=None, result_dir='result/Meta-Llama-3.1-70b-instruct/RR-3-TP-2-PP-1/IL-10', result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=10, random_output_len=512, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None)
Starting initial single prompt test run...
Traceback (most recent call last):
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 1136, in <module>
main(args)
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 794, in main
benchmark_result = asyncio.run(
^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 489, in benchmark
raise ValueError(
ValueError: Initial test run failed - Please make sure benchmark arguments are correctly specified. Error: Bad Request
(myenv) root@3-1-70-benchmark-pod:/benchmarking#
Please use code blocks to format your logs properly. They are difficult to read.
I think you need to set --backend openai-chat to use Chat API.
I will try but my model is running on vllm server
(myenv) root@3-1-70-benchmark-pod:/benchmarking# ./benchmark_serving.sh \
-m Meta-Llama-3.1-70b-instruct \
-r 1 \
-i 10 \
-d result \
--backend openai-chat \
--dataset-name sharegpt \
--dataset-path ShareGPT_V3_unfiltered_cleaned_split.json \
--tokenizer-path /mnt/models/meta-llama-3-1-70b-instruct/ \
--endpoint /v1/chat/completions \
--save-result True \
--host 10.244.2.102 \
--port 8000
Using dataset: sharegpt at ShareGPT_V3_unfiltered_cleaned_split.json
Running: python3 vllm/benchmarks/benchmark_serving.py --host 10.244.2.102 --port 8000 --endpoint /v1/chat/completions --model Meta-Llama-3.1-70b-instruct --tokenizer /mnt/models/meta-llama-3-1-70b-instruct/ --random-input-len 10 --random-output-len 512 --request-rate 1 --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1000 --backend openai-chat --disable-tqdm --save-result --result-dir result/Meta-Llama-3.1-70b-instruct/RR-1-TP-1-PP-1/IL-10
Namespace(backend='openai-chat', base_url=None, host='10.244.2.102', port=8000, endpoint='/v1/chat/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='Meta-Llama-3.1-70b-instruct', tokenizer='/mnt/models/meta-llama-3-1-70b-instruct/', best_of=1, use_beam_search=False, num_prompts=1000, logprobs=None, request_rate=1.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=True, profile=False, save_result=True, metadata=None, result_dir='result/Meta-Llama-3.1-70b-instruct/RR-1-TP-1-PP-1/IL-10', result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=10, random_output_len=512, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None)
Starting initial single prompt test run...
Traceback (most recent call last):
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 1136, in <module>
main(args)
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 794, in main
benchmark_result = asyncio.run(
^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 489, in benchmark
raise ValueError(
ValueError: Initial test run failed - Please make sure benchmark arguments are correctly specified. Error: Bad Request
(myenv) root@3-1-70-benchmark-pod:/benchmarking# ./benchmark_serving.sh \
-m Meta-Llama-3.1-70b-instruct \
-r 1 \
-i 10 \
-d result \
--backend openai-chat \
--dataset-name sharegpt \
--dataset-path ShareGPT_V3_unfiltered_cleaned_split.json \
--tokenizer-path /mnt/models/meta-llama-3-1-70b-instruct/ \
--endpoint /v1/completions \
--save-result True \
--host 10.244.2.102 \
--port 8000
Using dataset: sharegpt at ShareGPT_V3_unfiltered_cleaned_split.json
Running: python3 vllm/benchmarks/benchmark_serving.py --host 10.244.2.102 --port 8000 --endpoint /v1/completions --model Meta-Llama-3.1-70b-instruct --tokenizer /mnt/models/meta-llama-3-1-70b-instruct/ --random-input-len 10 --random-output-len 512 --request-rate 1 --dataset-name sharegpt --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json --num-prompts 1000 --backend openai-chat --disable-tqdm --save-result --result-dir result/Meta-Llama-3.1-70b-instruct/RR-1-TP-1-PP-1/IL-10
Namespace(backend='openai-chat', base_url=None, host='10.244.2.102', port=8000, endpoint='/v1/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='Meta-Llama-3.1-70b-instruct', tokenizer='/mnt/models/meta-llama-3-1-70b-instruct/', best_of=1, use_beam_search=False, num_prompts=1000, logprobs=None, request_rate=1.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=True, profile=False, save_result=True, metadata=None, result_dir='result/Meta-Llama-3.1-70b-instruct/RR-1-TP-1-PP-1/IL-10', result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=10, random_output_len=512, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None)
Starting initial single prompt test run...
Traceback (most recent call last):
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 1136, in <module>
main(args)
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 794, in main
benchmark_result = asyncio.run(
^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 194, in run
return runner.run(main)
^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/runners.py", line 118, in run
return self._loop.run_until_complete(task)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/usr/lib/python3.12/asyncio/base_events.py", line 687, in run_until_complete
return future.result()
^^^^^^^^^^^^^^^
File "/benchmarking/vllm/benchmarks/benchmark_serving.py", line 487, in benchmark
test_output = await request_func(request_func_input=test_input)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/benchmarking/vllm/benchmarks/backend_request_func.py", line 317, in async_request_openai_chat_completions
assert api_url.endswith(
^^^^^^^^^^^^^^^^^
AssertionError: OpenAI Chat Completions API URL must end with 'chat/completions'.
(myenv) root@3-1-70-benchmark-pod:/benchmarking#
Now it has failed for both endpoints.
any update on this
@ywang96 @comaniac can you help debug this? I'm not familiar with this part of the code.
@rabaja Can you share what's inside ./benchmark_serving.sh? I cannot repro this with our benchmark script in the main branch.
my server launch command:
vllm serve meta-llama/Llama-3.1-8B-Instruct
Benchmark launch command:
python3 benchmark_serving.py \
--model meta-llama/Llama-3.1-8B-Instruct \
--dataset-name sharegpt \
--dataset-path ShareGPT_V3_unfiltered_cleaned_split.json \
--num-prompts 10 \
--backend openai-chat \
--endpoint /v1/chat/completions \
--request-rate 1
Benchmark result
Namespace(backend='openai-chat', base_url=None, host='localhost', port=8000, endpoint='/v1/chat/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='meta-llama/Llama-3.1-8B-Instruct', tokenizer=None, best_of=1, use_beam_search=False, num_prompts=10, logprobs=None, request_rate=1.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=False, profile=False, save_result=False, metadata=None, result_dir=None, result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=1024, random_output_len=128, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None)
Starting initial single prompt test run...
Initial test run completed. Starting main benchmark run...
Traffic request rate: 1.0
Burstiness factor: 1.0 (Poisson process)
Maximum request concurrency: None
100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 10/10 [00:12<00:00, 1.21s/it]
============ Serving Benchmark Result ============
Successful requests: 10
Benchmark duration (s): 12.11
Total input tokens: 1369
Total generated tokens: 2275
Request throughput (req/s): 0.83
Output token throughput (tok/s): 187.87
Total Token throughput (tok/s): 300.92
---------------Time to First Token----------------
Mean TTFT (ms): 28.91
Median TTFT (ms): 28.09
P99 TTFT (ms): 36.37
-----Time per Output Token (excl. 1st token)------
Mean TPOT (ms): 7.84
Median TPOT (ms): 7.87
P99 TPOT (ms): 7.90
---------------Inter-token Latency----------------
Mean ITL (ms): 7.84
Median ITL (ms): 7.80
P99 ITL (ms): 8.37
==================================================
Its a wrapper script on top of that from where we are calling.. I have attached it for your reference.
` Function to display help message show_help() { echo "Usage: ./benchmark_serving.sh [options]" echo echo "Options:" echo " -m, --model Model name (default: microsoft/Phi-3-mini-4k-instruct)" echo " -r, --request-rates Comma-separated list of request rates (default: 10,20,30)" echo " -i, --input-lens Comma-separated list of input lengths (default: 128,256,512,1024,2048)" echo " -t, --tp Tensor Parallelism size (default: 1)" echo " -p, --pp Pipeline Parallelism size (default: 1)" echo " -d, --result-dir Result directory (default: results)" echo " -h, --host Host IP address (default: 10.150.17.207)" echo " --port Port (default: 8080)" echo " --dataset-name Dataset name (default: random)" echo " --dataset-path Path to dataset" echo " --num-prompts Number of prompts to process (default: 1000)" echo " --random-output-len Random output length (default: 512)" echo " --backend Backend for serving (default: vllm)" echo " --tokenizer-path Tokenizer path" echo " --disable-tqdm Disable TQDM progress bar" echo " --save-result Save benchmark results to a file" echo " --endpoint Endpoint to be tested (default: /v1/completions)" echo " --help Show this help message" echo echo "Example:" echo " ./benchmark_serving.sh -m meta-llama/Meta-Llama-3.1-8B-Instruct -r 10,20,30 -i 128,256,512 -d results --dataset-name sharegpt --dataset-path ./ShareGPT_V3_unfiltered_cleaned_split.json --tokenizer-path ~/.cache/huggingface/hub/models--meta-llama--Meta-Llama-3-8B-Instruct/snapshots/5f0b02c75b57c5855da9ae460ce51323ea669d8a/" echo }
Default values
model_name="microsoft/Phi-3-mini-4k-instruct" request_rates="10,20,30" input_lens="128,256,512,1024,2048" result_dir="results" host="10.150.17.207" port="8080" dataset_name="random" dataset_path="" num_prompts=1000 random_output_len=512 backend="vllm" disable_tqdm="--disable-tqdm" vllm_path="vllm" tokenizer_path="" # Tokenizer path to be provided tp=1 pp=1 endpoint="/v1/completions"
Parse command-line arguments
while [[ "$#" -gt 0 ]]; do case $1 in -m|--model) model_name="$2"; shift ;; -r|--request-rates) request_rates="$2"; shift ;; -i|--input-lens) input_lens="$2"; shift ;; -t|--tp) tp="$2"; shift ;; -p|--pp) pp="$2"; shift ;; -d|--result-dir) result_dir="$2"; shift ;; -h|--host) host="$2"; shift ;; --port) port="$2"; shift ;; --dataset-name) dataset_name="$2"; shift ;; --dataset-path) dataset_path="$2"; shift ;; --num-prompts) num_prompts="$2"; shift ;; --random-output-len) random_output_len="$2"; shift ;; --backend) backend="$2"; shift ;; --tokenizer-path) tokenizer_path="$2"; shift ;; --disable-tqdm) disable_tqdm="--disable-tqdm"; shift ;; --save-result) save_result="--save-result"; shift ;; --endpoint) endpoint="$2"; shift ;; --help) show_help; exit 0 ;; *) echo "Unknown parameter passed: $1"; show_help; exit 1 ;; esac shift done
Convert request rates and input lengths to arrays
IFS=',' read -r -a request_rate_array <<< "$request_rates" IFS=',' read -r -a input_lens_array <<< "$input_lens"
Ensure the dataset is available if specified
if [[ -n "$dataset_path" ]]; then if [[ ! -f "$dataset_path" ]]; then echo "Dataset not found at $dataset_path. Exiting..." exit 1 else echo "Using dataset: $dataset_name at $dataset_path" fi fi
Ensure the tokenizer path is specified
if [[ -z "$tokenizer_path" ]]; then echo "Tokenizer path is required. Please specify the tokenizer path with --tokenizer-path." exit 1 fi
Loop over request rates and input lengths
for rate in "${request_rate_array[@]}"; do for input_len in "${input_lens_array[@]}"; do # Define directory path based on the model name, request rate, TP, and PP rate_result_dir="${result_dir}/${model_name////_}/RR-${rate}-TP-${tp}-PP-${pp}/IL-${input_len}"
# Create the directory structure
mkdir -p "$rate_result_dir"
# Build the command to run the benchmark
cmd="python3 ${vllm_path}/benchmarks/benchmark_serving.py \
--host ${host} \
--port ${port} \
--endpoint ${endpoint} \
--model ${model_name} \
--tokenizer ${tokenizer_path} \
--random-input-len ${input_len} \
--random-output-len ${random_output_len} \
--request-rate ${rate} \
--dataset-name ${dataset_name} \
--dataset-path ${dataset_path} \
--num-prompts ${num_prompts} \
--backend ${backend} \
${disable_tqdm} \
${save_result} \
--result-dir ${rate_result_dir}"
# Echo the command for debugging
echo "Running: $cmd"
# Execute the command
$cmd
done
done`
It would be great if you can clone the latest main branch and just confirm that the benchmark script works for you.
I did took the latest yesterday only.
@ywang96 @DarkLight1337 Hello, if I have to install vllm using source code in a docker on nvidia GPU, which docker image would you recommend?
@rabaja Can you share what's inside
./benchmark_serving.sh? I cannot repro this with our benchmark script in the main branch.my server launch command:
vllm serve meta-llama/Llama-3.1-8B-InstructBenchmark launch command:
python3 benchmark_serving.py \ --model meta-llama/Llama-3.1-8B-Instruct \ --dataset-name sharegpt \ --dataset-path ShareGPT_V3_unfiltered_cleaned_split.json \ --num-prompts 10 \ --backend openai-chat \ --endpoint /v1/chat/completions \ --request-rate 1Benchmark result
Namespace(backend='openai-chat', base_url=None, host='localhost', port=8000, endpoint='/v1/chat/completions', dataset=None, dataset_name='sharegpt', dataset_path='ShareGPT_V3_unfiltered_cleaned_split.json', max_concurrency=None, model='meta-llama/Llama-3.1-8B-Instruct', tokenizer=None, best_of=1, use_beam_search=False, num_prompts=10, logprobs=None, request_rate=1.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=False, profile=False, save_result=False, metadata=None, result_dir=None, result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=1024, random_output_len=128, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None) Starting initial single prompt test run... Initial test run completed. Starting main benchmark run... Traffic request rate: 1.0 Burstiness factor: 1.0 (Poisson process) Maximum request concurrency: None 100%|โโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโโ| 10/10 [00:12<00:00, 1.21s/it] ============ Serving Benchmark Result ============ Successful requests: 10 Benchmark duration (s): 12.11 Total input tokens: 1369 Total generated tokens: 2275 Request throughput (req/s): 0.83 Output token throughput (tok/s): 187.87 Total Token throughput (tok/s): 300.92 ---------------Time to First Token---------------- Mean TTFT (ms): 28.91 Median TTFT (ms): 28.09 P99 TTFT (ms): 36.37 -----Time per Output Token (excl. 1st token)------ Mean TPOT (ms): 7.84 Median TPOT (ms): 7.87 P99 TPOT (ms): 7.90 ---------------Inter-token Latency---------------- Mean ITL (ms): 7.84 Median ITL (ms): 7.80 P99 ITL (ms): 8.37 ==================================================
@ywang96 Hi, I also encounter this error with deepseek-r1 on 8*H200, the vllm version is 0.7.2.dev64+g449d1bce.cu125.
vllm serve /mnt/model --tensor-parallel-size 8 --pipeline-parallel-size 1 --trust-remote-code
python3 ./vllm/benchmarks/benchmark_serving.py \
--model /mnt/model/ \
--dataset-name sharegpt \
--dataset-path /mnt/ShareGPT_V3_unfiltered_cleaned_split.json.1 \
--num-prompts 10 \
--backend openai-chat \
--endpoint /v1/chat/completions \
--request-rate 1
The error is as following:
INFO 02-15 08:21:53 __init__.py:186] Automatically detected platform cuda.
Namespace(backend='openai-chat', base_url=None, host='localhost', port=8000, endpoint='/v1/chat/completions', dataset=None, dataset_name='sharegpt', dataset_path='/mnt/ShareGPT_V3_unfiltered_cleaned_split.json.1', max_concurrency=None, model='/mnt/model/', tokenizer=None, best_of=1, use_beam_search=False, num_prompts=10, logprobs=None, request_rate=1.0, burstiness=1.0, seed=0, trust_remote_code=False, disable_tqdm=False, profile=False, save_result=False, metadata=None, result_dir=None, result_filename=None, ignore_eos=False, percentile_metrics='ttft,tpot,itl', metric_percentiles='99', goodput=None, sonnet_input_len=550, sonnet_output_len=150, sonnet_prefix_len=200, sharegpt_output_len=None, random_input_len=1024, random_output_len=128, random_range_ratio=1.0, random_prefix_len=0, hf_subset=None, hf_split=None, hf_output_len=None, tokenizer_mode='auto', served_model_name=None)
Starting initial single prompt test run...
Traceback (most recent call last):
File "/workspace/./vllm/benchmarks/benchmark_serving.py", line 1241, in <module>
main(args)
File "/workspace/./vllm/benchmarks/benchmark_serving.py", line 881, in main
benchmark_result = asyncio.run(
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/workspace/./vllm/benchmarks/benchmark_serving.py", line 567, in benchmark
raise ValueError(
ValueError: Initial test run failed - Please make sure benchmark arguments are correctly specified. Error: Not Found
Could you help me with this error? Thank you.
The output of python collect_env.py is as following:
INFO 02-15 08:23:01 __init__.py:186] Automatically detected platform cuda.
Collecting environment information...
PyTorch version: 2.5.1+cu124
Is debug build: False
CUDA used to build PyTorch: 12.4
ROCM used to build PyTorch: N/A
OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.30.2
Libc version: glibc-2.35
Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-5.15.0-130-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: 12.5.82
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA H200
GPU 1: NVIDIA H200
GPU 2: NVIDIA H200
GPU 3: NVIDIA H200
GPU 4: NVIDIA H200
GPU 5: NVIDIA H200
GPU 6: NVIDIA H200
GPU 7: NVIDIA H200
Nvidia driver version: 550.90.07
cuDNN version: Probably one of the following:
/usr/lib/x86_64-linux-gnu/libcudnn.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_adv.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_cnn.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_engines_precompiled.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_engines_runtime_compiled.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_graph.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_heuristic.so.9.2.1
/usr/lib/x86_64-linux-gnu/libcudnn_ops.so.9.2.1
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 52 bits physical, 57 bits virtual
Byte Order: Little Endian
CPU(s): 224
On-line CPU(s) list: 0-223
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Platinum 8480+
CPU family: 6
Model: 143
Thread(s) per core: 2
Core(s) per socket: 56
Socket(s): 2
Stepping: 8
Frequency boost: enabled
CPU max MHz: 2001.0000
CPU min MHz: 800.0000
BogoMIPS: 4000.00
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf tsc_known_freq pni pclmulqdq dtes64 monitor ds_cpl smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cat_l2 cdp_l3 invpcid_single intel_ppin cdp_l2 ssbd mba ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a avx512f avx512dq rdseed adx smap avx512ifma clflushopt clwb intel_pt avx512cd sha_ni avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local split_lock_detect avx_vnni avx512_bf16 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke waitpkg avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid bus_lock_detect cldemote movdiri movdir64b enqcmd fsrm md_clear serialize tsxldtrk pconfig arch_lbr amx_bf16 avx512_fp16 amx_tile amx_int8 flush_l1d arch_capabilities
L1d cache: 5.3 MiB (112 instances)
L1i cache: 3.5 MiB (112 instances)
L2 cache: 224 MiB (112 instances)
L3 cache: 210 MiB (2 instances)
NUMA node(s): 8
NUMA node0 CPU(s): 0-13,112-125
NUMA node1 CPU(s): 14-27,126-139
NUMA node2 CPU(s): 28-41,140-153
NUMA node3 CPU(s): 42-55,154-167
NUMA node4 CPU(s): 56-69,168-181
NUMA node5 CPU(s): 70-83,182-195
NUMA node6 CPU(s): 84-97,196-209
NUMA node7 CPU(s): 98-111,210-223
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Not affected
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI BHI_DIS_S
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] flashinfer==0.1.6+cu121torch2.4
[pip3] numpy==1.26.4
[pip3] nvidia-cublas-cu12==12.4.5.8
[pip3] nvidia-cuda-cupti-cu12==12.4.127
[pip3] nvidia-cuda-nvrtc-cu12==12.4.127
[pip3] nvidia-cuda-runtime-cu12==12.4.127
[pip3] nvidia-cudnn-cu12==9.1.0.70
[pip3] nvidia-cudnn-frontend==1.5.1
[pip3] nvidia-cufft-cu12==11.2.1.3
[pip3] nvidia-curand-cu12==10.3.5.147
[pip3] nvidia-cusolver-cu12==11.6.1.9
[pip3] nvidia-cusparse-cu12==12.3.1.170
[pip3] nvidia-dali-cuda120==1.39.0
[pip3] nvidia-ml-py==12.560.30
[pip3] nvidia-modelopt==0.13.0
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvimgcodec-cu12==0.2.0.7
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] nvidia-pyindex==1.0.9
[pip3] onnx==1.16.0
[pip3] optree==0.12.1
[pip3] pytorch-triton==3.0.0+989adb9a2
[pip3] pyzmq==26.0.3
[pip3] torch==2.5.1
[pip3] torch-tensorrt==2.5.0a0
[pip3] torchao==0.6.1
[pip3] torchaudio==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.48.2
[pip3] triton==3.1.0
[conda] Could not collect
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.7.2.dev64+g449d1bce
vLLM Build Flags:
CUDA Archs: 5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 GPU2 GPU3 GPU4 GPU5 GPU6 GPU7 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X NV18 NV18 NV18 NV18 NV18 NV18 NV18 0-13,112-125 0 N/A
GPU1 NV18 X NV18 NV18 NV18 NV18 NV18 NV18 28-41,140-153 2 N/A
GPU2 NV18 NV18 X NV18 NV18 NV18 NV18 NV18 42-55,154-167 3 N/A
GPU3 NV18 NV18 NV18 X NV18 NV18 NV18 NV18 14-27,126-139 1 N/A
GPU4 NV18 NV18 NV18 NV18 X NV18 NV18 NV18 56-69,168-181 4 N/A
GPU5 NV18 NV18 NV18 NV18 NV18 X NV18 NV18 84-97,196-209 6 N/A
GPU6 NV18 NV18 NV18 NV18 NV18 NV18 X NV18 98-111,210-223 7 N/A
GPU7 NV18 NV18 NV18 NV18 NV18 NV18 NV18 X 70-83,182-195 5 N/A
Legend:
X = Self
SYS = Connection traversing PCIe as well as the SMP interconnect between NUMA nodes (e.g., QPI/UPI)
NODE = Connection traversing PCIe as well as the interconnect between PCIe Host Bridges within a NUMA node
PHB = Connection traversing PCIe as well as a PCIe Host Bridge (typically the CPU)
PXB = Connection traversing multiple PCIe bridges (without traversing the PCIe Host Bridge)
PIX = Connection traversing at most a single PCIe bridge
NV# = Connection traversing a bonded set of # NVLinks
NVIDIA_VISIBLE_DEVICES=all
CUBLAS_VERSION=12.5.3.2
NVIDIA_REQUIRE_CUDA=cuda>=9.0
CUDA_CACHE_DISABLE=1
TORCH_CUDA_ARCH_LIST=5.2 6.0 6.1 7.0 7.2 7.5 8.0 8.6 8.7 9.0+PTX
NCCL_VERSION=2.22.3
NVIDIA_DRIVER_CAPABILITIES=compute,utility,video
NVIDIA_PRODUCT_NAME=PyTorch
CUDA_VERSION=12.5.1.007
PYTORCH_VERSION=2.4.0a0+3bcc3cd
PYTORCH_BUILD_NUMBER=0
CUDNN_VERSION=9.2.1.18
PYTORCH_HOME=/opt/pytorch/pytorch
LD_LIBRARY_PATH=/usr/local/lib/python3.10/dist-packages/torch/lib:/usr/local/lib/python3.10/dist-packages/torch_tensorrt/lib:/usr/local/cuda/compat/lib:/usr/local/nvidia/lib:/usr/local/nvidia/lib64
NVIDIA_BUILD_ID=100464919
CUDA_DRIVER_VERSION=555.42.06
PYTORCH_BUILD_VERSION=2.4.0a0+3bcc3cd
CUDA_HOME=/usr/local/cuda
CUDA_HOME=/usr/local/cuda
CUDA_MODULE_LOADING=LAZY
NVIDIA_REQUIRE_JETPACK_HOST_MOUNTS=
NVIDIA_PYTORCH_VERSION=24.07
TORCH_ALLOW_TF32_CUBLAS_OVERRIDE=1
NCCL_CUMEM_ENABLE=0
TORCHINDUCTOR_COMPILE_THREADS=1
@yuqie HI๏ผ you can try like this๏ผ vllm serve /mnt/model --tensor-parallel-size 8 --pipeline-parallel-size 1 --trust-remote-code \ --served-model-name your_model_name
python3 ./vllm/benchmarks/benchmark_serving.py \ --model /mnt/model/ \ --dataset-name sharegpt \ --dataset-path /mnt/ShareGPT_V3_unfiltered_cleaned_split.json.1 \ --num-prompts 10 \ --backend openai-chat \ --endpoint /v1/chat/completions \ --request-rate 1 \ --served_model_name your_model_name
you can change โyour_model_nameโ to the name what you want.
@yuqie HI๏ผ you can try like this๏ผ vllm serve /mnt/model --tensor-parallel-size 8 --pipeline-parallel-size 1 --trust-remote-code \ --served-model-name your_model_name
python3 ./vllm/benchmarks/benchmark_serving.py \ --model /mnt/model/ \ --dataset-name sharegpt \ --dataset-path /mnt/ShareGPT_V3_unfiltered_cleaned_split.json.1 \ --num-prompts 10 \ --backend openai-chat \ --endpoint /v1/chat/completions \ --request-rate 1 \ --served_model_name your_model_name
you can change โyour_model_nameโ to the name what you want.
Thank you @HammondWen, I will try this one
@yuqie HI๏ผ you can try like this๏ผ vllm serve /mnt/model --tensor-parallel-size 8 --pipeline-parallel-size 1 --trust-remote-code \ --served-model-name your_model_name
python3 ./vllm/benchmarks/benchmark_serving.py \ --model /mnt/model/ \ --dataset-name sharegpt \ --dataset-path /mnt/ShareGPT_V3_unfiltered_cleaned_split.json.1 \ --num-prompts 10 \ --backend openai-chat \ --endpoint /v1/chat/completions \ --request-rate 1 \ --served_model_name your_model_name
you can change โyour_model_nameโ to the name what you want.
It worked well, thank you @HammondWen
@yuqie could u please share the path where did you download the data set file "ShareGPT_V3_unfiltered_cleaned_split.json.1 "
@yuqie could u please share the path where did you download the data set file "ShareGPT_V3_unfiltered_cleaned_split.json.1 "
ไฝฟ็จๅฎๆนHugging Faceไปๅบไธ่ฝฝ
wget https://huggingface.co/datasets/anon8231489123/ShareGPT_Vicuna_unfiltered/resolve/main/ShareGPT_V3_unfiltered_cleaned_split.json โ:ml-citation{ref="2" data="citationList"}
ๅค็จไธ่ฝฝ่ทฏๅพ๏ผ่ฅไธป้พๆฅๅคฑๆ๏ผ
wget https://huggingface.co/datasets/anon8231489123/sharegpt_vicuna_unfiltered/resolve/main/sharegpt_v3_unfiltered_cleaned_split.json โ:ml-citation{ref="1" data="citationList"}
I encountered the same problem and found that it was caused by the max_completion_tokens parameter. Modify backend_request_func.py and changed to max_tokens solved this problem.
{"object":"error","message":"[{'type': 'extra_forbidden', 'loc': ('body', 'max_completion_tokens'), 'msg': 'Extra inputs are not permitted', 'input': 119}]","type":"BadRequestError","param":null,"code":400}
This issue has been automatically marked as stale because it has not had any activity within 90 days. It will be automatically closed if no further activity occurs within 30 days. Leave a comment if you feel this issue should remain open. Thank you!
This issue has been automatically closed due to inactivity. Please feel free to reopen if you feel it is still relevant. Thank you!