verl icon indicating copy to clipboard operation
verl copied to clipboard

vllm version question! 0.6.3?

Open weizhenli012 opened this issue 1 year ago • 11 comments

I install it according to the instructions in doc, but meet the problem: return ModelConfig( (main_task pid=181638) ^^^^^^^^^^^^ (main_task pid=181638) File "/inspire/hdd/ws-ba572160-47f8-4ca1-984e-d6bcdeb95dbb/a100-maybe/liweizhen/verl/verl/third_party/vllm/vllm_v_0_6_3/config.py", line 47, in init (main_task pid=181638) super().init(model=hf_config._name_or_path, tokenizer=hf_config._name_or_path, *args, **kwargs) (main_task pid=181638) File "/root/miniconda3/envs/verl/lib/python3.12/site-packages/vllm/config.py", line 186, in init (main_task pid=181638) self.max_model_len = _get_and_verify_max_len( (main_task pid=181638) ^^^^^^^^^^^^^^^^^^^^^^^^ (main_task pid=181638) File "/root/miniconda3/envs/verl/lib/python3.12/site-packages/vllm/config.py", line 1764, in _get_and_verify_max_len (main_task pid=181638) assert "factor" in rope_scaling (main_task pid=181638) ^^^^^^^^^^^^^^^^^^^^^^^^ (main_task pid=181638) AssertionError

update the vllm to 0.7.3, new problem occurs: File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/engine/llm_engine.py", line 756, in add_request preprocessed_inputs = self.input_preprocessor.preprocess( File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/inputs/preprocess.py", line 762, in preprocess return self._process_decoder_only_prompt( File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/inputs/preprocess.py", line 711, in _process_decoder_only_prompt prompt_comps = self._prompt_to_llm_inputs( File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/inputs/preprocess.py", line 343, in _prompt_to_llm_inputs return self._process_multimodal( File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/inputs/preprocess.py", line 273, in _process_multimodal return mm_processor.apply(prompt, mm_data, mm_processor_kwargs) File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/multimodal/processing.py", line 1276, in apply ) = self._apply_prompt_replacements( File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/multimodal/processing.py", line 1122, in _apply_prompt_replacements token_ids = replace_token_matches( File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/multimodal/processing.py", line 497, in replace_token_matches token_id_seqs = _replace_matches(prompt, mm_matches, mm_item_counts) File "/root/miniconda3/envs/Verl/lib/python3.10/site-packages/vllm/multimodal/processing.py", line 472, in _replace_matches out_seqs.append(prompt[prev_end_idx:start_idx] + repl_seq) ValueError: operands could not be broadcast together with shapes (40,) (616,)

weizhenli012 avatar Mar 18 '25 04:03 weizhenli012

same error

Adenialzz avatar Mar 18 '25 12:03 Adenialzz

could you share what model you're using and how to reproduce the issue?

eric-haibin-lin avatar Mar 18 '25 20:03 eric-haibin-lin

same error. any solution?

leoribeiro avatar Mar 18 '25 22:03 leoribeiro

I use qwen2.5-vl and a new dataset publaynet

weizhenli012 avatar Mar 19 '25 02:03 weizhenli012

these vllm issues seems related https://github.com/vllm-project/vllm/issues/8388 https://github.com/vllm-project/vllm/issues/8281

Adenialzz avatar Mar 19 '25 02:03 Adenialzz

SAME ISSUES

Haken1234 avatar Mar 21 '25 16:03 Haken1234

same error when train with qwen2.5-vl-7b in vllm 0.7.3 "ValueError: operands could not be broadcast together with shapes (xx,) (xx,)"

JoyTim-777 avatar Mar 22 '25 17:03 JoyTim-777

you could try install vllm==0.8.1

chenllliang avatar Mar 22 '25 18:03 chenllliang

the problem locate in the collate_fn func in dataset:def collate_fn(features: List[Dict[str, Any]]) -> Dict[str, Any]: tensors = defaultdict(list) non_tensors = defaultdict(list) for feature in features: for key, value in feature.items(): if isinstance(value, torch.Tensor): tensors[key].append(value) else: non_tensors[key].append(value)

for key, value in tensors.items():
    tensors[key] = torch.stack(value, dim=0)

for key, value in non_tensors.items():
    if key=="raw_prompt_ids":
        print(f"origional raw prompt id type: {type(value[0])}")
    **non_tensors[key] = np.array(value, dtype=object)**
    if key=="raw_prompt_ids":
        print(f"peocess raw prompt id type: {type(non_tensors[key][0])}")

return {**tensors, **non_tensors}

the items in value are lists, but when the length of the items in value is the same, the np.array() make it be ndarray, but the vllm 0.7.3 need the input to be list. resolve this then you can make it!

weizhenli012 avatar Mar 24 '25 05:03 weizhenli012

in addition, install vllm ==0.8.1 can also avoid this problem

weizhenli012 avatar Mar 24 '25 05:03 weizhenli012

should be resolved if using latest vllm v0.8. We recommend using the official image which include vllm v0.8.2 pre-installed. https://verl.readthedocs.io/en/latest/start/install.html#install-from-docker-image

eric-haibin-lin avatar Apr 06 '25 19:04 eric-haibin-lin