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

ADD whisper #53

Open
kyakuno opened this issue Mar 7, 2023 · 10 comments
Open

ADD whisper #53

kyakuno opened this issue Mar 7, 2023 · 10 comments
Assignees

Comments

@kyakuno
Copy link
Contributor

kyakuno commented Mar 7, 2023

https://github.com/usefulsensors/openai-whisper

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 23, 2024

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 23, 2024

medium model
nyadla-sys/whisper.tflite#11

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

入力は80x3000のmelspectrogram、出力は1x448のtoken_id。

スクリーンショット 2024-04-24 10 30 01

スクリーンショット 2024-04-24 10 30 19

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

MatmulはFCになっている。Geluが追加されている。

@kyakuno kyakuno mentioned this issue Apr 24, 2024
@kyakuno kyakuno self-assigned this Apr 24, 2024
@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

このモデルはweightはint8だが、tensorはfloatのweight quantizationになっている。

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

generateでラップしない場合のtfliteファイル。こちらは素直なencoder/decoder統合モデル。

スクリーンショット 2024-04-24 12 21 19

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

kv_cacheはoutputsにつながっているが、inputsにはつながっていないので、Stateを保存しておく仕組みがありそう。

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

量子化の話
tensorflow/tensorflow#58451

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

whisperはint8では精度不足という話。

It might not be possible to get expected results from int8 models ( because of model architecture itself). So, Work around might be to use hybrid models as you suggested.

@kyakuno
Copy link
Contributor Author

kyakuno commented Apr 24, 2024

下記もmixed precisionとdynamic quantizationで実装されている。
https://github.com/microsoft/Olive/tree/main/examples/whisper

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

No branches or pull requests

1 participant