When Memory Bandwidth Limits Vision-Language Models on FPGA

Industrial machine vision system with cameras and edge AI processing hardware.

 

Quick Overview

Problem: The vision encoder clears its per-frame target on the fabric, and then nobody can say whether the device will carry the language half — until after the board exists.

What actually binds: At batch size 1, autoregressive decoding reads the decoder weights from external memory on every step, so sustained memory bandwidth sets a floor on time per token. The encoder and prefill are a different question, and the answer there depends on the model, the resolution and the implementation.

Where it appears: Smart cameras adding captioning or visual question answering, AR and head-mounted assistants, robot and drone payloads taking natural-language instructions, broadcast metadata generation, industrial inspection with text-conditioned queries.

Engineering focus: Bytes per token, KV-cache growth, visual prefix length, graph partitioning read from the compilation report, and which compute domain carries which half.

 

 

The Decision Nobody Schedules

A vision encoder that maps well to programmable logic is a solved problem. Fixed token count, known shapes, weights reused across every token, high arithmetic intensity — this is what fabric is good at, and a quantized ViT in a streaming dataflow pipeline will hold its per-frame budget.

The question that goes unscheduled is the next one. Put a language decoder behind that encoder and the workload inverts: one token in flight, every weight in the model touched to produce one word, roughly one operation per byte fetched. The limit moves from multiply-accumulate throughput to external memory bandwidth, and it moves there regardless of how much logic is left on the device.

That inversion is arithmetic, not opinion, and it can be settled in an afternoon with four numbers and a datasheet. Teams settle it after fabrication instead, which is when the answer becomes expensive.

Teams typically assume: if the vision transformer maps efficiently to the fabric, the vision-language model built on top of it will too.

In reality: a VLM is two workloads with opposite hardware characteristics sharing one device. The encoder is compute-bound and fixed-shape. Batch-1 decoding is memory-bound and variable-length. A device chosen well for the first can be a poor fit for the second, and peak INT8 throughput does not describe the difference.

The Wrong Assumption

The assumption is that a vision-language model is a bigger vision transformer. It reads as reasonable: both are transformers, both are mostly matrix multiplication, and FPGAs are good at matrix multiplication.

What the framing hides is the direction of the arithmetic, and it only applies cleanly to one phase. Prefill — the pass over the visual prefix and the prompt — processes many tokens at once and behaves like the encoder: compute-bound, and a reasonable fit for the fabric. Decode is the phase that inverts. One token at a time, no weight reuse to exploit, the full parameter set read per step.

Those are not two points on the same scale. Logic density improves one phase and does nothing for the other, which is why a single headline number for “VLM performance on FPGA” is not a useful thing to quote.

Where the Budget Actually Goes

Batch-1 Decode Is Bound by Weight Traffic

Autoregressive generation at batch size 1 reads essentially the whole decoder from external memory to emit one token. Divide weight bytes by sustained bandwidth and you have a floor on time per token. Nothing in the kernels goes below it.

Two documented parts bracket the range. The AMD Kria K26 SOM carries 4 GB of 64-bit DDR4 at 2400 Mb/s, a peak of 19.2 GB/s (DS987). A Versal HBM device of the class behind the Alveo V80 card pairs 32 GB of HBM2e with a peak around 820 GB/s. That is a factor of roughly 43 between peak memory bandwidths, which is a hardware fact about the two parts and not a measured speedup on any model.

Worth separating from the datasheet: the 1.4 TOPS figure often quoted alongside the K26 describes a B4096 DPU configuration, not a property of the silicon on its own. Change the DPU config and the number changes with it.

The Visual Prefix Fills the KV Cache Before the Question Arrives

A LLaVA-1.5 configuration pairs a CLIP ViT-L/14 encoder at 336×336 with Vicuna-7B, and the visual prefix is a constant of that architecture: (336/14)² = 576 tokens, independent of image content or aspect ratio. Hugging Face exposes it directly as image_seq_length = 576.

For that decoder — 32 layers, hidden dimension 4096 — FP16 key-value storage is 32 × 2 × 4096 × 2 bytes = 0.5 MiB per token. The 576-token visual prefix is therefore 288 MiB, or about 302 MB, written during prefill and then re-read on every decode step. That is the visual part of the context only; the prompt and the generated tokens add to it.

Higher-resolution variants change the number, and they change it conditionally. LLaVA-NeXT packs multiple crops, so the token count depends on the input dimensions and the packing strategy rather than on a single constant — a 672×672 configuration reported in the literature yields 2,880. The figure to carry into a budget is the one for your resolution and packing, not a headline from a paper.

Operator Coverage Is a Device and Toolchain Question, Not a Flag

Transformer blocks lean on operators that CNN-era accelerators were not built around, and what runs where depends on the graph, the toolchain version and the IP configuration. Generalizations do not survive contact with a specific model.

Two concrete points. The DPUCZDX8G on Zynq UltraScale+ and Kria does offer an optional hardware softmax — but it is packaged as a separate accelerator inside the DPU wrapper, with its own AXI interface and runtime, int8 input and floating-point output, support for up to 1023 classes, and a cost of roughly 9,580 LUTs, 8,019 FFs, 4 BRAMs and 14 DSPs (PG338). That is a classifier-tail accelerator, which is a different proposition from softmax fused inside an attention pipeline. Separately, DPUCV2DX8G targets Versal AI Core and Versal AI Edge parts and the Alveo V70 — it is not the Gen 2 NPU, a distinction that is easy to get wrong in a device comparison.

On the newer path, the Vitis AI user guide for Versal AI Edge Series Gen 2 documents native handling of operators including softmax and MatMul, support for vision transformer architectures such as DETR and DeiT primarily for vision tasks, FP16 through explicit casting, and compilation either entirely on the NPU or as heterogeneous NPU/CPU subgraphs. Note what that scope covers and what it does not: vision transformers, which is the encoder half.

For any specific VLM, the compilation report is the evidence. Compile the graph, read the partitioning, and count the subgraph boundaries — each one is a data transfer, and on a deep attention stack the transfers are a latency line item, not a footnote. The general version of this discipline is in why edge AI accelerators fail without hardware-software co-design.

Fixed-Shape Dataflow Meets Variable-Length Input

An FPGA dataflow architecture is built around known shapes. Buffer depths, tiling factors and initiation intervals are compile-time decisions, and a bitstream cannot renegotiate them at runtime.

A VLM varies in both directions. Prompt length varies, output length is not known until generation stops, and dynamic-resolution encoders emit a different token count per image. A pipeline sized for the worst case spends cycles on padding; one sized for the typical case stalls or falls back when the input exceeds it. Partial reconfiguration is a real mechanism for switching between model variants, at a millisecond-scale cost and an interruption to the dataflow through the region — it is a mode-switch tool, not a per-token one.

Transformer Quantization Has Structure CNN Quantization Does Not

INT8 post-training quantization is routine for convolutional networks. Transformers carry documented distribution problems that need handling per tensor type: severe inter-channel variation in LayerNorm inputs, where published analysis found individual channel ranges exceeding 40× the median; a power-law distribution in post-softmax attention that uniform quantizers fit badly, which is why later methods reach for log-domain or power-of-two schemes for that tensor specifically; and an asymmetric distribution of positive and negative values after GELU.

The practical consequence is a mixed-precision design rather than a uniform one, and mixed precision is where a clean streaming dataflow gets harder to hold — a full-precision reduction across the hidden dimension does not stream the way a convolution does. What this is not: INT4 weight quantization does not by itself push LayerNorm or softmax onto the CPU. Whether that happens depends on the target, the toolchain and how the graph is written.

Where the Handoff Sits

image sensor → ISP and resize to encoder resolution → patch embedding → N encoder blocks → projector → concatenation with text tokens → prefill over the visual prefix → KV-cache write → decode loop → detokenization → application

Most FPGA effort goes into the first four stages. The stage that decides the system is the projector, because it is where a fixed-shape, compute-bound, streamable workload hands off to a variable-length, iterative one. Measured separately, both halves can look fine; the budget disappears at the handoff, which is also the one interface nobody writes a latency requirement for.

The surrounding contention is familiar from any shared-memory design. In an FPGA and MPSoC media pipeline it appears as deterministic datapaths competing with processor-side work for interconnect and external memory under full channel load; the pattern is the same here. And the broader point that model time in isolation is the floor, not the ceiling applies before any of the FPGA specifics do.

Failure Patterns You Will See in Production

Pattern 1 — The encoder passes, the system question stays open. Encoder latency meets the per-frame budget in isolation, and there is no number for end-to-end response time because nobody has modeled the decode phase. The gap surfaces at integration, when the only remaining options are expensive ones.

Pattern 2 — First token is fast, the rest are flat. Prefill processes the visual prefix in parallel and is compute-bound, which the fabric handles. Decode then settles into a per-token cost dominated by weight and KV traffic that barely responds to kernel work. Profiling the first token produces a good number and a misleading one.

Pattern 3 — A late resolution change invalidates the budget. A switch to a tiled or dynamic-resolution encoder multiplies the visual token count, and with it both the prefill cost and the per-step KV traffic. The memory budget was written against the original configuration and never revised, so the regression looks like a software problem.

Pattern 4 — The compilation report was never read. The model compiles and runs, and the partitioning shows it split into heterogeneous accelerator and CPU subgraphs. Each boundary is a transfer. The accelerator is doing less of the work than the architecture diagram suggests.

Check the Memory and Latency Budget Before the Board Is Fixed

Most of the cost in a multimodal edge product is committed at device selection, and most of the risk is in two numbers nobody has yet: bytes per token, and where the language workload runs. Promwad designs FPGA, SoC, embedded Linux and high-speed data architectures for AI systems that have to hold real-time behavior under sustained load, and works the partitioning question — what stays in the fabric, what moves to an SoC or NPU, what the memory interface has to deliver — while it is still a document rather than a respin.

Explore FPGA AI Engineering →

Engineering Experience Across FPGA, SoC and Edge AI Platforms

 

Worked Example: Sizing the Decode Budget From a Datasheet

This is a calculation, not a benchmark. It takes published figures and derives lower bounds, which is exactly what you want at device-selection time — a bound that cannot be argued with is more useful early than a measurement you do not have yet.

Case: a 7B-parameter language decoder at INT4 weights, behind a LLaVA-1.5-style encoder, on a Kria K26 class module.

Input Value Where it comes from
Decoder weight bytes ≈3.5 GB at INT4 7e9 params × 0.5 bytes
Peak memory bandwidth 19.2 GB/s 4 GB 64-bit DDR4 @ 2400 Mb/s (DS987)
Visual prefix 576 tokens (336/14)², CLIP ViT-L/14-336 (HF config)
KV cache per token 0.5 MiB (FP16) 32 layers × 2 × 4096 × 2 bytes

One weight sweep per token. 3.5 GB ÷ 19.2 GB/s ≈ 182 ms. That is a lower bound at peak bandwidth, for weight reads alone.

Derate to something a controller delivers. At 60–75% of peak under mixed traffic the same sweep lands at roughly 243–303 ms. This is an assumption, stated as one — the real figure depends on access pattern, refresh and contention, and only a measurement settles it.

The visual prefix on top. 288 MiB (≈302 MB) of KV cache is written during prefill and re-read each step, which adds traffic to the same interface. Prefill itself is a separate cost.

Change only the memory. The same 3.5 GB against an 820 GB/s HBM2e interface is about 4.3 ms. Same model, same precision — the ratio tracks the ratio of peak bandwidths.

What this does and does not establish. It establishes that on a 19.2 GB/s interface, a decoder of this size has a per-token floor in the hundreds of milliseconds, and that the floor is a property of the memory system rather than of the kernels. It does not give you an end-to-end product latency — that needs prefill, the KV traffic above, detokenization and measurement under sustained thermal and memory load.

It is enough to make the decision, which is the point. If the floor misses the requirement, the next move is a different device, a different partition, or a smaller decoder. None of those are optimization work, and all of them are cheaper in week one than in month six.

FPGA development board and laptop illustrating memory bandwidth analysis for vision-language models.

Three Checks Before You Commit to a Device

Check 1: Write Down Bytes per Token

Four numbers: decoder weight bytes at target precision, KV-cache bytes per token, visual prefix length at your resolution and packing, and the device’s sustained external bandwidth. Divide. If the resulting floor misses the latency requirement, the decision is a device or model decision and no amount of kernel work changes that. The wider version of the same selection question — MCU, SoC, FPGA or hybrid — is laid out in choosing an edge device architecture.

Check 2: Compile the Graph and Read the Partitioning

Before committing to a target, compile the actual model and look at what lands where. Count the accelerator and CPU subgraphs and treat every boundary as a transfer with a cost. This is also where device-family differences stop being abstract: the operator coverage and the compilation flow differ between the DPU path and the Versal AI Edge NPU paths, and the report tells you which one you are actually buying. For platform context across accelerator families, Jetson, Kria, Rockchip and Movidius performance tiers is a reasonable starting point, with the caveat that tier comparisons are usually framed around vision workloads.

Check 3: Decide Where Each Half Runs

Keep the encoder where it already works: programmable logic, close to the sensor, fixed shapes, streaming dataflow. Put the decode loop where the bandwidth is — a host SoC or NPU with a wider memory interface, an HBM-class part if the power and cost envelope allows it, or a smaller language model chosen to fit the interface you have. Treat the projector as an interface with its own budget rather than as glue.

Token count is the one lever that pays on both sides of the handoff, since it shrinks prefill compute and the KV cache that gets re-read each step. How much it pays depends on the model and the task, and the cost shows up in fine-grained work first — validate on OCR, small objects and the visual questions your product actually asks, not on classification accuracy.

A per-token floor derived from bandwidth is a hardware fact. If it misses the requirement, every week spent on kernels is a week spent re-proving the arithmetic.

Real Trade-offs to Expect

  • FPGA versus SoC or NPU for the decode loop. Fabric buys deterministic timing and control over the datapath, which matters when the visual path dominates. It does not buy memory bandwidth. For a batch-1 decode loop, the part with the wider memory interface usually wins.
  • HBM-class versus edge-class memory. HBM removes the bandwidth constraint outright. It also moves the design into a different power, thermal, cost and form-factor class than a camera or drone payload can carry.
  • Lower precision versus design complexity. INT4 weights halve the per-token sweep against INT8. The handling that LayerNorm and post-softmax attention then need makes the design mixed-precision, which is more engineering and a harder dataflow to keep clean.
  • Visual-token reduction versus task fidelity. Fewer tokens improve both prefill and KV traffic. They also remove spatial detail, and coarse captioning benchmarks will not show the loss that OCR and small-object questions will.
  • Partial reconfiguration versus timing stability. Swapping fabric regions supports multiple model variants at a millisecond-scale cost and an interruption through that region. Useful for mode switching, not for per-inference adaptation.
  • Building the accelerator versus choosing the model. A smaller decoder that fits the available bandwidth will usually beat a larger one that does not. That is worth deciding at architecture time, while it is still cheap.

Typical Engineering Tasks

Memory and Latency Budget Analysis

Deriving the per-token floor from weight footprint, KV-cache growth, visual prefix length and sustained bandwidth, with assumptions stated, before device selection is locked.

Encoder Dataflow Design on FPGA

Streaming patch-embedding and attention pipelines with fixed shapes, on-chip buffer reuse and fused normalization, sized to real resource budgets.

Graph Partitioning Review

Compiling against the candidate target, reading the subgraph report, and quantifying the transfer cost of each accelerator/CPU boundary.

High-Speed Data Path and Platform Design

Carrier boards, memory interfaces, sensor transport and embedded Linux integration for the platform the AI workload has to run on.

Workload Partitioning Across Compute Domains

Deciding what stays in programmable logic and what moves to an SoC or NPU, with the projector defined as a measured interface.

You May Be Facing This If

  • The vision encoder meets its per-frame target and there is still no number for end-to-end multimodal response time.
  • First-token latency looks acceptable and per-token latency afterward is flat, high, and insensitive to kernel optimization.
  • Decoder weights at target precision occupy most of the module’s DRAM, leaving no headroom for the OS, framebuffers and encoder activations.
  • Accelerator utilization stays low during the periods when the latency target is being missed.
  • The compilation report shows the model split into heterogeneous accelerator and CPU subgraphs and nobody has costed the boundaries.
  • A resolution or tiling change moved the visual token count and the memory budget was not revised with it.
  • Latency scales with output length in a way that was never modeled at device selection.

Where This Becomes an Architecture Problem

At this point the open question is device and partition selection. In practice that means a stated bytes-per-token budget, a compilation report that has been read, a deliberate token budget, and a decision about which compute domain carries the decode loop — then validation of the combined path under thermal and memory load rather than stage by stage.

Where the inference engine is one real-time tenant among several on a shared SoC, the contention analysis belongs to edge AI engineering at the system level. Where determinism in the visual path is the binding constraint, FPGA design for AI applications is where it gets built, and the FPGA and SoC project library covers the platform work underneath it.

Two product contexts reach the same wall from opposite directions: AI-powered content processing in broadcast, where metadata generation has to keep pace with a live signal path, and industrial machine vision, where text-conditioned inspection queries arrive on hardware specified years earlier for classification.

What Promwad Has Actually Built in This Area

Two projects cover the two halves of this problem, and they are worth reading as a pair.

On the real-time rail safety platform, we built a two-layer onboard system for a railway safety OEM: an FPGA layer receiving and pre-processing dense multi-sensor streams in real time, and an edge AI computing module running analytics and data-flow management under embedded Linux. Sensor data is routed through separate paths for streaming, operator connections and local recording, specifically so internal bottlenecks do not make latency unpredictable. That is the partitioning decision in this article, made on real hardware.

The on-device conversational edge AI reference design is our own, built on NXP i.MX 95 with an Ara240 discrete AI accelerator and an FRDM i.MX 8M Plus board. It runs multi-camera video analytics alongside a local LLM agent that takes natural-language commands — reconfiguring the live system, querying who passed a camera, even driving the Neo ISP to change a feed’s exposure or contrast — entirely on the device, with recognized events mirrored to a CAN panel the way an ECU would consume them. Shown at NXP Tech Days and at VISION 2026.

Note where the language workload runs in that design: on an SoC with a discrete accelerator, not in FPGA fabric. That was the right answer for that product, and the reasoning is the arithmetic in this article. Because the Ara240 is an M.2 M-Key module, the AI workload can be scaled without changing the base SoC — which is the same lever as choosing a memory interface that fits the model.

FAQ

Why does my vision encoder run well on FPGA while the full VLM does not?

 

Because they are different phases with different limits. The encoder and prefill process many tokens at once, reuse weights across them, and are compute-bound — a reasonable fit for fabric. Autoregressive decoding at batch size 1 reads the whole decoder from external memory per token, so the limit moves to memory bandwidth. On a 4 GB 64-bit DDR4 module at a 19.2 GB/s peak, a 3.5 GB INT4 decoder has a weight-read floor near 182 ms per token, and that floor does not move with logic density.
 

How much memory does the image prefix cost before generation starts?

 

For a LLaVA-1.5 configuration, a CLIP ViT-L/14 encoder at 336×336 gives exactly 576 visual tokens. On a 32-layer, 4096-dimension decoder, FP16 KV storage is 0.5 MiB per token, so the visual prefix is 288 MiB — about 302 MB — written during prefill and re-read each decode step. Tiled and dynamic-resolution variants change that number according to input size and packing, so take the figure for your own configuration rather than a published one.
 

Can Vitis AI compile a vision-language model?

 

Partly, and the partitioning report is the only honest answer for a specific model. Support depends on the device, the toolchain version and the IP configuration. The DPUCZDX8G offers an optional hardware softmax, though it is a separate accelerator with its own interface and runtime and a 1023-class limit rather than softmax fused into an attention pipeline. The Versal AI Edge Series Gen 2 NPU flow documents native softmax and MatMul and supports vision transformer architectures primarily for vision tasks, with heterogeneous NPU/CPU compilation available. That scope is the encoder half; a large language decoder is a separate question, and usually a memory one.
 

When is an FPGA the right choice for multimodal AI?

 

When the visual path dominates and the language path is small or optional: fixed-shape encoders, sensor-adjacent preprocessing, deterministic timing under sustained load, custom interfaces, long lifecycles where reconfigurability has value. When a large autoregressive decoder sits on the critical path at the edge, the honest comparison is against parts with wider memory, or against a smaller decoder. Our own conversational edge AI reference design put the language agent on an SoC with a discrete accelerator for exactly that reason.
 

Related Engineering Cases

Tell Us About Your Multimodal AI Project

Share the target platform, the model family and resolution, and your end-to-end latency target. We will help work out whether the memory budget holds and where each workload should run.

Tell us about your project

We’ll review it carefully and get back to you with the best technical approach.

All information you share stays private and secure — NDA available upon request.

Prefer direct email?
Write to info@promwad.com

Secured call with our expert in 24h
Secured call with our expert in 24h
Embedded in your team, end-to-end engineering
Embedded in your team, end-to-end engineering
22 years of engineering expertise
500+ projects for OEMs in EU & US
500+ projects for OEMs in EU and US
22 years of engineering expertise
MVP in 8–10 weeks
MVP in 8–10 weeks — predictable delivery
Featured at IBC, Embedded World, MWC
Featured at IBC, Embedded World, MWC