Add low_cpu_ram config to qlora recipes configs (excluding 2B/13B/70B configs) #1580
+40
−63
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.
Context
What is the purpose of this PR? Is it to
Addresses this comment https://github.com/pytorch/torchtune/pull/1315/files#r1750554790
Changelog
What are the changes made in this PR?
Update all qlora recipes to have low_cpu_ram config option added in #1315
Test plan
colab notebook https://colab.research.google.com/drive/14fGovrKguuTh67T0eL_rIg7gmJVaYSie?usp=sharing that tests checkpoint save with and without low_cpu_ram and verifies that with
low_cpu_ram=True
all of the qlora recipes updated here no longer OOM on checkpoint save.Please make sure to do each of the following if applicable to your PR. (If you're not sure about any one of these just ask and we will happily help. We also have a contributing page for some guidance on contributing.)
pre-commit install
)pytest tests
pytest tests -m integration_test
UX
If your function changed a public API, please add a dummy example of what the user experience will look like when calling it.
Example of docstring:
torchtune/torchtune/modules/vision_transformer.py
Line 285 in 6a7951f
Example in our docs: https://pytorch.org/torchtune/main/tutorials/qat_finetune.html#applying-qat-to-llama3-models