mirror of
https://github.com/QwenLM/Qwen.git
synced 2026-05-20 16:35:47 +08:00
Fix bug of low_cpu_mem_usage in finetune.py.
This commit is contained in:
@@ -291,9 +291,9 @@ def train():
|
|||||||
):
|
):
|
||||||
raise RuntimeError("ZeRO3 is incompatible with LoRA when finetuning on base model.")
|
raise RuntimeError("ZeRO3 is incompatible with LoRA when finetuning on base model.")
|
||||||
|
|
||||||
model_load_kwargs = {}
|
model_load_kwargs = {
|
||||||
if deepspeed.is_deepspeed_zero3_enabled():
|
'low_cpu_mem_usage': not deepspeed.is_deepspeed_zero3_enabled(),
|
||||||
model_load_kwargs['low_cpu_mem_usage'] = False
|
}
|
||||||
|
|
||||||
# Set RoPE scaling factor
|
# Set RoPE scaling factor
|
||||||
config = transformers.AutoConfig.from_pretrained(
|
config = transformers.AutoConfig.from_pretrained(
|
||||||
|
|||||||
Reference in New Issue
Block a user