Instructions to use lmms-lab/llava-next-interleave-qwen-7b-dpo with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use lmms-lab/llava-next-interleave-qwen-7b-dpo with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="lmms-lab/llava-next-interleave-qwen-7b-dpo") messages = [ {"role": "user", "content": "Who are you?"}, ] pipe(messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("lmms-lab/llava-next-interleave-qwen-7b-dpo", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use lmms-lab/llava-next-interleave-qwen-7b-dpo with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "lmms-lab/llava-next-interleave-qwen-7b-dpo" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmms-lab/llava-next-interleave-qwen-7b-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker
docker model run hf.co/lmms-lab/llava-next-interleave-qwen-7b-dpo
- SGLang
How to use lmms-lab/llava-next-interleave-qwen-7b-dpo with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "lmms-lab/llava-next-interleave-qwen-7b-dpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmms-lab/llava-next-interleave-qwen-7b-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "lmms-lab/llava-next-interleave-qwen-7b-dpo" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "lmms-lab/llava-next-interleave-qwen-7b-dpo", "messages": [ { "role": "user", "content": "What is the capital of France?" } ] }' - Docker Model Runner
How to use lmms-lab/llava-next-interleave-qwen-7b-dpo with Docker Model Runner:
docker model run hf.co/lmms-lab/llava-next-interleave-qwen-7b-dpo
Link model to paper (#3)
Browse files- Link model to paper (9349f498bd16eb9c6157513e27a5caa49f52f821)
Co-authored-by: Niels Rogge <nielsr@users.noreply.huggingface.co>
README.md
CHANGED
|
@@ -46,4 +46,18 @@ Use the code below to evaluate the model.
|
|
| 46 |
Please first edit /path/to/ckpt to the path of checkpoint, /path/to/images to the path of "interleave_data" in scripts/interleave/eval_all.sh and then run
|
| 47 |
```bash
|
| 48 |
bash scripts/interleave/eval_all.sh
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 49 |
```
|
|
|
|
| 46 |
Please first edit /path/to/ckpt to the path of checkpoint, /path/to/images to the path of "interleave_data" in scripts/interleave/eval_all.sh and then run
|
| 47 |
```bash
|
| 48 |
bash scripts/interleave/eval_all.sh
|
| 49 |
+
```
|
| 50 |
+
|
| 51 |
+
## Bibtex citation
|
| 52 |
+
|
| 53 |
+
```bibtex
|
| 54 |
+
@misc{li2024llavanextinterleavetacklingmultiimagevideo,
|
| 55 |
+
title={LLaVA-NeXT-Interleave: Tackling Multi-image, Video, and 3D in Large Multimodal Models},
|
| 56 |
+
author={Feng Li and Renrui Zhang and Hao Zhang and Yuanhan Zhang and Bo Li and Wei Li and Zejun Ma and Chunyuan Li},
|
| 57 |
+
year={2024},
|
| 58 |
+
eprint={2407.07895},
|
| 59 |
+
archivePrefix={arXiv},
|
| 60 |
+
primaryClass={cs.CV},
|
| 61 |
+
url={https://arxiv.org/abs/2407.07895},
|
| 62 |
+
}
|
| 63 |
```
|