convert a PeftModel back to the original model but with updated weights

77 Views Asked by At

I finetuned an opeai-whisper model using LoRa with huggingface. I want to "unwrap" this model so that I end up with the original WhisperForConditionalGeneration or WhisperModel model. I also want the LoRa layer weights to be added to the original weights, preserving the original model architecture. I searched around but can't seem to find any API that can do this conversion.

PeftModel

model

WhisperForConditionalGeneration model

enter image description here

0

There are 0 best solutions below