The mechanism
A vision-language bridge converts image features into inputs with the language model’s required width. Shape compatibility allows the computation to run, but does not prove that the generated answer depends on the image. The trainable state can change across stages: one recipe may initially freeze the vision encoder and language model while fitting a projector, then update additional components for instruction following. The original LLaVA paper documents such a staged choice; other architectures differ. The worked matrix here exposes the interface without executing an image model.
- Declare patch count, visual-feature width and language input width.
- Multiply by a declared projection and preserve patch ordering.
- Identify frozen and trainable components separately for each training stage.
- Compare image swaps, blank-image inputs and text-only baselines on questions whose answers truly depend on the image.
Science and assumptions
Patches, projection and visual instruction tuning · worked relation
Trace visual feature dimensions into a language model and distinguish alignment from visual use.
Symbols and units
- H_v
- Projected visual tokens in the declared row-vector convention
dimensionless
- Z_v
- Patch feature matrix
dimensionless
- W
- Projection weights with no bias in this example
dimensionless
- N
- Patch count
patches
- d_v,d_l
- Visual and language widths
features
Two patch rows Z=[[1,2],[3,4]] have visual width 2. With projector W=[[1,0,1],[0,1,−1]] of shape 2×3, visual tokens are ZW=[[1,2,−1],[3,4,−1]], now width 3. The projector has 6 trainable entries if it has no bias. Replacing both patches with zeros makes projected tokens zero, but a language prior could still produce a plausible answer; that would not establish image grounding.
Assumptions Authored fixed features and a linear projector, not an executed vision encoder or replication of an entire VLM. Matrix orientation is explicitly row-vector based.
Engineering example
Two patch rows Z=[[1,2],[3,4]] have visual width 2. With projector W=[[1,0,1],[0,1,−1]] of shape 2×3, visual tokens are ZW=[[1,2,−1],[3,4,−1]], now width 3. The projector has 6 trainable entries if it has no bias. Replacing both patches with zeros makes projected tokens zero, but a language prior could still produce a plausible answer; that would not establish image grounding.
Distinctions and tradeoffs
It is a mistake to conclude: The projected tensor has the expected width.
A lightweight projector limits trainable state but may constrain cross-modal alignment. Larger or jointly trained interfaces require new data and evaluation evidence.
Teach modality-specific representation, objective and evaluation choices. Trace visual feature dimensions into a language model and distinguish alignment from visual use.
Specifications and interfaces
- Learning mode
- worked example
The executable decoder has 423 parameters; worked extensions do not imply an additional simulator.
- Worked contract
- Trace visual feature dimensions into a language model and distinguish alignment from visual use.
Authored fixed features and a linear projector, not an executed vision encoder or replication of an entire VLM. Matrix orientation is explicitly row-vector based.
Interfaces
- Inputs and state Input
- Declare patch count, visual-feature width and language input width.
- Result and check Output
- Trace visual feature dimensions into a language model and distinguish alignment from visual use.
Check your understanding
Which observation tests visual use beyond mere shape compatibility?
- The projected tensor has the expected width.
- The answer sounds plausible with a blank image.
- Changing the image changes the answer correctly on an image-dependent question.
Answer and reasoning
Changing the image changes the answer correctly on an image-dependent question.
Changing the image changes the answer correctly on an image-dependent question. Authored fixed features and a linear projector, not an executed vision encoder or replication of an entire VLM. Matrix orientation is explicitly row-vector based.
Evidence and scope
Mode: worked example. Authored fixed features and a linear projector, not an executed vision encoder or replication of an entire VLM. Matrix orientation is explicitly row-vector based. Numerical examples are authored calculations, except explicitly identified automated core fixtures. Primary sources support the scoped mechanism; no human specialist review or learner outcome is implied.
Model lifecycle studio: worked example. Authored fixed features and a linear projector, not an executed vision encoder or replication of an entire VLM. Matrix orientation is explicitly row-vector based.
Sources
Continue exploring
Foundations
- Pair images and captions in a shared representation
- Self-attention
- Instruction tuning and assistant-only loss