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

Đang mở Phù hợp với người mới
#8,052 0 bình luận 0 reaction 0 người được giao Xem trên GitHub

Maintainer thường phản hồi trong vòng 3 ngày

Chưa có ai nhận issue này.

Đánh giá

Độ khó
2/5
Thời gian dự kiến
1-3 giờ
Mức phù hợp với người mới
77/100
Loại issue
Lỗi
Độ rõ ràng
Đặc tả rõ ràng
Mức độ hoạt động
Sôi nổi
Công nghệ
javascript
Lĩnh vực
frontend

Hướng nghiên cứu

Bắt đầu tại serve/web/app.js, gần dòng 812, nơi trang trạng thái tạo hàng Speculation, rồi kiểm tra cách /metrics cung cấp eng.spec và eng.mtp_max. Tái hiện với giá trị được báo cáo spec: "mtp" và xác nhận hàng này hiển thị số lượng bản nháp hữu hạn hoặc bị ẩn khi không có số nào. Issue cũng đề cập đến việc xuất bản mtp_max trên host độc lập như một phương án thay thế; hãy xem #8036 để biết phạm vi liên quan đó.

Do mô hình lập chỉ mục viết ra từ nội dung của issue.

Mô tả

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

Ngôn ngữ chính
C++
Star
11.6k
Fork
1k
Merge trung bình
4 ngày 17 giờ
Pull request đã merge (30 ngày)
28

Chuẩn bị môi trường

Dự án này không cung cấp dev container, Dockerfile hay hướng dẫn đóng góp, nên bạn cần tự thiết lập môi trường: hãy bắt đầu từ README và xem hướng dẫn đóng góp lần đầu của chúng tôi để biết các bước chung.

Bắt đầu từ đâu

  1. Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
  2. Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
  3. Fork repository và làm thay đổi trên một nhánh.
  4. Mở pull request có tham chiếu số hiệu của issue.

Issue khác của Niko1221/Strata

Tất cả issue của Niko1221/Strata

Issue tương tự

Thêm issue về C++

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.