Slow small-batch quantized inference on M1/M2 GPUs

Abierto
#24,812 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 1 día

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
5/5
Tiempo estimado
Más de una semana
Aptitud para principiantes
15/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
python, pytorch
Área
performance

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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.

Lenguaje dominante
Python
Estrellas
5.2k
Forks
1.3k
Merge medio
1 d 7 h
PR fusionados (30 d)
644

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de pytorch/executorch

Todos los issues de pytorch/executorch

Issues similares

Más issues de Python

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.