Skip to content

Fail loudly on two silent multimodal eval faults - #337

Merged
jason718 merged 2 commits into
visionfrom
jasonr/charxiv-judge-backoff
Sep 2, 2026
Merged

jason718 merged 2 commits into
visionfrom
jasonr/charxiv-judge-backoff

Conversation

@jason718

@jason718 jason718 commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

Both fixes come out of the Molmo2-8B sweep on the new multi-image / CharXiv benchmarks, where a job reported Success with a plausible score while being wrong.

1. Reject a load whose LM head duplicates the embeddings

Molmo2-8B scored 0.1223 on MMMU-Pro (chance) with zero failed instances, emitting noise ('Ψ梭梭梭…', 'tqdm traveled traveled').

Cause: the loaded lm.lm_head.w_out.weight came back byte-identical to lm.embeddings.weight (md5 3150fdf99033 instead of 04d532c7137b). Every other tensor matched a good load, so the backbone ran all 36 blocks correctly and only the final projection was wrong.

It is possible because the checkpoint's two largest tensors are indistinguishable except by shard filename:

model.transformer.wte.embedding   __R_0.distcp  offset=0  length=19449385
model.transformer.ff_out.weight   __R_1.distcp  offset=0  length=19449385

both 151936x4096, replicated across 16 ranks. Molmo2-4B is genuinely weight-tied and ships no ff_out, so it cannot hit this — hence 4B fine, 8B garbage. Reproduced on Beaker with byte-identical output across runs; local loads of the same checkpoint were fine, so the read is intermittent.

_verify_lm_head_is_untied compares the two tensors after conversion and fails the load when they match on a model the config says is untied. A trained untied head is never bit-for-bit equal to the embeddings, so there are no false positives; genuinely tied checkpoints are unaffected.

2. Back off between CharXiv grading retries

charxiv_reasoning on the 8B scored 0.2410 with n_invalid = 273 — 273 of 1000 gradings exhausted all ten retries and fell back to the official dummy (score = -1), which get_stats.py counts as 0.

The retry ladder had no wait between attempts, so with grading fanned out over many concurrent calls one transient API condition burned all ten retries in milliseconds. Replaying failed gradings against the same model and prompt returned valid replies on the first attempt, and all sampled ones deserved score = 1 — these were gradable responses scored zero.

Retries now wait a randomized exponential backoff (1s base, doubling, 30s cap), and the last raw reply is logged when grading gives up. Model, prompt, max_tokens ladder, retry count and dummy fallback are unchanged, so grading stays at official parity.

Rerun of the same task with the fix:

score n_invalid grading errors exhausted retries
before 0.2410 273 4140 273
after 0.3260 0 41 0

Verification

  • ruff check / ruff format --check clean; 2054 tests pass, 9 skipped.
  • Guard exercised on all four cases: untied + equal head raises; untied + real head passes; genuinely tied model with equal head passes; missing/mismatched shapes pass.
  • Judge fix exercised with a client that fails three times then succeeds — recovers on attempt 4 instead of returning the dummy.
  • Six guarded 8B benchmark reruns loaded cleanly with zero guard trips and coherent outputs (MMMU-Pro 0.2835 vs the broken run's 0.1223).

ty reports 3 pre-existing diagnostics in files this PR does not touch (litellm.py, olmo_core.py, vllm_server.py).

@jason718
jason718 force-pushed the jasonr/charxiv-judge-backoff branch from 97e5bd8 to 8caffe9 Compare August 31, 2026 06:22
An untied checkpoint stores its output projection in a tensor shaped exactly
like the embedding table, so a read that returns the wrong one of the pair
loads cleanly with every other weight intact. The model then decodes through
the wrong projection and emits noise while reporting chance-level accuracy and
no error, which is indistinguishable from a genuine result.

Compare the two tensors after conversion and fail the load when they match on
a model the config says is untied.
Grading fans out many concurrent calls, and the retry ladder had no wait
between attempts, so one transient API condition burned all ten retries within
milliseconds. The call then returned the dummy score, which downstream stats
count as zero — gradable responses were silently scored wrong rather than
regraded. A rerun of failed gradings returned valid replies on the first try.

Wait a randomized exponential backoff between attempts, and report the last raw
reply when grading finally gives up.
@jason718
jason718 force-pushed the jasonr/charxiv-judge-backoff branch from 8caffe9 to d8ccfe3 Compare August 31, 2026 06:24
@jason718 jason718 self-assigned this Sep 1, 2026
@jason718
jason718 merged commit 86c82e7 into vision Sep 2, 2026
1 check passed
@jason718
jason718 deleted the jasonr/charxiv-judge-backoff branch September 2, 2026 18:44
jason718 added a commit that referenced this pull request Sep 13, 2026
~3 of 4 Beaker loads of the untied 8B checkpoint returned the embedding table
as the LM head — every other tensor correct, output noise, score at chance,
nothing raised. The guard rejects a load whose untied head is bit-identical to
the embeddings. Also picks up ai2/holmes in WEKA_CLUSTERS (#330).
jason718 added a commit that referenced this pull request Sep 15, 2026
~3 of 4 Beaker loads of the untied 8B checkpoint returned the embedding table
as the LM head — every other tensor correct, output noise, score at chance,
nothing raised. The guard rejects a load whose untied head is bit-identical to
the embeddings. Also picks up ai2/holmes in WEKA_CLUSTERS (#330).
jason718 added a commit that referenced this pull request Sep 17, 2026
~3 of 4 Beaker loads of the untied 8B checkpoint returned the embedding table
as the LM head — every other tensor correct, output noise, score at chance,
nothing raised. The guard rejects a load whose untied head is bit-identical to
the embeddings. Also picks up ai2/holmes in WEKA_CLUSTERS (#330).
jason718 added a commit that referenced this pull request Sep 19, 2026
The official retry ladder retries with no wait, so with grading fanned out
concurrently one transient API condition burned all 10 retries in
milliseconds and forced dummy scores that count as zero. Retries now wait a
randomized exponential backoff, and the final failure logs the last raw reply.
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