ejschwartz commited on
Commit
064d414
·
1 Parent(s): 65b964c

Revert "Try to disable offloading to fix peft errors"

Browse files

This reverts commit 65b964cbde68046061db6707beb3e3922377b11a.

Files changed (1) hide show
  1. main.py +2 -1
main.py CHANGED
@@ -122,11 +122,12 @@ tokenizer = AutoTokenizer.from_pretrained(base_model_id)
122
  model = AutoModelForCausalLM.from_pretrained(base_model_id,
123
  device_map="auto",
124
  #quantization_config=quantization_config
 
125
  )
126
  print("Loaded base model")
127
 
128
  # Load the PEFT adapter onto the base model
129
- model = PeftModel.from_pretrained(model, adapter_id)
130
  model = model.merge_and_unload()
131
  print("Loaded peft model")
132
 
 
122
  model = AutoModelForCausalLM.from_pretrained(base_model_id,
123
  device_map="auto",
124
  #quantization_config=quantization_config
125
+ offload_folder="."
126
  )
127
  print("Loaded base model")
128
 
129
  # Load the PEFT adapter onto the base model
130
+ model = PeftModel.from_pretrained(model, adapter_id, offload_folder=".")
131
  model = model.merge_and_unload()
132
  print("Loaded peft model")
133