Layers 20-39 of DeepSeek-V4.1-Flash read a prompt's earlier tokens only through layer 20's compressed KV and index keys, and each looks back one 128-token window more than the layer before. So for the answer and for the rings the decode reads they need their own work only on the last (40 - 20) x 127 + 128 = 2,668 rows. A prompt of ~3,700 or more new tokens on one GPU now runs its earlier chunks through layers 0-19 plus layer 20's kv_only part (the hyper-connection pre-norm, the compressor latent, the index keys, the compressed KV) and nothing of the later layers' attention or experts; the chunk the cut falls in runs layers 20-39 from the cut row on; later chunks run every layer. The expert flow plans nothing for the skipped (chunk, layer)s. STRATA_DS4_PROMPT_SKIP: 1 (default) the skip, 2 only the last 128 rows (DeepSeek's own serving; answers shift a little), 0 off. Same approach as Maya #318. H100 emulation (64 GB cgroup, 12 GiB VRAM, store 41 GB, 3.6 GB/s SSD cap): 16K prompt 69.3 s -> 51.5 s (236 -> 318 tok/s, two alternating pairs), 4K 32.5 s -> 30.7 s; 800 teacher-forced positions after a 4,200-token skipped prompt: KL 0.00029 against the full work, top-1 against the text 88.11% against 87.98%, ppl 1.5110 against 1.5111. --score gets DS4_SCORE_PREFIX=N (the segments joined, the first N tokens read as one prompt with the last row's logits, the rest scored) so the skip can be scored; tools/dsv41/test_prompt_skip.py runs it against a pack when one is named. The Maya notice file now says later Maya changes are covered by the same notice.
1023 B
Project Maya (maya-ds4), DeepSeek-V4.1 engine
The files under src/dsv41/, include/strata/dsv41/, tests/dsv41/ and tools/dsv41/ come from
https://github.com/mw00/project-maya (release v1.1.17, commit 8d9a9b5d), its DeepSeek engine src/ds4, tests/ds4_*,
tools/ds4 and the kernel sources it builds on (exl3, sampler). Project Maya is itself built on Strata.
Copyright (c) 2026 Peasant Smith (mw00) and the Project Maya contributors, including needmorevram.
MIT License, the full text is in LICENSE beside this file. The notice stays with every copy.
Changes made while porting into Strata are listed in the git history of the src/dsv41 directory
(the first commit of each file is the unmodified upstream copy).
Later changes taken from Project Maya releases v1.1.18 to v1.1.26 (the same approach re-written onto Strata's engine,
for example the long-prompt layer skip, the thinking budget, conversation slots) are covered by the same copyright
and permission notice, in LICENSE beside this file.