Instructions to use YipengZhang/LLaVA-UHD-v2-Vicuna-7B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use YipengZhang/LLaVA-UHD-v2-Vicuna-7B with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="YipengZhang/LLaVA-UHD-v2-Vicuna-7B")# Load model directly from transformers import AutoModelForCausalLM model = AutoModelForCausalLM.from_pretrained("YipengZhang/LLaVA-UHD-v2-Vicuna-7B", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use YipengZhang/LLaVA-UHD-v2-Vicuna-7B with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "YipengZhang/LLaVA-UHD-v2-Vicuna-7B" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "YipengZhang/LLaVA-UHD-v2-Vicuna-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }'Use Docker
docker model run hf.co/YipengZhang/LLaVA-UHD-v2-Vicuna-7B
- SGLang
How to use YipengZhang/LLaVA-UHD-v2-Vicuna-7B 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 "YipengZhang/LLaVA-UHD-v2-Vicuna-7B" \ --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": "YipengZhang/LLaVA-UHD-v2-Vicuna-7B", "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 "YipengZhang/LLaVA-UHD-v2-Vicuna-7B" \ --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": "YipengZhang/LLaVA-UHD-v2-Vicuna-7B", "prompt": "Once upon a time,", "max_tokens": 512, "temperature": 0.5 }' - Docker Model Runner
How to use YipengZhang/LLaVA-UHD-v2-Vicuna-7B with Docker Model Runner:
docker model run hf.co/YipengZhang/LLaVA-UHD-v2-Vicuna-7B
LLaVA-UHD v2 Model Card
Model details
Model type: LLaVA-UHD v2, an advanced MLLM centered around a Hierarchical window transformer that enables capturing diverse visual granularity by constructing and integrating a high resolution feature pyramid.
Model date: LLaVA-UHD v2 was trained in November 2024.
Base LLM Model: lmsys/vicuna-7b-v1.5
Paper or resources for more information: https://github.com/thunlp/LLaVA-UHD
License
LLaVA-UHD v2 is licensed under the LLAMA 2 Community License, Copyright (c) Meta Platforms, Inc. All Rights Reserved.
Where to send questions or comments about the model: https://github.com/thunlp/LLaVA-UHD/issues
Intended use
Primary intended uses: The primary use of LLaVA-UHD v2 is research on large 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
- VDIM Pretrain: MS-COCO stuff 2017
- Pretrain: LLaVA-Pretrain 558K (filtered image-text pairs from LAION/CC/SBU, captioned by BLIP.)
- SFT: 858k-mixed dataset in https://huggingface.co/datasets/YipengZhang/LLaVA-UHD-v2-SFT-Data
Citation
If you find LLaVA-UHD v2 useful for your research and applications, please cite using this BibTeX:
@article{zhang2024llavauhdv2,
title={LLaVA-UHD v2: an MLLM Integrating High-Resolution Feature Pyramid via Hierarchical Window Transformer},
author={Yipeng Zhang and Yifan Liu and Zonghao Guo and Yidan Zhang and Xuesong Yang and Chi Chen and Jun Song and Bo Zheng and Yuan Yao and Zhiyuan Liu and Tat-Seng Chua and Maosong Sun},
journal={arXiv preprint arXiv:2412.13871},
year={2024}
}
- Downloads last month
- 9
Model tree for YipengZhang/LLaVA-UHD-v2-Vicuna-7B
Base model
lmsys/vicuna-7b-v1.5