Skip to content

Ulysses Gemma 4 test: media towers no longer refuse CP after #17930 (rest-2 red on main) - #17955

Merged
danielhanchen merged 1 commit into
mainfrom
fix-ulysses-gemma4-media-tower-test
Nov 16, 2026
Merged

danielhanchen merged 1 commit into
mainfrom
fix-ulysses-gemma4-media-tower-test

Conversation

@danielhanchen

Copy link
Copy Markdown
Member

Summary

Repo tests (CPU, rest-2) is red on main (seen on the staging run of #17933):

tests/test_ulysses_gemma4.py::test_gemma4_generic_route_gates
E   Failed: DID NOT RAISE NotImplementedError

Bisected to #17930 (the test passes on its parent, fails on it). #17930 deliberately stopped Gemma-4's vision and audio towers from deciding the context parallel route: CP batches are text only, so attention modules under a media tower are skipped by the route checks and get no Ulysses hooks. The test still expected attach_attention_hooks on a multimodal Gemma 4 to refuse with "Gemma4VisionAttention is bidirectional", which is exactly the refusal #17930 removed. The test is what is out of date.

Change

Test only, tests/test_ulysses_gemma4.py::test_gemma4_generic_route_gates: on the tiny multimodal Gemma 4, attach_attention_hooks now has to succeed, the model must actually have media tower attention, and the set of hooked self_attn modules must equal the text-stack ones exactly (no tower module hooked, no text module missed). That keeps the property the old refusal protected (bidirectional vision attention never runs through the causal Ulysses path) in the form #17930 implements it.

Testing

  • tests/test_ulysses_gemma4.py: 24 passed (CPU, gloo). On main the test fails as above.
  • Sabotage: dropping the media tower check from the hook loop in unsloth/context_parallel.py makes the new assertion fail (model.vision_tower.encoder.layers.0.self_attn hooked).

@danielhanchen

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-16T10:20:38.789545Z 0c4dbeb Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown
Codex Review Summary: ❌ Failed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ❌ Failed 2026-11-16T10:19:53.543242Z
We couldn’t complete this review. Comment @codex review to try again.
0c4dbeb PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: 0c4dbebc7b

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 0a29bc1 into main Nov 16, 2026
@danielhanchen
danielhanchen deleted the fix-ulysses-gemma4-media-tower-test branch November 16, 2026 10:23
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