huggingface / optimum-intel

🤗 Optimum Intel: Accelerate inference with Intel optimization tools
https://huggingface.co/docs/optimum/main/en/intel/index
Apache License 2.0
364 stars 101 forks source link

free memory after model export #800

Closed eaidova closed 3 weeks ago

eaidova commented 3 weeks ago

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

HuggingFaceDocBuilderDev commented 3 weeks ago

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.