Update causal_lm.py

This commit is contained in:
Florian Zimmermeister 2023-07-11 18:36:04 +02:00 committed by GitHub
parent f2fae6db91
commit 198e6179ef
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -481,7 +481,7 @@ class CausalLM(Model):
device_map="auto" device_map="auto"
if torch.cuda.is_available() and torch.cuda.device_count() > 1 if torch.cuda.is_available() and torch.cuda.device_count() > 1
else None, else None,
load_in_8bit=quantize == "bitsandbytes", load_in_4bit=quantize == "bitsandbytes",
trust_remote_code=trust_remote_code, trust_remote_code=trust_remote_code,
) )
if torch.cuda.is_available() and torch.cuda.device_count() == 1: if torch.cuda.is_available() and torch.cuda.device_count() == 1: