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

未关闭 适合新手
#8,052 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 3 天内回复

还没有人认领这个 Issue。

评估

难度
2/5
预计耗时
1-3 小时
新手友好度
77/100
Issue 类型
缺陷
描述清晰度
描述清楚
活跃度
活跃
技术栈
javascript
领域
frontend

调研方向

从 serve/web/app.js 第 812 行附近开始,那里状态页面会构建 Speculation 行;检查 /metrics 如何提供 eng.spec 和 eng.mtp_max。使用报告中的值 spec: "mtp" 重现,并确认该行会显示有限的草稿数量,或者在没有可用数字时隐藏。该 issue 还提到,另一种方案是在独立主机中发布 mtp_max;请查看 #8036 了解相关范围。

由索引模型根据 Issue 内容生成。

描述

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

主要语言
C++
星标
11.6k
派生
1k
平均合并
4 天 17 小时
30 天内合并 PR
28

环境准备

这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

Niko1221/Strata 的其他 Issue

查看 Niko1221/Strata 的全部 Issue

相似的 Issue

更多 C++ Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。