Skip to content

Commit 986c500

Browse files
authored
Respect cache_dir passed by user
When the user overrides default `cache_dir` we should respect it not only for tokenizer but also for the model
1 parent 86ac601 commit 986c500

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

qlora.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -267,6 +267,7 @@ def get_accelerate_model(args, checkpoint_dir):
267267
compute_dtype = (torch.float16 if args.fp16 else (torch.bfloat16 if args.bf16 else torch.float32))
268268
model = AutoModelForCausalLM.from_pretrained(
269269
args.model_name_or_path,
270+
cache_dir=args.cache_dir,
270271
load_in_4bit=args.bits == 4,
271272
load_in_8bit=args.bits == 8,
272273
device_map='auto',

0 commit comments

Comments
 (0)