Skip to content

olmo_core_vlm: refuse checkpoints with RoPE scaling (Molmo2-O-7B's YaRN gives a CUDA assert) #442

Open

Description

@jason718

What happens

olmo_core_vlm cannot run Molmo2-O-7B, final or pretrain. Every request fails with a CUDA gather out-of-bounds device assert about 10 minutes in, rather than with a clear error. On olmOCR-bench, 1,403 of 1,403 instances failed this way.

Cause

The O-7B checkpoints use YaRN RoPE:

  • mm_olmo llm config: rope_type: yarn, rope_factor: 8.0, rope_original_max_position_embeddings: 8192
  • HF config: rope_scaling = {rope_type: yarn, factor: 8.0, original_max_position_embeddings: 8192, attention_factor: 1.2079, beta_fast: 32.0, beta_slow: 1.0}

The provider passes only rope_theta to OLMo-core's Molmo2 config builder (checkpoint.py#L275). That builder's olmo3_7B preset has no RoPE scaling, and it logs that per-layer YaRN is unsupported. The model therefore runs with the wrong positional encoding.

Molmo2-4B and -8B use Qwen3 LLMs with default RoPE and are not affected.

Workaround

Use the HF provider (allenai/Molmo2-O-7B). Its remote code's YaRN RoPE buffers match mm_olmo's exactly. The O-7B rows in #412 were run this way.

Suggested fix

Until the provider supports RoPE scaling, refuse at load time any checkpoint whose LLM config sets a non-default rope_type or a rope_scaling. The error should say why and name the HF provider as the alternative.

Activity

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