bonyashiri/test-kotoba-whisper-v2.0

0

stars

10

commits

Python

primary language

Nov 29, 2024

updated

README

test-kotoba-whisper-v2.0

GPUの使用に必要な諸々のツールをインストール(Windowsのみ)

uvのインストール

  • Windows
    • コマンドプロンプトで以下を実行
      • powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.2/install.ps1 | iex"
    • (ぼんやはgit bashを使っているので).bash_profile に下記を追記
      • export PATH="${PATH}:${HOME}/.local/bin"
    • python3.12をインストール
      • $ uv python install cpython-3.12
  • Mac
    • $ brew install uv

ffmpegのインストール

プロジェクトセットアップ

  • Windows
    • 以下を順番に実行
    1. $ uv sync --group torch
    2. $ uv sync --group torch --group flash-attn
    • flash-attnのインストールに数時間かかります
  • Mac
    1. Macにインストールする場合はcuda用にビルドしたtorchもflash-attnも必要ないので [dependency-groups] より下を全てコメントアウトする
    2. $ uv sync

推論実行

  • $ uv run inference_pipeline.py

メモ: pyproject.toml 作成手順

  • 下記を参考に pyproject.toml に torch の依存を書く。ただし dependency-groups を分ける
  • $ uv add transformers accelerate datasets
  • $ uv add llvmlite
  • $ uv add numba
  • $ uv add -U openai-whisper
  • $ uv add soundfile numpy
  • $ uv add hatchling editables wheel
  • $ uv add --group flash-attn flash-attn --no-build-isolation --verbose

参考

Contributors

bonyashiri

10 commits

bonyashiri/test-kotoba-whisper-v2.0

0

stars

10

commits

Python

primary language

Nov 29, 2024

updated

README

test-kotoba-whisper-v2.0

GPUの使用に必要な諸々のツールをインストール(Windowsのみ)

uvのインストール

  • Windows
    • コマンドプロンプトで以下を実行
      • powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/0.5.2/install.ps1 | iex"
    • (ぼんやはgit bashを使っているので).bash_profile に下記を追記
      • export PATH="${PATH}:${HOME}/.local/bin"
    • python3.12をインストール
      • $ uv python install cpython-3.12
  • Mac
    • $ brew install uv

ffmpegのインストール

プロジェクトセットアップ

  • Windows
    • 以下を順番に実行
    1. $ uv sync --group torch
    2. $ uv sync --group torch --group flash-attn
    • flash-attnのインストールに数時間かかります
  • Mac
    1. Macにインストールする場合はcuda用にビルドしたtorchもflash-attnも必要ないので [dependency-groups] より下を全てコメントアウトする
    2. $ uv sync

推論実行

  • $ uv run inference_pipeline.py

メモ: pyproject.toml 作成手順

  • 下記を参考に pyproject.toml に torch の依存を書く。ただし dependency-groups を分ける
  • $ uv add transformers accelerate datasets
  • $ uv add llvmlite
  • $ uv add numba
  • $ uv add -U openai-whisper
  • $ uv add soundfile numpy
  • $ uv add hatchling editables wheel
  • $ uv add --group flash-attn flash-attn --no-build-isolation --verbose

参考

Contributors

bonyashiri

10 commits

Languages

Python

100.0%