Open cool-xuan opened 4 months ago
You may
--max_length
, e.g., --max_length=4096
--hd_num
You may
- try LoRA
- decrease the value of
--max_length
, e.g.,--max_length=4096
- decrease the value of
--hd_num
Thanks for your reply. Fine tuning by LoRA solves the OOD error. However, even when I reduce max_length=4096
and hd_num=4
, full parameters tuning still encounter OOD.
Maybe some other advice to try for full parameters tuning?
@yuhangzang @cool-xuan The methods you provided are very useful for avoiding OOM at startup. I have tried them. However, now it always suddenly appears OOM after running dozens of steps. I have no idea what parameter configuration is really effective.
Do not forget to install the flash-attention 2.
You may need 8 A100 80G GPUs for full parameters tuning.
If you use LoRA fine-tuning, you can also decrease the value of lora_r
and lora_alpha
to avoid the OOM problem.
Following your fine-tune instruction, my finetune.sh is as
All batch sizes are set to 1 and only two images are encoded for each conversation. I run this shell on 4 A100 with 80G GPU memory, with out of memory in the first iteration.
All packages are same with your env docs/install.md, except torch=2.10 and cuda=12.1.
Any advice for this wired OOD?