Paper: Visual Instruction Tuning Authors: Haotian Liu¹, Chunyuan Li², Qingyang Wu³, Yong Jae Lee¹ ¹University of Wisconsin–Madison, ²Microsoft Research, ³Columbia University Venue: NeurIPS 2023 (Oral) arXiv: 2304.08485 (v1: 17 Apr 2023, v2: 11 Dec 2023) PDF: https://arxiv.org/pdf/2304.08485 Project page: https://llava-vl.github.io License: CC BY 4.0

This guide is a comprehensive, section-by-section walkthrough of the paper that introduced LLaVA (Large Language and Vision Assistant) — the first system to apply instruction tuning, previously an NLP-only technique, to the joint language-image domain. It reorganizes the paper’s content for study purposes, reproduces its key tables and equations, and adds diagrams (as Mermaid flowcharts) to visualize the architecture and pipelines that the paper describes only in prose and a single static figure.


Abstract

Instruction tuning large language models (LLMs) using machine-generated instruction-following data has been shown to improve zero-shot capabilities on new tasks, but the idea is less explored in the multimodal field. We present the first attempt to use language-only GPT-4 to generate multimodal language-image instruction-following data. By instruction tuning on such generated data, we introduce LLaVA: Large Language and Vision Assistant, an end-to-end trained large multimodal model that connects a vision encoder and an LLM for general-purpose visual and language understanding. To facilitate future research on visual instruction following, we construct two evaluation benchmarks with diverse and challenging application-oriented tasks. Our experiments show that LLaVA demonstrates impressive multimodal chat abilities, sometimes exhibiting the behaviors of multimodal GPT-4 on unseen images/instructions, and yields a 85.1% relative score compared with GPT-4 on a synthetic multimodal instruction-following dataset. When fine-tuned on Science QA, the synergy of LLaVA and GPT-4 achieves a new state-of-the-art accuracy of 92.53%. We make GPT-4 generated visual instruction tuning data, our model, and code publicly available.


TL;DR — Key Contributions

The paper makes four concrete contributions:

  1. Multimodal instruction-following data. A pipeline that reformats existing image-caption pairs into instruction-following conversations by prompting text-only GPT-4/ChatGPT with symbolic (textual) representations of images — captions and bounding boxes — rather than the images themselves.
  2. A large multimodal model (LMM): LLaVA. A simple architecture connecting a frozen CLIP ViT-L/14 vision encoder to the Vicuna LLM via a single trainable linear projection layer, trained end-to-end on the generated data.
  3. Two new evaluation benchmarks: LLaVA-Bench (COCO) and LLaVA-Bench (In-the-Wild). Designed to stress-test multimodal instruction-following and chat ability, scored automatically using GPT-4 as a judge.
  4. Open-source release of the 158K-sample instruction dataset, model weights, training code, and a chat demo.

The headline numbers: 85.1% relative score vs. text-only GPT-4 on the synthetic instruction-following benchmark, and a new state-of-the-art 92.53% accuracy on ScienceQA when LLaVA’s predictions are ensembled with GPT-4 acting as a judge.


1. Introduction

Humans understand the world through multiple channels — vision and language chief among them — because each channel captures concepts the other cannot as efficiently. AI research has long pursued a general-purpose assistant that can follow multimodal vision-and-language instructions to complete real-world tasks.

The paper frames prior progress along two separate tracks that, until this work, had not been fully merged:

  • Vision-only foundation models. A wave of language-augmented vision models (CLIP, GLIP, BLIP, DALL-E 2, Latent Diffusion, Imagen, GLIGEN, etc.) achieved strong open-world performance on classification, detection, segmentation, captioning, and generation. However, each task is typically solved by a separate model with a fixed interface — language is used only to describe content, not to flexibly instruct the system, so interactivity and adaptability to user intent are limited.
  • Instruction-tuned LLMs. ChatGPT and GPT-4 demonstrated that language can serve as a universal interface: task instructions expressed in natural language can steer a single end-to-end model to solve arbitrary tasks. Open-source efforts — LLaMA, Alpaca, Vicuna, GPT-4-LLM — replicated this instruction-following ability using machine-generated instruction data, but remained strictly text-only.

LLaVA’s core idea is to extend instruction tuning into the language-image multimodal space — the first attempt of its kind — to move toward a general-purpose visual assistant. The four contributions listed in the TL;DR above are given as the paper’s explicit list of contributions.


3. GPT-Assisted Visual Instruction Data Generation

This is arguably the paper’s most novel methodological contribution: a recipe for manufacturing multimodal instruction data without any new human annotation, by exploiting a text-only GPT-4/ChatGPT as a “teacher.”

The core problem

Public image-text pair datasets (CC, LAION) are abundant, but instruction-following multimodal data is scarce because it is expensive and hard to define via crowdsourcing.

Naive baseline (and why it’s insufficient)

Given an image Xᵥ and its caption Xc, one could trivially synthesize an instruction sample by generating a question Xq (“describe this image”) and pairing it with the caption as the answer:

Human: Xq Xv <STOP>
Assistant: Xc <STOP>

This is cheap but lacks diversity and in-depth reasoning in both instructions and responses — every sample looks the same.

The GPT-4-as-teacher solution

Since GPT-4/ChatGPT are text-only (in this paper’s setting), the image itself cannot be shown to them. Instead, the image is encoded into two symbolic text representations:

  1. Captions — multiple independent captions describing the scene from different perspectives.
  2. Bounding boxes — object class + normalized spatial coordinates for every detected object (e.g., person: [0.681, 0.242, 0.774, 0.694]).

Feeding these symbolic representations (plus a handful of hand-written seed examples used as in-context-learning demonstrations) into GPT-4 lets it “imagine” the image and generate rich, varied instruction-response data — while never seeing the pixels. Data is built on top of COCO images.

Three distinct types of generated data are collected:

Type Description
Conversation A multi-turn Q&A between a “person” and the assistant, covering object types, counting, actions, locations, and relative positions. Only questions with a definite, confidently-answerable answer are included.
Detailed description A single rich, comprehensive description of the image, generated by first asking GPT-4 to curate a list of “describe in detail” instruction phrasings, then sampling one per image.
Complex reasoning In-depth questions requiring step-by-step logical reasoning beyond surface-level visual content (e.g., “what challenges do these people face?”).

Table 1 (reproduced) — worked example of the pipeline, for an image of people packing an SUV with luggage:

  • Context (Captions): “A group of people standing outside of a black vehicle with various luggage.” / “Luggage surrounds a vehicle in an underground parking area” / etc. (5 captions total)
  • Context (Boxes): person: [0.681, 0.242, 0.774, 0.694], backpack: [0.384, 0.696, 0.485, 0.914], suitcase: [...], …
  • Response 1 (conversation): Q: “What type of vehicle is featured in the image?” A: “The image features a black sport utility vehicle (SUV)…”
  • Response 2 (detailed description): “The image is an underground parking area with a black sport utility vehicle (SUV) parked. There are three people in the scene…”
  • Response 3 (complex reasoning): Q: “What challenges do these people face?” A: “…facing the challenge of fitting all their luggage into the black SUV. There are multiple suitcases and backpacks to be packed…”

Note: the actual image pixels are never given to GPT-4 — only the textual captions and boxes. The image is shown in the paper’s table purely as a reference for the human reader.

Dataset scale

The full data-generation pipeline yields 158K unique language-image instruction-following samples, broken down as:

Data type Count
Conversation 58,000
Detailed description 23,000
Complex reasoning 77,000
Total 158,000

An early ablation comparing ChatGPT vs. GPT-4 as the data-generating teacher found GPT-4 consistently produces higher-quality data, especially for spatial reasoning.

flowchart TD
    A["Image X_v + 5 human captions X_c"] --> B["Symbolic text encoding"]
    B --> C["Captions\n(scene description)"]
    B --> D["Bounding boxes\n(object + normalized coords)"]
    C --> E["Few-shot prompt to GPT-4\n(seed examples via in-context learning)"]
    D --> E
    E --> F1["Conversation data\n58K samples"]
    E --> F2["Detailed description data\n23K samples"]
    E --> F3["Complex reasoning data\n77K samples"]
    F1 --> G["LLaVA-Instruct-158K"]
    F2 --> G
    F3 --> G

Diagram: conceptual data-generation pipeline synthesized from the Section 3 description (not a literal reproduction of a paper figure — the paper describes this pipeline in prose and Table 1/14, without a dedicated flowchart figure).


4. Visual Instruction Tuning

4.1 Architecture

Goal: combine the instruction-following strength of a pretrained LLM with the visual representation power of a pretrained vision encoder, as simply as possible.

  • Language model f_φ(·): Vicuna — chosen because, among publicly available checkpoints (Alpaca, Vicuna, GPT-4-LLM), it had the best language instruction-following quality at the time.
  • Vision encoder g(·): the pretrained CLIP ViT-L/14 visual encoder, which converts an input image Xᵥ into visual features Zᵥ = g(Xᵥ). Both the grid features before and after the last Transformer layer were tried experimentally.
  • Connector: a single trainable linear projection matrix W maps the visual feature space into the same dimensionality as the LLM’s word-embedding space, producing a sequence of visual tokens Hᵥ:

\[ {\bf H}_{v} = {\bf W} \cdot {\bf Z}_{v}, \quad \text{with} \quad {\bf Z}_{v} = g({\bf X}_{v}) \tag{1} \]

The resulting Hᵥ tokens are treated exactly like language embedding tokens and injected directly into the LLM’s input sequence alongside the tokenized instruction.

The paper is explicit that this projection is deliberately simple (“lightweight”), chosen to allow fast iteration on the data side of the research; it explicitly calls out gated cross-attention (as in Flamingo) and the Q-Former (as in BLIP-2) as more sophisticated alternatives left to future work. (This simple-linear-projection choice is exactly what the paper’s own 2023 follow-up, “Improved Baselines with Visual Instruction Tuning” / LLaVA-1.5, revisits with an MLP projector.)

Figure 1 — LLaVA network architecture

LLaVA network architecture

Figure 1 from the paper. Reproduced here via the arXiv HTML-rendering asset link.

Mermaid recreation of Figure 1 (the paper’s only architecture figure, redrawn as a flowchart for clarity):

flowchart LR
    subgraph Vision["Vision Pathway"]
        Xv["Image X_v"] --> VE["Vision Encoder g(·)\n(CLIP ViT-L/14, frozen)"]
        VE --> Zv["Visual features Z_v"]
        Zv --> Proj["Projection W\n(trainable linear layer)"]
        Proj --> Hv["Visual tokens H_v"]
    end

    subgraph Language["Language Pathway"]
        Xq["Language instruction X_q"] --> Hq["Instruction tokens H_q"]
    end

    Hv --> LLM["Language Model f_φ(·)\n(Vicuna)"]
    Hq --> LLM
    LLM --> Xa["Language response X_a"]

4.2 Training

For each image Xᵥ, the paper generates multi-turn conversation data — a sequence of T question/answer turn pairs (X¹q, X¹a, …, X^T_q, X^T_a). All turns are concatenated into one long training sequence, and the instruction at turn t is defined as:

\[ {\bf X}^t_{\text{instruct}} = \begin{cases} \text{Randomly choose } [{\bf X}^1_q, {\bf X}_v] \text{ or } [{\bf X}_v, {\bf X}^1_q], & t = 1 \\ {\bf X}^t_q, & t > 1 \end{cases} \tag{2} \]

In words: on the first turn, the image token can appear either before or after the first question (randomized), while on all subsequent turns only the new question text is added — the image is only “introduced” once.

This produces the unified training sequence format (reproduced from Table 2):

X_system-message <STOP>
Human: X¹_instruct <STOP>  Assistant: X¹_a <STOP>
Human: X²_instruct <STOP>  Assistant: X²_a <STOP>  ⋯

The system message and <STOP> token follow the Vicuna-v0 conversation template, with <STOP> = ###. Critically, only the green (assistant-answer) tokens contribute to the training loss — the model is trained autoregressively to predict the assistant’s answers (and where to stop), not to reproduce the human’s questions.

Formally, for a sequence of length L, the model maximizes the likelihood of the target answer tokens conditioned on the image and all preceding instruction/answer tokens:

\[ p({\bf X}_a \mid {\bf X}_v, {\bf X}_{\text{instruct}}) = \prod_{i=1}^{L} p_\theta(x_i \mid {\bf X}_v, {\bf X}_{\text{instruct},<i}, {\bf X}_{a,<i}) \tag{3} \]

where θ are the trainable parameters and the subscript <i denotes all tokens before position i in prior turns.

Two-stage instruction-tuning procedure

flowchart TD
    Start(("Pretrained\nCLIP ViT-L/14 + Vicuna")) --> S1

    subgraph S1["Stage 1 — Pre-training for Feature Alignment"]
        direction TB
        A1["CC3M filtered to CC-595K\n(image, caption) pairs"] --> A2["Naive expansion:\nHuman: brief-describe Xq Xv → Assistant: Xc"]
        A2 --> A3["Freeze vision encoder AND LLM\nTrain ONLY projection matrix W"]
        A3 --> A4["Result: visual tokens H_v aligned\nwith frozen LLM word-embedding space\n(a visual tokenizer for the LLM)"]
    end

    S1 --> S2

    subgraph S2["Stage 2 — Fine-tuning End-to-End"]
        direction TB
        B1["Freeze vision encoder\n(still frozen)"] --> B2["Update BOTH W and\nLLM weights φ"]
        B2 --> B3{"Use case"}
        B3 -->|"Multimodal Chatbot"| B4["Fine-tune on\nLLaVA-Instruct-158K\n(conversation multi-turn,\ndetail + reasoning single-turn)"]
        B3 -->|"Science QA"| B5["Fine-tune on ScienceQA\n(single-turn: question+context → reasoning+answer)"]
    end

    S2 --> End(("LLaVA"))

  • Stage 1: Pre-training for Feature Alignment.
    • CC3M is filtered down to 595K image-text pairs (CC-595K) — see Appendix E for the filtering method.
    • Each pair becomes a single-turn “briefly describe this image” instruction sample using the naive expansion method from Section 3.
    • Both the vision encoder and the LLM are frozen. Only the projection matrix W is trained, maximizing the likelihood in Eq. (3) with θ = W.
    • Intuition: this trains W to act as a compatible visual tokenizer for the already-frozen, already-capable LLM — teaching the projector to speak the LLM’s “language,” not teaching the LLM anything new.
  • Stage 2: Fine-tuning End-to-End.
    • The vision encoder remains frozen; now both W and the LLM weights φ are updated (θ = {W, φ}).
    • Two concrete use cases are trained separately:
      • Multimodal Chatbot: fine-tuned on the full 158K instruction dataset (conversation data is multi-turn; detailed description and complex reasoning are single-turn; all three are uniformly sampled during training).
      • Science QA: fine-tuned on the ScienceQA benchmark, framed as single-turn — the question + context is the instruction, and the reasoning + final answer is the target response.

5. Experiments

All models are trained with 8× A100 GPUs, following Vicuna’s hyperparameters. Pre-training on CC-595K runs 1 epoch (learning rate 2e-3, batch size 128); fine-tuning on LLaVA-Instruct-158K runs 3 epochs (learning rate 2e-5, batch size 32). Full hyperparameters are in Appendix C.

5.1 Multimodal Chatbot

Qualitative comparison — the “Extreme Ironing” example (Table 3). The paper reuses the famous example from the original GPT-4 technical report: a man ironing clothes on the back/roof of a moving vehicle.

Extreme Ironing example image

This is the actual source photo cited by the paper’s Table 3 (“Source: https://www.barnorama.com/wp-content/uploads/2016/12/03-Confusing-Pictures.jpg”).

Model Response to “What is unusual about this image?”
LLaVA “The unusual aspect of this image is a man ironing clothes on the back of a minivan or van. This is not a typical place to perform this activity… it is not clear how the man is able to maintain balance and stability while ironing clothes in such an unstable environment.”
GPT-4 (multimodal, quoted from its own paper) “The unusual thing about this image is that a man is ironing clothes on an ironing board attached to the roof of a moving taxi.”
BLIP-2 “a man is sitting on the back of a yellow cab”
OpenFlamingo “The man is drying his clothes on the hood of his car.”

LLaVA also correctly answers a follow-up free-form question (“What’s happening in the scene?”) without being re-prompted to describe the image, unlike BLIP-2/OpenFlamingo, which tend to fall back to generic captioning regardless of the actual question asked. The paper notes this is notable because LLaVA was trained on only ~80K unique images for instruction tuning, yet approaches multimodal GPT-4’s reasoning quality on out-of-domain images.

Quantitative evaluation methodology

Because no established multimodal instruction-following benchmark existed, the paper designs its own GPT-4-as-judge protocol:

  1. Build triplets of (image, ground-truth textual description, question).
  2. Generate a candidate answer from the model under test (e.g., LLaVA), using the actual image.
  3. Generate a reference answer from text-only GPT-4, using only the ground-truth textual description (an approximate “theoretical upper bound,” since GPT-4 never sees the image either).
  4. Feed the question, the textual description (as a stand-in for “what the judge can see”), and both answers to a judge (text-only GPT-4), which scores each response 1–10 on helpfulness, relevance, accuracy, and level of detail, with a justification.
  5. Report the candidate’s score as a percentage relative to the reference GPT-4 score — this is the “relative score” metric quoted throughout the paper (e.g., the headline 85.1%).

Two benchmarks were built using this protocol:

LLaVA-Bench (COCO). 30 images randomly sampled from COCO-Val-2014, ×3 question types = 90 questions total. Used mainly to ablate which training-data types matter.

Table 4 (reproduced) — ablation on LLaVA-Bench (COCO):

Training data Conversation Detail description Complex reasoning All
Full data 83.1 75.3 96.5 85.1
Detail + Complex 81.5 (−1.6) 73.3 (−2.0) 90.8 (−5.7) 81.9 (−3.2)
Conv + 5% Detail + 10% Complex 81.0 (−2.1) 68.4 (−7.1) 91.5 (−5.0) 80.5 (−4.4)
Conversation only 76.5 (−6.6) 59.8 (−16.2) 84.9 (−12.4) 73.8 (−11.3)
No instruction tuning 22.0 (−61.1) 24.0 (−51.3) 18.5 (−78.0) 21.5 (−63.6)

Takeaways: instruction tuning alone lifts the score by >50 points over a non-instruction-tuned baseline; adding detailed-description and complex-reasoning data on top of conversation data adds a further ~7 points, and — notably — also improves conversational-question performance, suggesting reasoning ability transfers to conversation quality. The full 158K mixture is the best configuration (85.1%).

LLaVA-Bench (In-the-Wild). A harder, more diverse benchmark: 24 images (indoor/outdoor scenes, memes, paintings, sketches) × up to 60 questions total, each with a highly detailed, manually curated ground-truth description.

Table 5 (reproduced) — relative scores on LLaVA-Bench (In-the-Wild), mean ± std over 3 runs:

Model Conversation Detail description Complex reasoning All
OpenFlamingo 19.3 ± 0.5 19.0 ± 0.5 19.1 ± 0.7 19.1 ± 0.4
BLIP-2 54.6 ± 1.4 29.1 ± 1.2 32.9 ± 0.7 38.1 ± 1.0
LLaVA 57.3 ± 1.9 52.5 ± 6.3 81.7 ± 1.8 67.3 ± 2.0
LLaVA† (GPT-4 judged 3×) 58.8 ± 0.6 49.2 ± 0.8 81.4 ± 0.3 66.7 ± 0.3

LLaVA beats BLIP-2 by +29 points and OpenFlamingo by +48 points overall, and reaches 81.7% relative performance on complex reasoning specifically (i.e., close to the text-only-GPT-4-with-ground-truth-labels ceiling).

Limitations (Table 6)

Two hard failure cases are highlighted, both requiring capabilities LLaVA lacks:

  • ICHIRAN Ramen photo: correctly naming the restaurant requires broad world/multilingual knowledge and possibly internet retrieval; correctly listing the side dishes requires fine-grained recognition.
  • Filled fridge photo: identifying the yogurt brand requires reading small high-resolution text; more strikingly, LLaVA incorrectly answers “yes” when asked if strawberry-flavored yogurt is present, even though the fridge only contains plain yogurt and separately strawberries. The paper interprets this as LLaVA sometimes perceiving the image as a “bag of patches” — i.e., recognizing the objects present but failing to bind attributes to the correct object (a known weakness of the simple linear-projection + patch-token architecture).

5.2 ScienceQA

ScienceQA is a large-scale multimodal multiple-choice benchmark: 21K questions, 3 subjects, 26 topics, 127 categories, 379 skills, with train/val/test splits of 12,726 / 4,241 / 4,241. Each question is paired with a lecture/explanation and (usually) either a natural-language or image context.

Table 7 (reproduced, condensed) — ScienceQA accuracy (%):

Method Average
Human 88.40
GPT-3.5 73.97
GPT-3.5 + CoT 75.17
LLaMA-Adapter 85.19
MM-CoT (Base) 84.91
MM-CoT (Large) — prior SoTA 91.68
GPT-4 (text-only, 2-shot ICL, this paper’s eval) 82.69
LLaVA (alone) 90.92
LLaVA + GPT-4 (complement) 90.97
LLaVA + GPT-4 (judge) 92.53 — new SoTA

LLaVA alone (visual features from before the last CLIP layer, predicting reasoning then answer, 12 epochs) reaches 90.92%, within ~0.8 points of the prior SoTA (MM-CoT-Large, 91.68%) without any chain-of-thought-specific architecture. Text-only GPT-4 with 2-shot in-context learning reaches 82.69% — a full 7.52-point absolute gain over GPT-3.5 — but fails outright on many questions simply because it has no way to process the image/plot context.

Two ensembling schemes were tried to combine LLaVA and GPT-4:

flowchart TD
    Q["ScienceQA question"] --> L["LLaVA prediction"]
    Q --> G["Text-only GPT-4 prediction"]
    L --> C{"GPT-4 failed to answer\n(insufficient context)?"}
    G --> C
    C -->|"Yes"| UseLLaVA["Use LLaVA's answer\n(GPT-4 complement scheme) → 90.97%"]
    C -->|"No, but answers differ"| Judge["Re-prompt GPT-4 as a JUDGE\nwith both Q, both answers"]
    Judge --> Final["GPT-4 gives final answer\n(GPT-4 judge scheme) → 92.53% new SoTA"]
    C -->|"No, and answers agree"| Agree["Keep the (shared) answer"]

  1. GPT-4 complement: whenever GPT-4 declines to answer (reports insufficient context), fall back to LLaVA’s prediction. Result: 90.97% — essentially unchanged from LLaVA alone.
  2. GPT-4 as judge: whenever LLaVA and GPT-4 disagree, re-prompt GPT-4 with both the question and both candidate answers, asking it to pick/synthesize a final answer (similar in spirit to chain-of-thought, but drawing on an external model’s knowledge). Result: 92.53%, a new SoTA, with consistent improvement across every question category. Interestingly, text-only GPT-4 — which cannot see images at all — still improves accuracy on image-context questions, because some of those questions turn out to be answerable from text alone, and the judge step can catch and correct LLaVA’s mistakes on exactly those questions. The paper claims this is the first use of GPT-4 for model ensembling.

Table 8 (reproduced) — design-choice ablations on ScienceQA:

Ablation variant Accuracy Δ from best
Best variant (features before last CLIP layer) 90.92%
Visual features from the last CLIP layer 89.96% −0.96
Predict answer first, then reasoning (vs. reasoning-first) 89.77% −1.15
Training from scratch (skip Stage-1 pre-training) 85.81% −5.11
7B model size (vs. 13B) 89.84% −1.08

Interpretations offered in the paper:

  • Feature layer: the layer before CLIP’s final Transformer layer works better — hypothesized to retain more localized/detailed properties, whereas the very last layer focuses more on global/abstract image properties.
  • Answer-vs-reasoning order: answer-first converges to a slightly higher final accuracy (89.77%), while reasoning-first (chain-of-thought style) converges faster (reaching the same number in half the epochs) but plateaus at the same ceiling — i.e., CoT-style ordering helps convergence speed, not final quality.
  • Pre-training matters a lot: skipping Stage 1 costs 5.11 accuracy points — strong evidence that the feature-alignment pre-training stage is doing real work, not just serving as a formality.
  • Model scale matters: the 13B model beats the 7B model by ~1 point, consistent with general LLM scaling trends.

6. Conclusion

The paper’s own summary: it demonstrates the effectiveness of visual instruction tuning, presents an automatic pipeline for generating language-image instruction data, and trains LLaVA — achieving new SoTA on ScienceQA when fine-tuned there, and strong visual-chat ability when fine-tuned on multimodal chat data. It also contributes the first benchmark suite explicitly targeting multimodal instruction-following capability. The authors describe this as an initial step, focused on real-life tasks, and point readers to a follow-up paper — “Improved Baselines with Visual Instruction Tuning” (LLaVA-1.5) — for stronger quantitative results on academic benchmarks.


Appendix A. Broader Impact

The authors discuss risks and mitigations specific to releasing a general-purpose visual assistant:

  • Malicious input: mitigated via (1) the OpenAI Filter API on text instructions, and (2) an NSFW filter on uploaded images.
  • Hallucination: like text-only LLMs, LLaVA can generate outputs not grounded in the actual input — a particular concern in high-stakes domains like medicine.
  • Biases: inherited from both the vision encoder (CLIP) and the language decoder (LLaMA/Vicuna).
  • Energy consumption: not a major concern at LLaVA’s scale (small pretraining set), but flagged as a future concern if scaled up (e.g., to a 65B-parameter LLaMA backbone).
  • Evaluation complexities: their GPT-4-based evaluation is consistent within their study, but its generality/robustness across other settings is untested; aspects like hallucination degree and fine-grained visual understanding are not yet well covered by their benchmarks.

The authors conclude that the research-community benefits of releasing LLaVA outweigh these risks, since open release enables collaborative improvement and mitigation.

Appendix B. More Results

Additional qualitative demonstrations of emergent behavior (Figures 2–6 in the paper; not independently verified as directly linkable image assets — see the paper’s appendix online for the original screenshots):

  • Figure 2 — HTML/JS/CSS generation from a sketch. Given a simplified hand-drawn mockup of a “joke website,” LLaVA generates working HTML/JS/CSS for an interactive page (reveal a punchline on button click), with only a minor bug — echoing a similar live demo from OpenAI’s original GPT-4 announcement.
  • Figure 3 — Instruction-following without explicit recognition prompts. LLaVA answers “what should I be cautious about here?” for a lake/pier photo, and later writes a full travel-blog-style post about the same image on request — showing it can flexibly follow varied instructions grounded in one image, without being told to “first describe the image.”
  • Figure 4 — Relating visual content to pretrained world knowledge. Shown a sunset photo of a couple on a boat, LLaVA connects it to Titanic (Jack and Rose) and recalls plot details from its language-model pretraining — demonstrating that visual grounding can trigger downstream textual knowledge retrieval.
  • Figure 5 — Recognizing famous artwork / humor. LLaVA identifies a comedic dog-in-a-dress painting as riffing on the Mona Lisa, and — in a fresh conversation — correctly identifies an actual Mona Lisa image and its painter, Leonardo da Vinci.
  • Figure 6 — Zero-shot celebrity recognition (Elon Musk). LLaVA recognizes Elon Musk in both a plain headshot and a humorous “doge” meme edit, despite Musk never appearing in either of LLaVA’s own training stages — attributed to the frozen CLIP encoder having likely seen such images during its own (separate) pretraining, with the finding highlighted as surprising evidence of generalization to unseen visual concepts.

Table 9 (chicken-nugget-map meme) further compares LLaVA, GPT-4, BLIP-2, and OpenFlamingo on humor explanation — LLaVA and GPT-4 both explain the joke; BLIP-2 and OpenFlamingo fail to engage with the instruction at all and default to captioning.

Table 10 walks through a worked ScienceQA example (a rocking-chair material question) showing exactly how the “GPT-4 as judge” scheme corrects an LLaVA hallucination (LLaVA claims the chair is partly “silk,” which the judge correctly overrides in favor of “wood,” reasoning from general material-science knowledge even without seeing the image).

Appendix C. Training Details

Hyperparameter Stage 1 (CC-595K pre-training) Stage 2 (LLaVA-Instruct-158K fine-tuning)
Epochs 1 3
Learning rate 2e-3 2e-5
Batch size 128 32
Optimizer Adam, no weight decay Adam, no weight decay
LR schedule Cosine, 3% warmup Cosine, 3% warmup
Precision BF16 + TF32 BF16 + TF32
Parallelism FSDP (Full Shard Data Parallel) + gradient checkpointing (no CPU offload)
Hardware 8× A100 8× A100
Wall-clock time ~4 hours ~10 hours (Instruct-158K); ~4 hours (ScienceQA fine-tune)

Appendix D. Assets

The paper lists the following released assets (originally under an anonymized GitHub link for review purposes, later published at the LLaVA GitHub repo):

  1. Source code
  2. README / setup instructions
  3. Instructions to launch the demo
  4. All GPT-4 prompts and few-shot examples used for data generation
  5. LLaVA-Instruct-158K dataset
  6. LLaVA-Bench (COCO) and LLaVA-Bench (In-the-Wild)
  7. Model checkpoints (noted as ~25GB compressed — exceeding GitHub LFS’s 5GB limit at submission time, hence released separately)

Appendix E. Data

CC3M filtering methodology (→ CC-595K): noun phrases are extracted from every CC3M caption via spaCy, and their frequencies counted across the whole dataset.

  • Noun phrases occurring fewer than 3 times are dropped (too rare / idiosyncratic to be useful concept coverage).
  • For noun phrases occurring more than 100 times, only a random subset of 100 captions containing that phrase is kept (to avoid massive redundancy for common concepts).
  • Captions are added starting from the least-frequent remaining noun phrases, building up the final pool.
  • This filtering reduces the noun-phrase vocabulary from 108,182 unique noun phrases (full CC3M) down to 31,423 unique noun phrases (filtered), while shrinking the pair count to ~595K — the paper’s own summary is that the filtered set trades off total pair volume for better balance of concept coverage (avoiding the raw dataset’s long tail of near-duplicate high-frequency captions).

(Figure 7 in the paper is a log-log plot of noun-phrase frequency before/after filtering; not independently linked here — see the paper’s appendix online.)

flowchart LR
    A["CC3M\n~3.3M image-caption pairs\n108,182 unique noun phrases"] --> B["spaCy noun-phrase extraction\n+ frequency counting"]
    B --> C{"Frequency check"}
    C -->|"freq < 3"| D["Drop\n(too rare)"]
    C -->|"freq > 100"| E["Randomly keep 100 captions\n(cap over-represented concepts)"]
    C -->|"3 ≤ freq ≤ 100"| F["Keep all captions"]
    E --> G["CC-595K\n~595,000 pairs\n31,423 unique noun phrases"]
    F --> G

Appendix F. Prompts

The paper documents its exact GPT-4 prompting template (Table 13). The system prompt used to generate the “conversation”-type data reads (reproduced verbatim):

“You are an AI visual assistant, and you are seeing a single image. What you see are provided with five sentences, describing the same image you are looking at. Answer all questions as you are seeing the image.”

“Design a conversation between you and a person asking about this photo. The answers should be in a tone that a visual AI assistant is seeing the image and answering the question. Ask diverse questions and give corresponding answers.”

“Include questions asking about the visual content of the image, including the object types, counting the objects, object actions, object locations, relative positions between objects, etc. Only include questions that have definite answers: (1) one can see the content in the image that the question asks about and can answer confidently; (2) one can determine confidently from the image that it is not in the image. Do not ask any question that cannot be answered confidently.”

“Also include complex questions that are relevant to the content in the image, for example, asking about background knowledge of the objects in the image, asking to discuss about events happening in the image, etc. Again, do not ask about uncertain details. Provide detailed answers when answering complex questions. For example, give detailed examples or reasoning steps to make the content more convincing and well-organized. You can include multiple paragraphs if necessary.”

This system message is followed programmatically by a handful of few-shot in-context examples (Tables 15 and 16 in the paper give two full worked examples — a fire-hydrant-in-snow photo, and a skier photo — each showing 3–4 turns of Q&A the model should imitate in style and depth), and finally the actual query (captions + boxes for the target image) is appended as the final user turn. The paper notes that prompts for the other two data types (detailed description, complex reasoning) follow the same pattern but are omitted from the main text for space; readers are pointed to the released codebase.


Glossary of Symbols

Symbol Meaning
X Input image
Xc Ground-truth caption of an image
Xq A generated question/instruction about an image
Xinstruct The full instruction given to the model at a given turn (may include the image)
Xa The target assistant answer
g(·) The vision encoder (CLIP ViT-L/14)
Z Raw visual features output by g(·)
W The trainable linear projection matrix
H Visual tokens after projection, in the LLM’s embedding space
f_φ(·) The language model (Vicuna), parameterized by φ
θ The full set of trainable parameters at a given training stage (W only in Stage 1; {W, φ} in Stage 2)
T Number of conversation turns for a given image

Key Takeaways

The central methodological insight of this paper is that you can bootstrap high-quality multimodal instruction data purely from a text-only LLM, by describing images symbolically (captions + boxes) rather than requiring a multimodal teacher model — this sidesteps the chicken-and-egg problem of needing a good multimodal model to generate training data for a good multimodal model. Architecturally, the paper shows that a deliberately minimal design (frozen CLIP + frozen/then-unfrozen Vicuna + a single linear layer) is sufficient to reach near-SoTA results when the training data is good, which is the paper’s implicit thesis: data quality and instruction diversity, not architectural complexity, were the main bottleneck for multimodal instruction-following at the time. The two-stage training recipe (align first, then fine-tune end-to-end) and the “GPT-4 as judge” ensembling trick are both reused in numerous follow-up works, including the paper’s own sequel, LLaVA-1.5.


Selected References

(Full reference list has 63 entries in the original paper; the most load-bearing ones for understanding this paper are reproduced below. See the arXiv listing for the complete bibliography.)

  • Chiang et al., “Vicuna: An open-source chatbot impressing GPT-4 with 90%* ChatGPT quality,” 2023.
  • Radford et al., “Learning transferable visual models from natural language supervision” (CLIP), arXiv:2103.00020, 2021.
  • Touvron et al., “LLaMA: Open and efficient foundation language models,” arXiv:2302.13971, 2023.
  • Taori et al., “Stanford Alpaca: An instruction-following LLaMA model,” 2023.
  • Alayrac et al., “Flamingo: a visual language model for few-shot learning,” arXiv:2204.14198, 2022.
  • Li et al., “BLIP-2: Bootstrapping language-image pre-training with frozen image encoders and large language models,” arXiv:2301.12597, 2023.
  • Lu et al., “Learn to explain: Multimodal reasoning via thought chains for science question answering” (ScienceQA), NeurIPS 2022.
  • Zhang et al., “Multimodal chain-of-thought reasoning in language models” (MM-CoT), arXiv:2302.00923, 2023.
  • OpenAI, “GPT-4 Technical Report,” 2023.
  • Liu, Li, Li, Lee, “Improved Baselines with Visual Instruction Tuning” (LLaVA-1.5), 2023 — the direct follow-up paper referenced in the Conclusion.

Guide prepared from a full read of the arXiv v2 (11 Dec 2023) PDF text extraction of 2304.08485, cross-referenced against the arXiv/ar5iv HTML renderings for figure asset links. All tables and quoted passages are reproduced/paraphrased from the original paper; equations and the CC3M-filtering / GPT-4-ensembling diagrams are original Mermaid recreations synthesized from the paper’s prose descriptions, not literal copies of paper figures (only Figure 1 is a literal figure reproduction, linked directly from arXiv’s rendering assets).