mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
[PR #285] [MERGED] glm fast: warm up the prompt path before READY #444
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
mw00/project-maya#444
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/mw00/project-maya/pull/285
Author: @gopinath87607
Created: 10/20/2026
Status: ✅ Merged
Merged: 10/20/2026
Merged by: @mw00
Base:
main← Head:pr/warm-prompt📝 Commits (1)
5626b9aglm fast: STRATA_GLM_WARM_PROMPT (default 0 = off, 32 or more) runs one synthetic prompt through the whole part chain before READY, so a session's first request does not pay what only a session's first prompt pays (issue #8: 95-133 ms/token against 23-44 warm) - 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. It costs about one chunk of the smallest part's size (a few seconds to ~15 s here, beside the tiers' own 90-151 s warm-up at a start), its ids are spread over the vocabulary so the routes are not one expert's, and the state is zeroed right after it, so no conversation can see it (a request with no slot in use resets before its own prompt anyway). The default stays 0: whether it wins is what the first-prompt A/B with the knob on and off decides, and the knob is how that is measured📊 Changes
2 files changed (+30 additions, -0 deletions)
View changed files
📝
docs/SETTINGS.md(+1 -0)📝
src/program/generate.cpp(+29 -0)📄 Description
What this changes
STRATA_GLM_WARM_PROMPT=N(off by default;Nat least 32): with--serve, one synthetic prompt ofNtokens runs through the whole part chain before the server prints READY. It exists for issue #8: the first prompt of every session read 95-133 ms/token against 23-44 warm. 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.The warm prompt costs about one chunk of the smallest part's size - a few seconds to ~15 s on a four-way split of a big model, beside the tiers' own 90-151 s warm-up at a start. Its ids are spread over the vocabulary so the routes are not one expert's. The state is zeroed right after it, so no conversation can see it (a request with no slot in use resets before its own prompt anyway), and
glm fast: the prompt path is warm (N tokens in X ms, Y ms/token)marks it.0or unset is off. The default stays 0 because whether it wins is exactly what the first-prompt A/B with the knob on and off decides; the knob is how that is measured.What it leaves alone
Default off: a server started without the variable behaves exactly as before and no synthetic prompt runs. Requests, the API and the config are untouched.
Measurements
From issue #8, the motivation: the first prompt of every session read 95-133 ms/token against 23-44 warm on the same conversation, the first request after a fresh start against later ones. The cost is one chunk of the smallest part, a few seconds to ~15 s here, beside the tiers' 90-151 s warm-up. This branch does not claim a win: the A/B with the knob on and off is the measurement it enables.
Checks
src/program/generate.cppcompiles clean with the build's own flags (nvcc 13.2, compute_86 + compute_120).python3 tools/check_hip_compat.pypasses.🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.