[GH-ISSUE #347] DeepSeek-V4.1-Flash EXL3 on Windows: prefill ~100 t/s against the Maya-S GGUF's ~500 t/s #138

Open
opened 2026-10-29 21:21:26 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @21387A on GitHub (Oct 21, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/347

tl;dr

still not sure whether everything is working optimally (102 t/s smells like it's too low, really), I apologize if it ends up being a useless slop-report


This continues #280 (closed as fixed in v1.1.17). The chunking does work here - the engine logs prompts in chunks of 8192 - but on this machine the EXL3 quant of DeepSeek-V4.1-Flash reads prompts 4-5x slower than the Maya-S GGUF.

The box: Windows 11, two RTX 3090s (65% power limit), Threadripper 3990X (AVX2), 256 GB DDR4-2866, page file 128 GB, v1.1.20. Every run below: --tp 2 --max-context 131072 --dspark none --vision off, temperature 0, the same 31,024-token text file as the prompt, 32 tokens out.

what ran reading the 31,024-token prompt
Maya-S GGUF, --mmap-experts off (CPU lane copied into RAM) 58.4 s = 531 t/s
Maya-S GGUF, --mmap-experts on (in place) 67.9 s = 457 t/s
Maya-S GGUF, in place, DS4_FLOW=0 78.9 s = 393 t/s
EXL3 2.9, in place, default 8192 chunks 304.2 s = 102 t/s
EXL3 3.5, in place, default 8192 chunks 430.3 s = 72 t/s

The engine's own lines, EXL3 2.9:

ds4: the experts VRAM leaves over (~160.7 GB) are read in place from the model's files (--mmap-experts on) (261.6 GB of RAM free to keep them: the most-routed 160.7 GB read ahead; prompts in chunks of 8192)
ds4: CUDA0 layers [0, 39] (tensor parallel 2, part 0) + head: weights 3.05 GB, experts 17.65 GB (2717 of 15360 in VRAM), caches 0.12 GB, 554 MiB free
ds4: CUDA1 layers [0, 39] (tensor parallel 2, part 1): weights 3.05 GB, experts 17.65 GB (2717 of 15360 in VRAM), caches 0.12 GB, 566 MiB free
ds4: 12643 routed experts on the CPU lane (161.3 GB, in place in the model's files), 32 threads
maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 304163 ms (102.0 tok/s), 32 generated in 5563 ms (5.75 tok/s); CPU lane 0.1% of the experts

VRAM is full - 554 and 566 MiB free a card - so there is no room to move more experts into VRAM at this context.

The same prompt on EXL3 3.5:

ds4: 13208 routed experts on the CPU lane (205.0 GB, in place in the model's files), 32 threads
maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 430284 ms (72.1 tok/s), 32 generated in 6634 ms (4.82 tok/s)

27% more bytes on the lane, 41% more time for the same 31,024 tokens - the prompt grows with the lane.

DS4_PROF=1 on the EXL3 2.9 run:

ds4 prompt GPU time, 31024 tokens: attention 59817 ms, routing + shared expert 14259 ms, experts 557988 ms summed over the two GPUs (with the waits for streamed ones), between layers 27 ms

Maya-S GGUF, same prompt, --mmap-experts on:

maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 67896 ms (456.9 tok/s), 32 generated in 9169 ms (3.49 tok/s); CPU lane 0.0% of the experts
ds4 prompt stream, CUDA0: 31024 tokens in 67882 ms; 23122 experts streamed: 23122 from the files (254.2 GB, 3.75 GB/s: 0.0 GB from the disk unbuffered, 254.2 GB through the page cache), 0 from RAM (0.0 GB); 5120 likely ones queued early, 177 of them unpicked; the compute waited 23920 ms for reads

A second, longer prompt on the same server (34,138 tokens) read at 89.8 t/s against 96.3 for this one - going over the lane again is not cheaper the second time.

The time also follows the number of chunks at one prompt length: 4 chunks 304 s, --prefill-chunk 16384 (2 chunks) 198 s, --prefill-chunk 32768 (1 chunk) 131 s. The 32K chunk is not a fix (short prompts then take 1.74 s against 1.54 s warm, and the VRAM pool shrinks from 2715 to 1881 experts a card) - it only shows where the cost sits.

That leaves a starved link, which is also what the TUI shows: while a Maya-S GGUF prompt runs, its PCIe reading (per GPU) shoots up to 24 - 26 GB/s; while an EXL3 prompt runs - it gets to 4-5 GB/s, never rising above 8 GB/s max.

The knobs that touch that path, one run each on an 8,898-token prompt: default 161.3 s, DS4_RING_MB=1600 159.3 s, DS4_READERS=16 161.8 s, DS4_PF_ALL=1 155.5 s, the three together 160.8 s. None of them helps - but with the bigger ring our /metrics sampling saw PCIe reach 12.7 GB/s up and 21.5 GB/s down, so the link has room: there is not enough data arriving to send.

My concerns:

  1. On the same box, with the same chunking and the same two-GPU split (the read-once pass needs one GPU, so neither run gets it), the GGUF's experts move at 3.75 GB/s a GPU, or 3.45 GB/s with DS4_FLOW=0, while the EXL3 ones work out to about 1.1 GB/s a GPU if each 8K chunk reads its half of the lane. What is different about the EXL3 read, and can it be brought to the GGUF's rate? That would be the prefill fix at the default chunk size.
  2. Could DS4_FLOW_STATS cover EXL3 as well? It prints nothing for EXL3 today, so a report can show only times, never the bytes or the read waits.

Minor and unrelated to the above: maya-report.txt has no DeepSeek speed lines at all (its picker matches only GLM's lines), so every DS4 report arrives with "(nothing)" under speeds. Attached: maya-report.txt

Originally created by @21387A on GitHub (Oct 21, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/347 tl;dr > still not sure whether everything is working optimally (102 t/s smells like it's too low, really), I apologize if it ends up being a useless slop-report --- This continues #280 (closed as fixed in v1.1.17). The chunking does work here - the engine logs `prompts in chunks of 8192` - but on this machine the EXL3 quant of DeepSeek-V4.1-Flash reads prompts 4-5x slower than the Maya-S GGUF. The box: Windows 11, two RTX 3090s (65% power limit), Threadripper 3990X (AVX2), 256 GB DDR4-2866, page file 128 GB, v1.1.20. Every run below: `--tp 2 --max-context 131072 --dspark none --vision off`, temperature 0, the same 31,024-token text file as the prompt, 32 tokens out. | what ran | reading the 31,024-token prompt | |---|---| | Maya-S GGUF, `--mmap-experts off` (CPU lane copied into RAM) | 58.4 s = **531 t/s** | | Maya-S GGUF, `--mmap-experts on` (in place) | 67.9 s = **457 t/s** | | Maya-S GGUF, in place, `DS4_FLOW=0` | 78.9 s = **393 t/s** | | EXL3 2.9, in place, default 8192 chunks | 304.2 s = **102 t/s** | | EXL3 3.5, in place, default 8192 chunks | 430.3 s = **72 t/s** | The engine's own lines, EXL3 2.9: ``` ds4: the experts VRAM leaves over (~160.7 GB) are read in place from the model's files (--mmap-experts on) (261.6 GB of RAM free to keep them: the most-routed 160.7 GB read ahead; prompts in chunks of 8192) ds4: CUDA0 layers [0, 39] (tensor parallel 2, part 0) + head: weights 3.05 GB, experts 17.65 GB (2717 of 15360 in VRAM), caches 0.12 GB, 554 MiB free ds4: CUDA1 layers [0, 39] (tensor parallel 2, part 1): weights 3.05 GB, experts 17.65 GB (2717 of 15360 in VRAM), caches 0.12 GB, 566 MiB free ds4: 12643 routed experts on the CPU lane (161.3 GB, in place in the model's files), 32 threads maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 304163 ms (102.0 tok/s), 32 generated in 5563 ms (5.75 tok/s); CPU lane 0.1% of the experts ``` VRAM is full - 554 and 566 MiB free a card - so there is no room to move more experts into VRAM at this context. The same prompt on EXL3 3.5: ``` ds4: 13208 routed experts on the CPU lane (205.0 GB, in place in the model's files), 32 threads maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 430284 ms (72.1 tok/s), 32 generated in 6634 ms (4.82 tok/s) ``` 27% more bytes on the lane, 41% more time for the same 31,024 tokens - the prompt grows with the lane. `DS4_PROF=1` on the EXL3 2.9 run: ``` ds4 prompt GPU time, 31024 tokens: attention 59817 ms, routing + shared expert 14259 ms, experts 557988 ms summed over the two GPUs (with the waits for streamed ones), between layers 27 ms ``` Maya-S GGUF, same prompt, `--mmap-experts on`: ``` maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 67896 ms (456.9 tok/s), 32 generated in 9169 ms (3.49 tok/s); CPU lane 0.0% of the experts ds4 prompt stream, CUDA0: 31024 tokens in 67882 ms; 23122 experts streamed: 23122 from the files (254.2 GB, 3.75 GB/s: 0.0 GB from the disk unbuffered, 254.2 GB through the page cache), 0 from RAM (0.0 GB); 5120 likely ones queued early, 177 of them unpicked; the compute waited 23920 ms for reads ``` A second, longer prompt on the same server (34,138 tokens) read at 89.8 t/s against 96.3 for this one - going over the lane again is not cheaper the second time. The time also follows the number of chunks at one prompt length: 4 chunks 304 s, `--prefill-chunk 16384` (2 chunks) 198 s, `--prefill-chunk 32768` (1 chunk) 131 s. The 32K chunk is not a fix (short prompts then take 1.74 s against 1.54 s warm, and the VRAM pool shrinks from 2715 to 1881 experts a card) - it only shows where the cost sits. That leaves a starved link, which is also what the TUI shows: while a Maya-S GGUF prompt runs, its PCIe reading (per GPU) shoots up to 24 - 26 GB/s; while an EXL3 prompt runs - **it gets to 4-5 GB/s**, never rising above 8 GB/s max. The knobs that touch that path, one run each on an 8,898-token prompt: default 161.3 s, `DS4_RING_MB=1600` 159.3 s, `DS4_READERS=16` 161.8 s, `DS4_PF_ALL=1` 155.5 s, the three together 160.8 s. None of them helps - but with the bigger ring our `/metrics` sampling saw PCIe reach 12.7 GB/s up and 21.5 GB/s down, so the link has room: there is not enough data arriving to send. My concerns: 1. On the same box, with the same chunking and the same two-GPU split (the read-once pass needs one GPU, so neither run gets it), the GGUF's experts move at 3.75 GB/s a GPU, or 3.45 GB/s with `DS4_FLOW=0`, while the EXL3 ones work out to about 1.1 GB/s a GPU if each 8K chunk reads its half of the lane. What is different about the EXL3 read, and can it be brought to the GGUF's rate? That would be the prefill fix at the default chunk size. 2. Could `DS4_FLOW_STATS` cover EXL3 as well? It prints nothing for EXL3 today, so a report can show only times, never the bytes or the read waits. Minor and unrelated to the above: `maya-report.txt` has no DeepSeek speed lines at all (its picker matches only GLM's lines), so every DS4 report arrives with "(nothing)" under speeds. Attached: [maya-report.txt](https://github.com/user-attachments/files/33773565/maya-report.txt)
Author
Owner

@21387A commented on GitHub (Oct 22, 2026):

Same prompt, same flags, now on v1.1.22 — the Windows Engram changes in this release (#361, #362) moved both paths, and the gap narrowed from 7.4x to 5.6x, but it is still there.

Box and flags as above: Windows 11, 2x RTX 3090, Threadripper 3990X, 256 GB DDR4-2866, --tp 2 --max-context 131072 --dspark none --vision off, temperature 0, the same 31,024-token text file, 32 tokens out, default 8192-token chunks. Both runs are the first request on a freshly started server.

what ran v1.1.20 v1.1.22
EXL3 3.5bpw, in place 430.3 s = 72.1 tok/s 279.6 s = 110.9 tok/s
Maya-S GGUF, --mmap-experts off 58.4 s = 531 tok/s 50.2 s = 618 tok/s

The engine's lines, v1.1.22, EXL3 3.5bpw:

ds4: CUDA0 layers [0, 39] (tensor parallel 2, part 0) + head: weights 3.58 GB, experts 17.09 GB (2235 of 15360 in VRAM), caches 0.12 GB, 560 MiB free
ds4: 13125 routed experts on the CPU lane (205.0 GB, in place in the model's files), 32 threads
maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 279623 ms (110.9 tok/s), 32 generated in 7320 ms (4.37 tok/s); CPU lane 0.1% of the experts

Maya-S GGUF, same prompt on the same version:

ds4: 12351 of the CPU lane's 12351 experts copied into RAM (136.3 GB, 1 NUMA part) in 68.8 s
maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 50169 ms (618.4 tok/s), 32 generated in 1751 ms (18.28 tok/s); CPU lane 0.0% of the experts

So v1.1.22 is a real gain for the EXL3 path as well (+54% on the same prompt), but the shape of the problem has not changed. The same 205.0 GB lane, read in four passes of 8192 tokens, still moves at about 1.5 GB/s a GPU, against the GGUF's 3.75 GB/s; the prompt time still follows the lane, which is why the 32K chunk "helped" in the first report — fewer passes over the same bytes.

Both concerns from the first post still stand.

<!-- gh-comment-id:6344025062 --> @21387A commented on GitHub (Oct 22, 2026): Same prompt, same flags, now on v1.1.22 — the Windows Engram changes in this release (#361, #362) moved both paths, and the gap narrowed from 7.4x to 5.6x, but it is still there. Box and flags as above: Windows 11, 2x RTX 3090, Threadripper 3990X, 256 GB DDR4-2866, `--tp 2 --max-context 131072 --dspark none --vision off`, temperature 0, the same 31,024-token text file, 32 tokens out, default 8192-token chunks. Both runs are the first request on a freshly started server. | what ran | v1.1.20 | v1.1.22 | |---|---:|---:| | EXL3 3.5bpw, in place | 430.3 s = 72.1 tok/s | **279.6 s = 110.9 tok/s** | | Maya-S GGUF, `--mmap-experts off` | 58.4 s = 531 tok/s | **50.2 s = 618 tok/s** | The engine's lines, v1.1.22, EXL3 3.5bpw: ```text ds4: CUDA0 layers [0, 39] (tensor parallel 2, part 0) + head: weights 3.58 GB, experts 17.09 GB (2235 of 15360 in VRAM), caches 0.12 GB, 560 MiB free ds4: 13125 routed experts on the CPU lane (205.0 GB, in place in the model's files), 32 threads maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 279623 ms (110.9 tok/s), 32 generated in 7320 ms (4.37 tok/s); CPU lane 0.1% of the experts ``` Maya-S GGUF, same prompt on the same version: ```text ds4: 12351 of the CPU lane's 12351 experts copied into RAM (136.3 GB, 1 NUMA part) in 68.8 s maya ds4 serve: prompt 31024 tokens = 0 reused + 31024 read in 50169 ms (618.4 tok/s), 32 generated in 1751 ms (18.28 tok/s); CPU lane 0.0% of the experts ``` So v1.1.22 is a real gain for the EXL3 path as well (+54% on the same prompt), but the shape of the problem has not changed. The same 205.0 GB lane, read in four passes of 8192 tokens, still moves at about 1.5 GB/s a GPU, against the GGUF's 3.75 GB/s; the prompt time still follows the lane, which is why the 32K chunk "helped" in the first report — fewer passes over the same bytes. Both concerns from the first post still stand.
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
mw00/project-maya#138
No description provided.