Visual Primitives in Multimodal LLMs: A Technical Deep Dive into Tokenizer Design and Practical Behavior
This article explores how next-generation multimodal large language models address the "reference gap" through visual primitives—structured, unambiguous tokens for pointing at image regions. Drawing on a tokenizer-level analysis of a recently open-sourced experimental model, it covers the shift from the perception gap to the reference gap, the design of point/box/polygon tokens, the surprising absence of explicit markers in actual outputs, multimodal placeholder spans, and practical engineering takeaways for developers building vision-language applications.
Reading a Multimodal Model’s Visual Reference Mechanism Through Its Tokenizer
1. Background: Why Multimodal Models Need a “Visual Language”
A leading industry team recently open-sourced an experimental multimodal large language model, drawing wide attention from the developer community. On the surface, such models simply add image input capability on top of a text LLM. But what truly determines the depth of visual understanding is how the model internally refers to objects in an image—in other words, how the bridge between visual information and language reasoning is built.
The conventional approach encodes images into vector features and feeds them into the language model through a projection layer. This works reasonably well for coarse-grained tasks like image captioning and visual question answering, but it often fails on dense counting, precise localization, and complex spatial reasoning. The root cause is not that the model “can’t see clearly”—it’s that the model “can’t say it precisely.” When a model tries to describe the 17th cell or the third button in the upper-left corner using natural language, language itself becomes the bottleneck. This is the key entry point for understanding the design of new-generation multimodal models.
2. From the Perception Gap to the Reference Gap: A Paradigm Shift
Industry research frames the bottlenecks of multimodal models at two levels:
The first level is the Perception Gap. The visual encoder’s resolution and feature granularity are insufficient for fine-grained recognition—the model literally cannot see clearly. Over the past few years, the industry has narrowed this gap by increasing encoder resolution, introducing dynamic image tiling, and strengthening vision-language feature alignment, with significant progress.
The second level is the Reference Gap. Once perception is no longer the primary bottleneck, a new problem emerges: the model still relies on natural language to refer to image objects within its chain of thought. Natural language is inherently ambiguous—“the red object on the left” can hardly uniquely identify a target in a dense scene. As soon as a task involves cross-referencing multiple similar objects, the reasoning chain collapses due to referential ambiguity.
This shift in understanding is significant: it means the direction for improving visual understanding has moved from “making the model see more clearly” to “making the model refer more precisely.”
3. Visual Primitives: Structured Tokens as Unambiguous Pointers
To address the reference gap, a representative industry proposal is Visual Primitives. The core idea is to introduce structured, unambiguous referential symbols into the continuous visual space, so the model can precisely point to geometric elements in an image during reasoning—like using pointers—instead of relying on fuzzy natural-language descriptions.
The engineering traces of this idea are visible in the experimental model’s tokenizer configuration. Its vocabulary contains a set of special paired tokens corresponding to three types of geometric elements:
- Point: precisely indicates a pixel coordinate or feature center;
- Box: delimits a rectangular region, i.e., a bounding box in the object-detection sense;
- Polygon: describes the contour of an irregular shape, suited for segmentation tasks.
There is also a pair of reference (ref) tokens, presumably used to refer back to previously declared visual primitives within the reasoning text. Judging by their vocabulary IDs, these tokens are arranged consecutively, indicating they were deliberately injected during the same training stage—they are part of the architecture design, not an afterthought.
The elegance of this design is that the model can generate structured output in the form of “polygon + coordinate sequence,” which downstream systems can parse directly for visualization or further processing, completely bypassing the ambiguity of natural-language descriptions.
4. An Unexpected Finding in Practice: The “Invisibilization” of Explicit Markers
However, during hands-on testing of the model, researchers found a thought-provoking phenomenon: the expected explicit visual primitive tokens did not appear in the model’s chain-of-thought output—no structured coordinate segments wrapped in special tokens were generated. Instead, the model directly output coordinate values in plain text to describe object locations, e.g., “the target is located at [x1, y1, x2, y2].”
This contradiction suggests several plausible explanations:
- Evolution of training strategy: In later instruction-tuning or reinforcement-learning stages, the behavior of explicitly invoking special tokens may have “degenerated” into directly outputting coordinate text. As long as the coordinate values are accurate enough and well aligned with visual features, the explicit markers become a dispensable intermediate form.
- Internal representation vs. external output: Visual primitives may still exist in the model’s internal representation layers (e.g., attention computation or hidden states), but are no longer exposed to the output side as readable tokens.
- Readability trade-off: For end users, natural language plus coordinates is friendlier; explicit markers may exist only as supervision signals during training.
The lesson for developers is this: when analyzing an open-source model, the vocabulary and configuration reflect “design intent,” while actual behavior reflects “training outcomes”—and the two can diverge significantly. Inferring model behavior from architecture documentation alone is unreliable; it must be validated against real inference tests.
5. Interleaved Image-Text Placeholders: Another Design Worth Pondering
Beyond visual primitives, the model’s vocabulary contains a series of multimodal segment placeholder tokens numbered from 0001 to 0442. Conventionally, such placeholders mark image insertion positions in the text stream for interleaved image-text input. However, the numbering上限 doesn’t match the officially stated maximum number of images, nor does it align with the common configuration of “a maximum number of visual tokens per image.”
A more reasonable hypothesis is that each image is divided into multiple semantic spans based on its content, with each span occupying one placeholder number. In other words, the numbering ceiling corresponds to the “total quota of all image spans” rather than the “number of images.” This fine-grained slicing design allows the model to allocate attention independently to different regions of an image—consistent with the visual primitives philosophy: both pursue more precise intra-image reference capability.
For developers who need to handle interleaved image-text input in their own systems, this design offers a reference paradigm: rather than treating each image as an atomic unit, establish a two-level “image–span” structure that reserves an interface for region-level understanding.
6. Engineering Takeaways and Best Practices
From the analysis above, several practical recommendations for multimodal application development can be distilled:
1. Reference representation is a key design point for vision-understanding applications. If your business involves object localization, defect detection, or document layout analysis, prioritize having the model output structured coordinates (bounding boxes, polygon vertices) rather than natural-language descriptions, and explicitly constrain the output format in your prompts, for example:
Output each detected target in JSON format:{"label": "...", "box": [x1, y1, x2, y2]}
2. Use the tokenizer as a model analysis tool. Special tokens in the vocabulary are often the first-hand clues to a model’s design intent. When integrating any open-source model, it is advisable to first inspect its tokenizer configuration, catalog the special tokens, and then validate your hypotheses through inference testing.
3. Beware of the divergence between design and behavior. Model cards, papers, and actual inference outputs may be inconsistent—especially for experimental models. Building automated pipelines for output-format validation and coordinate-accuracy evaluation is a necessary measure to ensure downstream application stability.
4. Leverage cloud platforms to reduce validation costs. Evaluating such multimodal models demands substantial compute. You can use general-purpose cloud capabilities—such as the elastic GPU compute, object storage, and logging services provided by Baidu AI Cloud—to quickly set up inference validation and evaluation environments, keeping your focus on model behavior analysis itself.
7. Conclusion
The paradigm evolution from the perception gap to the reference gap marks multimodal technology’s transition from “being able to see” to “being able to refer precisely.” Visual primitives and their derivative designs—whether explicit markers or coordinate-based descriptions—essentially answer the same question: how to give a language model precise visual pointers. Although the actual behavior of experimental models still holds unresolved mysteries relative to their design documentation, the “tokenizer archaeology + behavioral verification” methodology itself has given developers a key to understanding the internal mechanisms of frontier models. As the technology continues to iterate, structured visual reference is well positioned to become a standard paradigm for multimodal applications.
