'Reduce auto-sklearn model size

I am using auto-sklearn to generate a regression model based on some data. After running for several hours, I save the generated model to disk for later use with joblib and the generated file has a size of 2.5 GiB.

How can I reduce the file size of the saved model? I only need to be able to make predictions with the model in the future.



Solution 1:[1]

Depending on the kind of model you use, there's a strong probability that you absolutely can't. If you have such a large model, I guess it is a Neural Network or a Random Forest model. And unfortunately there are no easy way to do this, and if you do this, you will most likely decrease your accuracy.

For Neural Networks there are no way to do this, just decrease the complexity of your network. For Random Forest, you can have a look to Tree Pruning, however I don't think you will earn a significant amount of memory.

If your question was: is there anything in the model only useful for training that I can delete => maybe a few variables, nothing big enough to be worth your time (a few KB at maximum).

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1