-
-
Notifications
You must be signed in to change notification settings - Fork 10.7k
Description
Your current environment
The output of `python collect_env.py`
Your output of `python collect_env.py` here
OS: Ubuntu 22.04.3 LTS (x86_64)
GCC version: (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
Clang version: Could not collect
CMake version: version 3.22.1
Libc version: glibc-2.35
Python version: 3.10.16 (main, Dec 11 2024, 16:24:50) [GCC 11.2.0] (64-bit runtime)
Python platform: Linux-5.15.0-43-generic-x86_64-with-glibc2.35
Is CUDA available: True
CUDA runtime version: Could not collect
CUDA_MODULE_LOADING set to: LAZY
GPU models and configuration:
GPU 0: NVIDIA A800 80GB PCIe
GPU 1: NVIDIA A800 80GB PCIe
GPU 2: NVIDIA A800 80GB PCIe
GPU 3: NVIDIA A800 80GB PCIe
Nvidia driver version: 535.86.05
cuDNN version: Could not collect
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): 160
On-line CPU(s) list: 0-159
Vendor ID: GenuineIntel
Model name: Intel(R) Xeon(R) Platinum 8383C CPU @ 2.70GHz
CPU family: 6
Model: 106
Thread(s) per core: 2
Core(s) per socket: 40
Socket(s): 2
Stepping: 6
CPU max MHz: 3600.0000
CPU min MHz: 800.0000
BogoMIPS: 5400.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 pni pclmulqdq dtes64 monitor 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 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
Virtualization: VT-x
L1d cache: 3.8 MiB (80 instances)
L1i cache: 2.5 MiB (80 instances)
L2 cache: 100 MiB (80 instances)
L3 cache: 120 MiB (2 instances)
NUMA node(s): 2
NUMA node0 CPU(s): 0-39,80-119
NUMA node1 CPU(s): 40-79,120-159
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 vulnerable
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
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Versions of relevant libraries:
[pip3] flake8==7.1.1
[pip3] mypy-extensions==1.0.0
[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-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-ml-py==12.570.86
[pip3] nvidia-nccl-cu12==2.21.5
[pip3] nvidia-nvjitlink-cu12==12.4.127
[pip3] nvidia-nvtx-cu12==12.4.127
[pip3] pyzmq==26.2.1
[pip3] torch==2.5.1
[pip3] torchaudio==2.5.1
[pip3] torchvision==0.20.1
[pip3] transformers==4.48.3
[pip3] triton==3.1.0
[conda] numpy 1.26.4 pypi_0 pypi
[conda] nvidia-cublas-cu12 12.4.5.8 pypi_0 pypi
[conda] nvidia-cuda-cupti-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-cuda-nvrtc-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-cuda-runtime-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-cudnn-cu12 9.1.0.70 pypi_0 pypi
[conda] nvidia-cufft-cu12 11.2.1.3 pypi_0 pypi
[conda] nvidia-curand-cu12 10.3.5.147 pypi_0 pypi
[conda] nvidia-cusolver-cu12 11.6.1.9 pypi_0 pypi
[conda] nvidia-cusparse-cu12 12.3.1.170 pypi_0 pypi
[conda] nvidia-ml-py 12.570.86 pypi_0 pypi
[conda] nvidia-nccl-cu12 2.21.5 pypi_0 pypi
[conda] nvidia-nvjitlink-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-nvtx-cu12 12.4.127 pypi_0 pypi
[conda] pyzmq 26.2.1 pypi_0 pypi
[conda] torch 2.5.1 pypi_0 pypi
[conda] torchaudio 2.5.1 pypi_0 pypi
[conda] torchvision 0.20.1 pypi_0 pypi
[conda] transformers 4.48.3 pypi_0 pypi
[conda] triton 3.1.0 pypi_0 pypi
ROCM Version: Could not collect
Neuron SDK Version: N/A
vLLM Version: 0.7.2
vLLM Build Flags:
CUDA Archs: Not Set; ROCm: Disabled; Neuron: Disabled
GPU Topology:
GPU0 GPU1 GPU2 GPU3 CPU Affinity NUMA Affinity GPU NUMA ID
GPU0 X PXB SYS SYS 0-39,80-119 0 N/A
GPU1 PXB X SYS SYS 0-39,80-119 0 N/A
GPU2 SYS SYS X PXB 40-79,120-159 1 N/A
GPU3 SYS SYS PXB X 40-79,120-159 1 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
CUDA_VISIBLE_DEVICES=0,1
CUDA_VISIBLE_DEVICES=0,1
NCCL_CUMEM_ENABLE=0
TORCHINDUCTOR_COMPILE_THREADS=1
CUDA_MODULE_LOADING=LAZY
🐛 Describe the bug
Summary: Setting Qwen2VL image_processor parameters like max_pixels and min_pixels is not available for vllm==0.7.2.
Details:
I find a bug when run my code to generate candidates for GRPO algorithms with vllm.
The model is init as:
self.llm = LLM(
model=model.name_or_path,
device=vllm_device,
gpu_memory_utilization=self.args.vllm_gpu_memory_utilization,
dtype=torch.bfloat16,
# Automatic Prefix Caching caches the KV cache of existing queries, so that a new query can
# directly reuse the KV cache if it shares the same prefix with one of the existing queries.
# This is particularly useful here because we generate completions from the same prompts.
enable_prefix_caching=True,
enforce_eager=True,
max_model_len=2048,
)
and generate with:
prompts_text = [
maybe_apply_chat_template(example, self.processing_class)["prompt"]
for example in inputs
]
all_prompts_text = gather_object(prompts_text) # something like <visual_start> <image_pad>....<image_pad> <visual_end> <text here>
all_images = gather_object(images) # Image
all_multimodal_inputs = [
{"prompt": p, "multi_modal_data": {"image": i} }
for p, i in zip(all_prompts_text, all_images)
]
outputs = self.llm.generate(
all_multimodal_inputs,
sampling_params=self.sampling_params,
use_tqdm=False,
)
completion_ids = [
out.token_ids
for completions in outputs
for out in completions.outputs
]
The prompts_text is applied chat templates and the number of <image_pad> is under the setting of max_pixel = 768 * 768. However, the self.llm use the default setting and make the errors:
[rank0]: Traceback (most recent call last):
[rank0]: File "LLM_RL_works/open-r1-multimodal/src/open_r1/grpo.py", line 207, in <module>
[rank0]: main(script_args, training_args, model_args)
[rank0]: File "LLM_RL_works/open-r1-multimodal/src/open_r1/grpo.py", line 196, in main
[rank0]: trainer.train()
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/transformers/trainer.py", line 2171, in train
[rank0]: return inner_training_loop(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/transformers/trainer.py", line 2531, in _inner_training_loop
[rank0]: tr_loss_step = self.training_step(model, inputs, num_items_in_batch)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/transformers/trainer.py", line 3669, in training_step
[rank0]: inputs = self._prepare_inputs(inputs)
[rank0]: File "LLM_RL_works/open-r1-multimodal/src/open_r1/trainer/vllm_grpo_trainer.py", line 553, in _prepare_inputs
[rank0]: outputs = self.llm.generate(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/utils.py", line 1086, in inner
[rank0]: return fn(*args, **kwargs)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 469, in generate
[rank0]: outputs = self._run_engine(use_tqdm=use_tqdm)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/entrypoints/llm.py", line 1390, in _run_engine
[rank0]: step_outputs = self.llm_engine.step()
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/engine/llm_engine.py", line 1386, in step
[rank0]: outputs = self.model_executor.execute_model(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/executor/executor_base.py", line 138, in execute_model
[rank0]: output = self.collective_rpc("execute_model",
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/executor/uniproc_executor.py", line 51, in collective_rpc
[rank0]: answer = run_method(self.driver_worker, method, args, kwargs)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/utils.py", line 2220, in run_method
[rank0]: return func(*args, **kwargs)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/worker/worker_base.py", line 413, in execute_model
[rank0]: output = self.model_runner.execute_model(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/torch/utils/_contextlib.py", line 116, in decorate_context
[rank0]: return func(*args, **kwargs)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/worker/model_runner.py", line 1719, in execute_model
[rank0]: hidden_or_intermediate_states = model_executable(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1736, in _wrapped_call_impl
[rank0]: return self._call_impl(*args, **kwargs)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/torch/nn/modules/module.py", line 1747, in _call_impl
[rank0]: return forward_call(*args, **kwargs)
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/model_executor/models/qwen2_vl.py", line 1347, in forward
[rank0]: inputs_embeds = self.get_input_embeddings_v0(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/model_executor/models/qwen2_vl.py", line 1283, in get_input_embeddings_v0
[rank0]: inputs_embeds = merge_multimodal_embeddings(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/model_executor/models/utils.py", line 455, in merge_multimodal_embeddings
[rank0]: return _merge_multimodal_embeddings(
[rank0]: File "env/openr1_multimodal/lib/python3.10/site-packages/vllm/model_executor/models/utils.py", line 371, in _merge_multimodal_embeddings
[rank0]: raise ValueError(
[rank0]: ValueError: Attempted to assign 1369 + 1369 = 2738 multimodal tokens to 3704 placeholders
So I want to align the vllm version Qwen2VL as in https://github.com/vllm-project/vllm/blob/main/examples/offline_inference/vision_language.py.
But I failed: WARNING 02-11 23:25:25 utils.py:1474] The following intended overrides are not keyword-only args and and will be dropped.
And I further set in inference time as in #9612:
all_multimodal_inputs = [
{"prompt": p, "multi_modal_data": {"image": i},
############ I change here. ##############
"mm_processor_kwargs": { "max_pixels": self._max_pixels, "min_pixels": self._min_pixels} }
for p, i in zip(all_prompts_text, all_images)
]
outputs = self.llm.generate(
all_multimodal_inputs,
sampling_params=self.sampling_params,
use_tqdm=False,
)
completion_ids = [
out.token_ids
for completions in outputs
for out in completions.outputs
]
It still does not work: Keyword argument max_pixels is not a valid argument for this processor and will be ignored.
Before submitting a new issue...
- 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.