Technical Highlights of Open-Source Experimental Multimodal Models

    This article analyzes the technical highlights of open-source experimental multimodal models, focusing on how they address the Reference Gap through Visual Primitives. It explains how special tokenizer markers represent points, boxes, and polygons, why explicit primitives may not appear in actual outputs, and how image placeholders work in interleaved text-image inputs. Developers will find practical guidance on input standardization, output constraints, and reproducible evaluation for building stable multimodal pipelines.

    1. Background: From “Seeing” to “Pointing Accurately”

    In the evolution of multimodal large models, early optimization efforts mostly focused on whether image recognition was accurate—that is, whether the model could correctly identify objects, text, and regions in a scene. However, once recognition accuracy reaches a certain level, engineering practice reveals a more difficult problem: models still frequently fail on tasks such as dense counting, complex occlusion, fine-grained localization, and multi-object relational reasoning. The cause is often not a lack of pixel information, but the fact that the model still relies on natural language to describe visual objects during the reasoning stage.

    Natural language is inherently ambiguous. Expressions such as “the one on the left,” “the small square near the edge,” or “the pillar next to the third person” can refer to different targets under different scales, viewpoints, and annotation conventions. As a result, the problem shifts from a Perception Gap to a Reference Gap: the model can see an object but cannot reliably “point to” which one it is referring to. This issue is amplified in tasks that require precise coordinates, unique identifiers, and verifiable steps, ultimately causing the reasoning chain to break down.

    2. Core Idea of Visual Primitives: Replacing Ambiguous Descriptions with Unambiguous Pointers

    A common approach to the Reference Gap is to introduce Visual Primitives. The concept is straightforward: abstract visual objects into structured symbols that the model can reference directly, such as points, bounding boxes, and polygons, and define a consistent notation so that the model refers to targets with “pointers” rather than “adjectives” during reasoning.

    This design brings three benefits:

    1. Uniqueness: Each primitive corresponds to a fixed coordinate or region, reducing the ambiguity of language descriptions.
    2. Composability: Points, boxes, and polygons can be nested and chained, supporting composite reasoning such as “localize first, then count” or “select with a box first, then compare.”
    3. Verifiability: The output structure can be parsed by programs, making automated evaluation and post-processing easier rather than relying solely on subjective human judgment.

    From an engineering perspective, this transforms visual reasoning from pure text generation into constrained generation with structured output, similar in spirit to function calling and structured output.

    3. Implementation from the Tokenizer: How Special Markers Carry Structured Semantics

    A common way to tell whether a model truly adopts the Visual Primitives approach is to inspect the special markers in its tokenizer configuration. A typical implementation adds paired opening and closing markers to the vocabulary to wrap geometric objects and reference relationships, for example:

    • Polygon: <|polygon|> and <|/polygon|>
    • Point: <|point|> and <|/point|>
    • Bounding box: <|box|> and <|/box|>
    • Reference: <|ref|> and <|/ref|>

    These markers are usually configured as special tokens that cannot be split and do not undergo normal normalization, ensuring they appear as a whole in the sequence. An illustrative structure is shown below:

    1. <|ref|><|box|>[[x1,y1,x2,y2]]<|/box|><|/ref|>
    2. <|point|>[[x,y]]<|/point|>
    3. <|polygon|>[[x1,y1],[x2,y2],...]<|/polygon|>

    It is important to note that the presence of special markers in the vocabulary only means the model has a channel to carry this semantics; it does not mean the model will explicitly output these markers during inference. Training strategies, data mixtures, and alignment methods all affect the final output format.

    4. A Common Confusion: Why Explicit Primitives Are Not Visible in Actual Outputs

    Many users find in practice that the model’s chain of thought does not contain the full primitive-wrapping structure, yet the model still provides coordinates or directional information in its descriptions. This usually points to two possibilities:

    1. Implicit internalization: After post-training and alignment, the model learns not to write markers explicitly and instead completes reference through coordinates and region descriptions directly. The effect is equivalent, but the form is more “natural.”
    2. Format drift: Different versions, decoding parameters, and prompt templates can change the output style, causing structured markers to be overridden by more colloquial phrasing.

    For developers, this means they cannot rely solely on the model “voluntarily outputting structure.” A more robust approach is to pull the output back into a parseable format through prompt constraints, decoding constraints, and post-processing validation:

    1. # Illustrative: constrain the model to output parseable structured references
    2. prompt = """
    3. Please strictly use the following format to refer to targets. Do not output natural language directional words:
    4. POINT: [x, y]
    5. BOX: [x1, y1, x2, y2]
    6. """
    7. # Trigger retry or fallback when parsing fails

    5. Placeholders in Interleaved Text-Image Inputs: Engineering Challenges with Multiple Images

    In interleaved text-image scenarios, multimodal models often use placeholder markers to indicate the position of images in the text sequence. A typical naming pattern looks like place_holder_mm_span_0001, with numbers increasing consecutively. Their role is to align the text channel and the visual channel at the sequence level, preventing mismatches between image features and text positions.

    Two points here are easily misunderstood:

    • The number of placeholders does not equal the maximum number of images. A placeholder may correspond to a segment of an image, a region, or a visual encoding unit, so the count can be far greater than the number of images.
    • The upper limit is constrained by context length and GPU memory. Even if the documentation states support for many image inputs, the actual usable number still depends on resolution, tiling strategy, context window, and inference resources.

    From an engineering standpoint, it is advisable to abstract placeholder management into a separate module responsible for ID allocation, recycling, and conflict detection, avoiding ID misalignment across multi-turn conversations:

    1. span_map = {
    2. "0001": {"image_id": "img_17", "region": "full"},
    3. "0002": {"image_id": "img_17", "region": "tile_2"},
    4. }

    6. Practical Recommendations: Reproducible, Evaluable, and Governable

    To adopt this approach in your own tech stack, it is recommended to build a closed loop around three areas:

    1. Input standardization: Unify image tiling, coordinate normalization, and resolution strategies. Clearly define the coordinate origin and scaling rules to avoid “the same coordinate meaning different things.”
    2. Strong output constraints: Prefer structured output and schema validation. Automatically retry or fall back on samples that fail to parse, ensuring downstream systems are not broken by dirty data.
    3. Verifiable evaluation: Design automated metrics for counting, localization, and relational reasoning separately, such as coordinate deviation, box overlap, and counting accuracy, rather than only looking at the fluency of natural language.

    At the infrastructure level, you can combine object storage to manage image assets, message queues to decouple inference tasks, container platforms to support elastic inference, and logging services with monitoring alerts to track parsing failure rates and latency fluctuations. Baidu AI Cloud can provide standardized component support for these general capabilities, helping teams quickly turn experimental capabilities into engineering practice.

    7. Conclusion

    What is most worth attention in experimental multimodal models is not any specific special marker itself, but the methodology behind it: structuring visual reference. It uses unambiguous pointers to compress language ambiguity and parseable output to enable verifiable reasoning. For developers, focusing on coordinate conventions, placeholder governance, and an evaluation loop can significantly improve stability and maintainability in most multimodal scenarios.