Repository navigation
Add vllm image support - #347
donovanclay wants to merge 25 commits into
Conversation
The provider's _embed() called F.embedding(token_ids, lm.embeddings.weight, ...) directly, which only covers the *base* vocab block of a SplitVocabEmbedding (OLMo-core's n_extra_vocab feature, used by Molmo2 for its 128 image-special tokens like <im_patch>/<im_col>/<im_start>). Any input token id in the extra range (e.g. image_patch_token_id=151938 for a 151936-base-vocab model) indexed past the end of .weight, causing a CUDA 'vectorized gather kernel index out of bounds' device-side assert on every single multimodal request - a 100%, completely silent failure (the harness swallows AcceleratorError without a traceback, so this looked like a random per-image issue until traced with CUDA_LAUNCH_BLOCKING=1 and ad hoc traceback logging). Fix: call emb.full_weight() (base + extra rows concatenated) when lm.embeddings is a SplitVocabEmbedding, matching MultimodalLM.forward's own _lookup_embedding_weight helper in OLMo-core. Also add the swallowed traceback to the asynq batch-processing error log (process_batch's except Exception branch) so future AcceleratorError-class failures aren't this hard to diagnose.
# Conflicts: # src/olmo_eval/inference/providers/olmo_core_vlm.py
A key with a trailing newline -- trivially introduced by storing it in a secrets manager with `echo` rather than `printf` -- becomes the header value `Authorization: Bearer sk-proj-...\n`. httpx rejects that with LocalProtocolError, and the openai SDK wraps it as `APIConnectionError: Connection error.` That message is indistinguishable from a network outage, and nothing upstream catches it: the judges wrap each scoring call in a broad `except Exception` and log a warning, so the run *succeeds* and reports a score computed from zero successful judgements. A full dense_caption eval returned 0.0000 with 2730/2730 instances failing this way, and it read as a model regression rather than a configuration error. Strip at all three read sites. math_vista is covered too: it reuses _cached_gpt_call from dense_caption_judge rather than reading the key itself. Besides tolerating padded keys, this makes a genuinely wrong key surface as a real AuthenticationError instead of a misleading connection failure. Co-Authored-By: Claude Opus 5 <[email protected]>
These three edits were made directly in the shared olmo-eval/ checkout while running Qwen3-VL evals and were never committed: - TaskConfig.__post_init__ coerces a dict sampling_params into the frozen SamplingParams, so `-o sampling_params.max_tokens=N` works. Without it a dotted override reaches the cache key as a dict and fails far from its cause with `unhashable type: 'dict'`. - HuggingFaceProvider gains an opt-in strip_reasoning kwarg. Qwen3-VL-Thinking's chat template prefills `<think>\n`, so generation starts inside the reasoning block; no scorer strips it and MmmuScorer's clean_prediction splits on the *first* "Answer:", routinely one written mid-thought. - The predictions builder persists metadata["reasoning"], so traces survive for error analysis now that `text` holds the answer alone. Part 3 of the ablation plan needs the first one. Co-Authored-By: Claude Opus 5 <[email protected]>
VLLMProvider was text-only, so every multimodal eval fell to HuggingFaceProvider, whose _generate_multimodal loops one request at a time at batch size 1 (the "batched" strategy only chunks the queue, never the forward pass). Measured on an A6000 with Qwen3-VL-4B that is ~1 s/instance for Instruct and ~25 s/instance for Thinking, which is why MMMU-Pro needed 8 single-GPU replicas to finish in 4.5 h. _format_prompt now returns vLLM's dict form with multi_modal_data when the request carries images, rendering placeholders through the tokenizer chat template. That works without an AutoProcessor because the tokenizer-level template emits the same placeholders as the processor-level one (verified on Qwen3-VL: both produce <|vision_start|><|image_pad|><|vision_end|>), and vLLM expands them internally. The message shape matches HuggingFaceProvider._build_chat_messages and OlmoCoreVlmProvider._chat_text so scores stay comparable across providers. Two paths cannot carry images and now raise instead of dropping them silently: add_bos_token=False (pre-tokenizes to prompt_token_ids) and logprobs() (scores raw token sequences). A new max_images kwarg raises limit_mm_per_prompt off vLLM's default of 1, which would otherwise break every interleaved-image task -- MMMU-Pro's standard settings carry up to 7. Co-Authored-By: Claude Opus 5 <[email protected]>
Molmo v9 ties Qwen3-VL-4B-Instruct on MMMU (49.56 vs 49.67) but loses CharXiv by 10-14 points. That is consistent with a perception deficit, but a tie on MMMU is equally consistent with both models being capped by a shared backbone -- both initialize from Qwen/Qwen3-4B-Instruct-2507. These two conditions tell them apart. TaskConfig gains image_mode (real | none | caption) and caption_source, read by ImageQATask.format_request and MmmuProTask.format_request (which overrides the base for interleaved images). none drops the image, giving the score reachable from the question alone; caption substitutes a text description, so oracle - real attributes error to perception and 100 - oracle to knowledge and reasoning. Three ways this could report a meaningless number instead of failing, all now guarded: a missing caption must not fall back to text-only, since that collapses the two conditions the experiment exists to distinguish; an unknown mode must not be treated as real; and the mmmu_pro vision setting must refuse imageless modes entirely, because its question is rendered *into* the screenshot and the official parser falls back to a seeded random choice, so it would report ~25% rather than error. tools/oracle_captions/generate.py produces the caption files with GPT-4o. It dedups by image content -- charxiv_descriptive is 4000 instances over 1000 figures, verified -- and caches on disk keyed by image bytes, so charxiv_reasoning reuses every caption for free. The describer never sees the question, keeping the oracle a bound on perception rather than a second attempt at the benchmark. Co-Authored-By: Claude Opus 5 <[email protected]>
A CHAT request carries its content on LMRequest.messages and leaves .prompt empty.
The text-only generate path read .prompt directly, so every chat-shaped request
tokenized to zero tokens and died inside attention with
cannot reshape tensor of 0 elements into shape [1, 0, -1, 128]
which names a head dimension and reveals nothing about the prompt being empty. This
took out all 900 instances of the text-only MMMU backbone run, and the job still
reported SUCCEEDED with n=0 rather than failing.
Only the multimodal branch had ever handled chat, because until now the only text
models run through this provider were given completion-style prompts. Route the
text path through the same tokenizer chat template VLLMProvider._format_prompt
uses; COMPLETION requests still pass .prompt through untouched.
Co-Authored-By: Claude Opus 5 <[email protected]>
TASK_CONFIG_FIELDS was a hand-maintained frozenset that had drifted from the
dataclass, so a valid override was rejected with
Invalid task override: 'caption_source' is not a TaskConfig or SamplingParams
field. Did you mean to put this after --harness instead of -t?
which points at flag placement rather than at a stale list, and it fails before any
work starts. Four existing fields were already unreachable this way: max_length,
answer_extractor, output_score_aggregation, and sandbox_env.
Enumerate dataclasses.fields(TaskConfig) instead, keeping 'priority' as an explicit
extra since it is extracted upstream for job priority and is not a real field. The
import is lazy and cached because TaskConfig is otherwise only needed here under
TYPE_CHECKING.
Co-Authored-By: Claude Opus 5 <[email protected]>
strip_reasoning existed only on HuggingFaceProvider, so running a reasoning model through vLLM would hand the whole <think> trace to the scorers -- MmmuScorer's clean_prediction splits on the FIRST "Answer:", routinely one the model wrote mid-thought. Move the helper to olmo_eval.inference.reasoning and add the same opt-in kwarg to VLLMProvider. A trace truncated before it emits </think> still passes through unchanged, so the truncation stays visible instead of silently becoming an empty answer. Needed because the HF-provider Thinking evals could not finish: after 6 h they were at 14%/6.5%/24%/1.3% of their four task sets against a 24 h timeout, while holding 20 GPUs. vLLM measured 10.6x on this decode-bound workload. Co-Authored-By: Claude Opus 5 <[email protected]>
vLLM raises for the entire llm.generate call when any single prompt exceeds
limit_mm_per_prompt, so one oversized instance fails its whole chunk. On MMMU-Pro
that cost 128 of 5190 instances: two instances carry 35 images (test_Geography_252),
and each took its 64-item batch down with it -- visible in the log as a batch
'processed' in 0.2s followed by 64 identical failures. The run then reported success
with n=5062.
vLLM's own message ('At most 8 image(s) may be provided in one prompt') names neither
the offending instance nor the setting to change, and the 8 came from this provider's
own default. Check before calling generate and say so, including the memory tradeoff:
vLLM profiles worst-case multimodal memory against the cap, so raising it shrinks the
KV cache.
Co-Authored-By: Claude Opus 5 <[email protected]>
The hybrid Qwen3 releases (Qwen3-8B/14B/32B) reason by default, while the 2507 Instruct refresh does not. Comparing them as a size ladder therefore needs enable_thinking=False to reach apply_chat_template, or size is confounded with reasoning mode. Co-Authored-By: Claude Opus 5 <[email protected]>
Running Qwen3-VL-4B-Instruct through this harness reproduced the Molmo2 paper on AI2D (83.23 vs 84.1) and collapsed everywhere else: VQAv2 6.45 vs 81.7, ChartQA 13.88 vs 84.6, TextVQA 11.15 vs 81.0, MMMU 49.67 vs 67.4. The model was answering correctly and scoring zero. Asked "chart_qa: How many food item is shown in the bar graph?" with no answer-format instruction it replies "There are three bars shown in the chart.", which exact-match against "3" scores 0. AI2D survived precisely because it carries no style tag, has an explicit instruction, and scores letters -- "A. Simple Leaf" still parses to "A". Not a token-budget problem: sweeping MMMU's cap with the prompt untouched moved 49.67 -> 50.11 -> 50.89 -> 52.22 across 12/64/512/2048, so ~2.5 points of ~18. TaskConfig.prompt_style selects the convention. "molmo" (default) is unchanged and stays correct for our own checkpoints, which were SFT'd on these tags. "neutral" drops the tag, appends the standard short-answer instruction, and strips MMMU's <image N> markers -- stray tokens here since images arrive via the chat template (mmmu_pro already resolves them; mmmu never did). Questions that already state how to answer are left alone, so AI2D and RealWorldQA are untouched. :neutral variants registered on the eight tasks the paper reports. Co-Authored-By: Claude Opus 5 <[email protected]>
The neutral prompt style recovered seven of eight tasks to within ~1.9 points of the Molmo2 paper (ChartQA 13.88->84.24, DocVQA 0.00->94.52, VQAv2 6.45->82.25, TextVQA 11.15->82.89, InfoQA 0.00->78.81, RWQA 43.79->72.29, AI2D unchanged at 83.16). MMMU moved -0.11, from 49.67 to 49.56, against a reported 67.4. MMMU is a different kind of problem. Of its 454 errors, 194/900 (22%) never produce a clean answer -- they begin reasoning and truncate -- and among the 706 that do answer cleanly accuracy is 56.94%. Eliminating truncation alone therefore reaches ~57, still ~10 short. It is a reasoning benchmark whose published numbers use CoT, and the direct-answer instruction forbids it; that the model reasons anyway on 22% of items is the tell. prompt_style="cot" strips the direct-answer instruction rather than contradicting it, and asks for a final Answer line -- the same device MMMU-Pro's official prompt uses so a trace stays parseable. Parsing needs care: the shared clean_prediction splits on the FIRST Answer marker, which on a trace scores the model's discarded intermediate guess. extract_cot_answer takes the LAST and is wired through TaskConfig.answer_extractor, so clean_prediction is untouched and no existing Molmo number shifts. A trace truncated before it answers falls through unchanged rather than becoming empty, keeping the truncation visible. Registered as a variant, not a new default: CoT MMMU is not comparable to the existing direct-answer numbers. Co-Authored-By: Claude Opus 5 <[email protected]>
…vider vLLM cannot read OLMo-core DCP (config.json + sharded model_and_optim/*.distcp), so the vLLM image support added earlier only helped external comparison models. This converts a step directory into a released-Molmo2 HF directory, which vLLM does read -- its registry has Molmo2ForConditionalGeneration with a weight mapper. The weight mapping is not reimplemented: it calls OLMo-core's multimodal_lm_state_dict_to_hf, already documented as the inverse of the loader used to read released Molmo2 weights. Model assembly reuses the provider's own path (detect_checkpoint_format -> resolve_tokenizer_path -> build_model_config -> load_checkpoint_weights) rather than a parallel DCP loader. Verified against the DCP checkpoint on 200 chart_qa:test instances: olmo_core on DCP (reference) 72.50 load 243.2s infer 38.8s 5.2 it/s hf on export 72.50 load 23.9s infer 99.0s 2.0 it/s 98.0% text match vllm on export 72.00 load 106.4s infer 16.8s 11.9 it/s 95.5% text match The hf leg reproducing 72.50 exactly is the evidence the conversion is right. vllm differs by one instance of 200, consistent with kernel-level numerical differences under greedy decoding rather than a mapping error. Auxiliary files are copied by excluding only weights/index/images, not by an allowlist. An allowlist was tried and silently dropped three that matter: without video_preprocessor_config.json the processor cannot locate Molmo2VideoProcessor (it is defined in video_processing_molmo2.py, but nothing points there), and added_tokens.json and chat_template.jinja carry the image special tokens and the chat template -- the released repo uses .jinja, not the .json the allowlist globbed. Both eval legs failed at load until this was inverted. --skip-weights repairs aux files without redoing the conversion. Co-Authored-By: Claude Opus 5 <[email protected]>
Independent verification on a real Molmo2-4B checkpointI reproduced the export and parity claims against Everything below ran locally on one A100-80GB. No Beaker jobs were involved, so there are no job IDs to cite. Full repro at the bottom. 1. The export is provably correct (stronger than the PR's own evidence)The description argues correctness from There's a decisive test that needs no GPU and no inference — compare tensors directly:
Two notes from this:
2. Three-way parity: it passeschart_qa validation, full split n=1920, greedy, identical task config, only the provider varies:
Max spread 0.42 pts (8 instances of 1920); all three land within 0.5 pts of mm_olmo's own reference dump. This is the leg the description only covers once (chart_qa, n=200) — it holds at 9.6× that sample size on a real released checkpoint. The bf16 default is a non-issue. vLLM on the bf16 export vs vLLM on the released fp32 weights: identical scores (0.000 on all three metrics), 100% per-instance correctness agreement, 99.79% raw text. vLLM casts to bf16 at load either way, so fp32 storage buys nothing. 3. Two things worth correcting in the write-upThe deltas are one-directional. Both export legs sit below the DCP leg on every metric — not the mixed-sign scatter the HF↔vLLM table reports. Small, but a bias rather than noise. Since dtype is ruled out, the residual is implementation, and the description's "consistent with kernel-level numerics" framing doesn't quite cover it. HF is the least faithful of the three, not vLLM. Raw-text agreement: vLLM agrees with olmo_core more than HF does, despite HF and vLLM reading byte-identical weights, and HF is furthest from the mm_olmo reference on all three metrics. If anything the path this PR adds is more faithful than the existing one — which is a better argument for the PR than the one currently being made. Throughput (same 1920 instances, wall clock end-to-end incl. load): 4. Blockers: the documented verify flow doesn't run
Following that verbatim fails three times. Two are doc gaps; one is a real design gap. (a) (b) Molmo2's crops produce 31,872 mm tokens per item. The "Notes for reviewers" section documents a (c)
The repo now has two incompatible things both called an "OLMo-core export," and the provider only knows about the older one. Suggest either teaching 5. Also worth a look (from reading the diff, not measured)Ranked; happy to open these separately if useful.
Full reproEnvironment. One A100-SXM4-80GB (driver 570.124.06), weka mounted locally. PR head # venv-oc: export + olmo_core_vlm + hf legs
uv sync --frozen --no-group vllm --extra olmo_core --extra hf
uv pip install "ai2-olmo-core[torchao,transformers] @ git+https://github.com/allenai/OLMo-core.git@vision"
# -> ai2-olmo-core 2.5.0 (commit 8018f472), torch 2.10.0+cu128, torchao 0.15.0, transformers 5.7.0
# NB: the pinned release ai2-olmo-core==2.4.0 has NO olmo_core.nn.vision, so the vision
# branch override is required for any multimodal checkpoint.
# venv-vllm: vllm leg
uv sync --frozen --extra vllm --extra hf
# -> vllm 0.19.1, torch 2.10.0+cu128, transformers 5.7.0Export (~10 min, CPU-bound, ~27 GB RSS): python tools/olmo_core_to_hf/export.py \
--checkpoint /weka/oe-training-default/mm-olmo/released-models-molmo2-1225/Molmo2-4B/step2000 \
--out <out>/export-molmo2-4b \
--reference allenai/Molmo2-4B # required: mm_olmo config.yaml has no model_idTensor check — load both state dicts, compare The four eval legs. Note DCP=/weka/oe-training-default/mm-olmo/released-models-molmo2-1225/Molmo2-4B/step2000
EXP=<out>/export-molmo2-4b
REF=~/.cache/huggingface/hub/models--allenai--Molmo2-4B/snapshots/042abfa7a38879a376cec03d949eff0aefaa0600
# 1. olmo_core on DCP 12m37s
olmo-eval run --harness default -o provider.kind=olmo_core_vlm \
-m "$DCP" -t chart_qa --no-save-requests
# 2. hf on export 47m43s
olmo-eval run --harness default -o provider.kind=hf \
-o provider.trust_remote_code=true -o provider.multimodal=true \
-m "$EXP" -t chart_qa --no-save-requests
# 3. vllm on export 6m50s
olmo-eval run --harness default -o provider.kind=vllm \
-o provider.trust_remote_code=true -o provider.max_num_batched_tokens=32768 \
-m "$EXP" -t chart_qa --no-save-requests
# 4. vllm on released fp32 (dtype control) ~7m
olmo-eval run --harness default -o provider.kind=vllm \
-o provider.trust_remote_code=true -o provider.max_num_batched_tokens=32768 \
-m "$REF" -t chart_qa --no-save-requests
Agreement was computed from the per-instance Reviewed and reproduced with Claude Code. Raw metrics/predictions for all four legs are on the box I ran this on — say the word and I'll attach the JSON. |
From jason718's independent reproduction on a released Molmo2-4B checkpoint. Two of these are the failure mode this PR is otherwise careful about -- a wrong result with no signal that anything went wrong. HuggingFaceProvider could not load this PR's own export. Multimodal detection went through is_olmo_core_hf_export, which recognises the *legacy* consolidated layout (olmo_core_config.json + OLMo-core key names). tools/olmo_core_to_hf writes a genuine HF directory, so detection returned False, the provider fell through to _init_text, and died with "Unrecognized configuration class Molmo2Config ... AutoModelForCausalLM" -- naming neither the cause nor the flag that would have fixed it. looks_multimodal_hf() now detects any image-text-to-text checkpoint from its config, which also removes the need to pass multimodal=true for allenai/Molmo2-4B and Qwen3-VL. `multimodal` becomes tri-state so an explicit False still forces the text path; with bool=False that was indistinguishable from unset. A dotted `-o sampling_params.max_tokens=N` rebuilt SamplingParams from the override keys alone, dropping every unspecified field -- on humaneval, all ten stop_sequences, silently. The runner now routes dotted sampling_params into sampling_overrides, which preparation.py applies with replace(), a merge. The coercion in base.py merges too, as defence for other callers. image_mode/prompt_style were honoured by ImageQATask only. mmmu_pro called resolve_image_mode but not render_question; pointing_base and multi_image_base called neither, so `-o image_mode=none -t blink` ran the full image benchmark and reported it as a text-only ablation. mmmu_pro is now wired; the other two raise rather than pretend. Also: the max_images guard reads the effective limit_mm_per_prompt instead of the constructor default, so an explicit lower limit no longer makes it permissive in exactly the case it exists for; mmmu:cot sets the max_tokens=2048 its own comment prescribed, having inherited the base task's 12 and truncated before the required "Answer:" line; and to_dict() serializes the prompt/ablation fields -- including prompt_templates and system_prompt_style, which predate this PR -- so an ablation run no longer serializes identically to the real benchmark run. export.py gains --verify, which compares against the reference tensor by tensor with no GPU and no inference. On an unmodified checkpoint that proves the conversion bitwise, strictly stronger than comparing eval scores, where matching numbers can hide compensating differences. On our fine-tuned v9 it reports 706/706 present, 0 missing, 0 extra, 0 shape mismatches, with values differing as expected. Also records torch_dtype in the output config, documents that --reference is required for released mm_olmo checkpoints (their config.yaml has no model_id), and notes mm_olmo_dcp alongside olmo_core_dcp. 1032 passed, 10 skipped across tests/providers, tests/cli and tests/evals/tasks. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Thanks — this is a much better verification than the PR had, and two of the diff findings are The bitwise check is now
|
The first attempt at multimodal auto-detection did not work on the artifact it was written for. It looked for a `vision_config` attribute or an architecture in transformers' image-text-to-text mapping; Molmo2 has neither. It names its vision tower `vit_config`, and `Molmo2ForConditionalGeneration` is remote code, so it is absent from the built-in mapping. The end-to-end run failed with the same "Unrecognized configuration class Molmo2Config" as before the fix. The unit tests passed throughout, because they asserted against a hand-built config carrying `vision_config` -- they encoded the assumption rather than the artifact. Check `auto_map` for AutoModelForImageTextToText first: a remote-code repo declares the head it loads with, and that is the only one of the three signals that identifies Molmo2. Also accept `vit_config` / `vision_tower_config` alongside `vision_config`. Verified against the real configs on disk: v9 export (Molmo2, remote code) True, Qwen3-VL-4B-Instruct (built-in mapping) True, Qwen3-4B (text only) False. End to end, `provider.kind=hf` on the export with no multimodal flag now logs the detection and scores 0.7250 on 200 chart_qa:test -- identical to the olmo_core DCP reference. Tests now use the real Molmo2 config shape. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Ran the two experiments I owed you. One confirms your finding's cause; the other caught that Your one-directional deltas are precision, not implementationFull
The fp32 leg reproduces your 0.8375 exactly. Dropping it to bf16 moves it into the export So the export legs aren't systematically worse: the DCP leg was systematically better, My fix for (c) was wrong, and your repro is what would have caught itThe end-to-end run failed with the same error as before the fix. My unit tests passed the whole time, because they asserted against a hand-built config The authoritative signal was in the config all along: "auto_map": {
"AutoConfig": "configuration_molmo2.Molmo2Config",
"AutoModelForImageTextToText": "modeling_molmo2.Molmo2ForConditionalGeneration"
}A remote-code repo declares the head it loads with. Detection now checks End to end, with no 0.7250 — identical to the Both in |
OLMo-core moved MultimodalLM's vision encoder and connector under a `vision_backbone.` submodule (PR #834, J-2). Back-compat used to be a state_dict()/load_state_dict() override pair on the model, which was unsound: optimizer FQNs come from named_parameters() and were never rewritten, so one checkpoint carried two key spaces. Measured on the real v9 step30000 DCP: 414 model keys under legacy `vision.*` / `connector.*` beside 6624 optimizer keys under `vision_backbone.*`. Those overrides are gone, so back-compat has to happen at the checkpoint layer. Two of the three paths in load_checkpoint_weights broke: olmo_core_dcp -- the primary path for evaluating real training checkpoints -- now passes key_mapping=model.legacy_vision_key_mapping(). Unconditional and needs no format sniffing: swap_param_keys skips any entry whose checkpoint-side key is absent from the checkpoint metadata, so post-rename checkpoints are untouched. Verified against the real metadata: all 414 mapping entries fire on the legacy checkpoint, 0 fire on a post-rename one. Guarded with hasattr since the helper only exists on MultimodalLM. olmo_core_unsharded now normalizes with canonicalize_vision_keys before a strict load_state_dict. These artifacts come from OLMo-core's scripts/unshard.py, which is key-agnostic, so older exports carry `vision.*` and newer ones `vision_backbone.*` and both have to load. The helper is idempotent, so post-rename exports pass through. The mm_olmo path already returns canonical keys via molmo2_hf_state_dict_to_multimodal_lm and is unchanged. Prefix logic is imported from OLMo-core rather than reimplemented, via the module path (olmo_core.nn.vision.molmo2_loader) to match the existing molmo2_loader imports in this file; the package re-export is a follow-up. Verified end to end on the real v9 step30000 checkpoint, CPU. Both broken paths fail *loudly* rather than silently, so the cost is that every eval of a pre-rename checkpoint stops working, not that it reports a wrong number: without the fix the DCP load raises `RuntimeError: Missing key in checkpoint state_dict: model.vision_backbone.vision.positional_embedding` (measured, same checkpoint). With it the load completes strictly and the ViT moves off random init (|w| 0.023 -> 0.267), confirming the vision subtree was populated rather than merely not raising. Both unsharded layouts were then round-tripped through path 2 with those same real 4B weights, 414 keys each way. (The silent variant of this bug lives in OLMo-core, where three sites load converter output with strict=False; that is handled there, not here.) New tests are synthetic (fake models, tiny safetensors) so they run on CPU with no weka reads; confirmed they bite by reverting the two bodies -- 4 of 7 fail pre-fix. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Re-verified at I withdraw #3 — and I can tell you why your six runs are correctYour six runs are right and my finding was wrong. In vLLM 0.19.1, # Init multimodal config if needed
if self._model_info.supports_multimodal:
...
mm_config_kwargs = dict(..., limit_per_prompt=limit_mm_per_prompt, ...)For So there's nothing to guard against on the text-only side, and no conditional is needed. Sorry for the noise — I verified the injection was unconditional and then took the consequence on trust instead of checking it. The memory-profiling half is real but you've already handled it: for a multimodal model on a text-only workload the cap does feed worst-case profiling, and Your dtype experiment settles the one-directional deltas — my control was blind to itAgreed, and the experiment is convincing. Your You're also right about why my control couldn't see it: I varied storage precision and vLLM normalizes that at load, so both arms of my control were bf16 compute. The axis that mattered was fp32 master weights + bf16 autocast vs pure bf16, which only the Verified fixed at
|
| # | check | result |
|---|---|---|
| (c) | looks_multimodal_hf on real configs |
export True, allenai/Molmo2-4B True, Qwen3-0.6B / SmolLM2-135M / tiny-Llama False |
| #1 | -o sampling_params.max_tokens=64 -t gsm8k, mock, end-to-end |
max_tokens=64 and stop_sequences=['Question:', '\n\n'] survive |
| #2 | mmmu:cot |
max_tokens=2048 |
| #5 | render_question call sites |
mmmu_pro.py:191 + image_qa_base.py:315; pointing/multi-image reject_unsupported_prompt_knobs |
| #6 | to_dict() |
all five fields serialized |
| #7 | ruff format --check / ruff check |
clean, 523 files |
Using auto_map as the authoritative signal is the right call — it's the model declaring its own head rather than us pattern-matching config shapes.
New: the tip doesn't build against any published OLMo-core
f5daedf imports two symbols that do not exist in the OLMo-core vision branch:
tests/providers/test_olmo_core_vision_key_compat.py 3 failed, 2123 passed, 9 skipped
E ImportError: cannot import name 'canonicalize_vision_keys'
from 'olmo_core.nn.vision.molmo2_loader'
src/olmo_eval/inference/providers/olmo_core_vlm_utils.py:498
I checked two commits — 8018f472 (branch tip on Sep 6) and 2dad929a (tip today) — and canonicalize_vision_keys and legacy_vision_key_mapping are absent from both. grep -rn over the installed package finds neither. So this isn't a stale venv; the OLMo-core side looks unpushed.
The two call sites fail differently, which is worth fixing even after the dependency lands:
olmo_core_unsharded(line 498) — barefrom ... import canonicalize_vision_keys, so hardImportError. That path is currently unusable.olmo_core_dcp(line 488) — guarded byhasattr(model, "legacy_vision_key_mapping"), so it degrades tokey_mapping=None. No crash, but the legacy-vision remap the commit advertises is silently inert on every published OLMo-core — a legacyvision.*DCP checkpoint still fails to load, just without saying why.mm_olmo_dcp— unaffected (falls through to_load_mm_olmo_state_dict), which is why my four legs still reproduce.
Suggest making both sites consistent: either both hard-fail with a message naming the required OLMo-core commit, or both degrade with a warning. Right now the same commit does one of each. And since pyproject.toml pins ai2-olmo-core==2.4.0 — which has no olmo_core.nn.vision at all — there's nowhere recording which OLMo-core a multimodal run actually needs. A pin or a runtime version check with a real message would save the next person the hour I just spent.
Still open (small): base.py merge doesn't merge
The runner fix is correct and is the path that matters. The base.py defence layer, though, merges onto the wrong target:
base_params = type(self).__dict__.get("sampling_params")type(self) is TaskConfig itself, not the task class, and TaskConfig.__dict__["sampling_params"] is None (the dataclass field default). So base_params falls back to bare SamplingParams() and task-specific fields are still dropped:
gsm8k: cfg.sampling_params.stop_sequences = ('Question:', '\n\n')
dataclasses.replace(cfg, sampling_params={'max_tokens': 64})
-> max_tokens=64, stop_sequences=None
That's the same bug in a new shape, and dataclasses.replace on a built config is exactly how variants and prepare_task_items go. The original SamplingParams is already gone by the time __post_init__ runs, so a merge can't be done there at all — I'd drop the merge and keep __post_init__ as pure validation (reject unknown keys, raise on a dict that reached it), leaving the runner as the single place that merges.
Where the residual disagreements concentrate
Ran the analysis you wanted before shipping the files — short answer, they don't concentrate anywhere interesting.
93 of 1920 instances (4.8%) have at least one leg disagreeing on raw text.
| cut | disagreements | baseline |
|---|---|---|
| human subset | 45/960 = 4.7% | — |
| augmented subset | 48/960 = 5.0% | — |
| numeric gold | 78/93 = 84% | 75% of all instances |
| mean output length | 5.2 chars | 5.1 chars overall |
- Not subset-dependent — human and augmented are within 0.3 pts of each other.
- Mildly enriched in numeric golds (84% vs 75%), consistent with
relaxed_correctness's 5% numeric tolerance flipping near-boundary values. - Not a truncation artifact: mean output length on disagreements is identical to overall (5.2 vs 5.1 chars). Different from the MMMU-Pro pattern in the description, where every mismatch had a truncated side — chart_qa answers are far too short to hit the 12-token cap.
- Only 30 of the 93 text disagreements (32%) changed the score; normalization absorbs the other two-thirds.
So the residual is diffuse per-instance numeric jitter, which is what the dtype story predicts.
Files
Per-instance predictions and metrics for all four legs, plus the two tensor-comparison scripts:
/weka/oe-training-default/jasonr/pr347-verification/
chart_qa_val_{oc,hf,vllm,vllm_released}.jsonl # 1920 rows each, native_id keyed
metrics_{oc,hf,vllm,vllm_released}.json
cmp_tensors.py # name/shape/value diff vs a reference repo
cmp_bf16.py # the bitwise `export == reference.to(bfloat16)` check
Left on weka rather than attached here since this repo is public. Say the word if you'd rather have them as a gist.
Re-verified with Claude Code on the same A100; mm_olmo_dcp legs unchanged from the previous comment, so those numbers stand as posted.
jason718
left a comment
There was a problem hiding this comment.
Re-reviewed at f5daedf. Most of the round-1 findings are genuinely fixed and I've verified them against real artifacts rather than fixtures — looks_multimodal_hf on real configs, the sampling_params runner fix end-to-end on gsm8k, mmmu:cot at 2048, to_dict() serializing all five fields, lint clean. The auto_map approach is the right call.
Requesting changes for one reason: the branch tip doesn't build against any published OLMo-core. canonicalize_vision_keys and legacy_vision_key_mapping exist in neither 8018f472 nor today's tip 2dad929a, so pytest is 3 red on a clean checkout and the olmo_core_unsharded path raises ImportError. That's a hard blocker until the OLMo-core side is pushed and the dependency is recorded somewhere — pyproject.toml currently pins ai2-olmo-core==2.4.0, which has no olmo_core.nn.vision at all.
Three smaller inline comments alongside it: the hasattr guard that makes the DCP remap silently inert, the base.py merge that doesn't merge, and the except Exception that swallows the missing-trust_remote_code case back into the old confusing error.
Also, to restate from the thread so it isn't lost: I withdraw the limit_mm_per_prompt finding entirely — your six runs are right, vLLM 0.19.1 discards the kwarg for non-multimodal models (vllm/config/model.py:615), and no guard is needed. And your dtype experiment settles the one-directional deltas; my storage-dtype control couldn't see compute precision. Both corrections are in the thread with detail.
Nothing here touches the parity result — the four verification legs run through mm_olmo_dcp, which takes neither of the broken paths, so those numbers stand.
| return | ||
|
|
||
| if info.format == "olmo_core_unsharded": | ||
| from olmo_core.nn.vision.molmo2_loader import canonicalize_vision_keys |
There was a problem hiding this comment.
Blocker: this symbol does not exist in any published OLMo-core.
canonicalize_vision_keys is absent from the vision branch at both 8018f472 (tip on Sep 6) and 2dad929a (tip today); grep -rn over the installed package finds neither it nor legacy_vision_key_mapping. I reinstalled from the current tip specifically to rule out a stale venv. The OLMo-core side looks unpushed.
Effect on a clean checkout:
tests/providers/test_olmo_core_vision_key_compat.py 3 failed, 2123 passed, 9 skipped
E ImportError: cannot import name 'canonicalize_vision_keys'
from 'olmo_core.nn.vision.molmo2_loader'
src/olmo_eval/inference/providers/olmo_core_vlm_utils.py:498
Because this is a bare module-level-style import inside the branch, the whole olmo_core_unsharded path is unusable rather than degraded — contrast the olmo_core_dcp path a few lines up, which is hasattr-guarded.
Two asks:
- Push the OLMo-core change (or point at the branch/commit that has it).
- Record the requirement somewhere.
pyproject.tomlpinsai2-olmo-core==2.4.0, which has noolmo_core.nn.visionat all, so nothing in the repo says which OLMo-core a multimodal run needs. A pin, an extra, or a runtime check that names the required commit would have saved me an hour of bisecting my own environment.
| # checkpoint metadata, so a post-rename checkpoint is untouched. | ||
| key_mapping = ( | ||
| model.legacy_vision_key_mapping() | ||
| if hasattr(model, "legacy_vision_key_mapping") |
There was a problem hiding this comment.
This guard makes the remap silently inert on every published OLMo-core.
legacy_vision_key_mapping doesn't exist in OLMo-core vision at 8018f472 or 2dad929a (same missing-dependency problem as line 498). So hasattr is always False today, key_mapping is always None, and the legacy-vision remap this commit advertises never runs. A legacy vision.* DCP checkpoint still fails to load — just without any indication why.
The inconsistency is the part worth fixing: the same commit hard-fails on the unsharded path and silently no-ops on the DCP path. Pick one. Given the commit message is "Accept both vision key layouts", I'd make both fail loudly and name the OLMo-core commit required — a silent no-op on a compatibility shim is the failure mode this PR is otherwise good at closing.
(For what it's worth, mm_olmo_dcp takes neither branch, which is why my four verification legs still reproduce on the released Molmo2-4B.)
| # override keys: `SamplingParams(**overrides)` would drop every field the caller | ||
| # did not mention, e.g. humaneval's stop_sequences. The runner now routes dotted | ||
| # overrides through sampling_overrides, so this is defence for other callers. | ||
| base_params = type(self).__dict__.get("sampling_params") |
There was a problem hiding this comment.
This merges onto the wrong target, so it still drops task-specific fields.
type(self) is TaskConfig, not the task class, and TaskConfig.__dict__["sampling_params"] is None — so base_params always falls through to a bare SamplingParams() and the merge is a no-op against anything the task declared. Verified at f5daedf:
gsm8k: cfg.sampling_params.stop_sequences = ('Question:', '\n\n')
dataclasses.replace(cfg, sampling_params={'max_tokens': 64})
-> max_tokens=64, stop_sequences=None
Same bug as before, new shape — and dataclasses.replace on a built config is exactly how variants and prepare_task_items go.
I don't think this is fixable here: by the time __post_init__ runs, the original SamplingParams has already been replaced by the dict, so there's nothing to merge against. Suggest deleting the merge and leaving __post_init__ as pure validation (reject unknown keys, raise if a dict reaches it at all), with the runner as the single place that merges. The runner fix itself is correct — I confirmed end-to-end that -o sampling_params.max_tokens=64 -t gsm8k keeps stop_sequences, so the actual CLI path is fine.
| } | ||
| try: | ||
| config = AutoConfig.from_pretrained(model_name, **config_kwargs) | ||
| except Exception: |
There was a problem hiding this comment.
This swallows the one failure mode most likely to hit Molmo2.
AutoConfig.from_pretrained on a remote-code repo raises unless trust_remote_code=True is passed. When a caller hasn't passed it, this except returns False, the provider takes the text path, and you get back exactly the error this function was written to eliminate:
Unrecognized configuration class Molmo2Config ... AutoModelForCausalLM
Worse, on the way there transformers writes an interactive prompt to stdout:
Do you wish to run the custom code? [y/N]
In a Beaker worker with no stdin that's at best noise in the log and at worst a hang.
Measured at f5daedf against real configs on disk:
| model | trust_remote_code |
result |
|---|---|---|
| PR-347 export (Molmo2) | True |
True |
| PR-347 export (Molmo2) | (unset) | False + interactive prompt |
allenai/Molmo2-4B |
True |
True |
| Qwen3-0.6B / SmolLM2-135M / tiny-Llama | either | False |
So the detection logic is right — auto_map is the correct authoritative signal and I'd keep it. It's only the no-flag path that regresses to the old confusing error. Suggest catching the remote-code case specifically and raising something that names trust_remote_code, rather than folding it into a blanket return False.
300c628 to
5260361
Compare
All three let a misconfiguration through as a plausible-looking result rather than an error, which is the failure mode this branch is otherwise built to close. `load_checkpoint_weights` guarded the vision-key remap with `hasattr`, so on an OLMo-core predating the `vision_backbone` rename the remap was silently inert: a legacy `vision.*` checkpoint loaded with an empty vision tower and scored at chance with nothing logged. The same function hard-failed on the unsharded path with a bare ImportError naming only a symbol. Both now raise and name the OLMo-core that supplies the helpers (allenai/Olmo-core#834), since the helper and the rename it compensates for ship in the same change -- its absence means the install is too old, not that back-compat is unnecessary. `TaskConfig.__post_init__` merged dotted `sampling_params` overrides onto `type(self).__dict__["sampling_params"]`, which resolves to TaskConfig's `None` default rather than the task's own value. The merge therefore always rebuilt from a bare SamplingParams and dropped every field the override omitted -- gsm8k's and humaneval's `stop_sequences` among them. There is nothing to merge against by the time `__post_init__` runs, so it is now validation only; the runner remains the single place that merges. `looks_multimodal_hf` swallowed every config-read failure, including transformers refusing to run a repo's custom code. A Molmo2 checkpoint without `trust_remote_code` then took the text path and died with `Unrecognized configuration class Molmo2Config ... AutoModelForCausalLM` -- the error this function exists to prevent. That case is now re-raised naming the flag, and `trust_remote_code` is pinned False when unset so the `[y/N]` stdin prompt cannot hang a Beaker worker with no stdin. Tests for the OLMo-core-dependent paths now skip rather than fail when the installed OLMo-core lacks the helpers, with the required branch named in the skip reason: `pyproject.toml` pins an ai2-olmo-core release with no olmo_core.nn.vision at all, so those cases were red on a clean checkout for reasons unrelated to the code under test. Co-Authored-By: Claude Opus 5 <[email protected]>
|
Thanks — and thank you for the two withdrawals. The The blocker: right diagnosis, wrong refThe symbols aren't unpushed — they're on allenai/OLMo-core#834, head
That's entirely my fault for not naming the branch in the PR description — "an hour of bisecting my own environment" is exactly the cost of that omission. But the substance of the finding stands, so I've fixed it rather than just pointing at the branch. A reviewer shouldn't have to know which of my open PRs to correlate, and Three fixes pushed (
|
The descriptive task ignored cot_cue (only reasoning applied it) and had no way to run a single question template. Both are needed to separate perception failure from elicitation failure on template 17 (total labeled ticks), which is the worst template at 29.91% and carries 3.65 of the ~16 points of remaining descriptive headroom. charxiv_templates restricts a run to a comma-separated set of descriptive template ids, so a t17 probe costs 224 instances instead of 4000. Both defaults are None, so the published prompt and the 4000-instance run are byte-identical when unset. Co-Authored-By: Claude Opus 5 <[email protected]>
The CLI override parser type-coerces, so `-o charxiv_templates=17` arrives as int 17 and
`.split(",")` raised "'int' object has no attribute 'split'", failing the task during
preparation. Both t17 probe jobs died this way.
Co-Authored-By: Claude Opus 5 <[email protected]>
CharXiv can only resolve two of the four capabilities this targets -- template 16 (trend) is n=36 with a 16.4pp 2-sigma band, and the dense-OCR templates already sit at 78-94%. So CharXiv is the transfer target and this is the instrument that can see whether a capability was learned at all. Ground truth comes from the generating FigureSpec, so scoring is exact match / numeric tolerance / multiset, with no judge: CharXiv's n_invalid failure mode (a rate-limited judge still exits 0 and still reports a plausible score) cannot occur here. chartgym_heldout_primitive is the headline metric. Nothing about panel layout is ever trained, so it measures transfer to a question shape the corpus never taught; overall accuracy is a fit statistic. :text_only is the leak floor. Co-Authored-By: Claude Opus 5 <[email protected]>
The n=20 smoke showed the checkpoint answering in prose and being cut off mid-sentence before stating the answer, e.g. gold 4 vs 'The legend box in the top right corner of the graph ' -- scored 0 for verbosity, not for error. Co-Authored-By: Claude Opus 5 <[email protected]>
…rXiv prompt A cued ChartGym number is a measured ceiling on what the checkpoint's existing perception supports, which is the training target once the deficit is known to be behavioural rather than perceptual. Co-Authored-By: Claude Opus 5 <[email protected]>
A procedure-supervised model answers counting questions with an enumeration ending in the total, so the first number in the response is the first tick label, not the answer. Bare answers are unaffected (first == last). Co-Authored-By: Claude Fable 5 <[email protected]>
Description
Teaches the inline
VLLMProviderto send images, adds an exporter so it can read our ownOLMo-core checkpoints, and adds prompt-convention knobs (
prompt_style,image_mode)needed to evaluate non-Molmo models and to attribute error between perception and
knowledge.
Measured throughput on one 80 GB card:
chart_qa, cap 64 tok)charxiv_reasoning, 1024 tok)Those rows are Qwen3-VL-4B. On Molmo2-4B the HF provider is materially slower —
@jason718 measured ~0.64 req/s over full
chart_qa(n=1920), where end-to-end wall clockwas vLLM 6m50s,
olmo_core12m37s, HF 47m43s, i.e. vLLM 7.0× HF and 1.85×olmo_core.Read the HF column as model-dependent.
The gain tracks how much the task actually decodes;
max_tokensis a ceiling, not atarget, so short-answer suites show much less of it. Note
olmo_coreis not the slowpath — it batches, and beats the HF provider, whose
_generate_multimodalis structurallybatch-size 1.
Full batch-size / memory sweep (15 cells) and methodology
Setup. One GPU, Molmo2-4B architecture throughout, 200
chart_qa:testinstances,identical crop budget, greedy.
olmo_corereads the v9 DCP checkpoint and the other tworead
allenai/Molmo2-4B— same architecture, different weights, which is immaterial forthroughput since speed depends on shape rather than weight values. Peak GPU memory sampled
every 2 s per cell.
Two venvs are required (
ai2-olmo-coreand vLLM fight over the torch pin), so a 16th cellre-runs the identical HF config in the other venv as a control: 2.0 vs 2.1 it/s, i.e. the
environment is not a confound.
max_num_seqs=256max_num_seqs=64max_num_seqs=8batch_size=32batch_size=8batch_size=1Findings.
It is the only option when VRAM is tight; it has no batch-size knob to trade.
olmo_corescaling stops paying atbatch_size=8. 1→8 buys +51% throughput for+5 GB; 8→32 buys +4% for +21 GB. Use 8–16.
max_num_seqsbecause it pre-allocates the KV cache fromgpu_memory_utilization(0.8). The footprint is a choice, not a consequence of thebatch setting — and it is why vLLM is OOM-killed at engine init on 48 GB cards (L40S,
A6000) with no traceback, surfacing only as
Expected 1 inference worker(s) to initialize ... got 0.chart_qaanswers areshort, so generation stops well before either cap. This matrix therefore measures the
prefill-bound regime only; the long-decode row in the summary table comes from a
separate
charxiv_reasoningrun at 1024 tokens, where per-instance throughput is 0.8 vs3.8 it/s (output-token rate ~32 vs ~220 tok/s, but vLLM generated more tokens per batch,
so 4.8× items/sec is the honest wall-clock figure).
olmo_corespends 243–264 s reconstituting 100+.distcpshardsversus 106–130 s for vLLM reading one safetensors file. At eval scale this amortizes, so
the inference ratio is what matters.
1. Images in
VLLMProvider_format_promptreturns vLLM's dict form —{"prompt": ..., "multi_modal_data": {"image": [...]}}— when a request carries images, rendering placeholders through the tokenizer chattemplate. No
AutoProcessorneeded: the tokenizer-level template emits the sameplaceholders as the processor-level one (verified on Qwen3-VL) and vLLM expands them. The
message shape matches
HuggingFaceProvider._build_chat_messagesandOlmoCoreVlmProvider._chat_textso scores stay comparable across providers.New kwargs:
max_images(raiseslimit_mm_per_promptoff vLLM's default of 1),strip_reasoning,chat_template_kwargs.Three paths now fail loudly rather than silently dropping images or traces:
add_bos_token=False+ images — the pre-tokenized path cannot carrymulti_modal_data.logprobs()+ images — scores raw token sequences with nowhere to attach them.max_images— vLLM raises for the entiregeneratecall, so oneoversized prompt fails its whole chunk. Two MMMU-Pro instances carry 35 images and cost
128 of 5190 before this check.
2. Running our own checkpoints through vLLM
tools/olmo_core_to_hf/export.pyconverts an OLMo-core DCP step directory into areleased-Molmo2 HF directory; vLLM 0.19.1 registers
Molmo2ForConditionalGeneration, sothe export loads directly. The weight mapping is not reimplemented — it calls OLMo-core's
multimodal_lm_state_dict_to_hf, already documented as the inverse of the loader used toread released Molmo2 weights — and model assembly reuses the provider's own path.
Verified on 200
chart_qa:testinstances:olmo_coreon DCP (reference)hfon exportvllmon exportIndependently reproduced by @jason718 on the released
Molmo2-4B/step2000at fullchart_qa(n=1920), with a stronger proof than a score comparison: the export is bitwiseequal to
allenai/Molmo2-4Bcast to bf16, 706/706 tensors.--verifynow does that check(no GPU, no inference). Matching eval scores are weaker than they look — 72.50 vs 72.50 at
98% text agreement means some outputs differed and netted to zero on a lossy metric.
His n=1920 run also shows vLLM is the more faithful of the two export paths, not the
riskier one: raw-text agreement with the
olmo_coreDCP leg is 97.14% for vLLM against96.30% for HF, despite HF and vLLM reading byte-identical weights, and HF lands furthest
from mm_olmo's own reference dump on all three metrics.
One caveat on his numbers: both export legs sit below the DCP leg on every metric — a
consistent direction, not scatter. A likely cause is precision rather than implementation:
the
olmo_coreleg runsdtype=float32withautocast_dtype=bfloat16(fp32 master weights,bf16 compute) while both export legs are pure bf16. His fp32-vs-bf16 control cannot see this,
since vLLM casts to bf16 at load either way. Testable with one
olmo_corerun atdtype=bfloat16.3.
prompt_style: our defaults are mm_olmo's SFT conventionQwen3-VL-4B-Instruct through this harness versus its published numbers:
molmo(default):neutralAsked
chart_qa: How many food item is shown in the bar graph?with no answer-formatinstruction, the model replies "There are three bars shown in the chart.", which exact-match
against "3" scores 0. AI2D was always fine because it carries no style tag, has an explicit
instruction, and scores letters. Not a budget problem: sweeping MMMU's cap with the
prompt untouched moved 49.67 → 50.11 → 50.89 → 52.22 at 12/64/512/2048.
prompt_style="neutral"drops the tag, appends the standard short-answer instruction, andstrips MMMU's
<image N>markers (stray tokens here, since images arrive via the chattemplate;
mmmu_proalready resolves them,mmmunever did). The default staysmolmo— our checkpoints were SFT'd on those tags and need them.
prompt_style="cot"+mmmu:cothandles MMMU, which is a reasoning benchmark: it permitsreasoning and requires a final
Answer:line, paired withextract_cot_answer, which readsthe last marker (shared
clean_predictiontakes the first, which on a trace scores adiscarded intermediate guess). Wired via
TaskConfig.answer_extractor, soclean_predictionis untouched and no existing Molmo number shifts. MMMU goes49.56 → 57.89 (2048 tok) → 60.11 (8192 tok).
4.
image_mode: perception vs knowledge attributionTaskConfig.image_mode=real|none|caption(+caption_source), read byImageQATask.format_requestandMmmuProTask.format_request.tools/oracle_captions/generates GPT-4o captions, deduped by image content (
charxiv_descriptiveis 4000instances over 1000 figures;
charxiv_reasoningreuses all 1000 from cache for zero APIcalls).
Three ways this could report a meaningless number instead of failing, all guarded: a
missing caption must not fall back to text-only; an unknown mode must not be treated as
real; andmmmu_pro's vision setting refuses imageless modes, because its question isrendered into the screenshot and the official parser falls back to a seeded random choice
— it would report ~25% rather than error.
5. Bugs found along the way
HuggingFaceProvidernever applied the chat template on its text-only path. It readrequest.prompt, but a CHAT request carriesmessagesand leavespromptempty. Zerotokens →
cannot reshape tensor of 0 elements into shape [1, 0, -1, 128], and the jobreported SUCCEEDED with n=0.
TASK_CONFIG_FIELDSwas a hardcoded allowlist drifted from the dataclass, rejectingvalid
-ooverrides with a message about flag placement. Four fields were alreadyunreachable:
max_length,answer_extractor,output_score_aggregation,sandbox_env.Now derived from
dataclasses.fields(TaskConfig).strip_reasoningmoved toolmo_eval.inference.reasoningso both providers share it, andrunners/io/builders.pypersistsmetadata["reasoning"]so traces survive for erroranalysis.
Type of Change
Testing
pytest tests/ --ignore=tests/integration/)152 tests pass across
tests/providers/,tests/cli/test_utils.pyand the newtests/evals/tasks/test_image_mode_ablations.py. The vLLM image tests use the existingFakeLLM/FakeTokenizermonkeypatch pattern, so they need no vLLM install.HF-vs-vLLM score parity, the gate that matters. Full sweep, 500 instances per task,
both providers in the same venv, identical prompt style and token budget, differing only in
provider.kind(Qwen3-VL-4B-Instruct):mean |Δ| = 0.29, max 0.69, signs mixed (4 negative, 3 positive, 1 zero; mean signed Δ
−0.05) — the signature of kernel-level numerical noise rather than a systematic difference.
The magnitudes match what the disagreement rate predicts: ~96% text agreement means ~20
instances differ, and coin-flip resolution of those moves the score 0–0.7 points. MMMU has
the lowest agreement (87%), as expected for the task with the longest generations.
Earlier point checks agree: MMMU on 900 instances gave 49.67 for both providers exactly, and
MMMU-Pro on 64 gave 27.92 for both. The Molmo2 export's ChartQA −0.50 (72.50 vs 72.00) sits
inside this distribution.
On the 64-instance MMMU-Pro subset raw text agreement is 45/64, which is benign: zero
mismatches occur where both providers produced a clean letter, and both ramble on exactly
27/64. Every mismatch has at least one side truncated by that task's 64-token cap, after
which the official parser scrapes a letter out of partial reasoning.
Notes for reviewers
uv syncneeds--extra vllmexplicitly. Thevllmextra is in aconflictssetwith
openhands, so uv resolves a fork that drops it even though thevllmgroup is indefault-groups— which is why.venvreportsvLLM NOT INSTALLED.-o provider.max_model_len=8192(or more): it declaresmax_position_embeddings=262144, and vLLM sizes its KV cache to that, demanding 36 GiB.High-resolution document images also exceed 8192 visual tokens, so document tasks want
32768 — which then requires an 80 GB card.
-o provider.trust_remote_code=true(it ships remote code; the default
Falsecrasheshfandvllmat worker init) and, forvLLM,
-o provider.max_num_batched_tokens=32768— Molmo2's crops emit 31,872 mm tokens peritem against vLLM's 8192 default, giving
Chunked MM input disabled but max_tokens_per_mm_item (31872) is larger than max_num_batched_tokens (8192).--referenceis required when exporting a released mm_olmo checkpoint: theirconfig.yamlcarries nomodel_idfor the exporter to default from.ai2-olmo-coreinto a vLLM env; they fight over the torch pin. Note thepinned
ai2-olmo-core==2.4.0has noolmo_core.nn.vision, so multimodal work needs thevision branch.
doc_qa:testandinfo_qa:testare unlabelled (labels live on the RRC server) andscore 0.00 for any model while reporting success. Use the
valdefaults.visionbut notorigin/vision(91f9f78SplitVocabEmbeddingfull_weight(),aa6e370OPENAI_API_KEYstrip). Happy to rebase them out if they should land separately.
Checklist