Former-commit-id: 5ce3e0056948aded120b63e365a892f9d8c3c840
This commit is contained in:
hiyouga 2023-06-04 16:35:50 +08:00
parent eebe71699b
commit 063a83ab4e

View File

@ -199,7 +199,7 @@ def load_pretrained(
model = AutoModelForCausalLM.from_pretrained( model = AutoModelForCausalLM.from_pretrained(
model_args.model_name_or_path, model_args.model_name_or_path,
config=config, config=config,
torch_dtype=torch.bfloat16 if finetuning_args.compute_dtype == torch.bfloat16 else torch.float16, torch_dtype=torch.bfloat16 if model_args.compute_dtype == torch.bfloat16 else torch.float16,
low_cpu_mem_usage=True, low_cpu_mem_usage=True,
**config_kwargs **config_kwargs
) )