liuhaotian/LLaVA-Instruct-150K
Preview • Updated • 4.09k • 614
How to use Navyabhat/Llava-Phi2 with Transformers:
# Use a pipeline as a high-level helper
from transformers import pipeline
pipe = pipeline("visual-question-answering", model="Navyabhat/Llava-Phi2") # Load model directly
from transformers import AutoModelForCausalLM
model = AutoModelForCausalLM.from_pretrained("Navyabhat/Llava-Phi2", dtype="auto")This is a multimodal implementation of Phi2 model inspired by LlaVA-Phi.
Use the code below to get started with the model.
git clone https://github.com/zhuyiche/llava-phi.git
cd llava-phi
conda create -n llava_phi python=3.10 -y
conda activate llava_phi
pip install --upgrade pip # enable PEP 660 support
pip install -e .
python llava_phi/eval/run_llava_phi.py --model-path="RaviNaik/Llava-Phi2" \
--image-file="https://huggingface.co/Navyabhat/Llava-Phi2/resolve/main/people.jpg?download=true" \
--query="How many people are there in the image?"
This implementation is based on wonderful work done by:
LlaVA-Phi
Llava
Phi2