mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
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#2808
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/753
Author: @zengyishou
Created: 10/4/2026
Status: ❌ Closed
Base:
main← Head:fix/batch-request-metrics📝 Commits (10+)
6f21f22CS-T: the partial pin of the RAM tier opt-in (STRATA_PARTIAL_PIN=1)c4175bdMerge branch 'f-q4-on242' into r131-finalf6c18ffdocs: Unsloth UD-Q4_K_XL manual import (docs/UNSLOTH_Q4.md); DETAILS: the mapped mode without experts.bin, --resident-budget-gib, the tier counters652437bMerge branch 'f-q4-on242' into r131-final9259cadEngine 0.1.31: Unsloth UD-Q4_K_XL runs on a 64 GB PC (experimental: split GGUF, Q4_K/Q5_K/Q5_1/Q8_0 experts, RAM budget + SSD tier with routing prefetch), the low-RAM mode reads GGUF experts in place, Windows GGUF load 2x (#230), server status race (#266) and tokenizer (#268) fixes, truncated tool calls (#211/#231), AMD intrinsics (#262); setup requires it3fb00c1HIP (S6): RDNA4 matrix-core prompt attention for int8 KV, opt-in (STRATA_HIP_WMMA=1, gfx12 only)648ab7fHIP (S6): router_top10 without its serial parts on AMD, bitwise the same (default on HIP; STRATA_HIP_ROUTER_OLD=1: old)78700caHIP (S6): router_top10.cu - drop a nested #if that left the HIP block unterminatedad48d5cdiagnostics: STRATA_DUMP_FIRST_LOGITS writes the first generated token's logitse095f12Start: name the GPU and stop at once when the build has no code for it; STRATA_EMULATE_CC for tests📊 Changes
5 files changed (+975 additions, -116 deletions)
View changed files
➕
docs/REQUEST_METRICS.md(+86 -0)➕
serve/request_stats.py(+195 -0)📝
serve/server.py(+262 -108)➕
serve/test_request_stats.py(+418 -0)📝
serve/web/app.js(+14 -8)📄 Description
Dependency and review scope
Draft: blocked on #559. Do not merge before #559. This branch is based on #559 head
f65301b3bfc621229c7d5ddb1e268f652be43a59. Because GitHub can only target an existing branch in this repository, the current comparison againstmainalso includes #559's unmerged changes. The contribution from this PR is the final single commit only; after #559 lands this branch must be rebased and the diff rechecked before marking ready.Review the isolated increment here: incremental diff. The same increment is also proposed directly to #559's author in the focused companion PR. These are alternative review routes for the same change, not patches to apply twice.
Summary
Follow-up to Niko1221/Strata#559, prepared on its
multi-sequence-batchingbranch. Concurrent requests currently share the engine's last protocol result and mutable live status. One completion can overwrite another request's counters or clear its activity.Bind content-free protocol collectors to each generation iterator operation, distinguish admission DONE from full BDONE, and aggregate continuation segments without double-counting input. Keep request-owned live status, monotonically bucket output rates, and correlate request IDs across HTTP and metric records. Bind delayed slot drains to their original queue and generation; preserve control ownership through cancellation and rejection.
This PR does not introduce the batch engine into main and does not include snapshot, ROCm allocation, or fatal-timeout changes. Existing optional API-monitor behavior is unchanged; the new metric collector retains no prompt or answer content.
Validation
Nineteen deterministic regressions cover seven-way reverse completion, interleaved protocol events, admission errors, cancellation, buffered completion, late drains, iterator context isolation and both API dialects. Tests use synthetic inputs and clocks, not private workloads or GPU-performance estimates.
Full server suite on macOS/Python 3.12: 222 tests run, 215 passed and 7 skipped. All 25 request-accounting and Prometheus tests passed; JavaScript syntax and diff whitespace checks passed. The existing Prometheus running gauge and per-request latency histograms are preserved.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.