-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
Support loading large model weights #7610
Merged
mattsoulanille
merged 9 commits into
tensorflow:lm
from
mattsoulanille:large_model_weights
Apr 24, 2023
Merged
Support loading large model weights #7610
mattsoulanille
merged 9 commits into
tensorflow:lm
from
mattsoulanille:large_model_weights
Apr 24, 2023
Commits on Apr 20, 2023
-
Configuration menu - View commit details
-
Copy full SHA for 78a3a03 - Browse repository at this point
Copy the full SHA 78a3a03View commit details -
Avoid allocating a large arraybuffer when loading weights (tensorflow…
…#7598) The loadWeights function loads weights in 4MB chunks and then concatenates them into a single large ArrayBuffer. That ArrayBuffer is used for splitting the weights data back up into tensors. Allocating large ArrayBuffers (3.5GB) can be unstable on Chrome, so this PR avoids this allocation, instead slicing the weights out of the chunks manually. The implementation wraps the array of weights (stored as ArrayBuffer[]) in a new CompositeArrayBuffer class. This class implements slice by copying the desired range out of the buffer(s) that it overlaps with.
Configuration menu - View commit details
-
Copy full SHA for 3ceace9 - Browse repository at this point
Copy the full SHA 3ceace9View commit details -
Configuration menu - View commit details
-
Copy full SHA for cf2493e - Browse repository at this point
Copy the full SHA cf2493eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 6720fde - Browse repository at this point
Copy the full SHA 6720fdeView commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d22064 - Browse repository at this point
Copy the full SHA 4d22064View commit details -
Configuration menu - View commit details
-
Copy full SHA for b21b302 - Browse repository at this point
Copy the full SHA b21b302View commit details -
Configuration menu - View commit details
-
Copy full SHA for 775e31d - Browse repository at this point
Copy the full SHA 775e31dView commit details -
Configuration menu - View commit details
-
Copy full SHA for d2613b7 - Browse repository at this point
Copy the full SHA d2613b7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0276e01 - Browse repository at this point
Copy the full SHA 0276e01View commit details
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.