liuhaotian/LLaVA-Instruct-150K
Preview • Updated • 7.2k • 602
How to use marianna13/llava-phi-2-3b with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("text-generation", model="marianna13/llava-phi-2-3b", trust_remote_code=True) # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("marianna13/llava-phi-2-3b", trust_remote_code=True, dtype="auto")How to use marianna13/llava-phi-2-3b with vLLM:
# Install vLLM from pip:
pip install vllm
# Start the vLLM server:
vllm serve "marianna13/llava-phi-2-3b"
# Call the server using curl (OpenAI-compatible API):
curl -X POST "http://localhost:8000/v1/completions" \
-H "Content-Type: application/json" \
--data '{
"model": "marianna13/llava-phi-2-3b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'docker model run hf.co/marianna13/llava-phi-2-3b
How to use marianna13/llava-phi-2-3b with SGLang:
# Install SGLang from pip:
pip install sglang
# Start the SGLang server:
python3 -m sglang.launch_server \
--model-path "marianna13/llava-phi-2-3b" \
--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": "marianna13/llava-phi-2-3b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'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 "marianna13/llava-phi-2-3b" \
--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": "marianna13/llava-phi-2-3b",
"prompt": "Once upon a time,",
"max_tokens": 512,
"temperature": 0.5
}'How to use marianna13/llava-phi-2-3b with Docker Model Runner:
docker model run hf.co/marianna13/llava-phi-2-3b
| Model | Parameters | SQA | GQA | TextVQA | POPE |
|---|---|---|---|---|---|
| LLaVA-1.5 | 7.3B | 68.0 | 62.0 | 58.3 | 85.3 |
| MC-LLaVA-3B | 3B | - | 49.6 | 38.59 | - |
| LLaVA-Phi | 3B | 68.4 | - | 48.6 | 85.0 |
| moondream1 | 1.6B | - | 56.3 | 39.8 | - |
| llava-phi-2-3b | 3B | 69.0 | 51.2 | 47.0 | 86.0 |
| Model | BLEU_1 | BLEU_2 | BLEU_3 | BLEU_4 | METEOR | ROUGE_L | CIDEr | SPICE |
|---|---|---|---|---|---|---|---|---|
| llava-1.5-7b | 75.8 | 59.8 | 45 | 33.3 | 29.4 | 57.7 | 108.8 | 23.5 |
| llava-phi-2-3b | 67.7 | 50.5 | 35.7 | 24.2 | 27.0 | 52.4 | 85.0 | 20.7 |