CUDA: tighter VRAM scratch size for 65b/70b#2551
Merged
JohannesGaessler merged 1 commit intoggml-org:masterfrom Aug 8, 2023
Merged
CUDA: tighter VRAM scratch size for 65b/70b#2551JohannesGaessler merged 1 commit intoggml-org:masterfrom
JohannesGaessler merged 1 commit intoggml-org:masterfrom
Conversation
ggerganov
approved these changes
Aug 8, 2023
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.
This PR is a followup to #2056 . At the time I did not have enough VRAM to properly measure the minimum required VRAM scratch sizes for 65b (and 70b was not yet published). This PR tightens VRAM scratch sizes based on testing. The specific methodology is that I hard-coded VRAM scratch sizes with a granularity of 1 MiB and determined the minimum VRAM scratch size at which perplexity calculations are not being affected. I then added a ~25% margin on top of the minimum. These are the test results that the new numbers are based on:
When I tested with smaller models the min. required VRAM scratch at some point always started increasing linearly with scratch size (measured up to 8192 context). Because the results are so close I just used the same scratch size for both 65b and 70b.