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

Aperta Adatta ai principianti
#8,052 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 3 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
2/5
Tempo stimato
1-3 ore
Idoneità per principianti
77/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
javascript
Ambito
frontend

Direzione di ricerca

Inizia in serve/web/app.js, vicino alla riga 812, dove la pagina di stato crea la riga Speculation, e verifica come /metrics fornisce eng.spec e eng.mtp_max. Riproduci il caso con il valore segnalato spec: "mtp" e conferma che la riga mostra un numero finito di bozze oppure viene nascosta quando non è disponibile alcun numero. L’issue menziona anche la pubblicazione di mtp_max nell’host autonomo come alternativa; controlla #8036 per il relativo ambito.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

[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.

Lingua principale
C++
Stelle
11.6k
Fork
1k
Merge medio
4g 17h
PR unite (30g)
28

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Niko1221/Strata

Tutte le issue di Niko1221/Strata

Issue simili

Altre issue su C++

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.