[Fix] Unload lora in HF_Runner if needed (#5899)
This commit is contained in:
1 parent
799789afed
commit
58195dd588
1 file changed
+4
@@ -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,
|
||||
|
||||
Reference in new issue
Block a user