vllm bench serve — 온라인 서빙 처리량 벤치마크
vllm bench serve — 온라인 서빙 처리량 벤치마크
vllm bench serve는 온라인 서빙(online serving) 처리량을 벤치마크하는 하위 명령입니다. 실제 서버에 요청을 보내면서, 지정한 요청 도착 패턴(도착률, 버스트성 등) 아래에서 처리량과 TTFT, TPOT 같은 지연 지표를 측정합니다.
출처: 문서
본문
JSON CLI 인자
JSON CLI 인자를 넘길 때, 아래 두 방식은 서로 동등합니다.
--json-arg '{"key1": "value1", "key2": {"key3": "value2"}}'
--json-arg.key1 value1 --json-arg.key2.key3 value2
리스트 요소는 + 기호로 각각 전달할 수 있습니다.
--json-arg '{"key4": ["value3", "value4", "value5"]}'
--json-arg.key4+ value3 --json-arg.key4+='value4,value5'
핵심 옵션
| 옵션 | 기본값 | 설명 |
|---|---|---|
--model |
None |
모델 이름 |
--num-prompts |
1000 |
처리할 프롬프트 수 |
--dataset-name |
random |
벤치마크할 데이터셋(sharegpt, burstgpt, sonnet, random, random-mm, random-rerank, hf, custom, prefix_repetition, spec_bench) |
--backend |
openai |
사용할 백엔드/엔드포인트 종류(vllm, openai, openai-chat, openai-embeddings, vllm-rerank 등) |
--base-url |
None |
http host/port 대신 사용할 서버 또는 API base url |
--host / --port |
127.0.0.1 / 8000 |
벤치마크 대상 서버 주소 |
--endpoint |
/v1/completions |
API 엔드포인트 |
--request-rate |
inf |
초당 요청 수. inf면 모든 요청을 시각 0에 보냄. 그 외에는 Poisson 또는 gamma 분포로 도착 시각 합성 |
--burstiness |
1.0 |
요청 생성의 버스트성 계수. 1이면 Poisson, 낮을수록 더 버스트한 도착 |
--max-concurrency |
None |
동시 실행 최대 요청 수(상위 계층이 동시성 제한을 거는 환경 시뮬레이션) |
--num-warmups |
0 |
워밍업 요청 수 |
--profile |
False |
Torch Profiler 사용(VLLM_TORCH_PROFILER_DIR 필요) |
--save-result |
False |
벤치마크 결과를 JSON 파일로 저장 |
--percentile-metrics |
None |
퍼센타일 보고 지표(ttft, tpot, itl, e2el) |
--metric-percentiles |
99 |
보고할 퍼센타일 값(예: "25,50,75") |
--goodput |
None |
KEY:VALUE 쌍으로 goodput의 SLO 지정(밀리초 단위, DistServe 참고) |
--tokenizer-mode |
auto |
토크나이저 모드(auto, slow, mistral, custom) |
--served-model-name |
None |
API에 노출될 모델 이름 |
기본 실행 예시는 다음과 같습니다.
vllm bench serve \
--model meta-llama/Llama-3.2-1B-Instruct \
--host server-host \
--port server-port \
--random-input-len 32 \
--random-output-len 4 \
--num-prompts 5
데이터셋별 옵션
데이터셋 종류에 따라 다음 옵션 군을 사용합니다.
- custom :
--custom-output-len(요청당 출력 토큰 수, 기본256) - spec bench :
--spec-bench-output-len(기본256),--spec-bench-category - sonnet :
--sonnet-input-len(기본550),--sonnet-output-len(기본150),--sonnet-prefix-len(기본200) - sharegpt :
--sharegpt-output-len - blazedit :
--blazedit-min-distance,--blazedit-max-distance - random :
--random-input-len(기본1024),--random-output-len(기본128),--random-range-ratio,--random-prefix-len,--random-batch-size - random-mm (random에서 확장) :
--random-mm-base-items-per-request,--random-mm-num-mm-items-range-ratio,--random-mm-limit-mm-per-prompt,--random-mm-bucket-config - hf :
--hf-subset,--hf-split,--hf-name,--hf-output-len - prefix repetition :
--prefix-repetition-prefix-len(기본256),--prefix-repetition-suffix-len,--prefix-repetition-num-prefixes(기본10),--prefix-repetition-output-len
샘플링 파라미터
OpenAI 호환 백엔드에서만 효과가 있으며, --top-p, --top-k, --min-p, --temperature, --frequency-penalty, --presence-penalty, --repetition-penalty 등을 지정할 수 있습니다. --temperature가 지정되지 않으면 greedy 디코딩(temperature==0.0)을 기본으로 합니다.
더 알아보기 (Learn more)
- vllm bench latency — 지연 시간 벤치마크
- vllm bench startup — 스타트업 시간 벤치마크
- vllm bench sweep — 파라미터 스윕 벤치마크