Skip to content

Conversation

Cyrilvallez
Copy link
Member

What does this PR do?

As per the title. We can rely on the scalar self.cumulative_length instead of tensor cache_position[0], as was introduced in #40893. It's much better for downstream masking and compilation support.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@Cyrilvallez Cyrilvallez merged commit 0c1839d into main Sep 16, 2025
22 of 24 checks passed
@Cyrilvallez Cyrilvallez deleted the align-mask-primitives branch September 16, 2025 10:49
ErfanBaghaei pushed a commit to ErfanBaghaei/transformers that referenced this pull request Sep 25, 2025
vijayabhaskar-ev pushed a commit to vijayabhaskar-ev/transformers that referenced this pull request Oct 2, 2025
yuchenxie4645 pushed a commit to yuchenxie4645/transformers that referenced this pull request Oct 4, 2025
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