You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A PEFT model cannot be merged with the quantized model and pushed to hub...The error is:
Cannot merge LORA layers when the model is gptq quantized
after trying:
model_id = "ybelkada/llama-7b-GPTQ-test"
model = AutoModelForCausalLM.from_pretrained(model_id, device_map="auto")
from peft import PeftModel
# load PEFT model with new adapters
model = PeftModel.from_pretrained(
model,
adapter_model_name,
)
model = model.merge_and_unload() # merge adapters with the base model.
Note that 'model' is the gptq quantized model, origin
I had originally posted in autogptq but realise this may be a question for here.
### Who can help?
@fxmarty perhaps you could assist? Maybe there is an alternate approach
### Information
- [ ] The official example scripts
- [X] My own modified scripts
### Tasks
- [ ] An officially supported task in the `examples` folder (such as GLUE/SQuAD, ...)
- [ ] My own task or dataset (give details below)
### Reproduction (minimal, reproducible, runnable)
See above
### Expected behavior
Typically, this approach of merging (like when I do it with NF4 quantization) will work.
The text was updated successfully, but these errors were encountered:
Hi @RonanKMcGovern, this is not a bug. We still haven't implemented the merge_and_unload() for gptq quantized model. Feel free to request this as a feature enhancement in peft library.
System Info
after trying:
Note that 'model' is the gptq quantized model, origin
I had originally posted in autogptq but realise this may be a question for here.
The text was updated successfully, but these errors were encountered: