perf(qwen_vl): profile the residual decode falloff on M5 Max at 64 and 2048 prompt tokens

Abierto
#3,546 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
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
48/100
Tipo de issue
Documentación
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
rust, shell

Línea de trabajo

Build the project with cargo build --release --features metal,accelerate, then run scripts/capture_m5_metal_trace.sh or use Instruments on an M5 Max at 64- and 2048-token prompts. Record per-kernel timings under docs/benchmark_results/ and link the new profile from docs/benchmark_results/model_tests_m5max.md, attributing the residual per-token cost with numbers, especially whether it comes from KV-read growth.

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

Descripción

area:models priority:low status:ready type:performance

Refs #1686

Background

This is the one #1686 acceptance criterion that cannot run on the CUDA host where the rest was finished: "A profile at 64 and at 2048 prompt tokens on qwen2.5-vl-3b-4bit attributes the extra per-token cost to these specific code paths rather than asserting it, and is recorded under docs/benchmark_results/."

The three #1686 changes have landed: repeat_kv removed from qwen2_vl, qwen3_vl, and qwen3_vl_moe; mask skipped at seq_len 1; MRoPE cos/sin built once per forward (qwen3 hoist in PR #3545). Commit 5946fa58 recorded the M5 Max curve, in its message only: 169.83 / 170.71 / 163.45 / 155.77 tok/s at 64 / 128 / 512 / 2048 (falloff 8.3%, was 40.3%). mlx-lm falls 9 to 11%.

Task

On an M5 Max, cargo build --release --features metal,accelerate, then profile decode at prompt 64 and 2048 with scripts/capture_m5_metal_trace.sh or Instruments. Attribute where per-token cost grows with context. If the residual is structural (KV read growth), say so with the numbers.

Acceptance Criteria

  • A profile record with per-kernel timings at both lengths exists under docs/benchmark_results/.
  • docs/benchmark_results/model_tests_m5max.md links to it.
Lenguaje dominante
Rust
Estrellas
505
Forks
81
Merge medio
14 h 2 min
PR fusionados (30 d)
448

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 lablup/mlxcel

Todos los issues de lablup/mlxcel

Issues similares

Más issues de Rust

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.