[GUI] Status page: Speculation line prints "MTP drafts up to NaN tokens" on the strata-q4-lite host

Abierto Apto para principiantes
#8,052 0 comentarios 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
2/5
Tiempo estimado
1-3 horas
Aptitud para principiantes
77/100
Tipo de issue
Error
Claridad
Bien especificado
Estado de actividad
Activo
Stack tecnológico
javascript
Área
frontend

Línea de trabajo

Empieza en serve/web/app.js, cerca de la línea 812, donde la página de estado construye la fila Speculation, e inspecciona cómo /metrics proporciona eng.spec y eng.mtp_max. Reproduce el caso con el valor indicado spec: "mtp" y confirma que la fila muestra un número finito de borradores o se oculta cuando no hay ningún número disponible. El issue también menciona como alternativa publicar mtp_max en el host independiente; consulta #8036 para ver ese alcance relacionado.

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

Descripción

[GUI] Status page: Speculation line prints "MTP drafts up to NaN tokens" on the strata-q4-lite host

Bug Description

On a Qwen4-35B-A3B .strata pack running on the standalone host (strata-q4-lite, NVIDIA/CUDA), the status page renders the Speculation row as "MTP drafts up to NaN tokens". The drafter itself works fine — only the number is broken. Cosmetic, front-end only; related to the scope discussed in #8036 but a separate defect.

Steps to Reproduce

  1. Set up Qwen4-35B-A3B (any .strata tier) on Linux/NVIDIA via the signed-feed components (Control 0.1.74.4, engine 0.1.73).
  2. Turn MTP on (setup writes qwen4_mtp_mode: on; the start adds --mtp <file> --spec 2).
  3. Open the status page.

Expected Behavior

The row shows the draft window the engine actually uses (or the row hides itself when the host publishes no number).

Actual Behavior

serve/web/app.js line 812:

["Speculation", eng.spec && (eng.drafting == null || eng.drafting === "mtp")
  ? `MTP drafts up to ${Math.max(0, (eng.mtp_max || eng.spec) - 1)} tokens...` : null],

The guard passes because eng.spec is truthy — but on this host /metrics reports spec: "mtp" (a string, the drafter type from strata_control/drafting.engine_info) and no mtp_max at all. So the expression computes "mtp" - 1 → NaN, and Math.max(0, NaN) is NaN. Every GGUF build previously reported a numeric K here, so the string case was never exercised.

Fix either side:

  • front end: only render the count when Number.isFinite(eng.mtp_max ?? eng.spec); or
  • have the standalone host publish mtp_max in its info (ties into #8036).

Environment

  • OS: Ubuntu 26.04.1 LTS, kernel 7.0.0-44-generic
  • Control 0.1.74.4, engine 0.1.73 linux-x86_64-cuda-cuda13 (feed sequence 145)
  • GPU: RTX 3090; model Qwen4-35B-A3B Balanced + PLE-Q8_0 + MTP (--spec 2)

Error Output

GET /metrics → engine: {"spec": "mtp", "drafting": "mtp", "drafting_note": ""}   # no mtp_max
page: Speculation | MTP drafts up to NaN tokens

Additional Context

Workaround: none needed functionally — speculation runs (bench decode ~100 tok/s with MTP vs ~24-31 without on the same card); the label is display-only noise.

Lenguaje dominante
C++
Estrellas
11.6k
Forks
1k
Merge medio
4 d 17 h
PR fusionados (30 d)
28

Preparar el entorno

Este proyecto no incluye contenedor de desarrollo, Dockerfile ni guía de contribución, así que la configuración corre por tu cuenta: empieza por su README y consulta nuestra guía para la primera contribución para los pasos generales.

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 Niko1221/Strata

Todos los issues de Niko1221/Strata

Issues similares

Más issues de C++

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.