llama-map to support hugepage feature of pagesize 2M or 1G which can …#12552
Open
nickhuang99 wants to merge 2 commits into
Open
llama-map to support hugepage feature of pagesize 2M or 1G which can …#12552nickhuang99 wants to merge 2 commits into
nickhuang99 wants to merge 2 commits into
Conversation
…greatly speedup loading huge model when system has enough RAM to pre-allocate hugetlbfs model file
Closed
4 tasks
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.
…greatly speedup loading huge model when system has enough RAM to pre-allocate hugetlbfs model file
Make sure to read the contributing guidelines before submitting a PR
As using argument is too much code change and also mmap with hugepage support not available in all platform, so, I decide to use compiler option to switch on this feature. i.e. cmake .. -DGGML_USING_HUGE_PAGE_1G=1
The hugepage feature requires model file must exist in hugetlbfs, and also Linux kernel command to boot with designate hugepagesz to be set. Also "copy" normal model file to hugetlbfs mount point requires also using a small tool with mmap. Therefore this is considered to be an advanced feature.