From 15c95e0b26efd73174dd967061bb9a6048930a44 Mon Sep 17 00:00:00 2001 From: rain1 Date: Mon, 24 Jul 2023 19:24:18 +0100 Subject: [PATCH] Update qlora.py add n_gpus = 0 default value to get_accelerate_model --- qlora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/qlora.py b/qlora.py index 23e675ee..2f9f7ed4 100644 --- a/qlora.py +++ b/qlora.py @@ -287,7 +287,7 @@ def touch(fname, times=None): self.save_model(args, state, kwargs) def get_accelerate_model(args, checkpoint_dir): - + n_gpus = 0 if torch.cuda.is_available(): n_gpus = torch.cuda.device_count() if is_ipex_available() and torch.xpu.is_available():