🗣️

GPUをレンタルしてJ-Moshiを使ってみた

2025/01/27に公開

最近話題になっている音声対話モデル「J-Moshi」が、日本語で人間のように自然な会話ができそうです。

https://x.com/atsumoto_ohashi/status/1882633871176630595

モデルはHFに公表されています。

https://github.com/nu-dialogue/j-moshi
https://github.com/kyutai-labs/moshi

スペックに関して、24GB以上のVRAMを搭載したGPUが必要のようです。

While we hope that the present codebase will work on Windows, we do not provide official support for it. We have tested the MLX version on a MacBook Pro M3. At the moment, we do not support quantization for the PyTorch version, so you will need a GPU with a significant amount of memory (24GB).

3090、4090あるいはP40、A6000...自分のMacbook Airには流石に無理なので、ネットでShared GPUを探してみます。

QuickPodでGPUを短時間レンタルする場合、1ドルもかからないので助かります。
(アフィリエイトではないです)

現在の値段は、

  • 3090(プラスSSD 30GB):1時間$0.15
  • 4090(プラスSSD 30GB):1時間$0.20

早速10ドルを課金し、4090 & SSD 30GBを選択します。イメージはubuntu 24.04

Connectでウェブターミナルが開いました。

Pythonをインストール

apt-get update
apt-get install -y build-essential
apt-get install -y python3  python3-dev python3-venv

mkdir project && cd project
python3 -m venv .venv
source .venv/bin/activate

pip install moshi gradio

moshiを立ち上げ、外部と共有するために--gradio-tunnelのパラメメーたを追加します。

python -m moshi.server --hf-repo nu-dialogue/j-moshi-ext --gradio-tunnel

遅延問題がなく、日本から接続しても普通に話せるのでよかった。

Discussion