Skip to content

Modernize Pallas Splash attention kernel and define eager fallback routing in Tunix Gemma 4. - #1890

Merged
copybara-service[bot] merged 1 commit into
mainfrom
test_963446160
Aug 25, 2026
Merged

Modernize Pallas Splash attention kernel and define eager fallback routing in Tunix Gemma 4.#1890
copybara-service[bot] merged 1 commit into
mainfrom
test_963446160

Conversation

@copybara-service

@copybara-service copybara-service Bot commented Aug 14, 2026

Copy link
Copy Markdown

Modernize Pallas Splash attention kernel and define eager fallback routing in Tunix Gemma 4.

  • Refactor Attention.block() into modular helper methods.
  • Broaden Pallas Splash attention execution across rectangular sequences (kv_len > q_len) using memoized in-kernel computable masks (LocalMask / CausalMask).
  • Define eager attention fallback routing (_eager_attention) with exact offset alignment for rectangular sequences.
  • Modernize use_gqa property to properly support MQA (num_kv_heads=1).
  • Add unit tests for mask predicate equivalence, block-size divisibility, and attention routing.

@google-cla

google-cla Bot commented Aug 14, 2026

Copy link
Copy Markdown

Thanks for your pull request! It looks like this may be your first contribution to a Google open source project. Before we can look at your pull request, you'll need to sign a Contributor License Agreement (CLA).

View this failed invocation of the CLA check for more information.

For the most up to date status, view the checks section at the bottom of the pull request.

…uting in Tunix Gemma 4.

- Refactor Attention.block() into modular helper methods.
- Broaden Pallas Splash attention execution across rectangular sequences (kv_len > q_len) using memoized in-kernel computable masks (LocalMask / CausalMask).
- Define eager attention fallback routing (_eager_attention) with exact offset alignment for rectangular sequences.
- Modernize use_gqa property to properly support MQA (num_kv_heads=1).
- Add unit tests for mask predicate equivalence, block-size divisibility, and attention routing.

PiperOrigin-RevId: 970406871
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.

2 participants