verl icon indicating copy to clipboard operation
verl copied to clipboard

process_vision_info() got an unexpected keyword argument 'image_patch_size'

Open zhihaofang1017 opened this issue 10 months ago • 3 comments

System Info

When I pull the latest main branch to run the qwen3-vl-8B, I encounter this error.

Image

When I revert to the December main branch, it runs normally. I currently suspect the issue is caused by the changes made to the rl_dataset.py file in this #4759 .

Information

  • [ ] The official example scripts
  • [ ] My own modified scripts

Tasks

  • [ ] An officially supported task in the examples folder (such as GLUE/SQuAD, ...)
  • [ ] My own task or dataset (give details below)

Reproduction

MODEL_PATH=./Qwen3-VL-8B-Instruct
CKPTS_DIR=./
TRAIN_FILE=${TRAIN_FILE:-"geo3k/train.parquet"}
TEST_FILE=${TEST_FILE:-"geo3k/test.parquet"}
PWD=./
RAY_ADDRESS=http://[fdbd:dc02:19:799::143]:10420
WORKING_DIR=${WORKING_DIR:-"${PWD}"}
RUNTIME_ENV=${RUNTIME_ENV:-"${WORKING_DIR}/verl/trainer/runtime_env.yaml"}
BYTENAS=${BYTENAS:-"bandai-lf"}

ulimit -n 32768
# ENGINE=${1:-vllm}
ENGINE=vllm


# export VLLM_ALLREDUCE_USE_SYMM_MEM=0

# prompt&response length
max_prompt_length=2000
max_response_length=200
max_num_batched_tokens=20000
# actor_rollout_ref.rollout.max_num_batched_tokens=$max_num_batched_tokens
# vllm related params
free_cache_engine=True # enable sleep_mode, must be true
gpu_memory_utilization=0.8
tensor_model_parallel_size=4 # 32B set 8, 7B set 4
enable_chunked_prefill=False
enforce_eager=False
# batch_size
train_batch_size=128
ppo_mini_batch_size=32
ppo_micro_batch_size_per_gpu=5
log_prob_micro_batch_size_per_gpu=2
use_remove_padding=True
ignore_eos=False

rollout_n=5

# training params
enable_gradient_checkpointing=True
nnodes=2
n_gpus_per_node=16
actor_reshard=True
ref_reshard=True
sp_size=1

# 解决训推一致性
rollout_is=sequence
rollout_is_threshold=2.0
rollout_is_batch_normalize=true
rollout_rs=geometric
rollout_rs_threshold=1.01
rollout_rs_threshold_lower=0.99
rollout_token_veto_threshold=1e-4

# 训练开始时间,不需要修改
start_time=$(date +%Y%m%d)_$(date +%H%M%S)
bs_str="bs${train_batch_size}_${ppo_mini_batch_size}_${ppo_micro_batch_size_per_gpu}_${log_prob_micro_batch_size_per_gpu}"
config_str="${bs_str}_sp${sp_size}_n${rollout_n}"

ray job submit --no-wait --runtime-env="${RUNTIME_ENV}" \
    --working-dir "${WORKING_DIR}" \
    --address "${RAY_ADDRESS}" \
    -- python3 -m verl.trainer.main_ppo \
    algorithm.adv_estimator=grpo \
    data.train_files="${TRAIN_FILE}" \
    data.val_files="${TEST_FILE}" \
    data.train_batch_size=$train_batch_size \
    data.max_prompt_length=$max_prompt_length \
    data.max_response_length=$max_response_length \
    data.filter_overlong_prompts=True \
    data.truncation='error' \
    data.image_key=images \
    data.shuffle=False \
    actor_rollout_ref.model.path=$MODEL_PATH \
    actor_rollout_ref.actor.optim.lr=1e-6 \
    actor_rollout_ref.model.use_remove_padding=$use_remove_padding \
    actor_rollout_ref.model.use_fused_kernels=True \
    actor_rollout_ref.actor.ppo_mini_batch_size=$ppo_mini_batch_size \
    actor_rollout_ref.actor.ppo_micro_batch_size_per_gpu=$ppo_micro_batch_size_per_gpu \
    actor_rollout_ref.actor.use_kl_loss=True \
    actor_rollout_ref.actor.kl_loss_coef=0.01 \
    actor_rollout_ref.actor.kl_loss_type=low_var_kl \
    actor_rollout_ref.actor.entropy_coeff=0 \
    actor_rollout_ref.actor.use_torch_compile=False \
    actor_rollout_ref.model.enable_gradient_checkpointing=$enable_gradient_checkpointing \
    actor_rollout_ref.actor.strategy=fsdp2 \
    actor_rollout_ref.actor.fsdp_config.fsdp_size=32 \
    actor_rollout_ref.actor.fsdp_config.reshard_after_forward=$actor_reshard \
    actor_rollout_ref.ref.fsdp_config.reshard_after_forward=$ref_reshard \
    actor_rollout_ref.actor.fsdp_config.entropy_checkpointing=True \
    actor_rollout_ref.actor.entropy_from_logits_with_chunking=True \
    actor_rollout_ref.ref.entropy_from_logits_with_chunking=True \
    actor_rollout_ref.actor.fsdp_config.param_offload=False \
    actor_rollout_ref.actor.fsdp_config.optimizer_offload=False \
    actor_rollout_ref.rollout.log_prob_micro_batch_size_per_gpu=$log_prob_micro_batch_size_per_gpu \
    actor_rollout_ref.rollout.tensor_model_parallel_size=$tensor_model_parallel_size \
    actor_rollout_ref.rollout.name=$ENGINE \
    actor_rollout_ref.rollout.ignore_eos=$ignore_eos \
    +actor_rollout_ref.rollout.engine_kwargs.vllm.disable_mm_preprocessor_cache=True \
    actor_rollout_ref.rollout.gpu_memory_utilization=$gpu_memory_utilization \
    actor_rollout_ref.rollout.enable_chunked_prefill=$enable_chunked_prefill \
    actor_rollout_ref.rollout.enforce_eager=$enforce_eager \
    actor_rollout_ref.rollout.free_cache_engine=$free_cache_engine \
    actor_rollout_ref.rollout.max_num_batched_tokens=$max_num_batched_tokens \
    actor_rollout_ref.rollout.n=$rollout_n \
    actor_rollout_ref.ref.log_prob_micro_batch_size_per_gpu=$log_prob_micro_batch_size_per_gpu \
    actor_rollout_ref.ref.fsdp_config.param_offload=True \
    algorithm.use_kl_in_reward=False \
    trainer.device=npu \
    trainer.critic_warmup=0 \
    trainer.logger='["console"]' \
    trainer.project_name='verl_grpo_geo3k_qwen3_vl_30b' \
    trainer.experiment_name='qwen3_vl_30b_1k2k_1sp_4tp_1229_1' \
    trainer.n_gpus_per_node=$n_gpus_per_node \
    trainer.nnodes=$nnodes \
    trainer.save_freq=-1 \
    trainer.test_freq=-1 \
    trainer.total_epochs=100 \
    trainer.val_before_train=False \
    actor_rollout_ref.model.enable_activation_offload=True \
    actor_rollout_ref.actor.ulysses_sequence_parallel_size=$sp_size \
    actor_rollout_ref.ref.ulysses_sequence_parallel_size=$sp_size \
    algorithm.rollout_correction.rollout_is=${rollout_is} \
    algorithm.rollout_correction.rollout_is_threshold=${rollout_is_threshold} \
    algorithm.rollout_correction.rollout_is_batch_normalize=${rollout_is_batch_normalize} \
    algorithm.rollout_correction.rollout_rs=${rollout_rs} \
    algorithm.rollout_correction.rollout_rs_threshold=${rollout_rs_threshold} \
    algorithm.rollout_correction.rollout_rs_threshold_lower=${rollout_rs_threshold_lower} \
    algorithm.rollout_correction.rollout_token_veto_threshold=${rollout_token_veto_threshold} \
    actor_rollout_ref.rollout.calculate_log_probs=True

Expected behavior

qwen3-vl can run normally.

zhihaofang1017 avatar Jan 05 '26 08:01 zhihaofang1017

Try an official example script first

tardis-key avatar Jan 05 '26 08:01 tardis-key

process_vision_info is derived from the third-party library qwen_vl_utils. This issue may be caused by a library version mismatch, try updating the library.

tardis-key avatar Jan 05 '26 09:01 tardis-key

Thanks @tardis-key , We need to upgrade qwen_vl_utils to version 0.0.14

zhihaofang1017 avatar Jan 05 '26 09:01 zhihaofang1017