Inside an Open-Source Multimodal Model's Tokenizer: Visual Primitives and Structured Token Design
A technical analysis of an experimental open-source multimodal model's tokenizer, focusing on its special tokens for visual primitives (points, boxes, polygons, references), the placeholder-based image-text alignment mechanism, and what these design details reveal about the model's actual capabilities and evolution. The article also distills practical guidance for developers building multimodal applications.
1. Background: A New Wave of Multimodal Exploration
An experimental open-source multimodal model has recently sparked wide discussion in the community. As the first vision experimental release in its series, its value lies not in topping leaderboards but in disclosing a large amount of underlying design detail: tokenizer configuration, special token tables, image-text interleaving mechanisms, and more. These details offer a glimpse into a technical route that differs from the mainstream “image captioning” approach.
From an engineering perspective, reading a model’s tokenizer often reveals its true capability boundaries better than a paper does. This article uses tokenizer.json as the entry point to systematically examine the technical highlights worth noting in this model.
2. The “Visual Primitives” Route Revealed by Special Tokens
2.1 What’s Hidden in the Token Table
Inspecting the model’s tokenizer.json reveals a set of tokens marked as special, with the following ids and contents:
| id | Content | ||
|---|---|---|---|
| 129271 | < | /polygon | > |
| 129272 | < | polygon | > |
| 129273 | < | /point | > |
| 129274 | < | point | > |
| 129275 | < | /box | > |
| 129276 | < | box | > |
| 129277 | < | /ref | > |
| 129278 | < | ref | > |
These tokens clearly correspond to opening/closing markers for three geometric structures—“polygon,” “point,” and “bounding box”—plus a pair of “reference (ref)” markers. Their existence means the vocabulary was designed from the start with a native channel for referring to spatial objects in images in a structured way during inference.
2.2 What Are Visual Primitives
This design aligns closely with the recently proposed idea of “visual primitives.” This line of research re-examines why multimodal models fail at fine-grained recognition tasks and identifies two distinct layers of failure:
- Perception gap: The model “cannot see” image details clearly—for example, small objects or dense regions. This can be mitigated with higher-resolution encoders, dynamic slicing, and other relatively mature techniques.
- Reference gap: Even when the model can see clearly, it still describes image content in natural language during reasoning. Natural language is inherently ambiguous about spatial positions, quantities, and shapes. A phrase like “the red object slightly to the upper left of center” can break the chain of logic in dense counting or complex localization tasks.
The core idea of visual primitives is to establish an unambiguous pointer for each object under discussion within continuous visual space. Instead of saying “that red object,” the model directly references a geometric primitive, for example:
<|ref|><|point|>[[312, 428]]<|/point|><|/ref|>
This kind of expression is precise, differentiable, and verifiable in coordinate space, preventing ambiguity from propagating through reasoning. It is also what distinguishes this approach from traditional “detection-box post-processing”: primitives are not a formatting wrapper applied to outputs, but carriers of meaning that participate in the reasoning process itself.
3. An Intriguing Observation: The Primitives “Disappeared”
3.1 A Gap Between Testing and Design
Interestingly, in actual inference tests, the model’s chain of thought did not contain the explicit primitive markers described above; no structured output such as <|point|>[[a,b]]<|/point|> was observed. This appears superficially inconsistent with the carefully designed special tokens in the tokenizer.
3.2 A Plausible Explanation: Implicitization
One reasonable explanation is that these explicit tokens are artifacts of an early experimental stage. During pre-training or mid-training, the model may indeed have used special tokens to build explicit primitives; in later alignment and post-training stages, the training objectives may have guided the model to “internalize” the explicit tokens into coordinate-value expressions:
- Early:
<|ref|><|box|>[[x1,y1,x2,y2]]<|/box|><|/ref|>wrapping coordinates - Later: The chain of thought directly contains natural language with coordinates, such as “the region from (x1, y1) to (x2, y2)”
From a capability standpoint, coordinates still participate in reasoning, so referential precision is preserved. But from an interpretability standpoint, losing the explicit tokens’ strong structural constraints reduces consistency and parsability of the output format. This is a reminder for downstream developers: do not assume that a model’s chain of thought will be reliably parseable as structured output. Parsing logic needs to be fault-tolerant.
4. The Placeholder Mechanism for Image-Text Interleaving
The tokenizer also contains another set of special tokens: place_holder_mm_span_0001 through place_holder_mm_span_0442. The engineering intent behind these tokens can be understood on two levels:
Document-level placeholders: In long interleaved image-text documents, every image insertion position needs a unique placeholder so that visual features and text sequences can be aligned precisely during stitching. Numbering the placeholders makes consistency checks easier in the data pipeline.
Span-level segmentation: Considering the meaning of “span”—a segment or fragment—an even more likely design is that a single image is not mapped to just one placeholder, but is divided into multiple visual spans, each anchored to a text span. This is especially useful for long images, charts, and multi-panel documents: the model can reference different regions of the same image as it “reads” different positions in the document.
However, the numbering only goes up to 0442, while some official documentation describes a higher image-count limit; these numbers don’t match. Possible explanations include: 0442 being the maximum number of visual spans per forward pass (rather than the number of images), or a discrepancy between training-data configuration and inference configuration. This highlights another point: placeholder count, image count, and visual token count are three different concepts, and they should be verified separately when working with long-document applications.
5. Takeaways for Developers
Combining the analysis above, here are several practical recommendations for multimodal application development:
- Prefer structured reference over natural-language reference: In scenarios requiring precise localization or dense counting, prompts should explicitly request coordinate outputs and provide an example of the output format to reduce referential ambiguity.
- Build dual-track output parsing: Different versions of the same model—or the same model at different decoding temperatures—may drift between explicit token formats and natural-language coordinate formats. Parsers should support both.
- Special tokens are capability “fossils”: A tokenizer often preserves traces of a model’s capability evolution. Dumping a new model’s special token table is a low-cost, high-information reconnaissance technique when evaluating it.
- Image-text alignment determines the ceiling for document applications: The placeholder/span design directly affects how precisely images can be referenced in long multi-image documents; verify this carefully during model selection.
6. Conclusion
The greatest value of this experimental model is that it turns the “visual primitives” route from a research paper into testable open-source weights. Although explicit primitive tokens did not appear in inference as expected, the design intent, evolutionary path, and leftover engineering details provide the community with a valuable reference. For researchers, the question worth asking is: which is more reliable for reasoning—explicit structured primitives or implicit coordinate expressions? For developers, the focus should be on borrowing the “structured reference” idea in their own multimodal applications, so that models not only “see clearly” but also “point accurately.”
