DavidFM43 commited on
Commit
ea2da4a
·
1 Parent(s): ba06853

tie weights

Browse files
Files changed (1) hide show
  1. app.py +1 -0
app.py CHANGED
@@ -12,6 +12,7 @@ model = AutoModelForCausalLM.from_pretrained(
12
  device_map="auto",
13
  revision="half",
14
  )
 
15
  tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
16
  # load the Lora model
17
  model = PeftModel.from_pretrained(model, peft_model_id)
 
12
  device_map="auto",
13
  revision="half",
14
  )
15
+ model.tie_weights()
16
  tokenizer = AutoTokenizer.from_pretrained(peft_model_id)
17
  # load the Lora model
18
  model = PeftModel.from_pretrained(model, peft_model_id)