Skip to content

add proper calibration to pt2e flow #4452

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

Closed
wants to merge 4 commits into from

Conversation

cccclai
Copy link
Contributor

@cccclai cccclai commented Jul 29, 2024

Copy link

pytorch-bot bot commented Jul 29, 2024

🔗 Helpful Links

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

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

❌ 8 New Failures

As of commit 290ca5d with merge base a743a3b (image):

NEW FAILURES - The following jobs have 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 29, 2024
cccclai added a commit that referenced this pull request Jul 29, 2024
Differential Revision: [D60419364](https://our.internmc.facebook.com/intern/diff/D60419364/)

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

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

@facebook-github-bot
Copy link
Contributor

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

cccclai added a commit that referenced this pull request Jul 30, 2024
Pull Request resolved: #4452

Differential Revision: [D60419364](https://our.internmc.facebook.com/intern/diff/D60419364/)
ghstack-source-id: 235862897
@cccclai cccclai mentioned this pull request Jul 30, 2024
@facebook-github-bot
Copy link
Contributor

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

cccclai added a commit that referenced this pull request Jul 30, 2024
Pull Request resolved: #4452


ghstack-source-id: 235865853

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

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

cccclai added a commit that referenced this pull request Aug 1, 2024
Pull Request resolved: #4452


ghstack-source-id: 236234222

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

tokenizer = get_tokenizer(tokenizer_path)
eval_wrapper = EagerEvalWrapper(
Copy link
Collaborator

@shewu-quic shewu-quic Aug 1, 2024

Choose a reason for hiding this comment

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

Hi @cccclai,
Thanks for this change.
It seems to have a problem when I capture seq_len = 1 in kv_cache mode but calibrate with whole sequence in batch process.
From my understanding, after we capture, some variable will be fixed such as "batch, seqlen, _ = x.shape".
If I am mistaken, please correct me.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hi thank you for checking out the pr! I pulled some changes from another local patch and haven't tested this pr properly. What you mentioned is true...I vaguelly remember I modified the code there to use kv cache instead, however it was too slow to calibrate (as you observed too)

@cccclai
Copy link
Contributor Author

cccclai commented Sep 4, 2024

Create a new pr #5095 instead as this pr wasn't tested properly

@cccclai cccclai closed this Sep 4, 2024
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
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants