From 1e41fa0c8c6ee1c46f2530d99d5164140d35d29e Mon Sep 17 00:00:00 2001 From: Daniel Han-Chen Date: Wed, 6 Mar 2024 05:07:37 +1100 Subject: [PATCH] Update save.py --- unsloth/save.py | 1 + 1 file changed, 1 insertion(+) diff --git a/unsloth/save.py b/unsloth/save.py index 51ddeb30e7..5c1bceb38f 100644 --- a/unsloth/save.py +++ b/unsloth/save.py @@ -369,6 +369,7 @@ def unsloth_save_model( # Switch to our fast saving modules if it's a slow PC! n_cpus = psutil.cpu_count(logical = False) + if n_cpus is None: n_cpus = psutil.cpu_count() if n_cpus is None: n_cpus = 1 if safe_serialization is None: