alignment-handbook icon indicating copy to clipboard operation
alignment-handbook copied to clipboard

FSDP + QDoRA Support

Open iseesaw opened this issue 1 year ago • 6 comments

Hi the team, great work!

QDoRA seems to be better than QLoRA, refer to Efficient finetuning of Llama 3 with FSDP QDoRA

I wonder whether there will be demo / example about FSDP + QDoRA during finetuning?

Thanks!

iseesaw avatar Apr 24 '24 06:04 iseesaw

I have done some FSDP to train full parameters mistral 7b

maybe its useful for you

here

MustafaAlahmid avatar Apr 24 '24 09:04 MustafaAlahmid

I have done some FSDP to train full parameters mistral 7b

maybe its useful for you

here

Thanks, good job!

I want to finetune Llama-3-70B with 8 A6000 48G, which are not enough for training full parameters.

FSDP + QDoRA is the method I have found to be feasible and probably the most effective.

iseesaw avatar Apr 24 '24 09:04 iseesaw

I have done some FSDP to train full parameters mistral 7b maybe its useful for you here

Thanks, good job!

I want to finetune Llama-3-70B with 8 A6000 48G, which are not enough for training full parameters.

FSDP + QDoRA is the method I have found to be feasible and probably the most effective.

yes it should work try to change the config file for FSDP and put llama decoder layer should be something like this

ACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/fsdp.yaml scripts/run_sft.py recipes/{modelname}/sft/config_q;ora.yaml

MustafaAlahmid avatar Apr 24 '24 09:04 MustafaAlahmid

yes it should work try to change the config file for FSDP and put llama decoder layer should be something like this

ACCELERATE_LOG_LEVEL=info accelerate launch --config_file recipes/accelerate_configs/fsdp.yaml scripts/run_sft.py recipes/{modelname}/sft/config_q;ora.yaml

I've tried this command and encountered the issue described in https://github.com/huggingface/peft/issues/1674

Currently, I am following the official example provided in PEFT for further troubleshooting: https://github.com/huggingface/peft/blob/main/examples/sft/run_peft_qlora_fsdp.sh

iseesaw avatar Apr 24 '24 10:04 iseesaw

FSDP + QDoRA for Zephyr 141b would be really good

freegheist avatar Apr 28 '24 00:04 freegheist

AFAIK, FSDP+QDoRA is not supported feature in HF official releases like transformers, peft, ...

deep-diver avatar May 17 '24 03:05 deep-diver