mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2832] [CLOSED] serve: STRATA_WARM_PROMPT (off) reads one synthetic prompt before READY #4289
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#4289
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/2832
Author: @gopinath87607
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:prefill-warm-prompt📝 Commits (1)
5abf08cserve: STRATA_WARM_PROMPT (off) reads one synthetic prompt before READY📊 Changes
2 files changed (+146 additions, -0 deletions)
View changed files
📝
docs/DETAILS.md(+11 -0)📝
src/program/generate.cpp(+135 -0)📄 Description
What this changes
STRATA_WARM_PROMPT=N(--serve, off by default): one synthetic prompt of N tokens (32 if you ask for less) is readthrough the whole part chain before the engine says READY, so a session's first request does not pay what only a
session's first prompt pays — the first chunk carries every kernel's first launch, the prompt path's own allocations
and the tiers' first reads, and no later prompt pays any of it.
STRATA_GLM_WARM_PROMPTis accepted as the sameknob.
The synthetic ids are spread over the vocabulary (
100 + (i * 131) % 20000), so the routes are not one expert's. Ittakes the same loan a request takes (the slots the prompt path is laid out in go non-resident and are refilled from
the arena afterwards), and every participant's state is zeroed before and after it, so no conversation can see it. A
prompt path that cannot run prints why and the first prompt pays it; the start never fails because of it.
From the Maya checkout (
project-maya), local commitcc58309(2026-10-14).What it leaves alone
Unset or
0(the default), the whole block is skipped and the engine says READY exactly as before. Nothing outsidethe block changes; this is by construction.
Measurements
12,24,36, Qwen3.8-Flash-Next IQ3_S,
--batch 8 --batch-groups 4(v0.1.45 + this PR + #2673), one run per case,warm page cache. Time to READY: 102 s unset vs 101 s at
STRATA_WARM_PROMPT=512. First request (a ~325-tokenprompt), time to first token: 1.00 s unset vs 0.72 s at 512. Later requests were unaffected.
on its rig.
PPline, with thevariable set and unset is the A/B.
off in those comparisons, so it does not look involved.
a cold page cache.
Checks
wn = 0skips the block).src/program/generate.cppcompiles clean against this branch's headers with the build's own flags(
-fsyntax-only; one pre-existing unused-variable warning in unrelated code). The development branch that alsocarries the change built fully with ninja (CUDA 13.2).
generate.cppcarries no per-backend code, so bothbuilds compile the same change.
strata serve: warming the prompt path with a N-token prompt before READY.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.