mirror of
https://github.com/hiyouga/LLaMA-Factory.git
synced 2025-10-14 23:58:11 +08:00
fix export on cpu device
Former-commit-id: e4722a9a627ea4e9a1341cc00a3108dd06a6b550
This commit is contained in:
parent
f4f71f2797
commit
2dca53962e
@ -284,8 +284,9 @@ def patch_config(
|
||||
|
||||
init_kwargs["torch_dtype"] = model_args.compute_dtype
|
||||
if not is_deepspeed_zero3_enabled():
|
||||
init_kwargs["device_map"] = {"": get_current_device()}
|
||||
init_kwargs["low_cpu_mem_usage"] = True
|
||||
if is_trainable:
|
||||
init_kwargs["device_map"] = {"": get_current_device()}
|
||||
|
||||
|
||||
def patch_model(
|
||||
|
Loading…
x
Reference in New Issue
Block a user