Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Smaller Whisper model? #1

Open
DigitLib opened this issue Jan 7, 2023 · 3 comments
Open

Smaller Whisper model? #1

DigitLib opened this issue Jan 7, 2023 · 3 comments

Comments

@DigitLib
Copy link

DigitLib commented Jan 7, 2023

Tested to convert fine tuned model and use it in Whisper. Work excellent! Thank you!

Whisper model is 2.9G while in HF is 6.17G.
Use this fine tuned model
https://huggingface.co/DrishtiSharma/whisper-large-v2-serbian/tree/main
Also 6.17G but get 5.7G.
Q: is there a way to reduce size to 2.9G for example? To be easier to download.

Use it in https://github.com/DigitLib/whisper-webui-vad

Just add new large-v2-sr and works excellent in Whisper app!!!

...and Happy New Year!!!

@bayartsogt-ya
Copy link
Owner

bayartsogt-ya commented Feb 15, 2023

Hey @DigitLib , sorry for the slow response.

Sounds so cool that you are enabling more functionality with whisper models!

The file size difference comes from how HF implemented Whisper vs the initial code.
You can easily see here what weights are changing or embedding layer vs linear layer.

I am not 100% sure about if the size should be tripled, but there definitely should be a difference for sure.

Q: is there a way to reduce size to 2.9G for example? To be easier to download.
For this question, I am not really sure.

@doublex
Copy link

doublex commented Mar 3, 2023

@DigitLib
Did you find a solution to reduce the size of the large-model to 3GB?

@doublex
Copy link

doublex commented Mar 3, 2023

For example: This model (3GB) increases to 6GB:
https://huggingface.co/bofenghuang/whisper-large-v2-cv11-german

This is what I have tried:

from multiple_datasets.hub_default_utils import convert_hf_whisper
convert_hf_whisper('bofenghuang/whisper-large-v2-cv11-german', './large-de.pt')

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants