boheumd / MA-LMM

(2024CVPR) MA-LMM: Memory-Augmented Large Multimodal Model for Long-Term Video Understanding
https://boheumd.github.io/MA-LMM/
MIT License
221 stars 26 forks source link

Will reducing the batch size for training from 32 to 4 result in performance loss? #20

Closed longmalongma closed 3 months ago

longmalongma commented 3 months ago

hi, We are replicating your work, using 4-card 4090. During training, we need to reduce the batch size from 32 to 4. Will this result in a significant loss of performance?

boheumd commented 3 months ago

Hi, in this case, you can increase the run.accum_grad_iters from 1 to 8 to keep the total batch size 32 unchanged.

longmalongma commented 3 months ago

Hi, in this case, you can increase the run.accum_grad_iters from 1 to 8 to keep the total batch size 32 unchanged.

Thank you for your reply. This can prevent performance loss, right?

boheumd commented 3 months ago

Hi, in this case, you can increase the run.accum_grad_iters from 1 to 8 to keep the total batch size 32 unchanged.

Thank you for your reply. This can prevent performance loss, right?

I did not try this before, but I think it can prevent the performance loss.

longmalongma commented 3 months ago

Hi, in this case, you can increase the run.accum_grad_iters from 1 to 8 to keep the total batch size 32 unchanged.

Thank you for your reply. This can prevent performance loss, right?

I did not try this before, but I think it can prevent the performance loss.

Ok. Thank you very much!