How to convert PEFT-LoRA trained model into original whisper architecture? #2582
Unanswered
bansal-sid
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hello, I have trained whisper large-v2 using PEFT-LoRA. I referred https://github.com/huggingface/peft/blob/main/examples/int8_training/peft_bnb_whisper_large_v2_training.ipynb
One can also refer #988 for PEFT-LoRA training.
I am trying to convert the trained model to OpenAI-Whisper's architecture from HuggingFace architecture.
I also trained small model of whisper and large-v2 using deepseed for which I was able to convert the model into OpenAI's structure.
For conversion, I followed #830
The conversion can also be seen at https://github.com/huggingface/transformers/blob/68e85fc822097b3df8d685a4705804348245284d/src/transformers/models/whisper/convert_openai_to_hf.py#L86
Now, the issue is I'm unable to repeat this for the model trained using PEFT-LoRA.
My code is below:
After conversion, there were no missing or unexpected keys as I had removed some extra layers that had SCB, lora_, and weight_norm at the end. I did this after the discussion with GPT.
Now, since the layer swapping happened without any error, I got the below error on transcription that I'm unable to get:
Beta Was this translation helpful? Give feedback.
All reactions