-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assemble state dictionary for offloaded models (#2156)
* changed meta alignment device to cpu * reverted alignment device and init weight map * trace on values * trace on values * trace on values * added offload model state dict save and test * removed hook traces * removed n * Update src/accelerate/accelerator.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * suggestions and make style * fixed circular import and make style * debugged test * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * function level import and make style * Update src/accelerate/utils/modeling.py Co-authored-by: Zach Mueller <muellerzr@gmail.com> * Update tests/test_accelerator.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update tests/test_accelerator.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * Update src/accelerate/utils/modeling.py Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> * make style --------- Co-authored-by: Marc Sun <57196510+SunMarc@users.noreply.github.com> Co-authored-by: Zach Mueller <muellerzr@gmail.com>
- Loading branch information
1 parent
68d63ee
commit 3499cf2
Showing
3 changed files
with
73 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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