- Clone the ShareGPT4V repository:
git clone https://github.com/ShareGPT4Omni/ShareGPT4V.git
cd ShareGPT4V
- Replace the
./share4v/model/multimodal_encoder/clip_encoder.py
with the clip_encoder.py that contains the HiRED implementation (as well as PruMerge as a baseline).
-
Follow the installation instructions provided in the ShareGPT4V repository.
-
Copy
sharegpt.py
from sharegpt.py and paste it into thelmms-eval/lmms_eval/models/
directory. -
Modify
__init__.py
:
Open the filelmms-eval/lmms_eval/models/__init__.py
and add the following key-value pair to theAVAILABLE_MODELS
dictionary:"sharegpt": "Sharegpt",
-
Run inference using ShareGPT4V:
Execute the script located atrun_inference_of_ShareGPT4V.py
using the following command:python ShareGPT4V/run_inference_of_ShareGPT4V.py
-
Run the benchmark script:
Execute the script located atrun_accuracy_benchmarks.sh
using the following command:bash ShareGPT4V/run_accuracy_benchmarks.sh
For more details, refer to the ShareGPT4V documentation.