Skip to content

Conversation

@jackzhxng
Copy link
Contributor

Summary

Swaps Llava export arg order, such that forward takes embeddings, cache_position, instead of cache_position, embeddings.

Test plan

Existing Llava tests

@jackzhxng jackzhxng requested a review from lucylq as a code owner September 11, 2025 23:07
@pytorch-bot
Copy link

pytorch-bot bot commented Sep 11, 2025

🔗 Helpful Links

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

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

❌ 6 New Failures, 1 Cancelled Job, 37 Pending, 1 Unrelated Failure

As of commit 3a800cb with merge base 6d8583d (image):

NEW FAILURES - The following jobs have failed:

CANCELLED JOB - The following job was cancelled. Please retry:

BROKEN TRUNK - The following job failed but were present on the merge base:

👉 Rebase onto the `viable/strict` branch to avoid these failures

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

@meta-cla meta-cla 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 Sep 11, 2025
@jackzhxng jackzhxng added the release notes: none Do not include this in the release notes label Sep 12, 2025
def _get_prompt_dynamic_shapes(self):
dim = torch.export.Dim("token_dim", min=2, max=self.max_seq_len)
text_model_dynamic_shapes = ({0: 1}, {1: dim})
text_model_dynamic_shapes = ({1: dim}, {0: 1})
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: 1 and 0 are the dims of a single tensor. So swapping doesnt do anything

Copy link
Contributor

Choose a reason for hiding this comment

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

also do you even have to specify that the batch is static 1?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

{0:1} is the dynamic shapes for the first arg, {1:dim} is for the second arg, so I swap them here

@jackzhxng jackzhxng merged commit 23acfea into main Sep 13, 2025
295 of 303 checks passed
@jackzhxng jackzhxng deleted the jz/swap-llava-input-order branch September 13, 2025 00:56
@jackzhxng
Copy link
Contributor Author

@pytorchbot cherry-pick --onto release/1.0 -c feature

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 16, 2025

❌ 🤖 pytorchbot command failed:

@pytorchbot cherry-pick: error: argument -c/--classification: invalid choice: 'feature' (choose from 'regression', 'critical', 'fixnewfeature', 'docs', 'release')

usage: @pytorchbot cherry-pick --onto ONTO [--fixes FIXES] -c
                               {regression,critical,fixnewfeature,docs,release}

Try @pytorchbot --help for more info.

@jackzhxng
Copy link
Contributor Author

@pytorchbot cherry-pick --onto release/1.0 -c critical

pytorchbot pushed a commit that referenced this pull request Sep 16, 2025
Swaps Llava export arg order, such that forward takes `embeddings,
cache_position`, instead of `cache_position, embeddings`.

(cherry picked from commit 23acfea)
@pytorchbot
Copy link
Collaborator

Cherry picking #14238

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

Details for Dev Infra team Raised by workflow job

StrycekSimon pushed a commit to nxp-upstream/executorch that referenced this pull request Sep 23, 2025
Swaps Llava export arg order, such that forward takes `embeddings,
cache_position`, instead of `cache_position, embeddings`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. release notes: none Do not include this in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants