Unverified Commit 58195dd5 authored by Qiaolin Yu's avatar Qiaolin Yu Committed by GitHub
Browse files

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

parent 799789af
...@@ -423,6 +423,10 @@ class HFRunner: ...@@ -423,6 +423,10 @@ class HFRunner:
) )
del input_logits 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( return ModelOutput(
output_strs=output_strs, output_strs=output_strs,
top_input_logprobs=top_input_logprobs, top_input_logprobs=top_input_logprobs,
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment