Skip to content

Commit 301e6e2

Browse files
committed
try only adding load_in_8bit if we really need to
1 parent bf827ea commit 301e6e2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

elk/utils/hf_utils.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,8 @@ def instantiate_model(
7474
model_str=model_str, is_cpu=is_cpu, load_in_8bit=load_in_8bit
7575
)
7676
# Add load_in_8bit to kwargs
77-
kwargs["load_in_8bit"] = load_in_8bit
77+
if load_in_8bit:
78+
kwargs["load_in_8bit"] = load_in_8bit
7879

7980
archs = model_cfg.architectures
8081
if not isinstance(archs, list):

0 commit comments

Comments
 (0)