Skip to content

Add option to use Tokamax attention API in MaxText.#3949

Open
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_912831162
Open

Add option to use Tokamax attention API in MaxText.#3949
copybara-service[bot] wants to merge 1 commit into
mainfrom
test_912831162

Conversation

@copybara-service
Copy link
Copy Markdown
Contributor

Add option to use Tokamax attention API in MaxText.

@codecov
Copy link
Copy Markdown

codecov Bot commented May 19, 2026

Codecov Report

❌ Patch coverage is 2.70270% with 36 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/maxtext/layers/attention_op.py 2.70% 35 Missing and 1 partial ⚠️

📢 Thoughts on this report? Let us know!

local_window_size = (self.sliding_window_size, self.sliding_window_size)

scale = 1.0 / math.sqrt(query.shape[-1])
attention_output = tokamax_attention_api.dot_product_attention(
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tbh this makes me sad, I want to call kernels with block sizes I am not a fan of high level APIs like this

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