Skip to content

[Excutorch][Llama] Decouple input sequence length from kv cache context length #7927

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Jan 30, 2025

Conversation

kimishpatel
Copy link
Contributor

@kimishpatel kimishpatel commented Jan 24, 2025

Stack from ghstack (oldest at bottom):

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: D68448334

cc @mergennachin @cccclai @helunwencser @dvorjackz

…xt length

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Jan 24, 2025

🔗 Helpful Links

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

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

✅ No Failures

As of commit 1070600 with merge base bdd3d9c (image):
💚 Looks good so far! There are no failures yet. 💚

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 Jan 24, 2025
kimishpatel added a commit that referenced this pull request Jan 24, 2025
…xt length

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

ghstack-source-id: 262854267
Pull Request resolved: #7927
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 24, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
ghstack-source-id: 262945661
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 24, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263000137

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 27, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263237442

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Jan 28, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263342053

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Jan 28, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263366616

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

@kimishpatel kimishpatel added module: examples Issues related to demos under examples/ release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava module: llm Issues related to LLM examples and apps, and to the extensions/llm/ code labels Jan 28, 2025
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

cc mergennachin cccclai helunwencser dvorjackz

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 28, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263491763

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

cc mergennachin cccclai helunwencser dvorjackz

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 28, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263517976

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

cc mergennachin cccclai helunwencser dvorjackz

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 28, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263531315

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

cc mergennachin cccclai helunwencser dvorjackz

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 29, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263580354

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
…cache context length"

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

cc mergennachin cccclai helunwencser dvorjackz

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D68448334

kimishpatel added a commit that referenced this pull request Jan 29, 2025
…xt length

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263653316

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)
@kimishpatel kimishpatel requested a review from iseeyuan January 30, 2025 04:48
@facebook-github-bot facebook-github-bot merged commit ecb6050 into gh/kimishpatel/152/base Jan 30, 2025
74 of 77 checks passed
@facebook-github-bot facebook-github-bot deleted the gh/kimishpatel/152/head branch January 30, 2025 06:21
manuelcandales pushed a commit that referenced this pull request Jan 30, 2025
…xt length (#8047)

Pull Request resolved: #7927

Decouple max sequence length, for shape dynamism in torch.export, from sequence
length used for kv cache sizing.
ghstack-source-id: 263653316

Differential Revision: [D68448334](https://our.internmc.facebook.com/intern/diff/D68448334/)

Co-authored-by: Kimish Patel <[email protected]>
kimishpatel added a commit that referenced this pull request Feb 11, 2025
Summary:
Previous PR #7927 deecoupled max_seq_length from kv cache. That broke
perf ci workflow. Fix that.

Test Plan:
Trigger it manually and check

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 11, 2025
Summary:
Previous PR #7927 deecoupled max_seq_length from kv cache. That broke
perf ci workflow. Fix that.

Test Plan:
Trigger it manually and check

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: 3a09b1a
Pull Request resolved: #8374
kimishpatel added a commit that referenced this pull request Feb 12, 2025
Summary:
Previous PR #7927 deecoupled max_seq_length from kv cache. That broke
perf ci workflow. Fix that.

Test Plan:
Trigger it manually and check
apple perf: https://github.com/pytorch/executorch/actions/runs/13267110949
android perf: https://github.com/pytorch/executorch/actions/runs/13267110908

Reviewers:

Subscribers:

Tasks:

Tags:

cc guangy10 huydhn kirklandsign shoumikhin

[ghstack-poisoned]
kimishpatel added a commit that referenced this pull request Feb 12, 2025
Summary:
Previous PR #7927 deecoupled max_seq_length from kv cache. That broke
perf ci workflow. Fix that.

Test Plan:
Trigger it manually and check

Reviewers:

Subscribers:

Tasks:

Tags:

ghstack-source-id: cd637af
Pull Request resolved: #8374
kimishpatel added a commit that referenced this pull request Feb 12, 2025
* [Executorch][perf-ci] Fix perf ci

Summary:
Previous PR #7927 deecoupled max_seq_length from kv cache. That broke
perf ci workflow. Fix that.

Test Plan:
Trigger it manually and check

Reviewers:

Subscribers:

Tasks:

Tags:

[ghstack-poisoned]

* Update on "[Executorch][perf-ci] Fix perf ci"


Summary:
Previous PR #7927 deecoupled max_seq_length from kv cache. That broke
perf ci workflow. Fix that.

Test Plan:
Trigger it manually and check
apple perf: https://github.com/pytorch/executorch/actions/runs/13267110949
android perf: https://github.com/pytorch/executorch/actions/runs/13267110908

Reviewers:

Subscribers:

Tasks:

Tags:

cc guangy10 huydhn kirklandsign shoumikhin

[ghstack-poisoned]
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. fb-exported module: examples Issues related to demos under examples/ module: llm Issues related to LLM examples and apps, and to the extensions/llm/ code release notes: examples Changes to any of our example LLMs integrations, such as Llama3 and Llava
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants