Skip to content

HF Molmo2 path fails on transformers 5.12: create_causal_mask() rejects input_embeds #416

Open

Description

@jason718

cc @jason718

olmo-eval beaker launch -m molmo2-4b -t blink (the HF huggingface provider, allenai/Molmo2-4B at Hub revision 042abfa7) fails every instance on current main at the model's first forward:

TypeError: create_causal_mask() got an unexpected keyword argument 'input_embeds'

The job resolved transformers==5.12.1 from the hf extra's >=5.8.0,<5.13 range. The Molmo2 remote modeling code on the Hub (last updated 2026-01-23) calls create_causal_mask(input_embeds=...), a keyword transformers has since renamed, so every HF-provider Molmo2 run reports 100% hard failures. The olmo_core_vlm provider is unaffected.

Seen on an H100 (ai2/jupiter) on 2026-09-25 while validating #324. Separately, on B300 (ai2/holmes) the same run fails earlier with a runtime-compiled CUDA kernel error under torch 2.10+cu128, so HF-provider runs need an H100 either way.

Options: cap transformers below the rename for the hf extra, or pin allenai/Molmo2-4B to a revision once the Hub code is updated, and add a small HF-provider smoke test to the GPU integration suite.

Activity

  1. jason718 commented on Sep 26, 2026

    @jason718
    ContributorAuthor

    Root cause: transformers 5.9 removed the @deprecate_kwarg("input_embeds" → "inputs_embeds") shim from create_causal_mask / create_masks_for_generate and dropped create_causal_mask's cache_position parameter (5.8.x is the last release that accepts what the Hub's modeling_molmo2.py passes). main's lock resolves 5.8.1, but Beaker installs unlocked (uv pip install -e '.[s3,hf,beaker]') and picked 5.12.1.

    Fixed on the olmo-eval side in #324 (c7c5a8c): the HF provider's multimodal load path wraps both helpers and renames/drops the kwargs the installed signature lacks, alongside its existing Molmo2 compat shims. Verified on CPU with 5.8.1 and 5.12.1 (identical outputs). Leaving this open for the Hub-side fix: renaming the kwargs in the allenai/Molmo2-* remote modeling code would let the shim go.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions