Skip to content

Fixing autoregressive generation for local sliding window and chunk attention #1811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jun 12, 2025

Conversation

gagika
Copy link
Collaborator

@gagika gagika commented Jun 9, 2025

Description

Fixing autoregressive generation for local sliding window and chunk attention, for both cases using query offset to compute the mask

Tests

Tested attention masks for local and Llama4 autoregressive generation.

Checklist

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

  • I have performed a self-review of my code.
  • 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.

Copy link
Collaborator

@RissyRan RissyRan left a comment

Choose a reason for hiding this comment

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

LGTM! Wondering if we could attach the test you have run?

Also, @aireenmei could you remind which unit test of attention is failing? is that MLA?

@gagika
Copy link
Collaborator Author

gagika commented Jun 11, 2025

LGTM! Wondering if we could attach the test you have run?

Also, @aireenmei could you remind which unit test of attention is failing? is that MLA?

@RissyRan

Llama4 test for autoregressive generation: b/415126351#comment3

This fix is not related to MLA, but wondering what was the issue?

@RissyRan
Copy link
Collaborator

LGTM! Wondering if we could attach the test you have run?
Also, @aireenmei could you remind which unit test of attention is failing? is that MLA?

@RissyRan

Llama4 test for autoregressive generation: b/415126351#comment3

This fix is not related to MLA, but wondering what was the issue?

Yeah, a separate issue I think. She mentioned MLA unit test does not pass, we could take this offline.

Testing in https://b.corp.google.com/issues/415126351#comment3, LGTM! Thank you!

Copy link
Collaborator

@khatwanimohit khatwanimohit left a comment

Choose a reason for hiding this comment

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

LGTM

@gagika gagika force-pushed the chunk-local-attn branch from e110418 to 8df1d5b Compare June 12, 2025 18:32
@gagika gagika force-pushed the chunk-local-attn branch from 8df1d5b to 09607cd Compare June 12, 2025 18:37
@copybara-service copybara-service bot merged commit 3e09dd2 into main Jun 12, 2025
31 of 38 checks passed
@copybara-service copybara-service bot deleted the chunk-local-attn branch June 12, 2025 22:10
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.

5 participants