Model reference · open weights

llava

LLMs llava-hf Vision + text 1 build Licence not stated 8k dl/mo

llava is an open-weight language model from llava-hf. llava-v1.6-34b-hf (FP16) weighs 69.5 GB; the smallest configuration that runs it is H100 80 GB.

For self-hosting, compare this build's requirements below with the GPU you plan to rent.

  • LLaVA-1.6 is a 34.8B parameter multimodal model designed for image-text-to-text tasks such as image captioning and visual question answering.
  • It combines a pre-trained large language model with a vision encoder to support English-language interactions with a context length of 4096 tokens.
  • The model improves upon previous versions by using dynamic high-resolution inputs and an improved visual instruction tuning dataset to enhance OCR and common sense reasoning.

Summary of the llava-hf/llava-v1.6-34b-hf model card, 2026-10-01

What it is

Released byllava-hf
Released2024-03-17
Parameters34.8B
VRAM69.5 GB for the weights

What it runs on

Memory and cards for llava-v1.6-34b-hf (FP16)

69.5 GBweights, file size
246 MBcache per 1K tokens
2.1 GBruntime overhead, at least
4,096 tokenscontext max
CardRequests at onceContext maxMemory
4K each
RTX 3060 12 GB … L40S 48 GB
6 smaller cards
A100 80 GB6all 4K78.2 GB
H100 80 GB2all 4K78.1 GB
RTX PRO 6000 Blackwell 96 GB18all 4K93.8 GB
DGX Spark (GB10) 128 GB unified31all 4K107 GB
H200 141 GB62all 4K138 GB
B200 180 GB99all 4K176 GB
2× L40S 48 GB
tensor parallel
14all 4K44.0 GB a card
4× RTX 4090 24 GB
tensor parallel
15all 4K23.4 GB a card
4× RTX 3090 24 GB
tensor parallel
15all 4K23.4 GB a card
4× RTX 5090 32 GB
tensor parallel
45all 4K31.0 GB a card
2× H100 80 GB
tensor parallel
74all 4K78.1 GB a card
2× A100 80 GB
tensor parallel
82all 4K78.2 GB a card
Memory needed at each load
Requests at once4K tokens each
172.6 GB
576.6 GB
879.6 GB
1687.7 GB
32104 GB
64136 GB

One card, with vLLM's small-card settings.

From the model card

What llava-hf says about llava

Read the model card

The LLaVA-NeXT model was proposed in LLaVA-NeXT: Improved reasoning, OCR, and world knowledge by Haotian Liu, Chunyuan Li, Yuheng Li, Bo Li, Yuanhan Zhang, Sheng Shen, Yong Jae Lee. LLaVa-NeXT (also called LLaVa-1.6) improves upon LLaVa by increasing the input image resolution and training on an improved visual instruction tuning dataset to improve OCR and common sense reasoning.

Disclaimer: The team releasing LLaVa-NeXT did not write a model card for this model so this model card has been written by the Hugging Face team.

Model description

LLaVa combines a pre-trained large language model with a pre-trained vision encoder for multimodal chatbot use cases. LLaVA 1.6 improves on LLaVA 1.5 BY:

  • Using Mistral-7B and Nous-Hermes-2-Yi-34B (for this checkpoint) which has better commercial licenses, and bilingual support
  • More diverse and high quality data mixture
  • Dynamic high resolution

Intended uses & limitations

You can use the raw model for tasks like image captioning, visual question answering, multimodal chatbot use cases. See the model hub to look for other versions on a task that interests you.

How to use

Here's the prompt template for this model but we recommend to use chat templates to format the prompt with processor.apply_chat_template(). That will apply the correct template for a given checkpoint for you.

"system\nuser\n\nassistant\n"

To run the model with the pipeline, see the below example:

from transformers import pipeline

pipe = pipeline("image-text-to-text", model="llava-hf/llava-v1.6-34b-hf")
messages = [
    {
      "role": "user",
      "content": [
          {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg"},
          {"type": "text", "text": "What does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud"},
        ],
    },
]

out = pipe(text=messages, max_new_tokens=20)
print(out)
>>> [{'input_text': [{'role': 'user', 'content': [{'type': 'image', 'url': 'https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/transformers/tasks/ai2d-demo.jpg'}, {'type': 'text', 'text': 'What does the label 15 represent? (1) lava (2) core (3) tunnel (4) ash cloud'}]}], 'generated_text': 'Lava'}]

You can also load and use the model like following:

from transformers import LlavaNextProcessor, LlavaNextForConditionalGeneration
import torch
from PIL import Image
import requests

processor = LlavaNextProcessor.from_pretrained("llava-hf/llava-v1.6-34b-hf")

model = LlavaNextForConditionalGeneration.from_pretrained("llava-hf/llava-v1.6-34b-hf", torch_dtype=torch.float16, low_cpu_mem_usage=True)
model.to("cuda:0")

# prepare image and text prompt, using the appropriate prompt template
url = "https://github.com/haotian-liu/LLaVA/blob/1a91fc274d7c35a9b50b3cb29c4247ae5837ce39/images/llava_v1_5_radar.jpg?raw=true"
image = Image.open(requests.get(url, stream=True).raw)

# Define a chat histiry and use `apply_chat_template` to get correctly formatted prompt
# Each value in "content" has to be a list of dicts with types ("text", "image")
conversation = [
    {

      "role": "user",
      "content": [
          {"type": "text", "text": "What is shown in this image?"},
          {"type": "image"},
        ],
    },
]
prompt = processor.apply_chat_template(conversation, add_generation_prompt=True)

inputs = processor(images=image, text=prompt, return_tensors="pt").to("cuda:0")

# autoregressively complete prompt
output = model.generate(**inputs, max_new_tokens=100)

print(processor.decode(output[0], skip_special_tokens=True))

From transformers>=v4.48, you can also pass image url or local path to the conversation history, and let the chat template handle the rest. Chat template will load the image for you and return inputs in torch.Tensor which you can pass directly to model.generate()

messages = [
    {
        "role": "user",
        "content": [
            {"type": "image", "url": "https://www.ilankelman.org/stopsigns/australia.jpg"}
            {"type": "text", "text": "What is shown in this image?"},
        ],
    },
]

inputs = processor.apply_chat_template(messages, add_generation_prompt=True, tokenize=True, return_dict=True, return_tensors"pt")
output = model.generate(**inputs, max_new_tokens=50)

Model optimization

4-bit quantization through bitsandbytes library

First make sure to install bitsandbytes, pip install bitsandbytes and make sure to have access to a CUDA compatible GPU device. Simply change the snippet above with:

model = LlavaNextForConditionalGeneration.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    low_cpu_mem_usage=True,
+   load_in_4bit=True
)
Use Flash-Attention 2 to further speed-up generation

First make sure to install flash-attn. Refer to the original repository of Flash Attention regarding that package installation. Simply change the snippet above with:

model = LlavaNextForConditionalGeneration.from_pretrained(
    model_id,
    torch_dtype=torch.float16,
    low_cpu_mem_usage=True,
+   use_flash_attention_2=True
).to(0)

BibTeX entry and citation info

@misc{liu2023improved,
      title={Improved Baselines with Visual Instruction Tuning},
      author={Haotian Liu and Chunyuan Li and Yuheng Li and Yong Jae Lee},
      year={2023},
      eprint={2310.03744},
      archivePrefix={arXiv},
      primaryClass={cs.CV}
}

Quoted from the model card on Hugging Face. The full card is behind the Hugging Face link above.

© 2026 AxForge · EU-hosted AI infrastructure Pricing Docs Trust Privacy Terms