mirror of
https://github.com/mw00/project-maya.git
synced 2026-12-03 21:08:26 +07:00
[PR #540] [CLOSED] DeepSeek: prompt lookup beside DSpark - whole-file edits up to 1.5x faster, the same tokens #588
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#588
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/540
Author: @needmorevram
Created: 10/27/2026
Status: ❌ Closed
Base:
main← Head:ds4-prompt-lookup📝 Commits (3)
d348264DeepSeek: prompt lookup beside DSpark - whole-file edits up to 1.5x faster, the same tokensa2dc983DeepSeek: prompt lookup without DSpark too - --dspark none / off, and the rounds DSpark rests01ce156DeepSeek: prompt lookup without DSpark moves to a PR of its own📊 Changes
9 files changed (+100 additions, -12 deletions)
View changed files
📝
CMakeLists.txt(+1 -1)📝
docs/SETTINGS.md(+1 -0)📝
include/strata/spec/draft_policy.hpp(+1 -1)📝
serve/server.py(+3 -0)📝
serve/test_server.py(+8 -0)📝
src/ds4/ds4_main.cpp(+75 -8)📝
src/ds4/ds4_model.cu(+2 -0)📝
src/ds4/ds4_model.hpp(+5 -0)📝
src/spec/draft_policy.cpp(+4 -2)📄 Description
What
When DeepSeek's answer repeats earlier context - a file sent back with small edits, quoted text, a list that comes back -
a decode round can now verify the tokens that followed that earlier occurrence instead of DSpark's drafts: up to 15 of
them, where DSpark's block gives 4.
maya-ds4 reuses the suffix drafter and draft policy the GLM path already has (
strata/spec/):committed tokens per millisecond from it - from this PC's measured round times by window size and the lookup drafts'
measured acceptance, both learned while it decodes (nothing tuned to one machine)
verify()keeps a draft the drafter did not draw with probability p(d) (q apoint at it), so greedy answers are identical and sampled ones are still the model's own draws
DS4_DSPARK_SAMPLE=1's drawn drafts (the choice would then depend on a draw)Settings
--suffix-draft N(maya-ds4)0turns it offstrata_tunesuffix_draft0/1: off / on for that request (an A/B in one engine)Also:
DraftPolicy's window cap 8 -> 16 (the GLM paths still pass 8 at most, so nothing changes there),Model::verify_max()andModel::drafts_sampled(), adocs/SETTINGS.mdrow, a server test for the new key.Measured
9 GPUs (RTX 3090 + 8x RTX 5060 Ti), the abliterated Mix-256G GGUF,
--tp 8,--prefill-chunk 4096, DSpark on,temperature 1.0 / top_p 1.0. One engine, lookup off / on per request, two passes in opposite orders (a prompt's second
run finds a warmer VRAM expert cache, so single pairs mislead), mean of both:
On the edits the lookup was taken in ~60 / ~140 rounds with 96-99% of its drafts kept; on ordinary answers in 0-15
rounds.
Note:
maincannot load the Mix-256G GGUF yet (its layers mix IQ3 gate / ups with MXFP4 downs - #520), so these runsare this commit applied on #520's branch; this branch itself was built and the tests below run on it.
Tests
serve.test_server(114 tests) pass, including the newtest_suffix_draft_tune_keydraft_policy_testandsuffix_drafter_testpass with the 16-token cap🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.