0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

ROCmでllm-jp-4、Bonsai-8B(1bit)、Gemma4をベンチマーク

0
Posted at

LLM ベンチマーク(llama-bench / ROCm)

概要

llama.cpp の llama-bench を使用して、以下の3モデルを AMD ROCm 環境でベンチマーク計測しました。
MLCommons 公式フォーマットではありませんが、計測指標(スループット・レイテンシ)は MLPerf Inference と同等です。

環境

項目 内容
GPU AMD RYZEN AI MAX+ 395 w/ Radeon 8060S (gfx1151)
VRAM 48 GB
ROCm 7.2.0
HSA_OVERRIDE_GFX_VERSION 11.5.1
バックエンド llama.cpp (ROCm/HIP)
フラッシュアテンション 有効 (-fa 1)
GPU レイヤー 全層オフロード (-ngl 99)
繰り返し回数 3回(平均・標準偏差を算出)

テストモデル

モデル 量子化 ファイルサイズ 備考
llm-jp-4-8B-thinking Q4_K_M 4.94 GiB LLM-jp 8B 思考モデル
llm-jp-4-32B-a3b-thinking Q4_K_M 19.93 GiB LLM-jp 32B MoE(実効パラメータ約3B)
Bonsai-8B Q1_0(1-bit) 1.07 GiB Prism ML製 エンドツーエンド1bitモデル
Gemma4-31B-it Q4_K_M 17.05 GiB Google Gemma 4 インストラクションチューン

ベンチマーク結果

モデル pp128 (t/s) pp512 (t/s) tg128 (t/s)
llm-jp-4-8B 1220 ± 0.2 1248 ± 3.2 40.7 ± 0.03
llm-jp-4-32B-a3b (MoE) 413 ± 8.0 1135 ± 7.5 76.8 ± 0.26
Bonsai-8B (1-bit) 428 ± 1.0 826 ± 0.8 116 ± 0.23
Gemma4-31B 258 ± 26.3 329 ± 0.5 10.7 ± 0.01
  • pp (prompt processing):プロンプトのプリフィル速度(トークン/秒)
  • tg (token generation):テキスト生成速度(トークン/秒)
  • 数値が大きいほど高速

考察

Bonsai-8B(1-bit)― 生成速度ナンバーワン

116 t/s という最速の生成速度を記録。ファイルサイズはわずか 1.07 GiB で、FP16(16.38 GiB)の約1/15。
Q1_0 カーネルは VRAM 帯域幅の利用効率が非常に高く、量子化精度の低さをスピードで補っています。

llm-jp-4-32B-a3b(MoE)― コスパ最強

32B の総パラメータを持ちながら実効パラメータは約 3B(MoE 構造)のため、生成速度は 76.8 t/s と高速。
同サイズの dense モデルと比べて大幅に高いスループットを実現しています。

llm-jp-4-8B ― プリフィル最速

pp512 で 1248 t/s を記録し、4モデル中最速のプリフィル性能。
RAG や長文入力が多いユースケースで特に有利です。

Gemma4-31B ― 生成が遅い

生成速度 10.7 t/s は4モデル中最低。Gemma4 のスライディングウィンドウ+グローバルアテンションの
インターリーブ構造が llama.cpp の ROCm カーネルと相性が悪く、並列化効率が低下していると考えられます。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?