merge-hf-and-lora-to-hf.py

This commit is contained in:
FNsi 2023-05-22 19:31:17 +08:00 committed by GitHub
parent 29995194e3
commit b78ceb1a2e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -40,7 +40,7 @@ tokenizer.save_pretrained(args.out)
# load model.
model = LlamaForCausalLM.from_pretrained(
args.model_path,
args.model,
load_in_8bit=False,
torch_dtype=torch.float16,
device_map={"": "cpu"},