deepspeedai / deepspeedai/DeepSpeed

[REQUEST] estimate the memory requirements of LoRA finetune.

Open
#5,304 1 comment 3 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.