Skip to content

Conversation

@abheesht17
Copy link
Collaborator

@abheesht17 abheesht17 commented Sep 5, 2025

The attention mask looks like this (for sequence length = 10, sliding window length = 4), and last 4 tokens padded:

[[[ True,  True,  True, False, False, False, False, False, False, False],
  [ True,  True,  True,  True, False, False, False, False, False, False],
  [ False,  True,  True,  True,  True, False, False, False, False, False],
  [False,  False,  True,  True,  True,  True, False, False, False, False],
  [False, False,  False,  True,  True,  True,  False, False, False, False],
  [False, False, False,  False,  True,  True,  False,  False, False, False],
  [False, False, False, False,  False,  False,  False,  False,  False, False],
  [False, False, False, False, False,  False,  False,  False,  False,  False],
  [False, False, False, False, False, False,  False,  False,  False,  False],
  [False, False, False, False, False, False, False,  False,  False,  False]]]

@github-actions github-actions bot added the Gemma Gemma model specific issues label Sep 5, 2025
@abheesht17 abheesht17 changed the title Add bidirectional masking for EmbeddingGemma Add bidirectional attention mask for EmbeddingGemma Sep 5, 2025
@abheesht17 abheesht17 marked this pull request as ready for review September 5, 2025 06:03
Copy link
Member

@mattdangerw mattdangerw left a comment

Choose a reason for hiding this comment

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

Thanks!

@abheesht17 abheesht17 merged commit 5b13fbf into keras-team:master Sep 10, 2025
9 of 10 checks passed
amitsrivastava78 pushed a commit to amitsrivastava78/keras-hub that referenced this pull request Oct 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gemma Gemma model specific issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants