Skip to content

Chatting about video: Video-LLaMA, Video-ChatGPT and LLaVA-Video

Connect a frame encoder (and an audio encoder) to a language model and tune on video questions and answers. Fluent answers aren't grounded answers: log which frames were seen, ablate the inputs and test for hallucination.

Advanced ~14 min9 steps

What runs in CodeSplash

You will be able to

  • Describe the encoder, connector and language model recipe for video assistants
  • Align audio and video by timestamp before a connector, and say what sparse sampling misses
  • Explain how pooling frame-patch features shapes what the language model can see
  • Explain answer-only loss and why synthetic instruction data needs auditing
  • Evaluate grounding with sampled timestamps, input ablations and hallucination tests

Read first

01

The recipe

Read

Video assistants share one recipe. A frozen or lightly tuned vision encoder embeds sampled frames; a connector turns those embeddings into a few vectors the language model can read as if they were words; the language model answers. Training is visual instruction tuningVisual instruction tuningFine-tuning a vision-language model on image + question + answer examples so it follows requests about images.: pairs of video, question and answer.

The answer can only be as good as the frames sampled. Eight frames from a two-minute video leave long gaps, and the language model fills them with what usually happens.

02

Video-LLaMA: video and sound

Read
Reference · VID046 · Explained hereVideo-LLaMAConnects video and audio encoders to a language model through learned interfaces, allowing multimodal conversational responses. It combines perception modules and instruction tuning;

Video-LLaMA adds an audio branch beside the video branch, each with a Q-FormerQ-FormerA small set of learned queries that read a frozen image encoder by cross-attention and pass a fixed number of tokens on.-style connector of learned queries, and trains the language model to answer from both:

L=−∑tlog⁡pθ(yt∣y<t, Qv(V), Qa(A), q).L = -\sum_t \log p_\theta\big(y_t \mid y_{<t},\, Q_v(V),\, Q_a(A),\, q\big).

Audio and frames must be aligned in time first. In the reference's toy, each frame takes the nearest audio feature; the timing errors are 0.1, 0.1 and 0.1 seconds. If the audio is missing at test time, a model trained on both may quietly answer from priors.

03

Video-ChatGPT: pool space and time

Read
Reference · VID047 · Explained hereVideo-ChatGPTAdapts a language model to video by deriving spatial and temporal features from frames and projecting them into the language embedding space.

Video-ChatGPT embeds each frame's patches, then pools two ways: over patches, giving one token per frame (what happens over time), and over frames, giving one token per patch location (what is where). A linear projector maps them into the language model's space.

In the reference's toy, two frames of three patches become two time tokens, the first holding 2 and 3, plus three space tokens: five in all. PoolingTemporal pooling of frame embeddingsAverage the embeddings of a video's frames into one vector. Simple and strong, but it forgets frame order. keeps the input short and loses order within each pooled group and small objects.

04

LLaVA-Video: the data is the method

Read
Reference · VID048 · Explained hereLLaVA-VideoUses large-scale synthetic video instruction data to improve a video-language assistant. The distinctive contribution includes the data-generation and training recipe;

LLaVA-Video's main contribution is a large synthetic set of video questions and answers, generated with the help of other models, and a training recipe around it. It trains with an answer-only lossAnswer-only lossScore a chat model only on the answer tokens, not on the prompt or the question it was given.: the prompt and question tokens are fed in but not scored.

In the reference's toy, five tokens have given probabilities and only the last three are answer tokens; their mean negative log-likelihood is 0.520. Synthetic answers inherit their generator's mistakes, and synthetic questions may overlap public benchmarks.

05

A confident answer

Predict

Predict first

Asked "what does the man pick up?", the assistant answers "a red mug, then he drinks from it." The video was sampled at eight frames. Can you trust the answer?

Yes: the answer is specific and fluentNot yet: check which frames were seen and whether the answer changes without themOnly if the model is large
Reveal

Not yet. Fluency says nothing about grounding. Log the sampled timestamps and look at them; ask again with the frames removed or shuffled; ask about things that aren't there. If the answer barely changes without the video, it came from the language model's priors, a hallucinationHallucinationFluent model output that is not supported by any source, including invented numbers, citations and column names..

06

Evaluating an assistant

Read
  • Log sampled timestamps with every answer.
  • Ablate the inputs: no video, shuffled frames, no audio. A grounded answer should change.
  • Test for hallucination with questions about absent objects and events.
  • Split question types: temporal ("what happened before"), spatial, long-video.
  • Distrust an LLM judge as the only grader; it has its own biases. Review a sample by hand.
  • Audit contamination between instruction data and test benchmarks.
07

What runs here

Read
EntryIn CodeSplash
VID046 · Video-LLaMAExplained here
VID047 · Video-ChatGPTExplained here
VID048 · LLaVA-VideoExplained here
08

Check: video assistants

Checkpoint

Check yourself

Before Video-LLaMA's connectors, why must audio and video features be aligned?

Show the answer

Answer: a

A question about what made a sound needs the right sound with the right frames.

Check yourself

A model trained on video plus audio gets a silent clip at test time. What is a risk?

Show the answer

Answer: b

Missing modalities remove evidence. Test with controlled audio and video ablations.

Check yourself

Video-ChatGPT pools frame-patch features over patches and over frames. What does that cost?

Show the answer

Answer: b

Pooling keeps the language model's input short at the price of detail and order.

Check yourself

Video-ChatGPT's answers are graded by another language model. What should accompany those grades?

Show the answer

Answer: a

Evaluator models carry bias. Human review and grounding checks keep the grades honest.

Check yourself

What does an answer-only loss score?

Show the answer

Answer: b

The model is trained to produce answers, not to reproduce the questions it was given.

Check yourself

LLaVA-Video trains on synthetic instruction data. Which checks matter most?

Show the answer

Answer: b

Synthetic labels inherit generator errors and may leak benchmark content.

Check yourself

You remove the video and ask the same questions; accuracy barely drops. What does that show?

Show the answer

Answer: a

Grounded answers depend on the input. An ablation that changes nothing reveals priors at work.

09

Recap

Recap
  • Video assistants: frame (and audio) encoders, a connector, a language model, instruction tuning.
  • Align modalities by time; sparse frames leave gaps the model fills with priors.
  • Pooling keeps inputs short and loses order and detail.
  • Answer-only loss trains answers; synthetic data needs grounding and contamination audits.
  • Log timestamps, ablate inputs, test hallucinations, don't rely on an LLM judge alone.

Concepts in this lesson