Add support for safetensors when reading checkpoints#19
Closed
tjs-intel wants to merge 1 commit into
Closed
Conversation
Author
|
PR applying patch to support safetensors to HabanaAI/DeepSpeed: HabanaAI/DeepSpeed#2 |
Author
|
@dvarshney-habana please assign reviewers as appropriate |
|
@tjs-intel @dvarshney-habana this looks same as #15 . Please confirm, if its same then other one is already in queue to merge. |
| # Creates a list of paths from all downloaded files in cache dir | ||
| file_list = [str(entry) for entry in Path(cached_repo_dir).rglob("*.[bp][it][n]") if entry.is_file()] | ||
| path = Path(cached_repo_dir) | ||
| globs = ["*.bin", "*.pt", "*.safetensors"] |
There was a problem hiding this comment.
Don't we need some kind of if else check ; cached repo dir can have both .safetensors and .pt files.
Author
There was a problem hiding this comment.
The code that is already there loads .bin and .pt files, can the cached repo have both of those as well? I might be misunderstanding something
Author
Author
|
Resolved with #15 which is already good to merge |
3 tasks
astachowiczhabana
pushed a commit
that referenced
this pull request
Nov 29, 2024
User provided min,max value can be set to a dynamic tensor.
xinyu-intel
pushed a commit
that referenced
this pull request
Mar 4, 2025
User provided min,max value can be set to a dynamic tensor.
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.
What does this PR do?
The TinyLlama model only has checkpoints in the form of
model.safetensors. This checkpoint needs to be included in the list of checkpoints that is passed to DeepSpeed in order for the model to function properly when initialized with DeepSpeed.This PR adds the safetensor checkpoints to the list of checkpoints passed to DeepSpeed.
Note: This change requires an upstream commit in microsoft/DeepSpeed to be merged downstream to HabanaAI/DeepSpeed in order for DeepSpeed to support the provided safetensor format.
Before submitting