[GH-ISSUE #556] Not fill the full VRAM with DSpark on 4x rtx 3090 (Minimax 3.1 flash + DeepSeek V4.1 flash 1017) #231

Open
opened 2026-10-29 21:22:58 +07:00 by bsakaguchi · 4 comments
Owner

Originally created by @bandito1 on GitHub (Oct 27, 2026).
Original GitHub issue: https://github.com/mw00/project-maya/issues/556

I run many test and setting with DSV41 flash and Minimax 3.1 flash, but if I use DSpark, Maya didn't fill the VRAM to maximum. All time had 4-6GB empty space, which is never filled.

Hardver + Settings:
Version: Project Maya v1.1.32 · engine mm3
Model: MiniMax-M3.1-Flash
Engine: MiniMax-M3.1 (maya-mm3)
Context: 262 144 tokens
KV cache: 8-bit (INT8), streamed: 32 768 positions per layer in VRAM, the rest in RAM
Experts: 7296 routed; room for 2553 in VRAM and 4743 in RAM
Speculation: DSpark: its drafter proposes a few tokens at a time, the full model checks them (88% of them kept in the last answer)
Images: On
GPU: 4 × NVIDIA GeForce RTX 3090 · 96 GB
PCIe: Gen4 x16 on all 4 GPUs
CPU: AMD Ryzen Threadripper PRO 3975WX 32-Cores, 48 threads
RAM: 502 GB

Screenshot enclosed.
Image

Originally created by @bandito1 on GitHub (Oct 27, 2026). Original GitHub issue: https://github.com/mw00/project-maya/issues/556 I run many test and setting with DSV41 flash and Minimax 3.1 flash, but if I use DSpark, Maya didn't fill the VRAM to maximum. All time had 4-6GB empty space, which is never filled. **Hardver + Settings:** Version: Project Maya v1.1.32 · engine mm3 Model: MiniMax-M3.1-Flash Engine: MiniMax-M3.1 (maya-mm3) Context: 262 144 tokens KV cache: 8-bit (INT8), streamed: 32 768 positions per layer in VRAM, the rest in RAM Experts: 7296 routed; room for 2553 in VRAM and 4743 in RAM Speculation: DSpark: its drafter proposes a few tokens at a time, the full model checks them (88% of them kept in the last answer) Images: On GPU: 4 × NVIDIA GeForce RTX 3090 · 96 GB PCIe: Gen4 x16 on all 4 GPUs CPU: AMD Ryzen Threadripper PRO 3975WX 32-Cores, 48 threads RAM: 502 GB Screenshot enclosed. <img width="1119" height="1257" alt="Image" src="https://github.com/user-attachments/assets/ccd78527-3028-49e1-840f-e45b8c8aca4e" />
Author
Owner

@mw00 commented on GitHub (Oct 27, 2026):

Thanks for the report and the screenshot - it showed the cause right away: GPU 1 at 20.7 of 24 GB while the others were full.

With 4 GPUs MiniMax runs as two tensor-parallel pairs, and the two GPUs of a pair hold the same experts (each one half of every expert). The DSpark drafter and the output head live on GPU 0 only, so GPU 0 filled up first, and GPU 1 kept the ~3 GB free that GPU 0 had spent on them.

Fixed in v1.1.34 for MiniMax: that space on GPU 1 now holds its half of more experts, so the CPU computes only GPU 0's half of those - less CPU work per token (decode about 1.2x faster on our two-GPU test with half of the experts outside VRAM), and no change to how much VRAM is kept free for safety.

DeepSeek: it has the same cause in a tensor-parallel pair - we measured 3.2 GB idle on the second GPU of a pair, right beside the drafter. But a DeepSeek GGUF such as your 1017 normally runs as a plain layer split, where each GPU fills on its own (our 2-GPU test with DSpark: under 0.5 GB left on both). So we can't yet tell which one your 4 GPUs run. Could you send the lines of the DeepSeek start that begin with ds4: CUDA0 layers ... (one per GPU, they end in "MiB free")? If your start is a tensor-parallel pair, MAYA_DS4_DRAFT_DEV=0,1,0 puts the drafter's second block on the other GPU of the pair and, on our test, took the idle room from 3.7 GB to 1.5 GB without slowing decode - an opt-in today; we'll look at the default once we see your lines.

Released in v1.1.34: https://github.com/mw00/project-maya/releases/tag/v1.1.34

<!-- gh-comment-id:6456009335 --> @mw00 commented on GitHub (Oct 27, 2026): Thanks for the report and the screenshot - it showed the cause right away: GPU 1 at 20.7 of 24 GB while the others were full. With 4 GPUs MiniMax runs as two tensor-parallel pairs, and the two GPUs of a pair hold the same experts (each one half of every expert). The DSpark drafter and the output head live on GPU 0 only, so GPU 0 filled up first, and GPU 1 kept the ~3 GB free that GPU 0 had spent on them. Fixed in v1.1.34 for MiniMax: that space on GPU 1 now holds its half of more experts, so the CPU computes only GPU 0's half of those - less CPU work per token (decode about 1.2x faster on our two-GPU test with half of the experts outside VRAM), and no change to how much VRAM is kept free for safety. DeepSeek: it has the same cause in a tensor-parallel pair - we measured 3.2 GB idle on the second GPU of a pair, right beside the drafter. But a DeepSeek GGUF such as your 1017 normally runs as a plain layer split, where each GPU fills on its own (our 2-GPU test with DSpark: under 0.5 GB left on both). So we can't yet tell which one your 4 GPUs run. Could you send the lines of the DeepSeek start that begin with `ds4: CUDA0 layers ...` (one per GPU, they end in "MiB free")? If your start is a tensor-parallel pair, `MAYA_DS4_DRAFT_DEV=0,1,0` puts the drafter's second block on the other GPU of the pair and, on our test, took the idle room from 3.7 GB to 1.5 GB without slowing decode - an opt-in today; we'll look at the default once we see your lines. Released in **v1.1.34**: https://github.com/mw00/project-maya/releases/tag/v1.1.34
Author
Owner

@bandito1 commented on GitHub (Oct 28, 2026):

Thanks for an update, Minimax now filled all GPUs, but DS41 stay big empty space on GPU1. I enclosed the screenshot.
Model: DeepSeek V4.1 · UD-Q8_K_XL · 256K context
I'll playing with 'MAYA_DS4_DRAFT_DEV=0,1,0' and report them here.

Image
<!-- gh-comment-id:6465231875 --> @bandito1 commented on GitHub (Oct 28, 2026): Thanks for an update, Minimax now filled all GPUs, but DS41 stay big empty space on GPU1. I enclosed the screenshot. Model: DeepSeek V4.1 · UD-Q8_K_XL · 256K context I'll playing with 'MAYA_DS4_DRAFT_DEV=0,1,0' and report them here. <img width="1072" height="1245" alt="Image" src="https://github.com/user-attachments/assets/7f116a9a-9f05-4107-8949-a53a69412dbe" />
Author
Owner

@bandito1 commented on GitHub (Oct 28, 2026):

With extra env: MAYA_DS4_DRAFT_DEV=0,1,0 same unfilled GPU1.

Image
<!-- gh-comment-id:6466125924 --> @bandito1 commented on GitHub (Oct 28, 2026): With extra env: MAYA_DS4_DRAFT_DEV=0,1,0 same unfilled GPU1. <img width="1096" height="1127" alt="Image" src="https://github.com/user-attachments/assets/9bb0ae55-366c-4e22-9c76-dde12c27f5d7" />
Author
Owner

@bandito1 commented on GitHub (Oct 28, 2026):

This one is missed:

ds4: 12687 of the CPU lane's 12687 experts copied into RAM (238.5 GB, 1 NUMA part) in 474.8 s
ds4: CUDA0 layers [0, 42] (tensor parallel 2, part 0): weights 4.79 GB, experts 16.03 GB (1302 of 7680 in VRAM), caches 0.15 GB, 573 MiB free
ds4: CUDA1 layers [0, 18] (tensor parallel 2, part 1): weights 4.17 GB, experts 8.81 GB (918 of 7296 in VRAM), caches 0.15 GB, 8471 MiB free
ds4: CUDA2 layers [19, 39] (tensor parallel 2, part 0) + head: weights 4.73 GB, experts 16.69 GB (1755 of 8064 in VRAM), caches 0.14 GB, 577 MiB free
ds4: CUDA3 layers [19, 39] (tensor parallel 2, part 1): weights 4.60 GB, experts 16.69 GB (1755 of 8064 in VRAM), caches 0.14 GB, 713 MiB free
ds4: 12687 routed experts on the CPU lane (238.5 GB): 12687 copied into RAM (1 NUMA parts), the rest in place in the model's files; 16 threads
maya ds4 serve: GEN <max_new> [keys] <ids>; GENI <max_new> [keys] <pictures> <ids>; STOP, QUIT
[maya] images: the model's vision tower runs in the engine (GPU 0: 318 MiB kept), up to 1024 tokens a picture
[maya] thinking level when a request names none: low
[maya] thinking budget: 32768 tokens (then the answer)
<!-- gh-comment-id:6482372517 --> @bandito1 commented on GitHub (Oct 28, 2026): This one is missed: ``` ds4: 12687 of the CPU lane's 12687 experts copied into RAM (238.5 GB, 1 NUMA part) in 474.8 s ds4: CUDA0 layers [0, 42] (tensor parallel 2, part 0): weights 4.79 GB, experts 16.03 GB (1302 of 7680 in VRAM), caches 0.15 GB, 573 MiB free ds4: CUDA1 layers [0, 18] (tensor parallel 2, part 1): weights 4.17 GB, experts 8.81 GB (918 of 7296 in VRAM), caches 0.15 GB, 8471 MiB free ds4: CUDA2 layers [19, 39] (tensor parallel 2, part 0) + head: weights 4.73 GB, experts 16.69 GB (1755 of 8064 in VRAM), caches 0.14 GB, 577 MiB free ds4: CUDA3 layers [19, 39] (tensor parallel 2, part 1): weights 4.60 GB, experts 16.69 GB (1755 of 8064 in VRAM), caches 0.14 GB, 713 MiB free ds4: 12687 routed experts on the CPU lane (238.5 GB): 12687 copied into RAM (1 NUMA parts), the rest in place in the model's files; 16 threads maya ds4 serve: GEN <max_new> [keys] <ids>; GENI <max_new> [keys] <pictures> <ids>; STOP, QUIT [maya] images: the model's vision tower runs in the engine (GPU 0: 318 MiB kept), up to 1024 tokens a picture [maya] thinking level when a request names none: low [maya] thinking budget: 32768 tokens (then the answer) ```
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#231
No description provided.