Skip to content

Commit

Permalink
For non low_resource llama loading code, I added an argument low_cpu_…
Browse files Browse the repository at this point in the history
…mem_usage=True, drastically speeding up load time (cuts more than a minute off of load)
  • Loading branch information
Cory authored and Cory committed Oct 11, 2023
1 parent ef1ac08 commit 5ab62fe
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions minigpt4/models/mini_gpt4.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,7 @@ def __init__(
self.llama_model = LlamaForCausalLM.from_pretrained(
llama_model,
torch_dtype=torch.float16,
low_cpu_mem_usage=True,
)

if lora_r > 0:
Expand Down

0 comments on commit 5ab62fe

Please sign in to comment.