[Fix] Unload lora in HF_Runner if needed (#5899)

This commit is contained in:
Qiaolin Yu
2025-04-29 23:17:42 -04:00
committed by GitHub
parent 799789afed
commit 58195dd588

View File

@@ -423,6 +423,10 @@ class HFRunner:
)
del input_logits
if lora_paths is not None and lora_paths[i] is not None:
# Unload the LoRA adapter if it is used
model.unload()
return ModelOutput(
output_strs=output_strs,
top_input_logprobs=top_input_logprobs,