Skip to content

Fix TPU Splash local sliding window size#4289

Merged
copybara-service[bot] merged 1 commit into
AI-Hypercomputer:mainfrom
huytransformer:htn/tpu-splash-local-window-size
Jun 29, 2026
Merged

Fix TPU Splash local sliding window size#4289
copybara-service[bot] merged 1 commit into
AI-Hypercomputer:mainfrom
huytransformer:htn/tpu-splash-local-window-size

Conversation

@huytransformer

Copy link
Copy Markdown
Collaborator

Description

Dense local sliding keeps exactly sliding_window_size tokens. Splash LocalMask uses an inclusive left window, so passing sliding_window_size keeps 1 extra token. This changes the Splash window to sliding_window_size - 1.

Tests

Ran successfully

python3 -m pytest tests/unit/attention_test.py -k SplashLocalMaskTest

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

@codecov

codecov Bot commented Jun 29, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

Comment thread src/maxtext/layers/attention_op.py Outdated
@huytransformer huytransformer force-pushed the htn/tpu-splash-local-window-size branch from 89413e5 to 4cb3051 Compare June 29, 2026 19:22
@huytransformer huytransformer requested a review from NuojCheng June 29, 2026 21:29
@copybara-service copybara-service Bot merged commit ccb0143 into AI-Hypercomputer:main Jun 29, 2026
79 of 84 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants