Track Qwen3.8 resident Metal prefill improvements

Abierto
#1,202 1 comentario 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
8/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
c

Línea de trabajo

This is a tracker for two separate PRs, #1154 (PLE chunk prefetch with synchronous-read fallback) and #1198 (packed Q4_K loader reuse in the NAX prefill path), so start by reading those PRs and their focused tests rather than this issue. Build and check compatibility with make -j8 ds4_test test-kvstore-near-tail followed by ./ds4_test --server, which the issue reports as passing on the temporary integration commit. Done means both PRs are merged or explicitly resolved, with their own correctness and speed gates met. Performance claims need matching model, corpus and host-load conditions, so do not treat the baseline timings here as a new gain.

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

Descripción

Goal

Track two independent resident Metal prefill optimizations for Qwen3.8 Flash Next. Keep their PRs separate: one hides PLE I/O latency; the other removes repeated packed Q4_K loads. Each has its own correctness, fallback and speed gates.

Changes to review

  • #1154 — read the next chunk's original BF16 PLE rows while Metal processes the current chunk. One extra host buffer is capped at 128 MiB (80 MiB at the measured 8,192-token chunk); thread/read failures fall back to synchronous reads. Worker completion is joined before exposing the next frontier.
  • #1198 — reuse packed Q4_K header/quant words in the NAX prefill loader. Arithmetic order, dequantization, dispatch geometry and other quant loaders are unchanged.

Evidence

Apple M5 Max, 128 GiB, resident Qwen3.8-Flash-Next-Q4 (Q4_K gate/up, MXFP4 down):

PR Primary result Qualification
#1154 +3.94% fresh-16K prefill in an eight-run comparison Full logits were exact. A separate four-run integration smoke measured +6.27%; it is not an additional gain. Worker cancellation/read/thread fallback tests are included.
#1198 +2.376% warmed fresh-16K text; +2.274% code Baseline already includes #1154. Exact kernel outputs, full frontier logits and serialized-state/ordinary-decode comparisons passed.

The campaigns differ in baseline, warmup/context conditions and attention-path background. There is no direct final-combination-versus-stock-upstream measurement, so these results do not establish a universal combined percentage or a gain at every context length. No new decode throughput benefit is claimed; production opportunistic/non-exact MTP is unchanged.

Review and integration

These are independent implementations, not a strict build dependency. #1154 before #1198 aligns with the latter's measured baseline. Keep each implementation with its focused tests and rollback/failure behavior.

Related context correctness and checkpoint reuse tracker #1201 covers #1169, #1175, #1206 and #1200. Those change history/reuse behavior and have separate merge decisions. The checkpoint workflow timing includes these prefill changes as baseline and must not be counted as another kernel-throughput gain. #1206 measures avoided replay work against upstream plus #1169; its timings do not measure a kernel-throughput improvement.

The earlier temporary integration of the original five PRs (#1154, #1169, #1175, #1198 and #1200) at upstream fc80bd695da76ee14bcb86820bf900a5cdfda806 merged without text conflicts and passed:

make -j8 ds4_test test-kvstore-near-tail
./ds4_test --server

These establish build and model-free server/store compatibility, not a combined model-speed campaign. Individual PRs contain their full model/kernel validation. Final performance qualification should use matching model, corpus, chunking, context, warmup and host-load conditions, with only one model process/session running at a time.

Close this tracker when both PRs are merged or explicitly resolved.

Lenguaje dominante
C
Estrellas
24.4k
Forks
2.4k
Métricas de merge de PR
Sin PR fusionados en 30 d

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 antirez/ds4

Todos los issues de antirez/ds4

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.