Wang, Liu, Yu et al. (NVIDIA), 2026

LocateAnything: Parallel
Box Decoding

VLMs spell out bounding boxes one digit at a time — slow and incoherent. LocateAnything emits a whole box in a single parallel step, advancing the speed-accuracy frontier with up to 2.5x higher throughput.

Prerequisites: Transformers / next-token prediction + basic object detection
11
Chapters
6+
Simulations

Chapter 0: The Problem

You ask a vision-language model: "Where is the dog?" It needs to answer with a box — four numbers that pin down a rectangle on the image. Sounds simple. But here is how today's VLMs actually do it.

They spell the box out loud. The model treats the box like a sentence and emits one token at a time: "1", "3", "0", then "6", "4", "7", then "9", "1", "1", then "8", "3", "2". Twelve forward passes through a multi-billion-parameter transformer just to say one box. Each pass waits for the previous one to finish.

The core tension: A bounding box is a single geometric object — its four coordinates are tightly coupled (x1 < x2, the width and height correlate with the object's size). But next-token prediction serializes it into a 1D stream of independent-ish tokens, forcing slow sequential generation AND discarding the geometric structure that makes the four numbers a box in the first place.

A worked example of the bottleneck

Suppose a single forward pass of a 3B VLM takes ~30ms on a GPU. Consider a detection query that returns 10 objects. With coordinates normalized to [0, 1000] and emitted as quantized tokens (x1, y1, x2, y2 each one token), plus a <box> and </box> wrapper, that is roughly 6 tokens per object.

QuantityValueHow
Tokens per box6<box> x1 y1 x2 y2 </box>
Objects in the query10a moderately busy scene
Total decode steps (NTP)60strictly sequential
Wall-clock time~1.8s60 x 30ms

That 1.8 seconds is dead time — the GPU is idle between tokens, waiting on the autoregressive dependency. For an embodied agent that must localize before it acts, or a labeling pipeline processing millions of images, this latency is fatal.

Spelling digits is even worse

Some models (the "textual digit" family) don't even use one token per coordinate — they spell each digit. The number 1024 becomes "1", "0", "2", "4": four tokens for one coordinate, sixteen for one box. The throughput collapses further.

So we have two problems wearing one mask:

Why is emitting bounding boxes as a token sequence slow?

Chapter 1: The Key Insight

Here is the move. A box's four coordinates are not a sentence to be spelled out — they are an atomic unit that should be decoded all at once, in a single parallel step.

The insight: Align the unit of parallel prediction with the natural geometric unit. Don't chunk tokens arbitrarily (generic multi-token prediction). Don't decode them one-by-one (next-token prediction). Treat the whole box as one block and predict all of its coordinates simultaneously. This is Parallel Box Decoding (PBD).

Three ways to decode a box, side by side

NTP (Next-Token)
x1 → y1 → x2 → y2, strictly sequential. Coherent but slow (4+ steps per box).
Generic MTP (Multi-Token)
Predict an arbitrary chunk of future tokens in parallel. Fast, but chunks can straddle box and category boundaries → garbage like <box><130></ref><911>.
PBD (Parallel Box)
Predict one box-aligned block (x1,y1,x2,y2) in a single step. Fast AND geometrically coherent.

Why "box-aligned" is the whole trick

Generic multi-token prediction asks the model to fill in random masked positions. For a token stream like <box> 130 647 911 832 </box> <ref> cat </ref>, a random chunk might span the </box> boundary, mixing coordinate tokens with the next object's category. The model is forced to learn "what token usually follows what," capturing spurious co-occurrence rather than geometry.

By contrast, PBD always masks exactly the coordinates inside one box. The model's job becomes well-posed: "given the visual features and the prefix, fill in the four numbers that form THIS box." The supervision matches the structure of the answer. Result: both higher throughput and higher accuracy — usually a tradeoff, here a free lunch, because the structure was being thrown away before.

The counterintuitive part: Going parallel usually costs accuracy (you lose conditioning on earlier tokens). PBD gains accuracy because the coordinates inside a box were never truly sequential — they're jointly determined by the object. Removing the artificial serial order helps.
What distinguishes PBD from generic multi-token prediction?

Chapter 2: Background — How VLMs Localize

Before we can appreciate PBD, we need to understand how a VLM turns "where is the dog?" into a rectangle. The answer: it reuses the same next-token machinery it uses for text.

Coordinates as tokens

Continuous pixel coordinates are first normalized to a fixed range [0, 1000] (so the scheme is resolution-independent), then discretized into integer bins. Each bin becomes a special token in the vocabulary, e.g. <313>. A box is then the sequence <box> <313> <638> <345> <663> </box> — the model emits these just like words.

This is elegant: detection becomes "language modeling over a coordinate vocabulary." But it inherits language modeling's serial bottleneck.

The autoregressive factorization

Let the output be a sequence of blocks B = (b1, b2, ..., bN). Conditioned on visual features Z and a text query E, every generative localizer factorizes the joint probability the same way:

P(B | Z, E) = ∏i=1N P(bi | b<i, Z, E)

Reading it symbol by symbol:

The only thing PBD changes in this formula is the granularity of bi. NTP makes bi a single token (so N is large). PBD makes bi an entire 6-token box block (so N is ~6x smaller). Fewer factors in the product = fewer sequential steps.

The architecture LocateAnything builds on

LocateAnything is a native-resolution VLM:

Native resolution matters for localization: a 12x12 pixel traffic sign needs its high-frequency detail preserved, or the predicted box will be off by tens of pixels.

Data-flow check: Image (H×W×3) → Moon-ViT → visual tokens Z (shape [num_patches, d]) → concatenated with query tokens → Qwen2.5 decoder → block sequence B. The decoder output at each step is a distribution over the coordinate+structural vocabulary.
In the factorization P(B|Z,E) = ∏ P(bi | b<i, Z, E), what does PBD change?

Chapter 3: The Block Format

For parallel decoding to work, every step must produce a tensor of the same shape. You cannot batch and parallelize variable-length outputs cleanly. So LocateAnything reorganizes the entire output into fixed-length blocks of constant length L = 6.

Why exactly 6?

A bounding box needs four quantized coordinates plus two structural tokens that bracket it: <box> x1 y1 x2 y2 </box>. That is 6 slots. Any block type that uses fewer than 6 meaningful tokens pads the rest with a <null> token, guaranteeing uniform tensor shapes for parallel decoding.

The four functional block types

Block Types — click to inspect each
BlockPurposeExample contents (6 slots)
SemanticEncodes the linguistic identity (the label / referring text). Long expressions span multiple consecutive Semantic blocks.<ref> "hot" "dog" </ref> <null> <null>
BoxFour quantized coordinates of one bounding box.<box> <313> <638> <345> <663> </box>
NegativeExplicitly says "the queried object is absent." Prevents hallucinated boxes.<null>-padded sentinel
EndTerminates generation.<eos> <null> ...

How a query becomes a block sequence

Query: "find the hot dog." The model emits: a Semantic block carrying <ref> hot dog </ref>, then a Box block <box> 313 638 345 663 </box>, then an End block. Three blocks = three decoding steps in Fast Mode, versus ~12 token steps under NTP.

Why padding with <null> is non-negotiable: Parallel hardware (GPUs) want rectangular tensors. If blocks varied in length, you couldn't decode them in one batched matmul. The constant L=6 + <null> padding is what physically unlocks the parallelism — it's an engineering choice serving a hardware constraint, not a modeling whim.
Why is every block padded to the same length L=6?

Chapter 4: PBD Showcase

This is the heart of the paper. Below you can decode the same box three different ways — NTP, generic MTP, and PBD — and watch the decode steps, the wall-clock cost, and whether the output stays coherent. This reconstructs Figure 2 of the paper as an interactive race.

Decode the Box: NTP vs Generic MTP vs PBD
NTP mode — step through to decode one token at a time.
What to notice: NTP takes one step per token (slow, but always coherent). Generic MTP finishes fast but occasionally produces a malformed block (a coordinate token leaking past a box boundary — shown in red). PBD finishes in one step per box AND stays coherent, because the parallel unit is exactly the box.

Reading the throughput numbers

Let T = single forward-pass latency, N = number of objects. The decode-step counts are:

MethodSteps for N boxesAt N=4, T=30ms
NTP6N (each of 6 tokens per box is one step)24 steps = 720ms
Generic MTP (chunk=3)~2N (but with re-decode penalty on errors)~8 steps + retries
PBD (Fast Mode)N (one block per step) + framing~5 steps = 150ms

That ~4.8x reduction in steps is where the paper's headline "up to 2.5x throughput" comes from after accounting for the larger per-step compute of predicting 6 tokens at once and KV-cache management.

Why the box stays coherent under PBD

Inside a PBD block, the four coordinate tokens attend to each other bidirectionally (next chapter). So when the model decides x1=313, the same step's prediction of x2 can "see" that decision and ensure x2 > x1. Generic MTP lacks this guarantee because its chunk doesn't respect the box boundary — half the chunk might belong to the next object entirely.

For N boxes, how many decode steps does PBD Fast Mode need (ignoring framing)?

Chapter 5: The Attention Mask

The single cleverest engineering piece. To train both an NTP stream (for causal reasoning) and an MTP stream (for parallel box prediction) in one forward pass, LocateAnything builds a specialized attention mask with three distinct behaviors.

Joint NTP + MTP Attention Mask — hover a cell to read the rule
Green = allowed attention, dark = blocked. The mask isolates the two streams while both read the shared context.

The three rules, decoded

  1. Causal attention for NTP. The shared context (visual tokens xvis + query xq) and the NTP stream xntp use a standard causal mask: each token sees only earlier tokens. Crucially, they are blocked from attending to the MTP block stream xblk — otherwise the NTP stream could cheat by peeking at the parallel answer (data leakage). This preserves the original VLM language ability and matches how a normal KV cache works at inference.
  2. Causal flow across blocks. Within the MTP stream, block i can attend to the shared context and all previously committed blocks b<i, but not future blocks. This lets the model learn dependencies between boxes — e.g., "I already placed a box here, don't duplicate it" — mitigating duplicate or missing detections.
  3. Bidirectional intra-block attention. The tokens inside one block attend to each other fully (bidirectionally). This is what lets the four coordinates be resolved simultaneously while respecting their joint geometry (x2 > x1, y2 > y1).
The genuine insight: One mask encodes three different inductive biases at once — causal for language, semi-autoregressive across blocks, and bidirectional within a block. The two streams share the same visual/query context but are isolated from each other so the NTP loss can't be contaminated by the MTP answer. It's a "two trainings, one forward pass" trick.

Why isolate the streams?

If the NTP tokens could attend to the masked MTP block, the model would learn to copy the answer instead of reasoning toward it. At inference the MTP block doesn't exist yet (you're predicting it), so the cheat-path would create a train/test mismatch. The strict isolation guarantees the NTP behavior at training time is identical to inference time — which is exactly why the standard causal KV cache still works.

Why are tokens inside a single block given bidirectional attention?

Chapter 6: Joint Training Design

Parallelizing the output directly during training risks destroying the model's inherited causal reasoning. The fix: a dual-formulation training strategy that optimizes the same ground truth in two formats at once.

One concatenated input, two views of the same target

A single sequence is built by concatenation:

xall = xvis ⊕ xq ⊕ xntp ⊕ xblk

where ⊕ is concatenation. Defining each piece:

So xntp and xblk are literally the identical answer in two encodings: token-level and block-level.

How xblk is constructed (the masking recipe)

Traverse xntp left to right; split and pad it according to the L=6 block rules. Then, within each block, keep the first token as a prediction anchor and replace all subsequent tokens with [mask]. The model must predict all masked tokens in the block in one step.

Beautiful degenerate case: if block size = 1, this MTP formulation becomes exactly standard NTP. PBD is a strict generalization of next-token prediction — NTP is just the L=1 special case. That's why the model never loses its language ability.

The objective

Both streams are supervised with cross-entropy, and the losses simply add:

L = Lntp + Lmtp

Because both are computed in the same forward pass over xall (the mask keeps them isolated), training cost barely grows while the model becomes bilingual: it can decode serially (Slow Mode) or in parallel (Fast Mode) from the same weights.

Anchor + Mask: building xblk from xntp

Working code: the block masking core

python
def build_block_targets(ntp_tokens, L=6, MASK="[mask]", NULL="<null>"):
    # ntp_tokens: the flat target sequence, e.g.
    # ["<box>","<313>","<638>","<345>","<663>","</box>", ...]
    blocks = []
    for i in range(0, len(ntp_tokens), L):
        chunk = ntp_tokens[i:i+L]
        while len(chunk) < L:          # pad to constant length
            chunk.append(NULL)
        anchor = chunk[0]              # keep first token as context
        masked = [anchor] + [MASK]*(L-1)  # mask the rest
        target = chunk                  # supervise against the real tokens
        blocks.append((masked, target))
    return blocks
# L=1 collapses to plain next-token prediction.
What is the total training objective?

Chapter 7: Hybrid Mode — Knowing When to Slow Down

Parallel decoding has an exploration-exploitation dilemma in hard scenes. LocateAnything names two failure patterns and builds a fallback for both.

The two failure modes

The ambiguity trigger (exact thresholds from the paper)

During Fast Mode, the model continuously validates syntactic integrity and monitors spatial confidence. A fallback is triggered when both conditions hold simultaneously:

Trigger: (1) the top-1 coordinate token probability is below 0.7, AND (2) the max-min spread among the top-5 coordinate tokens exceeds 80 in the [0,1000] normalized space (i.e., the model's top guesses disagree by more than 8% of the image dimension).

Reading condition (2): if the five most likely coordinate tokens are {410, 415, 418, 470, 495}, the spread is 495 - 410 = 85 > 80 — the model is torn between two spatially distant answers. Combined with low top-1 confidence, that's a red flag.

The fallback mechanism

On trigger, the compromised block is discarded, generation reverts to the last verified prefix, and that one problematic block is re-decoded with token-by-token NTP (higher precision). Once the block is finished, the model switches back to Fast Mode. Surgical, localized re-decoding — not a full restart.

Hybrid Mode: confidence gate & NTP fallback

Three on-demand modes

ModeDecodingUse case
Slow (NTP)Token-by-token, maximum stabilityHigh-precision labeling, final-pass dataset curation, offline eval
Fast (MTP)Box-aligned blocks in parallel, maximum throughputOn-device robotics, embodied agents, latency-bound settings
HybridFast by default, falls back to NTP on unreliable blocksProduction pipelines needing both speed and accuracy

Hybrid preserves most of the speed gains while keeping outputs robust — only the rare problematic block pays the NTP tax.

When does Hybrid Mode fall back to NTP re-decoding?

Chapter 8: The Data Engine

A fast decoder is useless without precise supervision. LocateAnything pairs PBD with LocateAnything-Data: 12M unique images, 138M natural-language queries, and 785M annotated bounding boxes across six task families.

LocateAnything-Data composition (by query share)

The six task families

TaskQuery shareWhat it teaches
General detection66.9%The foundation — dense, precise coordinate alignment (83% of all boxes)
UI / GUI grounding16.5%Locating buttons, menus — for embodied agents & GUI navigation
Referring comprehension7.3%Linking complex language ("the red mug behind the laptop") to a region
Text / OCR localization3.6%Tightly grounding text in images
Layout grounding3.5%Document/scene structure (tables, figures, paragraphs)
Pointing2.2%Fine-grained point-based localization

Why detection dominates the mixture

Detection supplies 83% of the bounding boxes despite being 67% of queries — because one detection query ("find all objects") returns many boxes, while a referring query returns one. Dense box supervision is what teaches the model precise coordinate regression, so the authors deliberately weight it heavily. The other five tasks add diversity of intent: the same coordinate-prediction skill, exercised through UI, text, and language-referring lenses.

Concept + realization: 785M boxes is the signal that makes the [0,1000] quantization bins meaningful. With so many examples, each of the ~1000 coordinate tokens is seen millions of times in varied spatial contexts, so the embedding for <313> learns a genuine notion of "about 31% across the image" rather than an arbitrary symbol. Data scale is what gives the discretized coordinates their geometric meaning.
Why does general detection get the largest share of the data mixture?

Chapter 9: Experiments

The headline: LocateAnything-3B advances the speed-accuracy frontier — higher throughput and higher localization quality, especially at strict IoU thresholds.

Speed-Accuracy Frontier (LVIS, illustrative)

Earlier VLMs cluster at low throughput (~1 box/sec) with modest mean F1. LocateAnything sits to the upper-right: ~12.7 boxes/sec while improving mean F1 — the rare move that pushes both axes the good way.

The numbers that matter (from Table 1)

MethodThroughput (BPS)LVIS Mean F1COCO Mean F1
Qwen3-VL-8B1.0~44.8~45.7
SEED1.5-VL1.0~46.7~51.4
Rex-Omni-3B5.0~46.9~52.9
LocateAnything-3B12.7~50.7~54.7

BPS = Boxes Per Second (decoding throughput). LocateAnything is ~2.5x the throughput of the next-fastest VLM (Rex-Omni-3B at 5.0) and ~12x faster than the dense 8B models — while topping mean F1.

Why high-IoU quality improves the most

The gains concentrate at strict IoU thresholds (e.g., F1@0.95), which demand pixel-precise boxes. This is exactly where the box-aligned, jointly-decoded coordinates pay off: predicting x1,y1,x2,y2 together with bidirectional intra-block attention keeps the rectangle internally consistent, so it snaps tighter to the object than four independently-sampled tokens would.

The free-lunch claim, validated: Parallelism normally trades accuracy for speed. Here, aligning the parallel unit with the geometric unit improves both — the experiments confirm PBD is not merely a speed hack but a better way to model boxes.

Breadth of evaluation

The paper evaluates across layout grounding, long-tail detection (LVIS has 1000+ rare categories), and GUI grounding — a deliberately diverse battery to show PBD isn't tuned to one benchmark. Outperforming SOTA "by a large margin" across all three is the evidence that box-aligned decoding is a general principle, not a COCO-specific trick.

Where do LocateAnything's accuracy gains concentrate, and why?

Chapter 10: Connections

LocateAnything sits at the intersection of three lineages: generative detection in VLMs, multi-token / semi-autoregressive decoding, and large-scale grounding data.

2020-23
DETR, Grounding DINO — specialized detection heads
2023
Shikra / Qwen-VL — detection as autoregressive coordinate tokens (the NTP era)
2024-25
Medusa / Block Diffusion / LLaDA — multi-token & semi-AR decoding for language
2026
LocateAnything — align the parallel unit with the geometric unit (PBD)

What's genuinely new here

The cheat sheet

Symbol / termMeaning
B = (b1...bN)Output as a sequence of blocks
P(B|Z,E) = ∏ P(bi|b<i,Z,E)Block-level autoregressive factorization
L = 6Constant block length (4 coords + 2 structural tokens)
xall = xvis⊕xq⊕xntp⊕xblkConcatenated dual-format input
L = Lntp + LmtpJoint cross-entropy objective
Trigger: ptop1<0.7 & spread>80Hybrid fallback condition
BPSBoxes Per Second (throughput metric)
Fast / Slow / HybridMTP-parallel / NTP-serial / adaptive modes

Open questions

"A box is not a sentence. Stop spelling it."
— the one-line summary of Parallel Box Decoding