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

question about peak memory in TinyTL #12

Open
Tsingularity opened this issue Apr 1, 2022 · 2 comments
Open

question about peak memory in TinyTL #12

Tsingularity opened this issue Apr 1, 2022 · 2 comments

Comments

@Tsingularity
Copy link

Hi, thanks for the great work!

We implemented the update-bias-only transfer learning in our own codebase, however, we didn't notice a huge decrease of peak memory / memory usage during fine-tuning as shown in your paper (only <10% decrease vs >90% claimed in ur paper). The command we used to check GPU memory usage is torch.cuda.max_memory_allocated().

We also checked your released codebase, and the only relevant part is this, which is the same as our implementation.

So I am just wondering how could we get this training memory decrease empirically? Or we're using the wrong command to check memory usage?

Thanks!

@han-cai
Copy link
Collaborator

han-cai commented Apr 6, 2022

Pytorch has its internal memory management system, which usually occupies a larger memory size than it actually needs.
To get the memory decrease on real hardware devices, you need to explicitly manage the memory allocation step. As far as I know, Pytorch currently does not support this feature. So the only way I know to achieve this is to write a customized training engine instead of using Pytorch.

@Tsingularity
Copy link
Author

thanks for the clarification!

just curious, is this implemented in your tiny engine? if yes, do u have any plan for releasing the code for it? (i saw on some other issues, people also asked about this)

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

No branches or pull requests

2 participants