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

free memory after model export #800

Merged
merged 1 commit into from
Jul 4, 2024

Conversation

eaidova
Copy link
Collaborator

@eaidova eaidova commented Jul 4, 2024

What does this PR do?

with usage export_from_model function that accepts model as argument, memory used for initialization pytorch model can not be free after conversion (as export process is not model's owner). It affects memory consumption if model used with export=True argument. Added model removing in main_export where model was initialized for making sure that we completely remove pytorch model from memory

@eaidova eaidova requested a review from echarlaix July 4, 2024 05:23
@eaidova eaidova force-pushed the ea/free_memory_after_convert branch from c32e065 to a6d4b61 Compare July 4, 2024 05:26
@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@echarlaix echarlaix merged commit e7ffee9 into huggingface:main Jul 4, 2024
11 of 16 checks passed
echarlaix pushed a commit that referenced this pull request Jul 8, 2024
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

Successfully merging this pull request may close these issues.

3 participants