Skip to content

Commit

Permalink
Update src/transformers/training_args.py
Browse files Browse the repository at this point in the history
Co-authored-by: amyeroberts <[email protected]>
  • Loading branch information
helloworld1 and amyeroberts authored Apr 19, 2024
1 parent e81cd98 commit 579a036
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transformers/training_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -1838,7 +1838,7 @@ def __post_init__(self):
if str(sync_module_states).lower() == "false" and str(cpu_ram_efficient_loading).lower() == "true":
# In this case, all the processes except the main process would have random weights leading
# to unexpected behaviour during training, thus throwing error here to prevent it.
raise ValueError("`sync_module_states` must be \"True\" if `cpu_ram_efficient_loading` is `\"True\"`")
raise ValueError("`sync_module_states` must be `\"True\"` if `cpu_ram_efficient_loading` is `\"True\"`")

os.environ[f"{prefix}SYNC_MODULE_STATES"] = sync_module_states
os.environ[f"{prefix}CPU_RAM_EFFICIENT_LOADING"] = cpu_ram_efficient_loading
Expand Down

0 comments on commit 579a036

Please sign in to comment.