[ModelRunner V2][BugFix] Free all model refs on shutdown (#47483)
Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
@@ -1555,6 +1555,10 @@ class GPUModelRunner(LoRAModelRunnerMixin):
|
|||||||
if hasattr(self, "kv_cache_config"):
|
if hasattr(self, "kv_cache_config"):
|
||||||
del self.kv_cache_config
|
del self.kv_cache_config
|
||||||
free_before_shutdown(self.vllm_config)
|
free_before_shutdown(self.vllm_config)
|
||||||
|
if hasattr(self, "model_state"):
|
||||||
|
del self.model_state
|
||||||
|
if getattr(self, "speculator", None) is not None:
|
||||||
|
self.speculator = None
|
||||||
if hasattr(self, "model"):
|
if hasattr(self, "model"):
|
||||||
del self.model
|
del self.model
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user