Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

micro_batch_size, step run time, total training time #134

Closed
AngainorDev opened this issue Jun 12, 2023 · 1 comment
Closed

micro_batch_size, step run time, total training time #134

AngainorDev opened this issue Jun 12, 2023 · 1 comment
Labels
question Further information is requested

Comments

@AngainorDev
Copy link
Contributor

Hi,

Thanks a lot for this clear and fat-free code base!
I'm training Falcon-7B with adapters-v2 and an Alpaca-formated dataset of mine.

As usual, I'm trying to max out the vram use for best training time but in this case, there is no significant gain since the step time is almost proportional to the batch size.

step times:
micro_batch_size 1, 159ms
micro_batch_size 2, 293ms
micro_batch_size 4, 560ms

Is this expected, or can this be optimized?

Note:
I'll also open a new issue as advised with my attempt at batch inference, exhibiting the same lack of gain when batching at inference, see
Lightning-AI/lit-llama#188 (comment)

@carmocca carmocca added the question Further information is requested label Sep 20, 2023
@carmocca
Copy link
Contributor

This would be expected in a memory-bound regime, where you are limited by the transfer of data. However, you would need to profile the code in your hardware to verify this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants