mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 19:04:50 +07:00
[PR #612] fix(ds4): isolate prefill timing by prompt size #625
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#625
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/612
Author: @Whamp
Created: 10/28/2026
Status: 🔄 Open
Base:
main← Head:fix/ds4-prefill-path-feedback📝 Commits (3)
55622a0Fix DS4 prefill path feedback isolation40fd73atest(ds4): prove cold feedback cannot reverse larger prompt choices3bd2962docs(ds4): explain size-local prompt learning and existing tuning📊 Changes
5 files changed (+127 additions, -20 deletions)
View changed files
📝
CMakeLists.txt(+2 -0)📝
docs/SETTINGS.md(+14 -0)📝
src/ds4/ds4_model.cu(+9 -20)➕
src/ds4/ds4_path_policy.hpp(+45 -0)➕
tests/ds4_path_policy_test.cpp(+57 -0)📄 Description
DeepSeek processes small inputs through either a streamed GPU pass, called flow, or repeated 16-token windows. Its selector predicts their cost from startup calibration and timings of earlier requests.
When an input's size class has no flow measurements, the selector borrows a timing correction from the nearest measured class. A slow 11-token warmup can therefore inflate the flow estimate for a 515-token input and make windows look faster. Fixed overhead can dominate the tiny request without making larger requests equally slow.
This PR keeps each correction within the size class that produced it. Unmeasured classes use the startup-calibrated estimate until they have their own measurements.
Measured effect
Main
e16dec85versus PR3bd2962, on a Threadripper PRO 3945WX with four RTX 3090s and the DeepSeek V4.1 Flash GSQ RCO IQ2-XXS pack. Prefill is input-processing time; complete time also includes generating 256 tokens.Benchmark setup and limits
This fix is independent of the read-ahead control in #569. Their measured gains should not be added together.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.