ggml-org

Activity

Stars and mentions · Last 30 days, Oct 7 – Nov 5

GitHub stars3,304
Mentions427
04386129172Oct 7Oct 21Nov 5
UTC days · repositories ggml-org owns6 repositories

Top repositories

ggml-org’s repositories ranked by new forks, as on trending.

Loading

Contributes to

Repositories outside ggml-org’s account where ggml-org opened or reviewed pull requests in the past 365 days.

Who noticed ggml-org

Everyone who starred or forked ggml-org’s repositories since the archive began in 2011.

Notable accounts

Ordered by the stars their own repositories have received.

Biggest fans

Accounts that starred the most of these repositories.

Breakout weeks

Each repository’s best week of new stars, with the release published around it.

Mentions

426posts
Nov 611 posts
  1. DGX Sparkでllama.cppの投機デコードを比較してみた TL;DR DGX Spark + llama.cpp で、Qwen3.8-27B(Q4)に投機デコードとベースモデルを含む計6方式を試しました MTP と DFlash が約21.6 tok/s で最速。Baseline(11.82 tok/s)の約1.83倍です MTP はメモリ増加が約2.1 GiB と小さく、設定も簡単。今回の環境では MTP が一番使いやすかった です 図1 平均速度(2〜6回目)。点線はBaseline 1. はじめに DGX Spark は128GBのUnified Memoryを積んでいて、デスクトップサイズでもかなり大きなLLMを動かせます。ただ、LLMはトークンを1つ生成するたびにモデルの重みをメモリから読み出すので、生成速度は演算性能よりもメモリ帯域に引っ張られがちです。DGX Spark のメモリ帯域は公称273 GB/sです。(ハードウェア仕様) そこで気になったのが投機デコードです。次のトークン候補を先にまとめて用意しておき、ターゲットモデルが一度に検証することで、重みの読み出し1回あたりに進めるトークン数を増やせます。メモリ帯域が詰まりやすい DGX Spark なら効くのでは?と考えたのが出発点です。 方式ごとにドラフトの作り方や必要な重み、設定方法が違うので、実際に使うモデルで比べてみました。 2. 投機デコードのしくみ 投機実行は、ベースモデル+ドラフトモデルのように2つのモデルを使用しています。比較のため、投機実行しない通常のベースモデルのみをもちいた実行結果は、Baseline としています。 まずは全方式に共通する流れです。 図2 投機デコードの基本的な流れ ポイントは、候補が当たれば1回の検証で複数トークン進めることです。外れても出力はターゲットモデル単体と同じになるので、品質は変わりません。方式による違いは「ドラフト役を誰がやるか」です。 3. 比較する投機方式 llama.cpp はドラフトモデルを使う方式や、過去の文脈から候補を探す方式などをサポートしています。(llama.cppの投機デコード資料) ドラフト役で分類すると、次の3グループになります。 図3 ドラフト役による方式の分類 各方式のイメージ MTP(Multi-Token Prediction) ターゲットモデルに付属するMTP用の重みが、本体の内部状態から「この先の数トークン」をまとめて予測します。 DFlash / DFlash2 ターゲット側の情報を受け取った小さな専用ドラフトモデルが、候補をブロック単位でまとめて出します。DFlash と DFlash2 は仕組みは同系統で、使うドラフトモデルが異なります。 DSpark DFlash 系のブロック生成に、直前のトークンを使うMarkov的な補正を加えます。専用ドラフトモデルが必要です。 ngram-mod 生成済みのテキストからn-gramを登録しておき、過去に出てきた並びをそのまま候補にします。ドラフト用のLLMは不要です。 使用したモデル 方式 llama.cppの指定 ドラフトモデル Baseline - - MTP --spec-type draft-mtp mtp-Qwen3.8-27B-Q4_0.gguf DFlash --spec-type draft-dflash dflash-Qwen3.8-27B-Q4_0.gguf DFlash2 --spec-type draft-dflash Qwen3.8-27B-DFlash2-Q4_K_M.gguf DSpark --spec-type draft-dspark Qwen3.8-27B-DSpark-Q8_0.gguf ngram-mod --spec-type ngram-mod 不要 ターゲットモデルはすべて ggml-org/Qwen3.8-27B-GGUF です。 ドラフトモデルの見つけやすさ 参考として、Hugging Face の方式タグ付きリポジトリ数も見てみました(2026年10月30日時点)。 タグ 件数 一覧 MTP 3,713 Hugging Face DFlash 598 Hugging Face DFlash2 未確認 Hugging Face DSpark 371 Hugging Face EAGLE-3 405 Hugging Face ngram-mod 専用モデルなし - 量子化版や派生モデルも含んだ数なので、llama.cpp でそのまま動くモデルの数ではありません。「探したときに見つかりやすいか」の目安くらいに見てください。 4. 検証環境 項目 内容 マシン DGX Spark(NVIDIA GB10) OS Ubuntu 24.04.5 LTS メモリ Unified Memory 128GB 推論エンジン llama.cpp 0.7.0-dev(commit d854d98) モデル管理 llama-swap ターゲットモデル Qwen3.8-27B(Q4量子化) 生成トークン数 1024 測定回数 各方式6回(2〜6回目を平均) 5. llama-swapの設定 llama-swap に方式ごとのモデル名を登録し、OpenAI互換APIのモデル名で切り替えました。ターゲットモデル・コンテキスト長・GPUオフロードはそろえ、方式ごとの引数とドラフトモデルだけを変えています。 models: "Qwen3.8-27B-Q4-Baseline": cmd: > llama-server --host 127.0.0.1 --port ${PORT} -hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M --n-gpu-layers 99 --ctx-size 131072 --jinja "Qwen3.8-27B-Q4-MTP": cmd: > llama-server --host 127.0.0.1 --port ${PORT} -hf ggml-org/Qwen3.8-27B-GGUF:Q4_K_M --spec-type draft-mtp --n-gpu-layers 99 --ctx-size 131072 --jinja DFlash / DFlash2 / DSpark / ngram-mod も同じ要領で、--spec-type とドラフトモデル、--spec-draft-n-max などを指定します。 6. 測定方法 全方式で同じプロンプト・同じ設定(temperature: 0、max_tokens: 1024)を使いました。各方式6回実行し、2〜6回目の平均を速度としています。 { "model": "$MODEL", "messages": [{ "role": "user", "content": "小規模な組織が、重要な業務データを長期にわたって安全に保管するための設計ガイドを書いてください。目的、脅威の想定、保存先の選定、暗号化とアクセス制御、バックアップ頻度、復元テスト、運用上の注意点の順に説明してください。各項目では具体例と判断理由を示し、最後に実行可能な導入手順を番号付きでまとめてください。特定製品の宣伝はせず、全体で十分に詳しい回答にしてください。" }], "temperature": 0, "max_tokens": 1024 } 7. 結果 生成速度 方式 平均速度(2〜6回目) Baseline比 Baseline 11.82 tok/s 1.00× MTP 21.61 tok/s 1.83× DFlash 21.62 tok/s 1.83× DFlash2 21.01 tok/s 1.78× DSpark 16.13 tok/s 1.36× ngram-mod 14.86 tok/s 1.26× ngram-mod は回を重ねるごとに速くなりました。同じプロンプトを繰り返したことで、過去の生成結果からn-gramの候補が当たりやすくなったのかもしれません。 図4 ngram-mod の試行ごとの速度(2〜6回目) メモリ使用量 nvidia-smi で測定しました。 方式 メモリ使用量 Baselineとの差 Baseline 27,067 MiB — MTP 29,144 MiB +2,077 MiB(約7.7%) DFlash 29,894 MiB +2,827 MiB(約10.4%) DFlash2 29,941 MiB +2,874 MiB(約10.6%) DSpark 33,091 MiB +6,024 MiB(約22.3%) ngram-mod 27,069 MiB ほぼ増加なし 8. 結論 速度とメモリを1枚にまとめると、MTP の立ち位置がよく分かります。 図5 横軸がメモリ増加、縦軸が速度。左上ほど効率がよい 速度:MTP と DFlash はどちらも約21.6 tok/s。差は0.01 tok/s なので、実質同じと見てよさそうです。DFlash2 も21.01 tok/s と近い結果でした メモリ:MTP の増加は約2 GiB で、ドラフト用の重みを使う方式の中では最小でした 扱いやすさ:MTP はターゲットモデルとセットで扱えるので、別系統のドラフトモデルを探して管理する手間がありません。Hugging Face のタグ付きモデルも一番多いです というわけで、今回の環境では速度・メモリ・入手性・設定の簡単さのバランスで MTP が一番使いやすい という結論になりました。 ただし、これは Qwen3.8-27B(Q4)と今回の llama.cpp ビルド・プロンプトでの結果です。モデルやタスクが変われば順位が入れ替わる可能性は十分あります。 9. まとめと今後 DGX Spark でも投機デコードはしっかり効き、最大で生成速度は約1.8倍になりました 迷ったらまず MTP 対応モデルを探すのがおすすめです MTP と DFlash がほぼ同じ速度に揃った理由は、今回のログだけでは分かりませんでした。メモリ帯域が上限に達しているのかどうかは、帯域を実測して確かめたいと思います プロンプトの種類(コード生成・要約など)を変えたときの比較も試してみたいです

  2. > and the remainder of VRAM is occupied by the KV cache and whatever experts still fit. Those days engines try to optimize "whatever experts" part and can use remaining VRAM as cache, moving hot experts to GPU during inference (but less used experts keep executing on CPU, yea). e.g. llama.cpp recently added flag for that: llama.cpp#29887

  3. Today we ship llama.cpp v0.9.0 and in the next couple of weeks we are gearing towards the first major v1.0.0 release github.com/ggml-org/llama.cpp/releases/tag/v0.9.0

    20 likes · 1 repost · 855 views
  4. LFM3をllama.cppで手元の会話の補助に。速さは足りたが、専門用語の聞き取りでWhisperに届かなかった 要約 llama.cpp の v0.8.0 で、Liquid AI の LFM3 の音声モデル(LFM3-Audio-2B と LFM3-Omni-2B)が動くようになった。2B の 1 つのモデルで、聞き取り・訳・読み上げができる 自作の会話サポート(AI グラスで会話を聞き、専門用語の一覧と解説、会話の要約を出すもの)の書き起こしを、今のクラウドの書き起こしから LFM3 に置き換えられるかを、手元のノート PC の内蔵 GPU で測った 速さは足りた。音声を流しながら送ると、話し終わってから 0.18 秒で最初の文字が出て、0.82 秒で書き起こしが出そろった。メモリは 4GB 前後 一般の文と会話の聞き取りは、文字の誤り率が 6〜7% だった 専門用語の聞き取りでは、この条件で Whisper medium にもクラウドの書き起こしにも届かなかった。用語 21 語のうち、原音で 13〜15 語(Whisper medium は 16 語)、グラスのマイクで録った音(SNR 24 dB)では 6〜7 語(Whisper medium は 12 語、クラウドは 17 語) 会話サポートは「速報を先に出し、あとで確定に置き換える」作りにしている。測った範囲では、LFM3 は速報の側に合い、確定の側の専門用語にはまだ届かなかった 訳まで広げるなら、速い訳を先に出し、書き起こしてから訳した 2 段目の訳で置き換える形で、意味がずれた発話が 23 中 16 から 9 に減った。前の発話を一緒に渡しても、それ以上は減らなかった きっかけ AI グラスで目の前の会話を聞き、出てきた専門用語の一覧と解説、会話の要約を出す道具を作っている。書き起こしは、今はクラウドの書き起こし(OpenAI の gpt-4o-mini-transcribe)を使っている。以前に手元の Whisper medium とも比べ(中編)、雑音の入ったグラスの音ではクラウドの方が用語を多く拾えたので、そうした。 llama.cpp の v0.8.0 で、LFM3 の音声モデルが動くようになった。LFM3-Audio-2B は、音声か文字を受け取って、文字か音声か両方で返す。手元の PC で書き起こしまで済むなら、通信を待たずに済み、費用もかからない。そこで、これまでの試験と同じ題材で測ることにした。 何で測ったか 環境 ノート PC(Intel Core Ultra、内蔵 GPU は Arc 140V、メモリ 32GB をグラフィックスと共有)。NVIDIA の GPU は無い llama.cpp:公式のリリースの b11972(v0.8.0 は b11960 に当たり、その少し後の版)、Windows の Vulkan 版 モデル:Liquid AI 本人が Hugging Face に置いた GGUF の Q8_0(LFM3-Audio-2B-GGUF・LFM3-Omni-2B-GGUF) 初めて使うモデルなので、外向きの通信を塞いだ専用の環境で動かした。llama-server にも、ネットへ取りに行かない設定(--offline)を付けた 起動の引数はこうした。 llama-server -m LFM3-Audio-2B-Q8_0.gguf -mm mmproj-LFM3-Audio-2B-Q8_0.gguf \ -ngl all -c 8192 -np 1 --reasoning off --temp 0 \ --no-webui --offline Omni は -m と -mm を Omni のファイルに替えただけ。聞き取りは、モデルの説明ページのとおり、システムプロンプトを Perform ASR in Japanese. にした。 題材 すべて合成音声で、台本がある。 題材 中身 声 一般の文 6 つ 道をたずねる、会議の時間の変更など Windows の合成音声(Haruka) 専門用語の 12 文 「今回の遅延はスループットではなくレイテンシの問題だと思います」など。用語 21 語つき Windows の合成音声(Haruka) 同じ 12 文をグラスで録ったもの 上の 12 文を PC のスピーカーで鳴らし、机に置いたグラスのマイクで録った。音量やエアコンを変えた 5 条件(SNR 14〜24 dB) 同上 デモの会議の 23 発話 音声まわりの進捗会議の作り話。3 人 VOICEVOX(青山龍星・玄野武宏・冥鳴ひまり) 専門用語の 12 文の採点は、これまでの試験と同じ物差しにした。用語ごとに表記ゆれ(「Opus」「オーパス」など)を許し、そのどれかが書き起こしに含まれれば取れたとする。どのモデルにも、用語のリストは渡していない。会話の話題は前もって分からないので、リストを用意できない前提で測った。 速さとメモリ LFM3-Audio-2B LFM3-Omni-2B 読み込み 約 12 秒(初回) 約 3 秒 文字を出す速さ 約 43 トークン/秒 約 36 トークン/秒 3〜6 秒の音声の聞き取り(まとめて送る) 0.4〜1.1 秒 0.5〜1.0 秒 llama-server のメモリ(最大) 約 3.7GB 約 4.2GB GPU に載った量(共有メモリ) 約 3.1GB 約 3.7GB 両方とも GPU(Vulkan)で動いた。 会話サポートで気になるのは、話し終わってから文字が出るまでの間だ。llama-server の /v1/realtime(WebSocket で音声を流しながら送る口)に、デモの会議の 23 発話を 100 ミリ秒ずつ実時間の速さで流し、書き起こさせた(LFM3-Audio-2B)。 話し終わってから 中央値 最大 最初の文字まで 0.18 秒 0.21 秒 書き起こしが出そろうまで 0.82 秒 1.33 秒 音声が届いた分から先に読み込んでおく作りなので、話し終わった直後に文字が出始める。23 発話とも途中で止まらずに流れ、文字の誤り率は平均 6.6% で、まとめて送ったときと同じだった。 /v1/realtime には書き起こし専用のセッション(?intent=transcription)もある。言語に日本語を渡したが、この版では設定に反映されず、ローマ字や英語で返ってきた。そこで、会話のセッションのまま、指示を Perform ASR in Japanese. にして文字だけを返させた。上の表はその値。 一般の文と会話の聞き取り 一般の文 6 つ(3〜6 秒)は、両方のモデルで 6 文とも正しかった。違いは「三時」を「3時」と書くような表記だけだった。 デモの会議の 23 発話(VOICEVOX、残響と小さな暗騒音入り)は、文字の誤り率が平均 6.5% だった。誤りは「六十四キロビット毎秒」が「毎ビット」、「通し試験」が「投資試験」、「要約」が「ようやく」になる、といったもので、用語や耳慣れない語の所に集まっていた。同じ 23 発話を Whisper medium で書き起こすと誤り率は 12.1% で、「投資試験」「ようやく」など同じ所で誤っていた(Whisper は数字や英字で書く所が多く、そのぶん誤り率の数字が高く出る)。 専門用語の 12 文 ここが本題。会話サポートでは、聞き慣れない用語を拾って解説を出すので、用語が正しく書けるかを一番重く見ている。 条件 LFM3-Audio-2B LFM3-Omni-2B Whisper medium(ローカル) gpt-4o-mini-transcribe(クラウド) 原音 13/21(62%) 15/21(71%) 16/21(76%) — グラスで録音(SNR 24 dB) 6/21(29%) 7/21(33%) 12/21(57%) 17/21(81%) グラスで録音(SNR 22 dB) 5/21(24%) 5/21(24%) 6/21(29%) 11/21(52%) グラスで録音(SNR 14 dB) 1/21(5%) 1/21(5%) 4/21(19%) 6/21(29%) Whisper medium と gpt-4o-mini-transcribe の値は、同じ 12 文・同じ物差しで以前に測ったもの(中編)。Whisper medium は、手元の GPU で OpenVINO の int8 版(OpenVINO/whisper-medium-int8-ov)を回した。今回あらためて Whisper medium で原音を書き起こすと、17/21 だった。 この条件では、2B の LFM3 は Whisper medium に届かなかった。原音での差は用語 1〜3 語ぶんで、雑音が入ると差が開いた。 用語の一覧を渡せば、取れる語は増えるかもしれない。ただ、会話サポートはどの話題の会話でも使う前提で作っている。あらゆる分野の用語を前もって登録しておくのは現実的ではないし、語を増やすほど、似た音の語を一覧の語に寄せて書く誤りも増えそうだ。そこで今回は、一覧なしで聞き取れる力そのものを測った。 書き起こしを見ると、音としてはかなり近いところまで来ている。 台本の用語 LFM3-Audio-2B の書き起こし(原音) レイテンシ 零点四 オーパス オーバス テザリング 手ざりング フォアグラウンドサービス フワグラウンドサービス 無音化 ブイン化 復号 複合 グラスで録った音では、「ブルートゥース」が「ブルータス」、「ファームウェア側」が「ハウリア川」になった。一方、用語の無い 12 番目の文(「来週の定例ですが、水曜の午後だと参加できない人がいるので、木曜の同じ時間に動かしたいと思っています。」)は、雑音入りでもほぼ正しかった。 以前の試験で分かっていた「雑音の大きさ(SNR)で成績が決まる」という形は、LFM3 でも同じだった。音を拾うところを良くするのが先、という結論は変わらない。 「速報→確定」の作りに当てはめると 会話サポートは、用語の一覧と要約を 2 段で出している。 速報:書き起こしが届いたら、LLM を呼ばずに語を拾い、すぐ一覧に暗い色で出す(聞いたままの語) 確定:次の要約の回で、LLM が専門用語と認めた語を明るい色にし、認めなかった語は消す 要約も、1 回目は始まって 5 秒で粗く出し、そのあと 15 秒ごとに作り直す この作りに当てはめると、測った範囲ではこう整理できる。 求めるもの LFM3-Audio-2B で測った値 速報 早く、聞いたままの語が出ること 話し終わってから 0.82 秒で書き起こしが出そろう。会話の誤り率は 6〜7% 確定 専門用語が正しく書けていること 用語はグラスの音(SNR 24 dB)で 29%。クラウドの 81% には届かない 今の作りでは、書き起こしが届くまで中央 1.2 秒ほどかかっている。ただしこれは区切りの検出や通信を含んだ値で、区切りが分かっている前提の 0.82 秒とそのまま比べられる数字ではない。 速報を LFM3 で早く出し、確定はクラウドの書き起こしで出し直す、という組み合わせは考えられる。ただ、速報の一覧に出る語がほとんど誤った字になるなら、出してすぐ消える語が増えるだけかもしれない。この組み合わせは、まだ試していない。 訳まで広げるなら 会話サポートは今は訳を出していないが、LFM3 は訳も読み上げもできるので、あわせて測った。デモの会議の 23 発話を英語にして、台本と読み比べた。英訳の正解は無いので、意味が落ちたかずれた発話を数えた。 音声から直に英語へ realtime に「英語に訳して、訳だけ返す」と頼み、文字と音声の両方で返させた。 話し終わってから 中央値 最大 最初の英語の文字まで 0.18 秒 1.2 秒 最初の英語の音まで 0.54 秒 1.55 秒 応答の終わりまで 4.3 秒 7.5 秒 速さは会話に間に合う。一方、23 発話中 16 発話で、意味が落ちるかずれた。 台本 英訳 先にセグメンターの話から聞かせてください Please listen to the segmenter's story first. 六十四キロビット毎秒です It is 64 kilobits per minute. ワイファイの方です、遅延の長い尾が消えました It's about Wi-Fi. The length of the delay has disappeared. 図を一枚入れると早いかもしれません It might be faster to put in one more. 速い訳を先に出し、2 段目の訳で置き換える 会話サポートの「速報→確定」と同じ考え方で、訳も 2 段にしてみた。1 段目は上の直の訳。2 段目は、話し終わってから書き起こし、その文字を英訳させる。 話し終わってから 2 段目の訳の文字が出そろうまで、中央値 2.05 秒、最大 3.02 秒。1 段目の最初の文字から 2 秒ほどあとに置き換わる 2 段目も読み上げにするなら、英語の読み上げを作り終えるまでさらに 3.8 秒ほどかかる。字幕だけ置き換え、読み上げは 1 段目のままにする方が、待ちは少ない 意味が落ちたかずれた発話は、直の訳の 16 から、2 段目で 9 に減った 台本 1 段目(直の訳) 2 段目(書き起こしてから訳) 図を一枚入れると早いかもしれません It might be faster to put in one more. Putting in one diagram might be faster. ノイズフロアの推定は分位点に変えたんでしたっけ The noise floor estimate had changed to a different unit. We changed the noise floor estimate to a quantile. オーパスのビットレートは今いくつで送っていますか Are you sending the Opus Bitrate in small pieces? What is the current bitrate of the Opus? 置き換えで直ったのは 9 発話。2 段目でもずれたままの 7 発話は、ほとんどが書き起こしの誤りをそのまま訳したものだった(「毎秒」を「毎ビット」と書き起こして "per bit"、「処理フロー図」を「フローーズ」と書き起こして "Processing Flowers")。逆に 2 段目で悪くなったものが 2 つあった(「ええ」を「いえ」と書き起こして "No" など)。 前の発話も一緒に渡すと 会話の流れが分かれば、2 段目の訳はもっと正確になるのではないか。そこで、2 段目に前後の発話も渡してみた。書き起こしは LFM3-Audio-2B のものと、比べるために Whisper medium のものの 2 通り。訳はどちらも LFM3-Audio-2B に文字で渡した。 まず、前の 3 発話と次の 1 発話を「BEFORE」「TARGET」「AFTER」の見出しを付けて 1 つの文にまとめて渡した。すると訳が返らず、見出しを繰り返したり途中で切れたりした。2B の大きさでは、この形の指示には沿わなかった。同じ形で書き起こしの誤りを直させる指示も、うまくいかなかった。 次に、前の 3 発話を会話の履歴として渡した(ユーザーの発言に書き起こし、アシスタントの返事にその訳を入れる)。指示文はこうした。 Translate the user's Japanese into natural English. Output only the translation. The earlier turns are from the same meeting; use them as context. 書き起こし 書き起こしの誤り率 音声から直の訳 その発話だけを訳す 前の 3 発話を履歴で渡す LFM3-Audio-2B 6.5% 16/23 がずれ 9/23(1.6 秒) 10/23(1.8 秒) Whisper medium 12.1% — 7/23(1.8 秒) 10/23(2.0 秒) 時間は、話し終わってから 2 段目の訳が出そろうまでの中央値。どの組み合わせでも最大 2.5 秒ほどだった。 前の発話を渡しても、ずれた数は減らなかった。直るものと崩れるものが入れ替わっただけだった(「六十四キロビット毎秒です」は "64 kilobits per second" に直ったが、「オーパス」が "Opa" に崩れた)。 Whisper medium の書き起こしは、数字や英字で書くぶん誤り率の数字は高いが、訳したときに意味が残りやすかった。2 つの書き起こしで共通してずれた 6 発話は、どちらも同じ所で聞き誤っていた(「通し試験」を「投資試験」、「要約」を「ようやく」など)。 2 段目の訳の質は、書き起こしの質で決まるようだ。ここでも、用語の聞き取りが鍵になる。 読み上げ /tts の口で、日本語の文 8 本を読ませた。読み上げを作る時間は、どちらも話す長さの 0.5〜0.9 倍で、実時間より速い(測るたびに 0.6〜0.8 倍ほど揺れた)。 作った音声を同じモデルで聞き直すと、LFM3-Audio-2B は 8 本とも台本どおりだった。LFM3-Omni-2B は 3 本で崩れた(「明日の会議は」が「真下の会議は」、「何ですか」が「を学んだ」に聞こえた)。ただ、同じモデルでの聞き直しは甘い。自分の耳で聞くと、LFM3-Audio-2B も 1 本(男声の「駅までの道を教えていただけますか」が「いただかますか」)で読みが崩れていて、聞き直しではこれを拾えなかった。ほかの読み上げにも、話し方の不自然さが残っていた。 ライセンス LFM3 は LFM Open License v1.0 で配られている。形は Apache License 2.0 とほぼ同じで、再配布するときはライセンスを添え、改変したファイルには改変したことを書く。違うのは商用の条件で、年商 1,000 万ドル以上の事業者による商用利用は、このライセンスでは許されていない(非営利の団体の研究・非商用の利用は除く)。個人で手元の道具に使う分には問題ないようだ。商標は使えない。 持ち帰り 2B の LFM3 は、内蔵 GPU のノート PC で、メモリ 4GB 前後で動いた。話し終わってから 1 秒以内に書き起こしが出そろう速さは、会話の補助に足りる 一般の文と会話の聞き取りは、誤り率 6〜7% だった 専門用語の聞き取りは、この条件では Whisper medium にもクラウドの書き起こしにも届かなかった。用語の解説が目的の会話サポートでは、書き起こしをそのまま置き換えるところまでは行かなかった 「速報→確定」の作りでいえば、LFM3 の速さは速報の側に合い、専門用語は確定の側にまだ届かない 訳まで広げるなら、速い訳を先に出し、書き起こしてから訳した 2 段目で置き換える形にすると、ずれは 16 から 9 に減った。前の発話を一緒に渡しても、それ以上は減らなかった。残りのずれも、もとをたどると書き起こしの誤りだった どの使い方でも、雑音の大きさで成績が決まる形は変わらなかった。モデルを替えるより先に、音を拾うところを良くしたい 次に試したいのは、確定した語と要約を回ごとに積んでいき、話題が近い回の語だけを渡す形である 取得物 リポジトリ ファイル SHA256 ggml-org/llama.cpp(リリース b11972) llama-b11972-bin-win-vulkan-x64.zip 5f3fa9b3ec948e6cb1af3c8f1063fa39c79f58bb5dc9bb9dfb2db890d098508d LiquidAI/LFM3-Audio-2B-GGUF LFM3-Audio-2B-Q8_0.gguf d4e36902ba8f0ee7b333596030a59d650f88ac76660b4d9ba5ff77c3c2258fc0 LiquidAI/LFM3-Audio-2B-GGUF mmproj-LFM3-Audio-2B-Q8_0.gguf 26601e904245a85bd8f3cf320a629e897cfc01c1d09369e8b4fd951f13024d3e LiquidAI/LFM3-Omni-2B-GGUF LFM3-Omni-2B-Q8_0.gguf 59118f661eaacb93d204723d76355b53347f0940b508c11412f6290fd49158d4 LiquidAI/LFM3-Omni-2B-GGUF mmproj-LFM3-Omni-2B-Q8_0.gguf 720ff4fc09df0e026c4ec641d0c698bf27b5bcd50561944c88eda5e3dffe1839 どれも、取得した時点で GitHub と Hugging Face が公開していた値と一致した。その後、Liquid AI は mmproj を差し替えている(音声を作る部分=コーデックのデコーダを量子化した。Q8_0 は Audio 版が約 338MB→304MB、Omni 版が約 541MB→507MB)。今の mmproj の SHA256 は上の表と違う。この記事の数字は、差し替える前の mmproj で測ったものである。差し替えたあとのファイルでも測り直したが、聞き取りの結果は同じで、メモリが 30〜40MB 減っただけだった。 使った音声 Windows の合成音声(Microsoft Haruka Desktop) VOICEVOX:青山龍星、VOICEVOX:玄野武宏、VOICEVOX:冥鳴ひまり Rokid Glasses の記事 Rokid Glasses を買ってから自作アプリが動くまで —— 購入・技適・ADB・タッチパッドの実機調査 会話サポートを作るまで(前編) —— 読む速さと話す速さは釣り合っていない(表示設計) 会話サポートを作るまで(中編) —— 音声認識は、安いモデルの方が正確だった(認識と補正) 会話サポートを作るまで(後編) —— AudioRecord がエラーも出さずに全部ゼロを返す(録音) 撮った写真を、本体で見られない —— 3つのジェスチャーで削除画面を作ったら、先客がいた 実測値を書いた記事は、いつ嘘になるのか —— ファーム更新に備えて45項目の判定表を作った 録音が暗騒音より小さかった —— 測定値が物理的にありえないなら、疑うのは測定系 Rokid Glasses で自分のアプリを作る —— コードは書けなくていい。ただし PC は要る Rokid Glasses のランチャーは、入口を2つ作っても同じ項目が2つ並ぶだけ —— 名前もアイコンも起動先もパッケージ単位だった Rokid Glasses で Bluetooth の「インターネットアクセス」設定に辿り着けない —— 自作アプリに入口を作って、消した Rokid Glasses の右側の物理ボタンは、キーではなく「合図」で自作アプリに届く —— 押すたびに写真も撮れる Rokid Glasses のマイクは 4ch で使える —— マイクは 4ch 取れる。ただし AudioSource で中身の意味が変わる 答えの分かっている不具合を Opus 5 と 5.5 に渡した(特別編) —— AudioRecord が全部ゼロを返す原因を、実機の記録で採点した プロンプトキャッシュは、変数の位置ひとつで 72% から 0% になる —— 会話サポートの費用を決めていたのは、LLM を呼ぶ回数だった この記事 —— LFM3 の音声モデルは、速さは足りたが、専門用語の聞き取りで Whisper に届かなかった 買ってから自分のアプリが動くまでを順に追いたいなら、無料の本にまとめてある:Rokid Glasses(RV101)を買ってから、自分のアプリが動くまで —— 知識ゼロからの手順書

  5. Radeon VIIとUbuntu 26.04でROCmを動かし、Flash-NextをOpenCodeにつないだ 5年ほど前に組んだデスクトップがある。当時、GPUにはすでに型落ちだったRadeon VIIを5万円くらいで入手して載せた。Stable Diffusionで遊んでいた時期もあったが、飽きてからはすっかり出番がなくなっていた。 最近はローカルLLMが盛り上がっている。とはいえ、パソコンもGPUもクソ高い。新しいGPUを買う前に、あまり期待せず、久しぶりにこのデスクトップに火を入れて環境を組み直してみることにした。 気になったのは、Radeon VIIのROCm公式サポートが切れていることだ。かなり苦戦する覚悟だったが、実際にはChatGPTのGPT-6.1 Terra(medium)に相談しながら、環境の調査から構築、動作確認まで進められた。多少の修正はあったものの、さくさく進む。最終的に、Qwen3.8-Flash-Nextが動き、OpenCodeからローカルモデルへツール付きでアクセスできるようになった。古いデスクトップでvibe codingを試せる環境ができてしまい、だいぶびっくりしている。 この記事は、そのRadeon VIIでROCmを動かし、ローカルLLMをOpenCodeにつなぐまでの記録だ。 結果は、Q2_0量子化版のFlash-Nextで短めの会話の生成が約35 tokens/s。別途、Qwen3.8-27BのQ3量子化版もllama.cppで約21〜22 tokens/s出ている。両者は量子化も実行エンジンも違うため、モデル同士の純粋な比較ではない。 この記事は2026年11月3日時点の実機メモだ。gfx906のROCmはAMDの通常の動作保証対象とは別扱いで、以下は一つの環境で動いた記録だ。アップデート後も同じように動くとは限らない。 環境と構成 項目 今回の環境 GPU Radeon VII、VRAM 16GB、gfx906 CPU Ryzen 5 3600、6コア12スレッド、AVX2 RAM 公称64GB、OSから約60.7GiB OS Ubuntu 26.04.1 LTS カーネル 7.0.0-42-generic、標準のamdgpu/KFD ROCm TheRock nightly 10.3.0a20261102、gfx906向け HIPのバージョン表示 7.18.26434 推論 Strata v0.2.10、gfx906用ソースビルド モデル ISTA-DASLab/Qwen3.8-Flash-Next-GSQ-RCO-GGUF、Q2_0 コーディングUI OpenCode v1.19.5 Flash-Nextは本体125B、1トークンで有効になるのは約6BのMoEモデルで、別に51BのN-gram参照テーブルがある。Q2_0はパラメーターを削った小型モデルではなく、重みを量子化したものだ。Qwenの説明と量子化版の配布元を参照してほしい。 構成は大きく3層だ。 Ubuntu標準のamdgpu/KFDがGPUを扱う。 gfx906向けROCmのユーザー空間ライブラリとHIPが計算を担当する。 StrataがモデルをGPU・RAM・ストレージに配置し、ローカルAPIを公開する。 コンテナは使わず、ROCmやビルド成果物はホームディレクトリ下に分離した。システムのドライバやAPTリポジトリは変更していない。 まずamdgpuとKFDを確認する 画面が映っているだけではGPU計算が動くとは限らない。まずカーネルドライバとデバイスノードを確認した。 uname -a lspci -nnk | grep -A 4 -i 'vga|display|3d' ls -l /dev/kfd /dev/dri getfacl /dev/kfd /dev/dri/renderD128 このPCでは1002:66afのRadeon VIIをamdgpuが使用し、/dev/kfdとrenderD128にはログインユーザー向けのACLが付いていた。アクセス権の設定方法は環境によって異なる。/dev/dri/renderD128も固定とは限らないので、自分の環境で確認しよう。 gfx906向けROCmをユーザー領域へ TheRockの対応表ではgfx906はビルド対象だが、Sanity Tested・Release Readyにはチェックがない。配布されていることと、実機で動作検証されていることは別だ。 今回はAMDのnightlyから、同じ日付のSDK・ライブラリ・開発ツール・gfx906向けデバイスコードを仮想環境に揃えた。uvは別途用意した。以下の版は実験時点の固定値で、nightlyの保持期間や配布状態によっては取得できなくなる可能性がある。 uv venv ~/rocm-gfx906/venv uv pip install --python ~/rocm-gfx906/venv/bin/python \ --index-url nightly.repo.amd.com \ 'rocm[libraries,devel,device-gfx906]==10.3.0a20261102' source ~/rocm-gfx906/venv/bin/activate rocm-sdk init export ROCM_PATH="$(rocm-sdk path --root)" export HIP_PATH="$ROCM_PATH" export PATH="$ROCM_PATH/bin:$PATH" export LD_LIBRARY_PATH="$ROCM_PATH/lib:$ROCM_PATH/lib64${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}" rocminfo これは配置先を分かりやすく書き直した再現例だ。実機では~/.local/share/rocm-gfx906/venvを使った。Ubuntu標準のPythonではvenvのensurepipがなかったため、uvで作成した。 rocminfoではRadeon VIIがgfx906:sramecc+:xnack-として見えた。さらにHIPで4,096要素のベクトル加算、rocBLASで2×2と512×512の行列積を検証した。SDK付属テストも27項目が通過した。 HIP compiled vector addition: PASS (4096 elements) rocBLAS SGEMM 512x512 identity product: PASS Ran 27 tests ... OK amdflangは最初、libquadmath.so.0不足で起動しなかった。今回はlibquadmath0をapt downloadしてユーザー領域に展開し、ライブラリパスを通して解決した。同様にC++開発ヘッダーとGCCの開発ライブラリもユーザー領域へ展開した。一般的な環境では、必要な開発パッケージをディストリビューションの方法で揃える方が簡単だ。無関係なUbuntu版のROCmパッケージを混ぜないようにした。 最初にllama.cppでGPU推論を確認 Strataに進む前に、llama.cppをHIP有効・gfx906指定でビルドした。使用したllama.cppのコミットはf9448cddc48c129a4abc7ff9c2a84c2b4c101c61だ。ビルド方法の基本はllama.cppの公式ドキュメントにある。 llama-cli --list-devicesにROCm0: AMD Radeon VIIが表示され、Qwen2.5-0.5BのGGUFで短い生成に成功。次にQwen3.8-27BのUD-Q3_K_XLも試した。モデルファイルは約13.2GBだ。 llama-server -m /path/to/Qwen3.8-27B-UD-Q3_K_XL.gguf \ -ngl 99 -c 4096 -np 1 --host 127.0.0.1 --port 8082 日本語の短い質問に正常回答し、会話では約21〜22 tokens/s。後にログを詳細化して、66/66層がGPUに配置されていることも確認した。別の8K設定では、約7,390トークンの合成入力を約240 tokens/sで処理した。いずれも今回のハードウェアと設定での観測だ。 Strataをgfx906向けにビルドする StrataのAMD向けドキュメントには、gfx906をwave64互換レイヤーでビルドする手順がある。配布済みのRX 6000/7000/9000向けバイナリをRadeon VIIに流用するのではなく、専用のSTRATA_HIP_GFX906経路を使う。 Strata v0.2.10のソースと、プロジェクトが指定するllama.cppコミット3cf03257f219afbe7334045ff7c6a06ac68c627dを用意した。システムにC/C++開発環境、CMake、Ninja、ROCmの開発ツールが必要だ。 STRATA_SRCとLLAMA_SRCは、それぞれ取得・展開したソースディレクトリ cmake -S "$STRATA_SRC" -B "$STRATA_SRC/build-906" -G Ninja \ -DSTRATA_HIP_GFX906=ON \ -DCMAKE_HIP_ARCHITECTURES=gfx906 \ -DSTRATA_GGML_DIR="$LLAMA_SRC" \ -DCMAKE_C_COMPILER="$ROCM_PATH/bin/amdclang" \ -DCMAKE_CXX_COMPILER="$ROCM_PATH/bin/amdclang++" \ -DCMAKE_PREFIX_PATH="$ROCM_PATH" \ -DCMAKE_BUILD_TYPE=Release cmake --build "$STRATA_SRC/build-906" --target strata strata-device -j 6 実機ではシステムにGCC開発環境がなかったため、APTからダウンロードして展開したlibstdc++-15-devとlibgcc-15-devを指す--gcc-toolchainをC/C++/HIPの各フラグに追加した。上は開発環境が通常の場所にある場合の基本形だ。 ビルド時に互換レイヤーの定義を追加した v0.2.10をそのままビルドすると、cudaDeviceGetStreamPriorityRangeとcudaStreamCreateWithPriorityが未定義になった。gfx906互換ヘッダーinclude/strata/platform/hip_compat/strata_hip.hに、対応するHIP APIへのマッピングを追加して再ビルドした。 #define cudaStreamCreateWithFlags hipStreamCreateWithFlags +#define cudaStreamCreateWithPriority hipStreamCreateWithPriority +#define cudaDeviceGetStreamPriorityRange hipDeviceGetStreamPriorityRange これは今回の版とビルドで必要だったローカル修正だ。将来の版では修正済みかもしれない。ビルド後、strata-device --selftest、gfx906向けGDN演算テスト、専門家演算の比較テストで失敗がないことを確認した。これらは全機能や長時間の安定性を保証するものではない。 Flash-Nextを準備して起動 モデルはISTA-DASLabのGGUFのQ2_0を選んだ。37.6GBの本体と28.8GBの参照テーブル、合わせて約66.4GBだ。今回使用したリビジョンはed59f92082b1e93c0e96d60a8b11aab089b52f09。両ファイルを配布元のSHA-256と照合した。 Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00001-of-00002.gguf SHA256 69820c02ec7d0b45ef2ebb19d6620299db749fe2aded7f39f93c6b88b199b720 Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00002-of-00002.gguf SHA256 316b46f3a2dbd68c900f43136ab9449f9dcc3725dfd8c794847c204bc161e113 転送が途中で停滞して再始動した際、最初の不完全ファイルを引き継がず、新しいファイルとして再取得した。完成後に古い不完全ファイル約17.6GBを削除した。大きなモデルでは、途中再開の動作と空き容量を確認したいところだ。 取得後、Strataに付属するtools/iq_pack.pyでインデックス、dense重み、トークナイザーを準備する。STRATA_GGUF_PYは上で用意した固定コミットのllama.cppにあるgguf-pyを指す。 export STRATA_GGUF_PY="$LLAMA_SRC/gguf-py" python "$STRATA_SRC/tools/iq_pack.py" \ --gguf /path/to/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00001-of-00002.gguf \ --out /path/to/pack-q2_0 サーバー設定には、ビルドしたstrata、pack、2つのGGUF、付属のdata/expert-profile.binを指定する。主要なエンジン引数は次のとおりだ。 { "exe": "/path/to/build-906/strata", "cwd": "/path/to/Strata", "tokenizer": "/path/to/pack-q2_0/tokenizer", "model_name": "Qwen3.8-Flash-Next-Q2_0-gfx906", "backend": "hip", "gpu": 0, "parallel": 1, "drafting": "off", "args": [ "--pack", "/path/to/pack-q2_0", "--native", "/path/to/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00001-of-00002.gguf", "--ple-gguf", "/path/to/Q2_0/Qwen3.8-Flash-Next-GSQ-RCO-Q2_0-00002-of-00002.gguf", "--expert-profile", "/path/to/Strata/data/expert-profile.bin", "--expert-cache", "auto", "--prefill", "auto", "--max-context", "262144", "--kv", "int8", "--kv-resident", "32768", "--ple-io", "direct", "--spec", "2" ] } パスは自分の環境に置き換える。Pythonの依存パッケージは別の仮想環境にrequirements.txtから導入し、ROCmのライブラリパスも通した状態で、ソースルートからサーバーを起動した。 cd "$STRATA_SRC" python -m serve.server --engine strata --config /path/to/config.json \ --host 127.0.0.1 --port 8081 最初は--specを付け忘れ、ネイティブpackには--spec T (T >= 2)が必要だとエラーになった。--spec 2を追加すると読み込みが進み、日本語での応答に成功した。ここでの--spec 2はエンジンの指定で、MTP補助モデルを導入したという意味ではない。今回draftingはoffだ。 サーバーはローカルのみにbindしている。稼働確認は以下で行える。 curl -s 127.0.0.1 curl -s 127.0.0.1 8Kから32K、256Kへ まず8,192トークンで動作確認し、その後32,768へ増やした。約30,417トークンの合成入力の中央に置いた合言葉を正しく回収できた。入力処理は約71.8秒、約424 tokens/sだった。 次に--max-context 262144 --kv int8 --kv-resident 32768で起動。約248,458トークンの入力でも、中央の合言葉を正しく回収できた。入力処理は約640秒、約388 tokens/sだった。 試行 結果 8K設定、短い会話 約35 tokens/sの生成を観測 32K設定、約30K入力 合言葉を正しく回収、入力約424 tokens/s 256K設定、約248K入力 合言葉を正しく回収、入力約388 tokens/s 長文は同じ日本語の文章を繰り返した合成データで、検索課題も一つだ。複雑な複数文書の理解、長時間稼働、異なるコンテンツで同じ精度・速度が出ることまでは確認していない。短い出力6トークンの生成速度を、長文回答の安定速度として扱うこともしない。 256K起動時は専門家キャッシュが8,235個、空きVRAMは約790MiBだった。GPUがデスクトップ表示も担当しているので余裕は小さめだ。--expert-cache autoやVRAM予約量の調整が必要になる場合がある。Strataのメモリ設定を確認してほしい。 また、今回のStrataの既定設定ではSTRATA_ROUTE_TAIL_SKIP=7が有効で、キャッシュにない専門家の一部を省略する。ログにも回答が少し変わり得ると表示される。7,390トークンの合成入力で1回ずつ試したところ、生成は有効時36.7 tokens/s、無効時33.7 tokens/sで、回答文も少し変わった。各1回の短い応答なので、この差を一般化したり品質差を判断したりはできない。 OpenCodeにつなぐ StrataのOpenAI互換APIを使う。OpenCode v1.19.5をユーザー領域に導入し、~/.config/opencode/opencode.jsonにローカルプロバイダーを追加した。設定形式はOpenCodeのプロバイダー設定を参照した。 { "$schema": "opencode.ai", "model": "strata/Qwen3.8-Flash-Next-Q2_0-gfx906", "provider": { "strata": { "npm": "@ai-sdk/openai-compatible", "name": "Strata (local Radeon VII)", "options": { "baseURL": "127.0.0.1", "apiKey": "local", "timeout": 1200000 }, "models": { "Qwen3.8-Flash-Next-Q2_0-gfx906": { "name": "Qwen3.8 Flash Next Q2_0 (local)", "tool_call": true, "limit": { "context": 262144, "output": 8192 } } } } } } モデルIDは/v1/modelsが返すIDと一致させる。既存設定がある場合は丸ごと置き換えず、必要なプロバイダーを統合してほしい。apiKeyはこのローカルの無認証サーバーに渡すダミー値だ。 opencode models strata opencode 簡単な接続確認として、OpenCodeにテストファイルを読むよう依頼したところ、readツールを呼び出し、ファイル内の合言葉を正しく返した。コードの変更や複雑なエージェント作業の品質までは、この時点では検証していない。 振り返り Radeon VIIの16GB VRAMだけにモデル全体を載せるのではなく、GPUの専門家キャッシュ、RAM、SSDを組み合わせることで、Flash-Nextの推論までたどり着けた。gfx906は標準的な導入経路から外れているため、GPU認識だけで成功とせず、HIP、行列演算、エンジン、実モデル、ツール呼び出しの順に確かめるのが役立った。 一方、今回はnightly ROCm、ソースビルド、互換ヘッダーへの小さな修正を使っている。Qwen3.8-27BはStrataではなくllama.cppで動かしており、Strataで同じ27Bが動くという話ではない。まずは手元で動いた版と設定を記録し、更新するときは一つずつ比較していこうと思う。 この記事について 実はこの記事も、実際に環境を構築したChatGPTのセッションで書いた。会話の中で調べたこと、実行したコマンド、ログに残った測定結果をもとにChatGPTが下書きした。OpenCodeではファイル読み取りツールの呼び出しまで確認したが、複雑なコード修正の成功率はまだ測っていない。これから、この環境でどこまでできるか試していきたい。

  6. Crew's first job is four questions: what do I actually need, what do I actually want, what actually helps, and what am I trying to accomplish? Local engine underneath: ggml-org/llama.cpp How do you share one GPU between a local model and games? #LocalLLM #homelab

    1 like
  7. Reddit · · r/LocalLLaMA · u/zyxciss · ggml-org/llama.cpp

    Betelgeuse: Running Qwen 3.8 Flash Next at 22 tok/s sustained (spiking to 48 tok/s) on an RTX 3060 12GB + 16GB DDR4 RAM 100% bit-exact! About two months ago I posted here about trying to predict which MoE experts get used on the next token to speed up CPU/GPU offload on Qwen 3.6 35B. Quick confession on that older post before anything else: I ended up throwing that prototype away. To get the big numbers I was seeing back then, I was basically cheating with gate pruning (dropping cold experts when their router weights were low). It made the tok/s counter go brrr, but on an already low-bit quant it quietly degraded output quality and reasoning. I didn't want to ship something that lobotomizes the model just to look fast in a screenshot, so I scrapped it. When Qwen 3.8 Flash Next dropped, I wanted to see if we could actually run the 68GB GSQ-RCO-IQ2_XS build at real usable speeds on a normal budget gaming PC—without dropping a single expert. For context, here is the exact box I tested this on (I actually pulled my extra RAM sticks out specifically to test what a regular 16GB PC gets): - GPU: RTX 3060 12GB - RAM: 16GB DDR4, single-channel (~19 GB/s) - OS: CachyOS / Arch Linux (tested inside a strict MemoryMax=12G cgroup) - Storage: Consumer PCIe NVMe SSD (~2.1 GB/s) If you try to load a 68GB MoE on 12GB VRAM + 16GB RAM in stock llama.cpp, you already know what happens: mmap thrashes the OS page cache to death, you get ~1,500 major page faults per token, and generation crawls at 1.47 tok/s. Then I tested Strata. Strata is super cool and hits 40+ tok/s if you have 48GB–64GB of RAM to mlock 24GB+ of experts in system memory. But on a 16GB RAM setup, it refuses to load unless you force --low-ram mmap, where it drops down to 8.11 tok/s because it's bound by cold SSD reads. So over the last week I built Betelgeuse (bel-cli / bel-server, a fork of llama.cpp, and I'm also opening a clean upstream PR for llama.cpp even if it probably won't get merged lol). What it actually does under the hood: - Zero gate pruning / 100% bit-exact: Every single one of the 10 routed experts per layer across all 48 layers is computed at full precision. We verified 28,080 router records and 576 generated tokens byte-for-byte against golden stock output (0.000e+00 diff). - Arrival-Slack VRAM Slot Pool (~5,000 slots in VRAM): All 49 dense layers + GDN + QSA + LM head stay in ~3.2 GB of VRAM. The remaining VRAM holds ~5,000 expert slots distributed non-uniformly (240 slots/layer on early layers 0–4 where there is 0ms of compute slack, 92 on middle layers, 60 on tail layers). - In-Stream GPU Doorbell + 1-Split CUDA Graph Replay: Instead of ggml_backend_sched splitting the graph 48 times per token to ask the CPU which experts missed (which burns ~360ms/token in cudaStreamSynchronize), a custom in-stream CUDA kernel resolves hits in ~2 µs on-device and only rings a mapped host doorbell when an expert is missing. Per-layer token embeddings (per_layer_token_embd) are also staged to CUDA0 so the entire decode pass runs as 1 single CUDA Graph replay. - RAM Victim Cache + io_uring Pager: When an expert gets evicted from the VRAM pool, it moves into a dedicated host RAM victim cache instead of getting thrown away.VRAM and RAM stay 100% exclusive instead of duplicating the same hot experts in the OS page cache. Physical NVMe reads drop from ~71 MB/token down to 12.43 MB/token. - No duplicate 35GB expert bloat on disk: Instead of keeping 35GB of dead expert tensors inside Shard 1 .gguf AND another 35GB in experts.bin, we stripped the expert payloads out of Shard 1 so the main GGUF is only 3.2 GB (Dense.gguf) + 35.3 GB (experts.bin, 4KB-aligned single-read blobs) + **26.8 GB (**PLE.gguf n-gram shard). Measured Results (RTX 3060 12GB + 16GB DDR4, MemoryMax=12G) |Engine|Cold Decode (Run 1)|Warm Decode (Run 2)|Peak Bursts|Prompt Processing (PP)|Physical SSD Reads|Output Parity| |:-|:-|:-|:-|:-|:-|:-| |Stock llama.cpp (mmap)|1.47 tok/s|1.63 tok/s|~2 tok/s|14–20 tok/s|208–312 MiB/tok|Baseline| |Strata (--low-ram mmap)|8.11 tok/s|8.11 tok/s|~9 tok/s|34.6 tok/s|~105 ms pool wait|~0.022 KL| |Betelgeuse (bel-server)|16.80 tok/s|22.03 tok/s|Up to 48 tok/s|16.2 – 19.3 tok/s|12.43 MiB/tok|100% Byte-Exact| On warm runs it holds 21.8–22.03 tok/s sustained across long coding prompts, and when generation hits stretches where all 10 routed experts are resident in the VRAM/victim pools, it spikes up to 48 tok/s. Links & What's Next - GitHub (Betelgeuse Engine — bel-cli & bel-server): [https://github.com/Betelgeuse-AI/Betelgeuse] - HuggingFace (Pre-packed Alpha-Orionis-XS 3.2GB Dense + Experts bundle): https://huggingface.co/Betelgeuse-AI/Alpha-Orionis-XS - Upstream llama.cpp PR: [https://github.com/ggml-org/llama.cpp/pull/31469] 1. Even on the massive Q8_K_XL quant (~190GB total), bel-server runs at 8 tok/s cold and 12 tok/s warm (with bursts up to 21 tok/s) on the exact same 12GB 3060 + 16GB DDR4 box, where stock llama.cpp immediately OOMs or crawls at <0.1 tok/s. 2. Zero experts are dropped or thresholded (0.000e+00 diff across 28,080 router records and 576 tokens vs unmodified stock). The speedup comes from eliminating the 48 per-layer CPU/GPU scheduler splits (KICK/WAIT doorbell around the shared expert), keeping the RAM victim cache strictly exclusive of VRAM (MOE_DROP_MMAP), and pre-staging cold misses via the upgraded oracle + 4KB-aligned io_uring pack. What I'm working on next: We're currently bringing this exact streaming + victim-cache architecture over to DeepSeek V4.1 Flash (1017)—early testing under development is already sitting around ~25 tok/s on the same hardware class. Happy to answer any questions or have people poke holes in the benchmarks! Leave us a Star :)

    492 points · 121 comments
  8. YouTube · · YouTube description · Bi' Öğren · ggml-org/llama.cpp

    Yapay Zekayı Kendi Bilgisayarında Çalıştıran 3 GitHub Reposu | Bi Öğren #shorts Yapay zekayı kendi bilgisayarında nasıl çalıştırırsın? Ollama, llama.cpp ve LocalAI nedir? Kısa özet aşağıda. 1) Ollama: açık modelleri yerelde ya da bulutta çalıştır. ollama/ollama 2) llama.cpp: modeli Hugging Face'ten indirip tek komutla çalıştır, OpenAI uyumlu API sunucusu aç. ggml-org/llama.cpp 3) LocalAI: metin, görüntü, ses ve video modelleri tek API arkasında; README'ye göre GPU şart değil. mudler/LocalAI Hangi modelin çalışacağı bilgisayarına bağlı. Kurmadan önce her reponun README'sini oku. Bi Öğren: her gün yeni bir bilgi.

    1 like · 22 views
  9. YouTube · · YouTube description · Bi' Öğren · ggml-org/whisper.cpp

    Yapay Zeka Kullananlar İçin 3 Harika Araç | Bi Öğren #shorts Sesi yazıya çevirme nasıl yapılır? Whisper, whisper.cpp ve faster-whisper nedir? Kısa özet aşağıda. 1) Whisper: açık kaynaklı, çok dilli konuşma tanıma modeli. openai/whisper 2) whisper.cpp: aynı modelin bağımlılıksız C/C++ uygulaması. ggml-org/whisper.cpp 3) faster-whisper: README'ye göre aynı doğrulukla orijinalinden 4 kata kadar hızlı. SYSTRAN/faster-whisper Hız bilgisayarına göre değişir. Kurmadan önce README'yi oku. Bi Öğren: her gün yeni bir bilgi.

    2 likes · 12 views
  10. Four GPUs, One Quantization Ladder: Gemma 4 E2B From a 4 GB Laptop to an NVIDIA L4 --- title: "Four GPUs, One Quantization Ladder: Gemma 4 E2B From a 4 GB Laptop to an NVIDIA L4" published: true description: "Gemma 4 E2B from BF16 to Q2_K on a Tesla T4, an NVIDIA L4, a GTX 1650 laptop and an RTX 3050 desktop, with byte-identical GGUF files and the same llama.cpp build. The ladder keeps its shape on all four cards, 218 questions die on all four, and any two GPUs grade 2 to 4 questions differently at BF16." tags: gemma, llamacpp, quantization, nvidia cover_image: raw.githubusercontent.com --- This article provides a step by step guide to running Gemma 4 E2B's quantization ladder, BF16 down to Q2_K, on four NVIDIA GPUs with the same nine GGUF files and the same llama.cpp build, and comparing the four cards question by question. xbill9/gemma-graveyard The first article asked every rung of the ladder the same 250 GSM8K questions on a Tesla T4. The second repeated it on an NVIDIA L4 in AWS. This one adds two consumer cards: a GTX 1650 Ti laptop GPU with 4 GB and an RTX 3050 desktop card with 8 GB. All four run llama.cpp b11699 on files with the same sha256, and each card gives identical text when BF16 is run twice. --- The Results in Brief The ladder keeps its shape on all four GPUs. Against each card's own BF16, F16 to Q5_K_M lose 1 to 8 answers, Q4_K_M and Q4_0 lose 9 to 19, Q3_K_M loses 42 to 49, and Q2_K gets 3 to 6 right out of 250. The counts agree; the questions move. Any two GPUs grade 2 to 4 questions differently at BF16 and 12 to 22 at Q4_0. No question is lost at F16 or Q8_0 on all four cards, while 216 are lost at Q2_K on all four. 218 questions die at some rung on every GPU, and 147 of them die first at the same rung on every GPU. The 4 GB laptop runs every quantized rung entirely on its GPU. BF16 and F16 do not fit, so llama.cpp splits them between GPU and CPU, and they decode at 9.2 and 9.6 tokens per second against 45.9 for Q8_0 on the same card. The cover lays the four GPUs' grades over each other. One row per rung, BF16 at the top and Q2_K at the bottom, one cell per question: marigold where all four GPUs answer right, grey where all four answer wrong, violet where they disagree. docs/make_cover_gpu4.py draws it from the committed rows. --- What Changes and What Stays | | Tesla T4 | NVIDIA L4 | GTX 1650 Ti | RTX 3050 | | :--- | :--- | :--- | :--- | :--- | | Where | GCE n1-standard-2 | AWS g6.xlarge | laptop | desktop | | GPU memory | 15,360 MiB | 23,034 MiB | 4,096 MiB | 8,192 MiB | | Compute capability | 7.5 | 8.9 | 7.5 | 8.6 | | Host CPU | 2 vCPU | AMD EPYC 7R13 | Intel i7-10750H | Intel i7-5820K | | Driver | 615.71.10 | 595.112.07 | 615.71.10 | 615.78.08 | The same on all four: llama.cpp b11699 with GGML_CUDA=ON, built for each card's own compute capability; the nine GGUFs and Google's QAT Q4_0 file, byte for byte; the 250 questions in data/heldout.jsonl; temperature 0, one request at a time, thinking off, 1,024 max tokens, llama-server -c 4096 -np 1 --seed 0. Every rung runs with -ngl 99 except BF16 and F16 on the GTX 1650 (Step 4). --- At This Point You Should Have… - An NVIDIA GPU with at least 4 GB and a CUDA toolkit - About 58 GB of free disk for the checkpoint, the nine GGUFs and the QAT file - A clone: git clone https://github.com/xbill9/gemma-graveyard - The T4 run's committed results in runs/2026-10-27-ladder/ --- Step 1 — Build llama.cpp at the Same Tag On the RTX 3050: git -C ~/llama.cpp worktree add --detach /android/graveyard/llama.cpp b11699 cd /android/graveyard/llama.cpp cmake -B build -DGGML_CUDA=ON -DCMAKE_CUDA_ARCHITECTURES=86 -DCMAKE_BUILD_TYPE=Release cmake --build build -j12 --target llama-server llama-quantize The one build flag that changes per card is CMAKE_CUDA_ARCHITECTURES: 75 for the T4 and the GTX 1650, 89 for the L4, 86 for the RTX 3050. nvidia-smi --query-gpu=name,memory.total,compute_cap,driver_version --format=csv name, memory.total [MiB], compute_cap, driver_version NVIDIA GeForce RTX 3050 OEM, 8192 MiB, 8.6, 615.78.08 🔎 Tip: keep the pinned build in its own worktree. The desktop already had a newer llama.cpp checkout (b11983). git worktree add --detach <dir> b11699 gives a second working copy at the tag from the same clone, so the measured build and the everyday build sit side by side. --- Step 2 — Rebuild the Ladder and Check It Against the T4 ladder.sh converts the checkpoint to BF16 and F16 and quantizes seven rungs from BF16. Each run script then compares every file's size and sha256 with the T4's ladder.tsv: diff <(cut -f1,3,4 runs/2026-10-27-ladder/ladder.tsv) <(cut -f1,3,4 runs/2026-10-29-3050/ladder.tsv) && echo "ladder matches T4 sha256" ladder matches T4 sha256 The GTX 1650 and the RTX 3050 both print the same line, and Google's QAT Q4_0 file matches too (sha256 fa401b55…). Across the four machines, the GGUF bytes are identical; the card, its driver, its CUDA version and the kernels built for it are what differ. 🔎 Tip: the converter writes the checkpoint directory into the GGUF. convert_hf_to_gguf.py copies the model card and takes the model's name from the directory it reads. A checkpoint taken straight from the Hugging Face cache snapshot has neither the README.md nor the name gemma-4-E2B-it, and gives different bytes. Download with hf download google/gemma-4-E2B-it --local-dir <dir>/gemma-4-E2B-it. --- Step 3 — Prove Each Card Repeats Itself BF16 on 50 questions, twice, on every GPU: ./graveyard.py repeat runs/2026-10-29-3050/determinism-1 runs/2026-10-29-3050/determinism-2 BF16 {"rung": "BF16", "n": 50, "mismatched_extracted": 0, "mismatched_text": 0, "mismatched_right": 0, "right_a": 46, "right_b": 46} The T4, the L4 and the GTX 1650 give the same result: 0 mismatched characters and 46 of 50 right both times. Each card on its own is deterministic, so a difference between two cards comes from the GPU and its CUDA stack. --- Step 4 — Fit the 16-bit Rungs on 4 GB BF16 and F16 need a 4,384.87 MiB GPU buffer for their 36 layers (from the T4's load log), and the GTX 1650 has 4,096 MiB. With -ngl 99 the load fails. graveyard.py run --ngl auto leaves -ngl off, and llama.cpp's fit step places what it can: common_params_fit_impl: - CUDA0 (NVIDIA GeForce GTX 1650 Ti with Max-Q Design): 14 layers, 2546 MiB used, 1125 MiB free load_tensors: offloaded 14/36 layers to GPU load_tensors: CUDA0 model buffer size = 2407.92 MiB Every other rung fits whole. Q8_0 on the same card: load_tensors: offloaded 36/36 layers to GPU load_tensors: CUDA0 model buffer size = 2342.30 MiB The split changes speed and leaves the grades in line with the other GPUs: the GTX 1650's BF16 scores 229, the same as the T4 and the L4, and grades 2 to 4 questions differently from each of them. The 8 GB RTX 3050 holds BF16 whole at 4,651 MiB. --- Step 5 — Run the Ladder on Each Card and Score It Each run script runs the nine rungs and QAT Q4_0, then scores every rung against that card's own BF16: ./graveyard.py bury runs/2026-10-29-3050 BF16 F16 Q8_0 Q6_K Q5_K_M Q4_K_M Q4_0 Q3_K_M Q2_K --json graveyard-ladder.json Right answers, out of 250: | Rung | T4 | L4 | GTX 1650 | RTX 3050 | | :--- | :--- | :--- | :--- | :--- | | BF16 | 229 | 229 | 229 | 232 | | F16 | 229 | 229 | 228 | 232 | | Q8_0 | 227 | 228 | 229 | 226 | | Q6_K | 229 | 227 | 226 | 227 | | Q5_K_M | 231 | 228 | 226 | 226 | | Q4_K_M | 224 | 221 | 222 | 221 | | Q4_0 | 222 | 220 | 216 | 218 | | Q3_K_M | 191 | 186 | 183 | 191 | | Q2_K | 3 | 6 | 5 | 3 | Lost, against the same card's BF16: | Rung | T4 | L4 | GTX 1650 | RTX 3050 | | :--- | :--- | :--- | :--- | :--- | | F16 | 1 | 1 | 2 | 1 | | Q8_0 | 4 | 3 | 2 | 7 | | Q6_K | 4 | 6 | 7 | 8 | | Q5_K_M | 3 | 6 | 6 | 8 | | Q4_K_M | 9 | 14 | 12 | 14 | | Q4_0 | 15 | 16 | 19 | 16 | | Q3_K_M | 42 | 45 | 49 | 44 | | Q2_K | 226 | 225 | 225 | 229 | Lost: right at BF16, wrong at this rung, on the same GPU. The failures fall into the same kinds on every card. Q3_K_M runs out of room: 33 to 36 of its losses on each GPU are answers cut off at 1,024 tokens. Q2_K loops: 208 to 228 of its 250 answers repeat a line five or more times, and 246 to 249 hit the token cap. --- Step 6 — Line the Four GPUs Up, Question by Question docs/gpu4_derived.py rebuilds the T4's grid from its committed results and reads the other three from their rows, then compares all six pairs of GPUs at every rung: python3 docs/gpu4_derived.py > runs/2026-10-29-3050/four-gpus.txt | Rung | Graded differently, any two GPUs | Lost on all four | | :--- | :--- | :--- | | BF16 | 2 to 4 | — | | F16 | 3 to 5 | 0 | | Q8_0 | 3 to 9 | 0 | | Q6_K | 4 to 10 | 2 | | Q5_K_M | 7 to 10 | 1 | | Q4_K_M | 9 to 15 | 5 | | Q4_0 | 12 to 22 | 5 | | Q3_K_M | 26 to 34 | 20 | | Q2_K | 6 to 9 | 216 | Graded differently: right on one GPU and wrong on the other, at that rung, for the closest and the furthest of the six pairs. - The light rungs lose different questions on each card. F16 and Q8_0 lose 1 to 7 answers per GPU, and none of them is lost on all four. - The deep losses are shared. Q3_K_M loses 20 questions on all four GPUs and Q2_K 216. - Most of the graveyard is common ground. Each GPU has 226 questions that die at some rung, the RTX 3050 230. 218 die on all four, and 147 die first at the same rung on all four. One question dies only on the RTX 3050 (test-358) and one only on the GTX 1650 (test-147). - BF16 itself moves a few answers. 227 questions are right at BF16 on all four cards and 18 wrong on all four. Against the L4, the RTX 3050's BF16 changes the text of 31 answers out of 250, the extracted number of 4 and the grade of 3. --- Step 7 — Google's QAT Q4_0 on Four Cards ./graveyard.py bury runs/2026-10-29-3050 BF16 QAT_Q4_0 Q4_0 --json graveyard-qat.json | GPU | QAT Q4_0 right | Q4_0 right | QAT Q4_0 lost | Q4_0 lost | | :--- | :--- | :--- | :--- | :--- | | T4 | 221 | 🥇 222 | 15 | 15 | | L4 | 219 | 🥇 220 | 15 | 16 | | GTX 1650 | 🥇 222 | 216 | 11 | 19 | | RTX 3050 | 🥇 221 | 218 | 15 | 16 | QAT Q4_0 scores 219 to 222 on the four cards and plain Q4_0 216 to 222. On the T4 and the L4 the plain file is ahead by 1; on the GTX 1650 QAT is ahead by 6 and on the RTX 3050 by 3. The two files lose mostly different questions: on the RTX 3050, 5 questions are lost under both, 10 only under QAT and 11 only under the plain Q4_0. Across the four GPUs, 6 of QAT's losses and 5 of Q4_0's are lost on every card. --- Step 8 — Speed on Each Card Median decode speed in tokens per second. Each column is one machine; read down a column. | Rung | T4 | L4 | GTX 1650 | RTX 3050 | | :--- | :--- | :--- | :--- | :--- | | BF16 | 40.0 | 50.1 | 9.2 | 40.3 | | F16 | 39.6 | 50.0 | 9.6 | 40.3 | | Q8_0 | 64.3 | 83.0 | 45.9 | 67.8 | | Q6_K | 70.8 | 98.1 | 57.2 | 75.3 | | Q5_K_M | 78.7 | 107.7 | 61.9 | 82.2 | | Q4_K_M | 84.1 | 118.7 | 66.5 | 91.5 | | Q4_0 | 🥇 93.6 | 125.6 | 🥇 70.8 | 🥇 99.7 | | Q3_K_M | 74.2 | 111.1 | 55.9 | 64.2 | | Q2_K | 74.0 | 🥇 139.5 | 62.2 | 95.0 | - Q4_0 is the fastest rung on three of the four cards; on the L4 it is Q2_K, which is wrong on 244 of 250 questions. - Q5_K_M decodes 1.21 to 1.35 times as fast as Q8_0 on each card (arithmetic, from the table). Q8_0 is the baseline here because it is the largest rung that fits whole on all four GPUs. - Q3_K_M is slower than Q4_0 on every card, and on the RTX 3050 it is slower than Q8_0. - BF16 and F16 run at the same speed on the T4, the L4 and the RTX 3050. On the GTX 1650, with 22 of 36 layers on the CPU, they run at a fifth of Q8_0's speed. The full ladder with QAT took 5 hours 16 minutes on the RTX 3050 and 12 hours 25 minutes on the GTX 1650, from the first log line to the last (run-3050.log, run-1650.log). --- Compare and Contrast | | T4 | L4 | GTX 1650 | RTX 3050 | | :--- | :--- | :--- | :--- | :--- | | BF16 right of 250 | 229 | 229 | 229 | 🥇 232 | | Q5_K_M lost | 🥇 3 | 6 | 6 | 8 | | Q4_0 right, tok/s | 222, 93.6 | 220, 125.6 | 216, 70.8 | 218, 99.7 | | Every rung whole on the GPU | 🟢 yes | 🟢 yes | ❌ BF16, F16 split | 🟢 yes | | Same text twice at BF16 | 🟢 yes | 🟢 yes | 🟢 yes | 🟢 yes | --- So, Which One? On any of the four cards, take Q5_K_M: 39.0% of BF16's bytes, 226 to 231 right, 3 to 8 answers lost against the card's own BF16, and 1.21 to 1.35 times Q8_0's decode speed. For the fastest file that stays within 19 answers, take Q4_0, the fastest rung on three of the cards. On a 4 GB card, every quantized rung fits whole and the 16-bit rungs run at under 10 tokens per second. To compare two quantizations question by question, run both on one GPU: a different card moves 2 to 4 grades at BF16 and up to 34 at Q3_K_M. --- Summary The goal of this article was to run Gemma 4 E2B's quantization ladder on four GPUs, from a 4 GB laptop card to a data-centre L4, and see which grades hold. The key was holding everything else fixed: byte-identical GGUFs, the same llama.cpp tag and the same sampling, with each card checked to give identical text twice. The four-GPU results were: - 🟢 All nine GGUFs and the QAT file match the T4's sha256 on every machine, and BF16 gives identical text twice on 50 questions on every card. - 🟢 The ladder keeps its shape on all four GPUs: F16 to Q5_K_M lose 1 to 8, Q4_K_M and Q4_0 lose 9 to 19, Q3_K_M loses 42 to 49. - 🟢 Q5_K_M is the best trade on every card: 226 to 231 right at 1.21 to 1.35 times Q8_0's speed. - 🟢 A 4 GB GTX 1650 runs every quantized rung whole on the GPU; BF16 and F16 run split, 14 of 36 layers on the GPU, at 9.2 and 9.6 tokens per second. - ⚠️ Any two GPUs grade 2 to 4 questions differently at BF16 and 12 to 22 at Q4_0; no question is lost at F16 or Q8_0 on all four. - ⚠️ 218 questions die on all four GPUs, 147 of them first at the same rung. - ⚠️ QAT Q4_0 and plain Q4_0 trade places by card: plain ahead by 1 on the T4 and L4, QAT ahead by 6 on the GTX 1650 and by 3 on the RTX 3050. - ❌ Q3_K_M loses 42 to 49, mostly answers cut off at 1,024 tokens; Q2_K gets 3 to 6 right, with 208 to 228 looping answers per card. Scope: one run of each rung per GPU on four NVIDIA cards (a Tesla T4 on GCE, an L4 on AWS, a GTX 1650 Ti laptop GPU and an RTX 3050 desktop card), 250 GSM8K test questions, greedy, thinking off, 1,024 max tokens, llama.cpp b11699 built for each card. Determinism checked at BF16 on each card. The T4 grid is rebuilt from its committed per-question results. The hosts also differ in CPU, RAM, driver and CUDA version, and on the GTX 1650 BF16 and F16 run split between GPU and CPU. Speed is compared within each card only. The strategy for measuring Gemma 4's accuracy one quantization rung at a time on four GPUs was validated with an incremental step by step approach. --- References - Accuracy vs Speed: Gemma 4 E2B Quantization Tradeoffs, BF16 to Q2_K, the T4 article - Performance vs Quality: Gemma 4 E2B Quantization on an NVIDIA L4 and a Tesla T4, the L4 article - gemma-graveyard on GitHub - GTX 1650 run: runs/2026-10-29-1650 - RTX 3050 run: runs/2026-10-29-3050 - llama.cpp - google/gemma-4-E2B-it - google/gemma-4-E2B-it-qat-q4_0-gguf - GSM8K

    10 reactions · 1 comment

Achievements

Awards earned by the repositories ggml-org owns. Select an award to embed its badge.

Gold
01st place finishes
Silver
12nd place finishes
Bronze
13rd place finishes
Awarded repositories
2Owned by ggml-org now

Repositories

Ordered by gold, then silver, then bronze.

  1. llama.cppBest: 2nd by stars, 1,217 stars010
  2. whisper.cppBest: 3rd by stars, 522 stars001

Every award

Top-three finishes of these repositories in completed trending days and weeks, newest first.

  1. llama.cpp
  2. whisper.cpp

A repository earns an award for finishing first, second or third in a completed trending day or week, ranked by new stars, new forks or pull request authors. Awards follow a repository through renames and transfers and count toward its current owner. Weeks run Monday to Sunday, UTC.