Instructions to use zongzhuofan/llama3-mova-8b with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use zongzhuofan/llama3-mova-8b with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="zongzhuofan/llama3-mova-8b") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("zongzhuofan/llama3-mova-8b", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- vLLM
How to use zongzhuofan/llama3-mova-8b with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "zongzhuofan/llama3-mova-8b" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "zongzhuofan/llama3-mova-8b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/zongzhuofan/llama3-mova-8b
- SGLang
How to use zongzhuofan/llama3-mova-8b 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 "zongzhuofan/llama3-mova-8b" \ --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": "zongzhuofan/llama3-mova-8b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'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 "zongzhuofan/llama3-mova-8b" \ --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": "zongzhuofan/llama3-mova-8b", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use zongzhuofan/llama3-mova-8b with Docker Model Runner:
docker model run hf.co/zongzhuofan/llama3-mova-8b
MoVA-8B Model Card
Model details
Model type: MoVA-8B is an open-source multimodal large language model (MLLM), adaptively routing and fusing task-specific vision experts with a coarse-to-fine mechanism.
Vision Encoders: OpenAI-CLIP-336px, DINOv2-giant, Co-DETR-large, SAM-huge, Vary-base, Pix2Struct-large, Deplot-base, and BiomedCLIP-base.
Base LLM: meta-llama/Meta-Llama-3-8B-Instruct
Paper or resources for more information: [Paper] [Code]
Usage
You can directly utilize this model as we provide in our [repository].
License
This project utilizes certain datasets and checkpoints that are subject to their respective original licenses. Users must comply with all terms and conditions of these original licenses, including but not limited to the OpenAI Terms of Use for the dataset and the specific licenses for base language models for checkpoints trained using the dataset (e.g. META LLAMA 3 COMMUNITY LICENSE AGREEMENT).
Intended use
Primary intended uses: The primary use of MoVA-8B is research on multimodal models and chatbots.
Primary intended users: The primary intended users of the model are researchers and hobbyists in computer vision, natural language processing, machine learning, and artificial intelligence.
Training dataset
- 15M diverse visual instruction tuning samples for pre-training, including DataComp-1B, ShareGPT4V-PT, Objects365, and MMC-Instruction. Please refer to our paper for more details.
- 2M high-quality instruction data for fine-tuning. We integrate several visual question answering datasets across various domains, such as DocVQA, ChartQA, InfographicVQA, AI2D, ST-VQA, TextVQA, SynthDoG-en, Geometry3K, PGPS9K, Geo170K, VQA-RAD, and SLAKE into LLaVA-mix-665k. We also encompass equivalent comprehensive captions generated by GPT4-V.
Evaluation dataset
We evaluate our model on a wide range of popular MLLM benchmarks.
MultiModal Benchmark
| Name | LLM | #Tokens | MME | MMBench | MMBench-CN | QBench | MathVista | MathVerse | POPE |
|---|---|---|---|---|---|---|---|---|---|
| MoVA-8B | Llama3-8B | 576 | 1595.8 / 347.5 | 75.3 | 67.7 | 70.8 | 37.7 | 21.4 | 89.3 |
General & Text-oriented VQA
| Name | LLM | #Tokens | VQAv2 | GQA | SQA | TextVQA | ChartQA | DocVQA | AI2D |
|---|---|---|---|---|---|---|---|---|---|
| MoVA-8B | Llama3-8B | 576 | 83.5 | 65.2 | 74.7 | 77.1 | 70.5 | 83.4 | 77.0 |
Visual Grounding
| Name | LLM | #Tokens | RefCOCO (val) |
RefCOCO (testA) |
RefCOCO (testB) |
RefCOCO+ (val) |
RefCOCO+ (testA) |
RefCOCO+ (testB) |
RefCOCO‑g (val) |
RefCOCO‑g (test) |
|---|---|---|---|---|---|---|---|---|---|---|
| MoVA-8B | Llama3-8B | 576 | 92.18 | 94.75 | 88.24 | 88.45 | 92.21 | 82.82 | 90.05 | 90.23 |
- Downloads last month
- 6
docker model run hf.co/zongzhuofan/llama3-mova-8b