Skip to content

About

VTCNativeEval: A Structured Study of Visual Token Compression Methods for Native VLMs

Resources

Stars

4 stars

Watchers

0 watching

Forks

Repository files navigation

VTCNativeEval: A Structured Study of Visual Token Compression Methods for Native VLMs

Environment Setup

We closely follow the setup from NEO repository to set up the environment:

module load miniconda3/24.1.2-py310
conda create -n neo pip python=3.10
conda activate neo
cd VLMEvalKit
python -m pip install -e .
python -m pip install transformers==4.57.1

VLM Evaluation

We can run one-liner evaluation:

salloc --nodes=1 --ntasks-per-node=1 --gpus-per-node=1 -A PAS2836 --partition debug-nextgen --time 00:10:00
module load miniconda3/24.1.2-py310
conda activate neo
cd VLMEvalKit
export LMUData=/fs/scratch/PAS2836/yusenpeng_dataset/VLMEvalKit_data
# MMBench
python run.py --data MMBench_DEV_EN --model NEO-2B-SFT --verbose
# MME
python run.py --data MME --model NEO-2B-SFT --verbose
# MMMU
python run.py --data MMMU_DEV_VAL --model NEO-2B-SFT --verbose
# RealWorldQA
python run.py --data RealWorldQA --model NEO-2B-SFT --verbose
# TextVQA
python run.py --data TextVQA_VAL --model NEO-2B-SFT --verbose
# DocVQA
python run.py --data DocVQA_VAL --model NEO-2B-SFT --verbose
# OCRBench
python run.py --data OCRBench --model NEO-2B-SFT --verbose
# ChartQA
python run.py --data ChartQA_TEST --model NEO-2B-SFT --verbose

Or run all jobs concurrently with SLURM:

bash VTCeval_scripts/eval_all.sh <model_name>

Measure benchmark-level latency (for example, DocVQA):

bash VTCeval_scripts/latency_docvqa.sh

Measure FLOPs:

salloc --nodes=1 --ntasks-per-node=1 --gpus-per-node=1 -A PAS2836 --partition debug-nextgen --time 01:00:00
module load miniconda3/24.1.2-py310
conda activate neo
cd VLMEvalKit
export LMUData=/fs/scratch/PAS2836/yusenpeng_dataset/VLMEvalKit_data
python ../scripts/flops.py

Continued SFT

We can (and we should, full-parameter is expensive) run the training experiment with LoRA:

# basic SFT
sbatch VLMEvalKit/vlmeval/VLMTrainKit/SFT.sh
# SFT + distillation
sbatch VLMEvalKit/vlmeval/VLMTrainKit/SFT_w_distillation.sh

About

VTCNativeEval: A Structured Study of Visual Token Compression Methods for Native VLMs

Resources

Stars

4 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages