Open kyakuno opened 1 year ago
入力は80x3000のmelspectrogram、出力は1x448のtoken_id。
MatmulはFCになっている。Geluが追加されている。
このモデルはweightはint8だが、tensorはfloatのweight quantizationになっている。
generateでラップしない場合のtfliteファイル。こちらは素直なencoder/decoder統合モデル。
kv_cacheはoutputsにつながっているが、inputsにはつながっていないので、Stateを保存しておく仕組みがありそう。
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.
下記もmixed precisionとdynamic quantizationで実装されている。 https://github.com/microsoft/Olive/tree/main/examples/whisper
https://github.com/usefulsensors/openai-whisper