Skip to content

Qwen3.8-Flash-Next on any consumer hardware: one-click install for Windows / Linux. Strata inference engine, OpenAI/Anthropic API on localhost, optional image input.

C++

monitor: show prefill rate in recent requests

hash13bafc8dd556cc
diff --git a/serve/web/app.css b/serve/web/app.css
index dd9a3e1fe..b0a57c6ab 100644
--- a/serve/web/app.css
+++ b/serve/web/app.css
@@ -111,6 +111,12 @@ main { flex: 1; min-height: 0; display: flex; }
margin-top: var(--st-s-2); font-variant-numeric: tabular-nums; }
.req-card { display: flex; flex-direction: column; gap: var(--st-s-3); min-width: 0; }
.table-wrap { overflow-x: auto; }
+/* Recent requests: keep headings, values and status badges on one line. */
+#req-wrap .st-table th,
+#req-wrap .st-table td {
+ white-space: nowrap;
+ padding-inline: 8px;
+}
.req-head { display: flex; align-items: center; justify-content: space-between; gap: var(--st-s-2); }
.table-wrap.all { max-height: 420px; overflow-y: auto; }
.req-totals { margin: 0; font-size: var(--st-fs-sm); }
diff --git a/serve/web/app.js b/serve/web/app.js
index 69735fc5c..6c821c20b 100644
--- a/serve/web/app.js
+++ b/serve/web/app.js
@@ -329,7 +329,7 @@ function renderMonitor(live, hw, st, eng, h, last, requests, totals, kept) {
// recent requests
const body = $("req-body");
if (!requests.length) {
- body.innerHTML = `<tr><td colspan="8" class="muted">No requests yet</td></tr>`;
+ body.innerHTML = `<tr><td colspan="9" class="muted">No requests yet</td></tr>`;
} else {
const badge = {stop: ["", "Done"], length: ["", "Max tokens"], cancel: ["st-badge--queued", "Stopped"],
disconnect: ["st-badge--queued", "Closed"], error: ["st-badge--error", "Error"]};
@@ -340,8 +340,11 @@ function renderMonitor(live, hw, st, eng, h, last, requests, totals, kept) {
// #588: the VRAM share; the PCIe share (--pcie-frac) beside it when there is one
const hit = r.hit_rate == null ? "–" : `${(r.hit_rate * 100).toFixed(1)}%` +
(r.pcie_share ? ` <span class="muted" title="routed experts the GPU read over PCIe (--pcie-frac) or another GPU computed">+${(r.pcie_share * 100).toFixed(1)}% PCIe</span>` : "");
+ // Reused tokens are not prefetched again. Match the Monitor's existing Prefill metric.
+ const fresh = r.prompt_tokens == null ? null : Math.max(0, r.prompt_tokens - (r.reused || 0));
+ const prefillRate = fresh > 0 && r.prompt_ms > 0 ? fresh / (r.prompt_ms / 1000) : null;
return `<tr><td>${esc(t)}</td><td><span class="st-badge ${cls}">${esc(text)}</span>${proj}</td><td class="num">${fmt(r.prompt_tokens)}</td>
- <td class="num">${fmt(r.reused)}</td><td class="num">${fmt(r.output_tokens)}</td><td class="num">${fmt(r.decode_tok_s, 1)}</td>
+ <td class="num">${fmt(r.reused)}</td><td class="num">${fmt(r.output_tokens)}</td><td class="num">${fmt(prefillRate)}</td><td class="num">${fmt(r.decode_tok_s, 1)}</td>
<td class="num">${hit}</td><td class="num">${fmt(r.duration_s, 1)} s</td></tr>`;
}).join("");
}
diff --git a/serve/web/index.html b/serve/web/index.html
index 5c26ad827..fb2201cb4 100644
--- a/serve/web/index.html
+++ b/serve/web/index.html
@@ -117,8 +117,8 @@
<div class="table-wrap" id="req-wrap">
<table class="st-table">
<thead><tr><th>Time</th><th>Status</th><th class="num">Prompt</th><th class="num">Reused</th><th class="num">Output</th>
- <th class="num">Tok/s</th><th class="num" title="While writing the answer: the share of the experts looked up that were already in VRAM. Experts the GPU read over PCIe (--pcie-frac) are not counted in it; their share of all routed experts is shown after it (+N% PCIe)">VRAM hit rate</th><th class="num">Duration</th></tr></thead>
- <tbody id="req-body"><tr><td colspan="8" class="muted">No requests yet</td></tr></tbody>
+ <th class="num" title="New prompt tokens per second, excluding reused cache tokens (engine prompt time)">Prefill t/s</th><th class="num">Decode t/s</th><th class="num" title="While writing the answer: the share of the experts looked up that were already in VRAM. Experts the GPU read over PCIe (--pcie-frac) are not counted in it; their share of all routed experts is shown after it (+N% PCIe)">VRAM hit rate</th><th class="num">Duration</th></tr></thead>
+ <tbody id="req-body"><tr><td colspan="9" class="muted">No requests yet</td></tr></tbody>
</table>
</div>
<p class="muted req-totals" id="req-totals"></p>