Skip to content

Make caption, counting and pointing benchmarks follow the checkpoint's prompt family - #301

Merged
jason718 merged 1 commit into
visionfrom
jasonr/dense-caption-prompt-family
Aug 18, 2026
Merged

jason718 merged 1 commit into
visionfrom
jasonr/dense-caption-prompt-family

Conversation

@jason718

@jason718 jason718 commented Aug 18, 2026 •

Copy link
Copy Markdown
Contributor

mm_olmo's DataFormatter prefixes "<style>:" based on the example's style — long_caption,
pointing, point_count, … — under the style_and_length/_v2 families, and adds nothing under
demo_or_style_v* (olmo/data/data_formatter.py). It keys off the style, not off whether the
benchmark supplied a ready-made question.

olmo-eval honoured that only for the _mp pointing variants, which route through
build_pointing_prompt. Every other family-sensitive benchmark sent the bare question, so
-o system_prompt_style=style_and_length_v2 — the override a pretrain checkpoint is supposed to
pass — was silently inert on them:

task mm_olmo style source of truth
dense_caption long_caption default_inference_len at inference
pixmo_count point_count PixMoCount message style
countbench_qa point_count CountBenchQaConfig.format_example sets it
pixmo_points_eval pointing pixmo_datasets.py:789
sa_co_gold_subset pointing academic_datasets.py:1766

Why it matters

Measured on a 4B Molmo2 stage-1 checkpoint (style_and_length_v2; every caption trained behind a
"<style> <bucket>:" prefix), dense_caption both ways:

bare question family declared
recall 38.18 45.28
consistency 69.68 70.69
recall_at_10 77.20 86.73
num_statements 19.80 21.66
avg 53.93 57.98
<points .../> answers 93 (3.4%) 0
answers < 30 words 60 0
words med 143, min 3 med 164, min 105

7.1 recall points, and it reads as a model regression rather than a harness setting — which is
exactly how it was reported. Given a prompt it never saw in training, the model sometimes answered a
caption request with pointing markup, or with three words. Two stage-1 checkpoints that looked 3–4
points apart turned out to be within 0.05 recall of each other once both were scored correctly.

The counting and pointing tasks have the same exposure for any pretrain checkpoint.

The change

  • system_prefix(system_prompt, style=POINTING_STYLE) — now style-aware; existing callers unchanged.
  • apply_style_prefix(question, system_prompt, style) — prefixes a pre-built question.
  • StylePrefixMixin — gives a task the same system_prompt_style override the _mp tasks have;
    each task declares its mm_olmo style.
  • dense_caption honours system_prompt_style directly, selecting
    "long_caption {default_inference_len}:".

Backwards compatible. Defaults stay demo_or_style_v2 (no prefix), so every existing run keeps
its current prompts; only an explicit -o system_prompt_style=style_and_length* changes behaviour.
dense_caption_captioner still force-sets its prompt via caption_prompt, which takes precedence.

Verification

Prefix resolution checked per task for the default and for style_and_length_v2 (point_count: Q,
pointing: Q, bare by default); dense_caption checked for no-override, demo_or_style_v2,
style_and_length, style_and_length_v2, and the dense_caption_captioner subclass. make lint
clean (520 files). make type-check reports one diagnostic, pre-existing and in
providers/olmo_core.py:219, untouched here.

…ng tasks

The `_mp` pointing tasks take the checkpoint's prompt family as a task override on the same task
(`-o prompt_templates=none -o system_prompt_style=style_and_length_v2` for a pretrain checkpoint;
`ModelPromptPointingTask`'s defaults target the instruction-tuned models). `dense_caption` instead
expressed the same distinction as a *separate registered task* (`dense_caption_captioner`), so a
run that correctly declared the family for pointing still silently got the released-family caption
prompt. Nothing in the override it already passed had any effect here.

That is easy to get wrong and expensive when you do. A 4B Molmo2 stage-1 checkpoint
(`style_and_length_v2` conditioning, i.e. every caption trained behind a `"<style> <bucket>:"`
prefix) evaluated with the natural-language prompt:

                          dense_caption   with the family declared
    recall                    38.18              45.28
    consistency               69.68              70.69
    recall_at_10              77.20              86.73
    num_statements            19.80              21.66
    avg                       53.93              57.98
    `<points .../>` answers   93 (3.4%)          0
    answers < 30 words        60                 0
    words                med 143, min 3     med 164, min 105

7.1 recall points, and it reads as a model regression rather than a harness setting. Handed a
prompt it never saw in training, the model sometimes answered a caption request with pointing
markup or three words. mm_olmo re-applies the same prefix at inference through
`default_inference_len` (`olmo/data/data_formatter.py`), so the natural-language instruction is
out of distribution for that whole family.

`system_prompt_style` is already on the base task config, so `dense_caption` just honours it:
`style_and_length` / `style_and_length_v2` select `"long_caption {default_inference_len}:"`, and
anything else keeps the seeded natural-language template. One override now describes the
checkpoint for both captions and pointing.

Backwards compatible: the default is unchanged (`demo_or_style_v2` -> seeded template), and
`dense_caption_captioner` still forces the captioner prompt via `caption_prompt`, which takes
precedence over the family.

Verified: prompt resolution checked for no-override, `demo_or_style_v2`, `style_and_length`,
`style_and_length_v2`, and the `dense_caption_captioner` subclass; `make lint` clean (520 files);
`make type-check`'s one diagnostic is pre-existing and in `providers/olmo_core.py:219`, untouched
here.
@jason718
jason718 merged commit 5ddf693 into vision Aug 18, 2026
1 check passed
@jason718 jason718 changed the title dense_caption: follow the checkpoint's prompt family, like the pointing tasks Make caption, counting and pointing benchmarks follow the checkpoint's prompt family Aug 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant