deepspeedai / deepspeedai/DeepSpeed
[REQUEST] estimate the memory requirements of LoRA finetune.
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 43.1k
- Forks
- 5k
- Avg merge
- 4d 15h
- Merged PRs (30d)
- 112
Description
Hi,
is there any solution to estimate the memory requirements of LoRA finetune?
I find that estimate_zero3_model_states_mem_needs_all_live and estimate_zero2_model_states_mem_needs_all_live cannot solve this problem, as they calculate the total number of params (even require_grad==False). It is not correct for the peft_model with adapters.
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading estimate_zero3_model_states_mem_needs_all_live and estimate_zero2_model_states_mem_needs_all_live, then compare their parameter accounting with the peft_model and its adapters described in the issue. The request is complete when memory requirements for LoRA fine-tuning can be estimated without counting non-trainable parameters as trainable model state.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- distributed-systems, machine-learning, performance
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100