mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #358] [CLOSED] DeepSeek on Windows: 1 ms timer resolution (decode 36-41 -> 68.5 tok/s here) #486
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#486
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/358
Author: @OscarSheng
Created: 10/21/2026
Status: ❌ Closed
Base:
main← Head:ds4-windows-timer📝 Commits (1)
1415b8dDeepSeek on Windows: 1 ms timer resolution📊 Changes
1 file changed (+14 additions, -0 deletions)
View changed files
📝
src/ds4/ds4_main.cpp(+14 -0)📄 Description
What it changes:
timeBeginPeriod(1)when maya-ds4 starts,_WIN32only.MAYA_DS4_TIMER_MS=0leaves thesystem's 15.6 ms tick;
=Nasks for N ms.Why:
serve_lanenaps (sleep_for(20 us)) after 2 ms without a request, between tokens. On Windows that nap lasts atimer tick, and the next token's first
wait_seqwaits it out (DS4_PROF: "waiting for the CPU lane" and attentiongrow by the tick).
What it leaves alone: Linux / macOS builds (the code is under
_WIN32); the lane's logic.Measured (v1.1.21 + PR 1 and the other PRs below,
--mmap-experts off,MAYA_DS4_STREAM=0, one process a config, tworounds; decode = 1,500 tokens at temperature 1 after a 23-token prompt; every run reached 1,500):
MAYA_DS4_TIMER_MS=0(as before)Prompts: unchanged (8,517 tokens 1,850-1,894 against 1,876-1,902 tok/s). On v1.1.19 with the next PR off as well:
20.08 -> 30.52 tok/s (
DS4_PROF: GPU a token 47.9 -> 30.7 ms, waiting for the CPU lane 25.7 -> 18.4 ms).Same answers: a 3,000-token prompt + 48 greedy tokens gave the same token ids with this and the next PR on and both off.
Not measured: other Windows PCs. Possibly related: #316 (Windows decode slower in v1.1.18) - not checked.
🤖 Generated with Claude Code
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.