TorchMoE / MoE-Infinity

PyTorch library for cost-effective, fast and easy serving of MoE models.
Apache License 2.0
88 stars 5 forks source link

Add explicit resource release #21

Closed lausannel closed 4 months ago

lausannel commented 4 months ago

In the open-moe-llm-leaderboard, each task currently initializes separately.

However, the control over resource release timing is not precise, which can lead to potential issues. Specifically, there's a risk that a new ArcherPrefetchHandle instance might be initialized before the previous one is properly destructed.

To prevent this and ensure clean resource management, I propose that we explicitly release resources within the __del__ method. To address this issue, I recommend adding an interface for explicit resource release.