Commit cadefd2
authored
[Performance] DSV4 prefix cache hit rate optimize (vllm-project#11107)
### What this PR does / why we need it?
refer to this issue:
vllm-project#10970 and
vllm-project/vllm#43447 ,
vllm-project/vllm#44082 , Address the issue of
0% DSV4 prefix cache hit rate, which is caused by turning on MTP
### How was this patch tested?
test result:
<img width="1644" height="416" alt="image"
src="https://github.com/user-attachments/assets/2a7c1d2c-fd4c-439f-8777-91b25c219d36"
/>
model script:
export OMP_PROC_BIND=false
export OMP_NUM_THREADS=10
export PYTORCH_NPU_ALLOC_CONF=expandable_segments:True
export
LD_PRELOAD=/usr/lib/aarch64-linux-gnu/libjemalloc.so.2:$LD_PRELOAD
export HCCL_BUFFSIZE=1024
export VLLM_ASCEND_ENABLE_FLASHCOMM1=1
export TASK_QUEUE_ENABLE=1
export HCCL_OP_EXPANSION_MODE="AIV"
export VLLM_PREFIX_CACHE_RETENTION_INTERVAL=16384
vllm serve
/nas/disk6/DeepSeek-V4-Flash-HW-W8A8/DeepSeek-V4-Flash-HW-W8A8_20260512_02
\
--max_model_len 1048576 \
--max-num-batched-tokens 10240 \
--served-model-name dsv4 \
--gpu-memory-utilization 0.9 \
--api-server-count 1 \
--max-num-seqs 32 \
--data-parallel-size 2 \
--tensor-parallel-size 8 \
--enable-expert-parallel \
--tokenizer-mode deepseek_v4 \
--tool-call-parser deepseek_v4 \
--enable-auto-tool-choice \
--reasoning-parser deepseek_v4 \
--safetensors-load-strategy 'prefetch' \
--enable-prefix-caching \
--model-loader-extra-config='{"enable_multithread_load": "true",
"num_threads": 128}' \
--quantization ascend \
--port 8898 \
--block-size 128 \
--speculative-config '{"num_speculative_tokens": 1,"method":
"mtp","enforce_eager": true}' \
--async-scheduling \
--compilation-config '{"cudagraph_mode": "FULL_DECODE_ONLY"}'\
--additional-config '
{"ascend_compilation_config":{
"enable_npugraph_ex":true,
"enable_static_kernel":false
},
"enable_cpu_binding": true,
"enable_dsa_cp": true,
"multistream_overlap_shared_expert":true}'
test script:
vllm bench serve --backend openai-chat --model dsv4 --served-model-name
dsv4 --tokenizer
/nas/disk6/DeepSeek-V4-Flash-HW-W8A8/DeepSeek-V4-Flash-HW-W8A8_20260512_02
--percentile-metrics ttft,tpot,itl,e2el --dataset-name random --port
8898 --max-concurrency 10 --num-prompts 40 --endpoint
/v1/chat/completions --seed 42 --ignore-eos --random-input-len 48000
--random-output-len 300 --random-range-ratio 0 --random-prefix-len 20000
- vLLM version: v0.23.0
- vLLM main:
vllm-project/vllm@967c5c3
Signed-off-by: HF-001 <1670186653@qq.com>1 parent fd2aa3f commit cadefd2
2 files changed
Lines changed: 100 additions & 0 deletions
File tree
- tests/ut/patch/platform
- vllm_ascend/patch/platform
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
304 | 304 | | |
305 | 305 | | |
306 | 306 | | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
| 320 | + | |
| 321 | + | |
| 322 | + | |
| 323 | + | |
| 324 | + | |
| 325 | + | |
| 326 | + | |
| 327 | + | |
| 328 | + | |
| 329 | + | |
| 330 | + | |
| 331 | + | |
| 332 | + | |
| 333 | + | |
| 334 | + | |
| 335 | + | |
| 336 | + | |
| 337 | + | |
| 338 | + | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
| 382 | + | |
| 383 | + | |
| 384 | + | |
307 | 385 | | |
308 | 386 | | |
309 | 387 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
197 | 197 | | |
198 | 198 | | |
199 | 199 | | |
| 200 | + | |
| 201 | + | |
| 202 | + | |
| 203 | + | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
| 209 | + | |
| 210 | + | |
| 211 | + | |
| 212 | + | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
200 | 222 | | |
201 | 223 | | |
202 | 224 | | |
| |||
0 commit comments