GPU memory increased
Hello, I'd like to ask why the evaluation script significantly increases GPU memory usage during runtime? Qwen2.5-VL-3B-Instruct uses 22GB of video memory on MMVP; is this related to your methodology?
export CUDA_VISIBLE_DEVICES=4
NUM_WORKERS=1 DATA_POINT=100 DATASET=mmvp DATASET_FILE=data/${DATASET}.json OUTPUT_DIR=./output_vis/v8/${DATASET}/${DATA_POINT}/qwen_initpatch_passk
MODEL_NAME=Qwen/Qwen2.5-VL-3B-Instruct
#uv run
python main.py
--dataset $DATASET_FILE
--model_name_or_path $MODEL_NAME
--output_dir $OUTPUT_DIR
--device cuda
--seed 42
--max_new_tokens 2048
--max_num_steps 15
--num_thought_tokens 4
--sigma 10.0
--sigma_decay 0.95
--lr 0.001
--verbose 1
--min_pixels 128
--max_pixels 256
--start_data_idx 0
--end_data_idx $DATA_POINT
--use_llm_verify
--num_workers $NUM_WORKERS
--worker_device_round_robin
--num_selected_patches 16
--initial_patch_count 2
--patch_increment 2
--visual_insert_stride 1
--visual_injection_start_step 0
--visual_injection_interval 1 \
Thanks for the question. In our evaluation, we perform visual injection, which requires extracting and operating on attention maps during inference. This introduces additional intermediate activations that are kept in memory, so the GPU memory usage is higher than standard forward-only inference.
In practice, inference can be run on a single A100 or H100 GPU without issues.