By Manny Fernandez

July 23, 2026

Beyond the Prompt Series: Multimodal Models: Teaching the Transformer to See

Vision encoders, projectors, and the 2026 move from bolt-on bridges to native multimodality.

A multimodal model is an LLM that can take in more than text: images, audio, sometimes video, all sharing the same token stream as words. The elegant part is that almost nothing new is invented. You reuse a language model, reuse a vision model, and train a small bridge between them. Here is how the pieces wire together, and why the frontier is now tearing the bridge out.

Who this is for

You understand systems, architecture, and tradeoffs, but you are not an ML specialist. This guide skips the beginner framing and the math derivations, defines niche jargon on first use, and stays focused on the mental models and decisions that matter in production.

Core Architecture & Mental Model

A large multimodal model (LMM, also called a vision-language model or VLM when it handles images) extends an LLM so that images, audio, or video can share the same token stream as text. The mental model is a universal translator into the LLM’s token space: whatever the modality, convert it into vectors the language model can attend to alongside words, then let the same next-token machinery do the reasoning.

The workhorse design has three parts wired in series: a vision encoder that turns an image into embeddings, a projector that reshapes those embeddings into the LLM’s representation space, and the LLM decoder that consumes the combined stream and generates text. This is the LLaVA-style recipe, and it became mainstream precisely because it is cheap to build: reuse a pretrained vision encoder, reuse a pretrained LLM, and train mostly the small bridge between them.

The Mechanics (Under the Hood)

  1. Encode. A Vision Transformer (ViT), or a contrastively-trained encoder such as SigLIP, splits the image into fixed patches (a common grid is many 14×14 or 16×16 pixel patches) and encodes each patch into a vector. An image becomes a sequence of visual tokens, exactly like text becomes a sequence of text tokens.
  2. Project. A small projector, usually a two-layer MLP, maps each visual token into the LLM’s embedding space so the language model treats it like any other token. This adapter is the component most teams actually train.
  3. Fuse. The visual tokens are concatenated with the text tokens and fed to the decoder. This is early fusion: vision and language interact from the first layers. An older approach, Flamingo-style gated cross-attention, injected vision through separate attention layers; it has largely been superseded by simpler concatenation.
  4. Generate. The LLM autoregressively produces text conditioned on both the image tokens and the prompt.

Training runs in two phases. A feature-alignment phase trains the projector (and often keeps the vision encoder and most of the LLM frozen) so visual tokens land in the right region of the language space. A visual instruction-tuning phase then trains on image-question-answer data to teach the model to follow multimodal instructions. Freezing the encoder and training only the projector plus the top few LLM layers can cut training compute dramatically while retaining most of the quality.

The 2026 frontier is moving past the bolt-on bridge toward native multimodality, where image, audio, and video tokens enter a single early-fused stream and the vision representation is a first-class citizen of the transformer rather than a translated guest. Native designs reduce visual hallucination and capture spatial relationships better, at the cost of far more expensive end-to-end training. The newest branch, vision-language-action (VLA) models, adds motor control as an output modality for robotics.

Key Technical Trade-offs

Decision Gains Costs
Late fusion (bridge) Cheap to build, reuses frozen encoder and LLM More prone to visual hallucination; weaker spatial and geometric reasoning
Early / native fusion Richer grounding, better spatial reasoning, fewer hallucinations Expensive end-to-end training; harder to iterate on components independently
Image resolution Higher res reads small text and fine detail Token count per image explodes; a single high-res image can cost thousands of tokens
Frozen vs trained encoder Frozen is cheap and stable Trained encoder adapts to your domain but multiplies compute and risks catastrophic forgetting

Real-World Implementation

In practice you send an image inline (base64 or URL) alongside text in the same message. The critical variable you control is how many visual tokens the image consumes, which you tune with resolution or a detail setting.

import base64
from openai import OpenAI

client = OpenAI(base_url="https://api.your-provider.com/v1", api_key=KEY)

with open("firewall_topology.png", "rb") as f:
    img_b64 = base64.b64encode(f.read()).decode()

resp = client.chat.completions.create(
    model="vlm-2026",
    messages=[{
        "role": "user",
        "content": [
            {"type": "text", "text": "List every subnet visible in this diagram."},
            {"type": "image_url", "image_url": {
                "url": f"data:image/png;base64,{img_b64}",
                "detail": "high",   # high = more visual tokens, more cost, more precision
            }},
        ],
    }],
)
print(resp.choices[0].message.content)

Rule of thumb: a detail: high image can cost more tokens than several pages of text. Downscale before sending unless you truly need to read fine print, and never assume the model perceives the image at full native resolution.

Common Pitfalls & Antipatterns

  • Token-cost blindness. Images are expensive in tokens. A batch job over thousands of high-res screenshots can cost more than the text workload it supports. Right-size resolution deliberately.
  • Resolution loss on dense content. Many encoders downsample to a fixed grid. Small fonts, dense tables, and fine schematics degrade. Tile or crop the region of interest instead of shrinking the whole image.
  • OCR overconfidence. LMMs read text in images impressively but not perfectly. For invoices, config screenshots, or legal documents, verify extracted values; do not treat them as ground truth.
  • Visual hallucination. The model may describe objects that are not present, especially with late-fusion designs. Ask it to say when something is not visible, and cross-check safety-critical claims.
  • Image-borne prompt injection. Text embedded in an image (a caption, a sign, a watermark) can act as an instruction. An attacker can hide directives in a picture the same way they hide them in a web page. Treat image content as untrusted input, exactly like retrieved text.

The through-line

Every family in this series is the same machine: the 2017 transformer, modeling sequences of tokens. A token is whatever you make it (a subword, an image patch, a spacetime patch), and the objective is either predict the next token or denoise the whole set. Learn the machine once and every 2026 model release slots into a map you already own.

This is one of four. The others: large language models (the autoregressive engine underneath), small language models and edge AI (that engine shrunk to run on-device), and diffusion video models (the same transformer, denoising instead of predicting).


 

Recent posts

  • If you've spent any time configuring user authentication on... Full Story

  • DNS is one of those technologies that quietly underpins... Full Story

  • BGP issues on FortiGate firewalls usually trace back to... Full Story

  • Every time your laptop talks to your router, a... Full Story

  • If you've spent any time configuring NAT on a... Full Story

  • If you have spent any time configuring firewall policies... Full Story

  • High availability on FortiGate is one of those features... Full Story

  • If you've configured SD-WAN on a FortiGate, you've almost... Full Story

  • FortiLink is the management protocol that turns a FortiSwitch... Full Story

  • FortiSwitches are pretty rock solid from Mean Time Between... Full Story

  • This is a quicky tip.  Have you ever gone... Full Story

  • DNS is one of those quiet pieces of internet... Full Story

  • This article is an updated version of the previous... Full Story

  • You will add ns2 as a secondary (slave) BIND9... Full Story

  • In the process of deploying my lab, I needed... Full Story

  • RFC 8805, used to be known as Self-Correcting IP... Full Story

  • Years back, I wrote an article about certificate pinning. ... Full Story

  • FortiGates have the ability to send alerts to Microsoft... Full Story

  • In this post, I am going to walk through... Full Story

  • Troubleshooting VoIP on a FortiGate can feel like trying... Full Story

  • Prior to FortiOS 7.0, there were three commands to... Full Story

  • In this post, I am going to go over... Full Story

  • What we are going to do:  We are going... Full Story

  • Choosing between FGCP (FortiGate Clustering Protocol) and FGSP (FortiGate... Full Story

  • Creating a VLAN on macOS (The "Pro" Move) A... Full Story

  • This blog post explores the logic behind how macOS... Full Story

  • Pretty Fly for a Wi-Fi Tell My Wi-Fi Love... Full Story

  • Part of my daily gig is creating BoMs (Bill-of-Materials)... Full Story

  • ICMP introduces several security risks, but careful filtering, rate... Full Story

  • The command diag debug application dhcps -1 enables full... Full Story

  • In the world of FortiOS, execute tac report is... Full Story

  • LLDP; What is it The Link Layer Discovery Protocol... Full Story

  • What it actually does When you run diagnose fdsm... Full Story

  • Monkey Bites are bite-sized, high-impact security insights designed for... Full Story

  • I have run macOS in macOS with Parallels but... Full Story

  • Don't be confused with my other FortiNAC posts where... Full Story

  • This is the third session in a multi-part article... Full Story

  • Today I was configuring key-based authentication on a FortiGate... Full Story

  • Netcat, often called the "Swiss Army knife" of networking,... Full Story

  • At its core, IEEE 802.1X is a network layer... Full Story

  • In case you did not see the previous FortiNAC... Full Story

  • This is our 5th session where we are going... Full Story

  • Now that we have Wireshark installed and somewhat configured,... Full Story

  • The Philosophy of Packet Analysis Troubleshooting isn't about looking... Full Story

  • Everyone learns EVPN as "type 2 carries MACs and... Full Story

  • The short answer. XDR and SOAR overlap on automated... Full Story

  • If your team manages SSL/TLS certificates using spreadsheets, calendar... Full Story