Skip to content

Conversation

pytorchbot
Copy link
Collaborator

This PR was created by the merge bot to help merge the original PR into the main branch.
ghstack PR number: #12476 by @larryliu0820
^ Please use this as the source of truth for the PR details, comments, and reviews
ghstack PR base: https://github.com/pytorch/executorch/tree/gh/larryliu0820/68/base
ghstack PR head: https://github.com/pytorch/executorch/tree/gh/larryliu0820/68/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head: https://github.com/pytorch/executorch/tree/gh/larryliu0820/68/orig
@diff-train-skip-merge

In Huggingface causal LM forward convention, `cache_position` should
have the same length as `input_ids`. The previous logic will allocate
`cache_position` based on method metadata which by default is equal to
the maximum length of this tensor (normally max context length). Now
changing the logic to align the size of `cache_position` to `input_ids`.

ghstack-source-id: d1b407c
Pull Request resolved: #12476
Copy link

pytorch-bot bot commented Jul 15, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/12478

Note: Links to docs will display an error until the docs builds have been completed.

❌ 1 New Failure

As of commit 980f44d with merge base 042eb1a (image):

NEW FAILURE - The following job has failed:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jul 15, 2025
@larryliu0820 larryliu0820 added the release notes: llm Changes to llm utilities label Jul 15, 2025
@larryliu0820 larryliu0820 merged commit aa44c06 into main Jul 15, 2025
98 of 100 checks passed
@larryliu0820 larryliu0820 deleted the gh/larryliu0820/68/orig branch July 15, 2025 06:21
@larryliu0820
Copy link
Contributor

@pytorchbot cherry-pick --onto release/0.7 -c fixnewfeature

pytorchbot added a commit that referenced this pull request Jul 15, 2025
This PR was created by the merge bot to help merge the original PR into
the main branch.
ghstack PR number: #12476 by
@larryliu0820
^ Please use this as the source of truth for the PR details, comments,
and reviews
ghstack PR base:
https://github.com/pytorch/executorch/tree/gh/larryliu0820/68/base
ghstack PR head:
https://github.com/pytorch/executorch/tree/gh/larryliu0820/68/head
Merge bot PR base: https://github.com/pytorch/executorch/tree/main
Merge bot PR head:
https://github.com/pytorch/executorch/tree/gh/larryliu0820/68/orig
@diff-train-skip-merge

Co-authored-by: Mengwei Liu <larryliu@meta.com>
(cherry picked from commit aa44c06)
@pytorchbot
Copy link
Collaborator Author

Cherry picking #12478

The cherry pick PR is at #12479 and it is recommended to link a fixnewfeature cherry pick PR with an issue. The following tracker issues are updated:

Details for Dev Infra team Raised by workflow job

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: llm Changes to llm utilities

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants