Slow small-batch quantized inference on M1/M2 GPUs

オープン
#24,812 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
15/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
活発
技術スタック
python, pytorch
領域
performance

調査の方向性

This is a tracking issue for a performance gap, not a located bug: start by reproducing the 24.5 vs 44.6 tokens/s decode on an M2 with Muse-Glimmer Q4_K_M and DFlash, seven draft tokens and FP16 KV, then profile eight-row against single-row target verification (140 ms vs 37 ms). Look at the quantized linear kernels used for small verification batches on the M1/M2 GPU backend, keeping single-token decode and larger prefill as regression controls. Done means M1 numbers are measured as well and the small-batch path is tracked or fixed.

索引モデルが issue の本文から書いたものです。

説明

On M2 Ultra, Muse-Glimmer Q4_K_M with DFlash decodes at about 24.5 tokens/s, versus 44.6 tokens/s in the installed Muse llama.cpp integration. The comparison uses the same target/draft weights, exact 160-token code prompt, 512 generated tokens, temperature 0, seven draft tokens, and FP16 KV.

Eight-row target verification takes roughly 140 ms, versus 37 ms for one row. Small verification batches use quantized linear layers inefficiently, so strong prefill throughput does not translate into competitive speculative decoding.

Track small-batch quantized inference performance on M1/M2 GPUs. M1 still needs measurement. Include single-token decode and larger prefill as regression controls.

主要言語
Python
スター
5.2k
フォーク
1.3k
平均マージ
1日 7時間
マージ済み PR(30日)
644

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

pytorch/executorch のほかの issue

pytorch/executorch の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。