Skip to content

make sure position_ids are passed in for causal mask creation for gpt-oss#39997

Open
winglian wants to merge 1 commit intohuggingface:mainfrom
winglian:gpt-oss-position_ids-causal_mask
Open

make sure position_ids are passed in for causal mask creation for gpt-oss#39997
winglian wants to merge 1 commit intohuggingface:mainfrom
winglian:gpt-oss-position_ids-causal_mask

Conversation

@winglian
Copy link
Copy Markdown
Collaborator

@winglian winglian commented Aug 7, 2025

What does this PR do?

Packing won't work with gpt-oss since it doesn't respect the position ids. See #39194

Fixes # (issue)

@ArthurZucker @Cyrilvallez

Before submitting

  • This PR fixes a typo or improves the docs (you can dismiss the other checks if that's the case).
  • Did you read the contributor guideline,
    Pull Request section?
  • Was this discussed/approved via a Github issue or the forum? Please add a link
    to it if that's the case.
  • Did you make sure to update the documentation with your changes? Here are the
    documentation guidelines, and
    here are tips on formatting docstrings.
  • Did you write any new necessary tests?

Who can review?

Anyone in the community is free to review the PR once the tests have passed. Feel free to tag
members/contributors who may be interested in your PR.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 7, 2025

[For maintainers] Suggested jobs to run (before merge)

run-slow: gpt_oss

"attention_mask": attention_mask,
"cache_position": cache_position,
"past_key_values": past_key_values,
"position_ids": position_ids,
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.

ty can you update the modular as well ?!

@Cyrilvallez
Copy link
Copy Markdown
Member

Indeed, needs to be upstreamed in modular as well!

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.

3 participants