Merge pull request #347 from alex4321/peft-model-use-adapter-name

Use `adapter_name` for `get_gptq_peft_model` with `train_mode=True`
This commit is contained in:
潘其威(William) 2023-09-26 13:55:06 +08:00 committed by GitHub
commit 04db761eed
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -402,7 +402,7 @@ def get_gptq_peft_model(
with hijack_peft_mappings(): with hijack_peft_mappings():
try: try:
if train_mode: if train_mode:
peft_model = get_peft_model(model.model, peft_config) peft_model = get_peft_model(model.model, peft_config, adapter_name=adapter_name)
else: else:
peft_model = PeftModel.from_pretrained(model.model, model_id, adapter_name) peft_model = PeftModel.from_pretrained(model.model, model_id, adapter_name)
except: except: