Instructions to use liuhaotian/LLaVA-7b-delta-v0 with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use liuhaotian/LLaVA-7b-delta-v0 with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("text-generation", model="liuhaotian/LLaVA-7b-delta-v0")# Load model directly from transformers import AutoTokenizer, AutoModelForCausalLM tokenizer = AutoTokenizer.from_pretrained("liuhaotian/LLaVA-7b-delta-v0") model = AutoModelForCausalLM.from_pretrained("liuhaotian/LLaVA-7b-delta-v0", device_map="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use liuhaotian/LLaVA-7b-delta-v0 with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "liuhaotian/LLaVA-7b-delta-v0" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liuhaotian/LLaVA-7b-delta-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/liuhaotian/LLaVA-7b-delta-v0
- SGLang
How to use liuhaotian/LLaVA-7b-delta-v0 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 "liuhaotian/LLaVA-7b-delta-v0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liuhaotian/LLaVA-7b-delta-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'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 "liuhaotian/LLaVA-7b-delta-v0" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "liuhaotian/LLaVA-7b-delta-v0", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use liuhaotian/LLaVA-7b-delta-v0 with Docker Model Runner:
docker model run hf.co/liuhaotian/LLaVA-7b-delta-v0
Commit ·
82f0879
1
Parent(s): 318f11c
Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,47 @@
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
license: apache-2.0
|
| 3 |
+
inference: false
|
| 4 |
---
|
| 5 |
+
|
| 6 |
+
**NOTE: This "delta model" cannot be used directly.**
|
| 7 |
+
Users have to apply it on top of the original LLaMA weights to get actual LLaVA weights.
|
| 8 |
+
See https://github.com/haotian-liu/LLaVA#llava-weights for instructions.
|
| 9 |
+
|
| 10 |
+
<br>
|
| 11 |
+
<br>
|
| 12 |
+
|
| 13 |
+
# LLaVA Model Card
|
| 14 |
+
|
| 15 |
+
## Model details
|
| 16 |
+
|
| 17 |
+
**Model type:**
|
| 18 |
+
LLaVA is an open-source chatbot trained by fine-tuning LLaMA/Vicuna on GPT-generated multimodal instruction-following data.
|
| 19 |
+
It is an auto-regressive language model, based on the transformer architecture.
|
| 20 |
+
|
| 21 |
+
**Model date:**
|
| 22 |
+
LLaVA was trained in April 2023.
|
| 23 |
+
|
| 24 |
+
**Paper or resources for more information:**
|
| 25 |
+
https://llava-vl.github.io/
|
| 26 |
+
|
| 27 |
+
**License:**
|
| 28 |
+
Apache License 2.0
|
| 29 |
+
|
| 30 |
+
**Where to send questions or comments about the model:**
|
| 31 |
+
https://github.com/haotian-liu/LLaVA/issues
|
| 32 |
+
|
| 33 |
+
## Intended use
|
| 34 |
+
**Primary intended uses:**
|
| 35 |
+
The primary use of LLaVA is research on large multimodal models and chatbots.
|
| 36 |
+
|
| 37 |
+
**Primary intended users:**
|
| 38 |
+
The primary intended users of the model are researchers and hobbyists in computer vision, natural language processing, machine learning, and artificial intelligence.
|
| 39 |
+
|
| 40 |
+
## Training dataset
|
| 41 |
+
595K filtered image-text pairs from CC3M.
|
| 42 |
+
150K GPT-generated multimodal instruction-following data.
|
| 43 |
+
|
| 44 |
+
## Evaluation dataset
|
| 45 |
+
A preliminary evaluation of the model quality is conducted by creating a set of 90 visual reasoning questions from 30 unique images randomly sampled from COCO val 2014 and each is associated with three types of questions: conversational, detailed description, and complex reasoning. We utilize GPT-4 to judge the model outputs.
|
| 46 |
+
We also evaluate our model on the ScienceQA dataset. Our synergy with GPT-4 sets a new state-of-the-art on the dataset.
|
| 47 |
+
See https://llava-vl.github.io/ for more details.
|