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

Open Beginner friendly
#8,052 0 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 3 days

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
77/100
Issue type
Bug
Clarity
Clearly specified
Activity status
Active
Tech stack
javascript
Domain
frontend

Research direction

Start in serve/web/app.js near line 812, where the status page builds the Speculation row, and inspect how /metrics supplies eng.spec and eng.mtp_max. Reproduce with the reported spec: "mtp" value and confirm the row shows a finite draft count or hides when no number is available. The issue also mentions publishing mtp_max in the standalone host as an alternative; check #8036 for that related scope.

Written by the indexing model from the issue text.

Description

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

Dominant language
C++
Stars
11.6k
Forks
1k
Avg merge
4d 17h
Merged PRs (30d)
28

Getting set up

This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from Niko1221/Strata

All issues in Niko1221/Strata

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.