Multifunction consumes linearly increasing memory in the number of functions, even with all the weights shared #2351
Labels
feature request
Functionality does not currently exist, would need to be created as a new feature (type)
🌱 Describe your Feature Request
Hi, when creating a multifunction with many functions that reuses the same weights for all cases, the memory increases on the number of functions. It would be useful to reduce the memory usage for speed and accessibility to use.
Example code to reproduce the problem
This code creates a simple model with 1 billion parameters, and creates many functions with different input sizes for the same model
Included a video showing the RAM usage.
The text was updated successfully, but these errors were encountered: