Tonic commited on
Commit
0caf514
1 Parent(s): fc4a83f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -60,13 +60,11 @@ tokenizer.pad_token = tokenizer.eos_token
60
  tokenizer.padding_side = 'left'
61
 
62
  # Load the GaiaMiniMed model with the specified configuration
63
-
64
  peft_config = PeftConfig.from_pretrained("Tonic/GaiaMiniMed")
 
65
 
66
- peft_model = PeftModel.from_pretrained(peft_model, "Tonic/GaiaMiniMed")
67
-
68
- # Using Optimum
69
-
70
  peft_model = peft_model.to_bettertransformer("tiiuae/falcon-7b-instruct")
71
 
72
 
 
60
  tokenizer.padding_side = 'left'
61
 
62
  # Load the GaiaMiniMed model with the specified configuration
63
+ # Load the Peft model with a specific configuration
64
  peft_config = PeftConfig.from_pretrained("Tonic/GaiaMiniMed")
65
+ peft_model = PeftModel.from_pretrained("Tonic/GaiaMiniMed", config=peft_config)
66
 
67
+ # Now you can use peft_model without any NameError
 
 
 
68
  peft_model = peft_model.to_bettertransformer("tiiuae/falcon-7b-instruct")
69
 
70