[GH-ISSUE #457] /metrics: expose the speculative draft counts (offered / accepted) for llm-visuals #208

Closed
opened 2026-11-04 01:40:56 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @blaakstone on GitHub (Oct 2, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/457

Hi, I run Strata 0.1.34 with Qwen3.8-Flash-Next IQ3_S at 262K on my RTX 5090 behind llama-swap (119-135 tok/s decode, ~5,000 tok/s prefill, 0.8 s to resume a 71K conversation), thank you for it.

I monitor it live with llm-visuals, a terminal dashboard that polls Strata's /metrics every second (its Strata adapter is on the branch feature/strata). Throughput, context, layers and requests work; the speculative decoding panel stays empty: "Strata does not report draft acceptance".

The server already has the MTP draft counts: serve/server.py reads them from the engine's DONE line (self.last.update(drafts_accepted=..., drafts_offered=...)), returns them in the response timings as draft_n / draft_n_accepted (#83), and the server log prints them ("drafts accepted 601 of 1181").

They are missing from GET /metrics: not in live, not in the requests history, not in totals (checked on 0.1.34). From the response timings I only get the figure once a request has finished; what I would like to see in llm-visuals is the acceptance while the model generates.

Proposal (additive, no change to existing fields):

  • in live, while generating: "drafts_offered" and "drafts_accepted" so far for the current request (if the engine can report them before DONE);
  • in each requests entry: the same two counts for the finished request (null when the engine did not report them, as draft_n is omitted today);
  • in totals: running sums of both.
Originally created by @blaakstone on GitHub (Oct 2, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/457 Hi, I run Strata 0.1.34 with Qwen3.8-Flash-Next IQ3_S at 262K on my RTX 5090 behind llama-swap (119-135 tok/s decode, ~5,000 tok/s prefill, 0.8 s to resume a 71K conversation), thank you for it. I monitor it live with [llm-visuals](https://github.com/DingoOz/llm-visuals), a terminal dashboard that polls Strata's `/metrics` every second (its Strata adapter is on the branch `feature/strata`). Throughput, context, layers and requests work; the speculative decoding panel stays empty: "Strata does not report draft acceptance". The server already has the MTP draft counts: `serve/server.py` reads them from the engine's DONE line (`self.last.update(drafts_accepted=..., drafts_offered=...)`), returns them in the response `timings` as `draft_n` / `draft_n_accepted` (#83), and the server log prints them ("drafts accepted 601 of 1181"). They are missing from `GET /metrics`: not in `live`, not in the `requests` history, not in `totals` (checked on 0.1.34). From the response `timings` I only get the figure once a request has finished; what I would like to see in llm-visuals is the acceptance while the model generates. **Proposal** (additive, no change to existing fields): - in `live`, while generating: `"drafts_offered"` and `"drafts_accepted"` so far for the current request (if the engine can report them before DONE); - in each `requests` entry: the same two counts for the finished request (`null` when the engine did not report them, as `draft_n` is omitted today); - in `totals`: running sums of both.
Author
Owner

@Niko1221 commented on GitHub (Oct 2, 2026):

Added in 0.1.35: each /metrics request entry has drafts_offered and drafts_accepted (null when the engine didn't report them), and totals keeps their running sums. Live counts during a request need an engine protocol change, so they're for later. Thanks for the idea!

<!-- gh-comment-id:5948764304 --> @Niko1221 commented on GitHub (Oct 2, 2026): Added in [0.1.35](https://github.com/Niko1221/Strata/releases/tag/v0.1.35): each `/metrics` request entry has `drafts_offered` and `drafts_accepted` (null when the engine didn't report them), and `totals` keeps their running sums. Live counts during a request need an engine protocol change, so they're for later. Thanks for the idea!
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#208
No description provided.