Halve model loading time for llama demo#4032
Closed
swolchok wants to merge 1 commit into
Closed
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/4032
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit 4d922b4 with merge base 3eec95a ( This comment was automatically generated by Dr. CI and updates every 15 minutes. |
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D58826044 |
larryliu0820
approved these changes
Jun 21, 2024
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D58826044 |
swolchok
force-pushed
the
export-D58826044
branch
from
June 22, 2024 00:33
b8da11a to
01ff5b5
Compare
swolchok
added a commit
to swolchok/executorch
that referenced
this pull request
Jun 22, 2024
Summary: Pull Request resolved: pytorch#4032 mmap is not recommended for large sequential workloads -- you have to take a bunch of page faults. Surprisingly, this doesn't seem to hurt reported peak memory usage. Differential Revision: D58826044
swolchok
force-pushed
the
export-D58826044
branch
from
June 28, 2024 06:22
01ff5b5 to
8daba50
Compare
swolchok
added a commit
to swolchok/executorch
that referenced
this pull request
Jun 28, 2024
Summary: Pull Request resolved: pytorch#4032 mmap is not recommended for large sequential workloads -- you have to take a bunch of page faults. Surprisingly, this doesn't seem to hurt reported peak memory usage. Differential Revision: D58826044
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D58826044 |
Summary: Pull Request resolved: pytorch#4032 mmap is not recommended for large sequential workloads -- you have to take a bunch of page faults. I originally assumed this would hurt peak memory usage (we read all the weights into memory at once and then pack them; packing is basically copying them), but it doesn't. In retrospect, this makes sense because we actually operate on one weights tensor at a time, and the individual tensors aren't gigantic, there are just a lot of them. Reviewed By: larryliu0820 Differential Revision: D58826044
Contributor
|
This pull request was exported from Phabricator. Differential Revision: D58826044 |
swolchok
force-pushed
the
export-D58826044
branch
from
June 28, 2024 22:36
8daba50 to
4d922b4
Compare
Contributor
|
This pull request has been merged in 8740c69. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary:
mmap is not recommended for large sequential workloads -- you
have to take a bunch of page faults. Surprisingly, this doesn't seem
to hurt reported peak memory usage.
Differential Revision: D58826044