https://github.com/intellabs/lvlm-interpret
https://github.com/intellabs/lvlm-interpret
Last synced: 10 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/intellabs/lvlm-interpret
- Owner: IntelLabs
- License: apache-2.0
- Created: 2024-05-29T23:41:18.000Z (about 2 years ago)
- Default Branch: main
- Last Pushed: 2025-03-25T23:28:21.000Z (over 1 year ago)
- Last Synced: 2025-04-08T03:35:34.993Z (about 1 year ago)
- Language: Jupyter Notebook
- Size: 1.69 MB
- Stars: 72
- Watchers: 1
- Forks: 13
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Security: Security.md
Awesome Lists containing this project
README
# LVLM-Interpret: An Interpretability Tool for Large Vision-Language Models
[[Project Page](https://intellabs.github.io/multimodal_cognitive_ai/lvlm_interpret/)] [[Paper](https://arxiv.org/abs/2404.03118)]
## Setup
- Update submodules
`git submodule update --init --recursive`
- Install dependencies
`pip install -r requirements.txt`
## Usage
Start the Gradio server:
```
python app.py --model_name_or_path Intel/llava-gemma-2b --load_8bit
```
or
```
python app.py --model_name_or_path llava-hf/llava-1.5-7b-hf --load_8bit
```
Options:
```
usage: app.py [-h] [--model_name_or_path MODEL_NAME_OR_PATH] [--host HOST] [--port PORT] [--share] [--embed] [--load_4bit] [--load_8bit]
options:
-h, --help show this help message and exit
--model_name_or_path MODEL_NAME_OR_PATH
Model name or path to load the model from
--host HOST Host to run the server on
--port PORT Port to run the server on
--share Whether to share the server on Gradio's public server
--embed Whether to run the server in an iframe
--load_4bit Whether to load the model in 4bit
--load_8bit Whether to load the model in 8bit
```