Update README.md
Browse files
README.md
CHANGED
@@ -24,7 +24,7 @@ from peft import PeftModel, PeftConfig
|
|
24 |
|
25 |
def get_model(peft_model_name):
|
26 |
config = PeftConfig.from_pretrained(peft_model_name)
|
27 |
-
base_model = AutoModelForSequenceClassification.from_pretrained(config.base_model_name_or_path)
|
28 |
model = PeftModel.from_pretrained(base_model, peft_model_name)
|
29 |
model = model.merge_and_unload()
|
30 |
model.eval()
|
|
|
24 |
|
25 |
def get_model(peft_model_name):
|
26 |
config = PeftConfig.from_pretrained(peft_model_name)
|
27 |
+
base_model = AutoModelForSequenceClassification.from_pretrained(config.base_model_name_or_path, num_labels=1)
|
28 |
model = PeftModel.from_pretrained(base_model, peft_model_name)
|
29 |
model = model.merge_and_unload()
|
30 |
model.eval()
|