Slow small-batch quantized inference on M1/M2 GPUs

未关闭
#24,812 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
5/5
预计耗时
一周以上
新手友好度
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 小时
30 天内合并 PR
644

环境准备

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

pytorch/executorch 的其他 Issue

查看 pytorch/executorch 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。