mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #83] [CLOSED] serve: llama-server-style timings on responses (prefill/decode rates for llama-swap & friends) #2444
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#2444
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/83
Author: @mikicvi
Created: 9/28/2026
Status: ❌ Closed
Base:
main← Head:llama-timings📝 Commits (2)
0dd2285serve: llama-server-style timings on responses, for llama-swap and friends9e277ddMerge branch 'main' into llama-timings📊 Changes
1 file changed (+24 additions, -2 deletions)
View changed files
📝
serve/server.py(+24 -2)📄 Description
The engine already reports per-request prompt/decode timings, conversation-cache reuse and draft counts on its
DONEline, but those numbers stayed insideserver.py. This emits them everywhere theusageobject already goes, in llama-server's dialect — a top-leveltimingsobject on the final streamed chunk, the non-streaming response, and the Anthropicmessage_delta:(
cache_n/draft_*only when the engine reported them.)Why: proxies and monitors that chart per-request prefill/decode speed read exactly this shape — llama-swap's activity log (the llama-server, vLLM and TabbyAPI dialects it accepts), and anything else that already understands llama.cpp responses. Without it, Strata requests show token counts but
unknownrates. Nothing else changes: fields are additive, and clients that don't knowtimingsignore it.Verified end to end through llama-swap v257: streaming and non-streaming
/v1/chat/completions, and/v1/messages, all produce activity rows with prefill/decode rates, cached-token counts on reused prompts, and draft acceptance — e.g. a 10.6k-token request charts PP 467 t/s, decode 19.7 t/s, drafts 32 of 59 accepted.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.