This repository was archived by the owner on Jun 3, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 156
Merged
FSDP oneshot #1939
Conversation
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
…into sparse_auto_recipe
mgoin
reviewed
Jan 9, 2024
bfineran
previously approved these changes
Jan 9, 2024
See updated PR comment :( device_map="auto" doesn't seem to be compatible with quantization so I'm leaving it off the default. It can still be specified on the CLI for non-quantized one-shot |
bfineran
previously approved these changes
Jan 10, 2024
bfineran
approved these changes
Jan 11, 2024
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 updates the one-shot modifiers SparseGPT, Wanda and SmoothQuant and Quantization to be compatible with FSDP. This enables us to run alternating one-shot/finetuning flows with FSDP
** NOTE: ** #1912 should be merged first, it covers the initial alternating flow implementation.
Summary of Changes
Remove any references of specific devices from the one-shot modifiers, device is now handled by"auto" actually isn't compatible with quantization :( so keeping the default as "cuda:0", but you can pass "auto" through the CLI for a non-quantized oneshotSparseCausalLM
, and defaults to "auto" for splitting the model across multiple GPUs (this isn't FSDP related, we can split the model even outside of FSDP)SparseGPT
class to be a module wrapper, so that we can update weights using module.apply as required for FSDP compatibility