Closed4

whisper-medusa-v1 を試す

kun432kun432

https://twitter.com/rohanpaul_ai/status/1819413510956122435

@aiOlaの新しい超高速「マルチヘッド」音声認識モデルがOpenAI Whisperを打ち負かす。

正式にはWhisper-Medusaと呼ばれるこのモデルは、Whisperをベースにしているが、一度にはるかに多くのトークンを予測する斬新な「マルチヘッドアテンション」アーキテクチャを使用している。

つまり、Whisperの上にさらにアテンション・ヘッドを追加したようだ。精度は同じだが、50%高速だという。彼らのデモは1つのテキストを1.9秒で処理するのに対し、「ベースライン」Whisperは4秒だ。コードとウェイトはMITの下でオープンソース化されている。

彼らは10ヘッドのモデルから始めたが、一度に20のトークンを予測できるより大きな20ヘッドのバージョンにすぐに拡張し、精度を損なうことなく、より高速な認識と書き起こしを可能にする予定である。

公式のブログ記事

https://aiola.com/blog/introducing-whisper-medusa/

kun432kun432

GitHubレポジトリ
https://github.com/aiola-lab/whisper-medusa

Whisperは音声トランスクリプションと翻訳のための先進的なエンコーダ・デコーダモデルであり、エンコードとデコードの段階を経て音声を処理する。Whisperはサイズが大きく推論速度が遅いため、性能を向上させるためにFaster-WhisperやSpeculative Decodingのような様々な最適化戦略が提案されてきた。我々のMedusaモデルは、反復ごとに複数のトークンを予測することでWhisperをベースにしており、WERの劣化は小さいが速度を大幅に向上させている。我々のモデルをLibriSpeechデータセットで学習・評価し、速度と精度の両方が向上する強力な性能を実証した。


Whisper Medusa アーキテクチャ
referred from https://github.com/aiola-lab/whisper-medusa


librispeechデータセットにおけるWhisper MedusaとWhisper vanillaの時間比較。Whisper Medusaの方がX2シーケンスを速く生成している。
referred from https://github.com/aiola-lab/whisper-medusa

モデル
https://huggingface.co/aiola/whisper-medusa-v1

kun432kun432

ローカルではどうしても動かなかったので、Colaboratoryで。

結論から言うと日本語ではうまく動かなかったのでポイントだけ。手順は割愛するけど、基本的にREADME通りで進めた。

  • ランタイムはCPUでもよいがハイメモリじゃないとOOM
  • バージョン依存が結構キツイ印象。
    • ColabratoryはCUDA12.1みたいだけど、READMEにあるようにCUDA11.8に落としている。
    • その他のパッケージもREADME/requirements.txtのとおりに諸々ダウングレードした。
  • 入力する音声ファイル
    • フォーマットは、wav/モノラル/16000khzにしておく。これ以外だとコケる。
    • 英語はイケるが、日本語はダメ。日本語文字が一切表示されず、以下のような壊れたLLMのような出力になった。
      • not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.ar are not.com.aroughing.oughingoughingoughingoughingoughingoughingoughingoughingoughingoughingoughingoughingoughing

Whisper-Medusaの仕組みをちゃんと理解していないけども、モデルが日本語を学習してないということなのかな?

20240807追記

ここにちゃんと書いてある、というかどうやら追記されたっぽい。

https://huggingface.co/aiola/whisper-medusa-v1#training-details

aiola/whisper-medusa-v1 was trained on the LibriSpeech dataset to perform audio translation. The Medusa heads were optimized for English, so for optimal performance and speed improvements, please use English audio only.

このスクラップは2ヶ月前にクローズされました