Comments (5)
The feature seems no problem when I enabled it on MI250x.
from vllm.
Can you also paste the log? I think the main parameters need to be considered is the number of available blocks
from vllm.
It seems ok for me now. Might because some other workload was running something at the same time using the same GPU when I experienced the problem.
I will check with the client to get some more information.
from vllm.
Here is one log for latency benchmarking, which I observed that the avg latency is much worse than not using the chunked-prefill. Maybe some parameters need tuning ?:
INFO 05-23 21:41:39 pynccl.py:58] Loading nccl from library librccl.so.1
Namespace(model='/dockerx/data/llama-2-13b-chat-hf', tokenizer=None, quantization=None, tensor_parallel_size=1, input_len=1024, output_len=256, batch_size=1, n=1, use_beam_search=False, num_iters_warmup=10, num_iters=10, trust_remote_code=False, dtype='auto', enforce_eager=False, kv_cache_dtype='auto', quantization_param_path=None, profile=False, profile_result_dir=None, device='cuda', block_size=16, enable_chunked_prefill=True, ray_workers_use_nsight=False, download_dir=None)
INFO 05-23 21:41:40 config.py:581] Chunked prefill is enabled (EXPERIMENTAL).
INFO 05-23 21:41:40 llm_engine.py:84] Initializing an LLM engine (v0.4.0.post1) with config: model='/dockerx/data/llama-2-13b-chat-hf', speculative_config=None, tokenizer='/dockerx/data/llama-2-13b-chat-hf', tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=False, dtype=torch.float16, max_seq_len=2048, download_dir=None, load_format=auto, tensor_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='outlines'), seed=0)
/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/cuda/__init__.py:611: UserWarning: Can't initialize NVML
warnings.warn("Can't initialize NVML")
INFO 05-23 21:41:41 selector.py:59] flash_atten is not supported on NAVI GPUs.
INFO 05-23 21:41:41 selector.py:38] Using ROCmFlashAttention backend.
INFO 05-23 21:41:50 model_runner.py:169] Loading model weights took 24.2835 GB
INFO 05-23 21:41:52 gpu_executor.py:61] # GPU blocks: 1270, # CPU blocks: 327
INFO 05-23 21:41:52 model_runner.py:967] Capturing the model for CUDA graphs. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI.
INFO 05-23 21:41:52 model_runner.py:971] CUDA graphs can take additional 1~3 GiB memory per GPU. If you are running out of memory, consider decreasing `gpu_memory_utilization` or enforcing eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.
INFO 05-23 21:41:57 model_runner.py:1048] Graph capturing finished in 5 secs.
SamplingParams(n=1, best_of=1, presence_penalty=0.0, frequency_penalty=0.0, repetition_penalty=1.0, temperature=1.0, top_p=1.0, top_k=-1, min_p=0.0, seed=None, use_beam_search=False, length_penalty=1.0, early_stopping=False, stop=[], stop_token_ids=[], include_stop_str_in_output=False, ignore_eos=True, max_tokens=256, min_tokens=0, logprobs=None, prompt_logprobs=None, skip_special_tokens=True, spaces_between_special_tokens=True, truncate_prompt_tokens=None)
Warming up...
Warmup iterations: 100%|████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [05:01<00:00, 30.15s/it]
Profiling iterations: 100%|█████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 10/10 [05:01<00:00, 30.12s/it]
Avg latency: xxx seconds
from vllm.
Below is the log from the client:
root@26a65a87bce7:/data/vllm-latest/vllm-240507/benchmarks# python benchmark_throughput.py --dataset /data/ShareGPT_V3_unfiltered_cleaned_split.json \
> --model /data/THUDM/.chatglm2-6b --enable-chunked-prefill --max-num-batched-tokens 1024 --trust-remote-code --num-prompts 100
Namespace(backend='vllm', dataset='/data/ShareGPT_V3_unfiltered_cleaned_split.json', input_len=None, output_len=None, model='/data/THUDM/chatglm2-6b', tokenizer='/data/THUDM/chatglm2-6b', quantization=None, tensor_parallel_size=1, n=1, use_beam_search=False, num_prompts=100, seed=0, hf_max_batch_size=None, trust_remote_code=True, max_model_len=None, dtype='auto', gpu_memory_utilization=0.9, enforce_eager=False, kv_cache_dtype='auto', quantization_param_path=None, device='cuda', enable_prefix_caching=False, enable_chunked_prefill=True, max_num_batched_tokens=1024, download_dir=None)
INFO 05-24 02:35:06 config.py:627] Chunked prefill is enabled (EXPERIMENTAL).
INFO 05-24 02:35:06 llm_engine.py:100] Initializing an LLM engine (v0.4.2) with config: model='/data/THUDM/chatglm2-6b', speculative_config=None, tokenizer='/data/THUDM/chatglm2-6b', skip_tokenizer_init=False, tokenizer_mode=auto, revision=None, tokenizer_revision=None, trust_remote_code=True, dtype=torch.float16, max_seq_len=32768, download_dir=None, load_format=LoadFormat.AUTO, tensor_parallel_size=1, disable_custom_all_reduce=False, quantization=None, enforce_eager=False, kv_cache_dtype=auto, quantization_param_path=None, device_config=cuda, decoding_config=DecodingConfig(guided_decoding_backend='outlines'), seed=0, served_model_name=/data/THUDM/chatglm2-6b)
WARNING 05-24 02:35:06 tokenizer.py:126] Using a slow tokenizer. This might cause a significant slowdown. Consider using a fast tokenizer instead.
INFO 05-24 02:35:06 utils.py:660] Found nccl from library /opt/rocm-6.0.0/lib/librccl.so.1
/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/cuda/__init__.py:611: UserWarning: Can't initialize NVML
warnings.warn("Can't initialize NVML")
INFO 05-24 02:35:09 selector.py:63] flash_atten is not supported on NAVI GPUs.
INFO 05-24 02:35:09 selector.py:37] Using ROCmFlashAttention backend.
INFO 05-24 02:35:23 model_runner.py:175] Loading model weights took 11.6608 GB
INFO 05-24 02:35:25 gpu_executor.py:114] # GPU blocks: 65192, # CPU blocks: 9362
INFO 05-24 02:35:27 model_runner.py:937] Capturing the model for CUDA graphs. This may lead to unexpected consequences if the model is not static. To run the model in eager mode, set 'enforce_eager=True' or use '--enforce-eager' in the CLI.
INFO 05-24 02:35:27 model_runner.py:941] CUDA graphs can take additional 1~3 GiB memory per GPU. If you are running out of memory, consider decreasing `gpu_memory_utilization` or enforcing eager mode. You can also reduce the `max_num_seqs` as needed to decrease memory usage.
INFO 05-24 02:35:30 model_runner.py:1017] Graph capturing finished in 4 secs.
Processed prompts: 0%| | 0/100 [00:00<?, ?it/s]
And python collect_env.py stdout
root@26a65a87bce7:/app/vllm# python collect_env.py
Collecting environment information...
/opt/conda/envs/py_3.9/lib/python3.9/site-packages/torch/cuda/__init__.py:611: UserWarning: Can't initialize NVML
warnings.warn("Can't initialize NVML")
PyTorch version: 2.1.1+git011de5c
Is debug build: False
CUDA used to build PyTorch: N/A
ROCM used to build PyTorch: 6.0.32830-d62f6a171
OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: 17.0.0 (https://github.com/RadeonOpenCompute/llvm-project roc-6.0.0 23483 7208e8d15fbf218deb74483ea8c549c67ca4985e)
CMake version: version 3.29.2
Libc version: glibc-2.31
Python version: 3.9.18 (main, Sep 11 2023, 13:41:44) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-92-generic-x86_64-with-glibc2.31
Is CUDA available: True
CUDA runtime version: 10.1.243
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration: AMD Radeon PRO W7900NoGCNArchNameOnOldPyTorch
Nvidia driver version: Could not collect
cuDNN version: Could not collect
HIP runtime version: 6.0.32830
MIOpen runtime version: 3.0.0
Is XNNPACK available: True
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 46 bits physical, 57 bits virtual
CPU(s): 64
On-line CPU(s) list: 0-63
Thread(s) per core: 1
Core(s) per socket: 32
Socket(s): 2
NUMA node(s): 2
Vendor ID: GenuineIntel
CPU family: 6
Model: 106
Model name: Intel(R) Xeon(R) Platinum 8338C CPU @ 2.60GHz
Stepping: 6
CPU MHz: 800.000
CPU max MHz: 3500.0000
CPU min MHz: 800.0000
BogoMIPS: 5200.00
Virtualization: VT-x
L1d cache: 3 MiB
L1i cache: 2 MiB
L2 cache: 80 MiB
L3 cache: 96 MiB
NUMA node0 CPU(s): 0-31
NUMA node1 CPU(s): 32-63
Vulnerability Gather data sampling: Mitigation; Microcode
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Mitigation; Clear CPU buffers; SMT disabled
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 IBRS, IBPB conditional, RSB filling, PBRSB-eIBRS SW sequence
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
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 pni pclmulqdq dtes64 ds_cpl vmx 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 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad 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 wbnoinvd dtherm ida arat pln pts avx512vbmi umip pku ospke avx512_vbmi2 gfni vaes vpclmulqdq avx512_vnni avx512_bitalg tme avx512_vpopcntdq la57 rdpid fsrm md_clear pconfig flush_l1d arch_capabilities
Versions of relevant libraries:
[pip3] mypy==1.4.1
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.22.4
[pip3] torch==2.1.1+git011de5c
[pip3] torchvision==0.16.1+fdea156
[pip3] triton==2.1.0
[conda] No relevant packagesROCM Version: 6.0.32830-d62f6a171
Neuron SDK Version: N/A
vLLM Version: 0.4.1
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
Could not collect
from vllm.
Related Issues (20)
- [Bug]: Gemma2 model not working with vLLM 0.6.0 CPU backend HOT 1
- [Usage]: how to let vllm use the generation_config.json as the default generation config
- [Installation]: can not install vllm in GPU HOT 2
- [Bug]: Dockerfile has a hardcoded dependency for flashinfer with cuda 12.1
- [Feature]: support out tree multimodal models HOT 10
- [Bug]: son.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
- [Bug]: Slow Inference Speed with llama 3.1 70B GGUF Q4 on A100 80G (8.7 tokens/s)
- [Bug]: Neuron + Vllm inference broken with backward incompatible change HOT 1
- [Doc]: How to Specify System CUTLASS/CUTE Path? HOT 2
- [Usage]: VLLM serve Gemma 2 9B it with more than 4096 tokens HOT 1
- [Bug]: QLoRA inference returns alternating output HOT 1
- [Doc]: Is Qwen2-VL-72B supported? HOT 1
- [Feature]: improve distributed backend selection HOT 3
- [New Model][Format]: Support the HF-version of Pixtral HOT 1
- [Bug]: RuntimeError on A800 using vllm0.6.1.post2 HOT 2
- [Bug]: Error when using --tensor-parallel-size 4 on Qwen2.5-72B-Instruct HOT 2
- [Bug]: Pixtral-12B not supported on CPU HOT 8
- [Bug]: AssertionError when loading Qwen 2.5 GGUF q3 model in vLLM HOT 2
- [Bug]: Low trhoughput on AMD MI250 using llama 3.1 (6 toks/s) HOT 1
- [Feature]: Support for Seq classification/Reward models HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from vllm.