mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2480] [CLOSED] [Engine] send the stream role with the first response data #4064
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#4064
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/2480
Author: @KeyanHu-git
Created: 10/14/2026
Status: ❌ Closed
Base:
main← Head:fix/2391-stream-first-data📝 Commits (3)
9c3629fserve: send the role chunk with the first response datab7766a3test: cover progress and MCP stream opening48ca8f9merge current main and align stream tests with declared tools📊 Changes
2 files changed (+170 additions, -1 deletions)
View changed files
📝
serve/server.py(+21 -1)➕
serve/test_first_chunk.py(+149 -0)📄 Description
Problem and result
Withdrawn after checking the measurement path on Strata 0.2.2 (
011c9e60). This patch delays the role-only stream chunk, but the reported prefill discrepancy comes from estimating processing time using the arrival of that chunk. I have not established a server-side requirement for changing its timing.Related discussion
#2391 reports implausible prefill throughput in llama-benchy while first-content latency and Strata's monitor show normal processing time.
Approach
In llama-benchy's metric calculation, per-request prefill throughput uses
first_response_ts - start_ts - latency. Its client records a role-only chunk as the first response and records the first content separately. Strata's owntools/strata_bench.pyalready waits for nonempty content or reasoning when measuring first-token latency.Validation
Passed: replayed fixed timestamps through the unchanged llama-benchy metric methods. With 8,192 input tokens and first content fixed at 3.650 seconds, moving only the role chunk from 7 ms to 3.650 seconds changes the per-request prefill estimate from 1,365,333 to 2,245 tok/s. The content-based batch metric remains 2,244.38 tok/s in both cases.
Failed: none in this metric replay.
Not run: a new model-speed benchmark; the replay isolates the metric and does not measure inference speed.
Limits
The earlier stream-ordering tests show that the patch delays the role chunk. They do not establish that the original timing is a server defect. The measurement definition should be resolved before proposing a server compatibility change.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.
--ple-io ram: read the PLE table into page-locked RAM with the unbuffered reader instead of faulting it in through the page cache #4901