Skip to content

Commit

Permalink
Merge pull request #26 from sgwhat/model_half
Browse files Browse the repository at this point in the history
Add model half to reduce memory usage
  • Loading branch information
sgwhat committed Mar 29, 2024
2 parents 8a97681 + 9b23022 commit af95b6c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion modules/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ def ipex_llm_loader(model_name):

if shared.args.device == "GPU":
import intel_extension_for_pytorch
model = model.to("xpu")
model = model.half().to("xpu")

tokenizer = AutoTokenizer.from_pretrained(path_to_model, trust_remote_code=shared.args.trust_remote_code)

Expand Down

0 comments on commit af95b6c

Please sign in to comment.