[GH-ISSUE #5444] Bug Report: DeepSeek V4.1 Chunked Prefill Stalls on 4× RTX 3080, Plus Possible VRAM Reallocation Issue with --restart #3255

Open
opened 2026-11-07 14:39:12 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @xenonfear128 on GitHub (Nov 7, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5444

<html> <html><head></head>

Bug Report: DeepSeek V4.1 Chunked Prefill Stalls on 4× RTX 3080, Plus Possible VRAM Reallocation Issue with --restart

Hi Niko,

I've been testing Strata with DeepSeek-V4.1-Flash ISTA-DAS 2.25 bpw on my four-GPU workstation. I managed to get the model running, but encountered two reproducible issues during setup and inference.

The first one is particularly interesting because I found a working workaround.

System configuration

Component | Specification -- | -- OS | Debian 13 (Trixie) Kernel | Linux 6.12.115-x550fix (custom PCIe workaround) CPU | AMD Threadripper PRO 5965WX (24C/48T) RAM | 256 GB Motherboard | ASUS Pro WS WRX80E-SAGE SE WIFI GPUs | 4× NVIDIA GeForce RTX 3080 20GB (modified GA102) NVIDIA driver | 620.70.06 CUDA | 13.5 Strata DeepSeek engine | 0.1.57-linux-x86_64-cuda-cuda13 Model | DeepSeek-V4.1-Flash-1017 ISTA-DAS 2.25 bpw (IQ2_XS)

The GPUs are connected through separate PCIe root ports. NVIDIA P2P is currently unavailable, and BAR1 remains at 256 MiB per GPU.

All four GPUs previously passed a simultaneous 300-second CUDA GPU-Burn test with zero computational errors at a 220W power limit.

Bug 1: Chunked Prefill freezes during long prompts

Severity: High — prevents practical use with coding agents such as Codex.

Steps to reproduce

  1. Launch the model using all four GPUs with a 128K context window and the default Prefill configuration.

  2. Submit a long prompt through the OpenAI-compatible Responses API. My test used Codex through CC Switch.

  3. Observe the Strata Monitor during Prompt Processing.

Actual behavior

For an input containing approximately 27,419 tokens:

  • Prefill initially processes around 3,917 tokens.

  • Progress then stops completely at approximately 3917 / 27419.

  • The displayed average tokens/sec continuously decreases as elapsed time increases.

  • No additional tokens appear to be processed.

  • The request never reaches normal decoding during the observation period.

The engine log confirms:

ds4: prompts in chunks of 4096 tokens

And:

ds4: prompt path: the chunked pass from 96 tokens, windows of 16 below

The stall occurs suspiciously close to the first 4096-token chunk boundary.

All four GPUs are initialized and assigned model layers:

  • CUDA0: layers 0–9

  • CUDA1: layers 10–19

  • CUDA2: layers 20–29

  • CUDA3: layers 30–39 + head

The engine also reports:

ds4: tensor parallel 2 -> 1: the experts' 256-value blocks split n_ff 2304 no other way (each GPU its own layers)

There are no NVIDIA Xid errors or GPU-disconnect errors in the kernel log.

Working workaround

I restarted the model with the advanced setting:

--set prefill-chunk=0

The engine confirmed that the configuration was applied:

ds4: prompts run in windows of 16 tokens (--prefill-chunk 0)

With Chunked Prefill disabled, the model resumed normal prompt processing and generation.

This was tested with a 512K configured context window.

The workaround is significantly slower for long prompts, as the engine itself warns, but it restores functionality.

I haven't yet completed a controlled full-length benchmark of the original 27K prompt with this workaround, so I cannot confirm that all long-prompt scenarios are fixed.

Suspected cause

This looks like a possible synchronization, chunk-boundary, or multi-GPU scheduling issue in the Chunked Prefill path.

The fact that disabling Chunked Prefill changes the outcome suggests the issue is associated with that execution path rather than general CUDA initialization or model loading.

It may be related to the problems discussed in Issues #4090 and #4664, although I haven't confirmed whether the underlying causes are identical.


Bug 2: --restart may fail to release or recalculate GPU memory allocations

Severity: Medium — model startup fails when changing context configuration.

Steps to reproduce

  1. Start the model with a smaller context window, such as 8K or 128K.

  2. Attempt to increase the context to 512K (--context 524288) using strata launch --restart.

  3. Observe model preparation and the engine smoke test.

  4. Fully stop the existing instance.

  5. Perform a clean launch using the 512K context configuration.

Actual behavior

Using --restart resulted in:

CUDA0 has 0.36 GB free of 21.05 GB, but the dense weights of layers 0-9 need 1.44 GB on it

The installation preparation failed with exit code 1.

However, after fully stopping the previous instance and launching again, the model successfully initialized with the 512K context configuration.

This suggests that the restart path may not be releasing all previous GPU allocations or recalculating the memory layout correctly.

This is only a hypothesis. I have not yet determined whether the underlying issue is retained CUDA allocations, stale resource planning, or some other lifecycle problem.

Expected behavior

--restart should produce the same allocation result as a clean stop followed by a fresh launch, assuming the model configuration and available resources are identical.


Additional observation

In one engine log, the launch command included:

--parallel 4

Although my earlier Strata launch configuration explicitly requested:

--parallel 1

I'm not yet certain whether this was due to a configuration override or a separate issue, but it may be worth checking when investigating the launch/restart behavior.

Current working state

The model is currently able to initialize and respond with:

  • 4× RTX 3080 20GB

  • 512K configured context window

  • All six routed experts per token

  • --prefill-chunk 0

  • Local/LAN OpenAI-compatible API

To clarify, successful initialization at 512K does not mean I've verified inference with an actual 512K-token prompt.

The main unresolved issue is that the default Chunked Prefill implementation appears to stall, while the non-chunked path works.

I can provide full engine logs, launch commands, GPU allocation information, and further reproduction tests if needed.

Thanks for your work on Strata! It's impressive that a model of this size can run on a workstation with only 80GB of total GPU VRAM.

I'd be happy to help test a fix on this four-GPU configuration.

</html> </html>
Originally created by @xenonfear128 on GitHub (Nov 7, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5444 <html> <body> <!--StartFragment--><html><head></head><body><h1><span>Bug Report: DeepSeek V4.1 Chunked Prefill Stalls on 4× RTX 3080, Plus Possible VRAM Reallocation Issue with </span><code><span>--restart</span></code></h1><p><span>Hi Niko,</span></p><p><span>I've been testing Strata with DeepSeek-V4.1-Flash ISTA-DAS 2.25 bpw on my four-GPU workstation. I managed to get the model running, but encountered two reproducible issues during setup and inference.</span></p><p><span>The first one is particularly interesting because I found a working workaround.</span></p><h2><span>System configuration</span></h2> Component | Specification -- | -- OS | Debian 13 (Trixie) Kernel | Linux 6.12.115-x550fix (custom PCIe workaround) CPU | AMD Threadripper PRO 5965WX (24C/48T) RAM | 256 GB Motherboard | ASUS Pro WS WRX80E-SAGE SE WIFI GPUs | 4× NVIDIA GeForce RTX 3080 20GB (modified GA102) NVIDIA driver | 620.70.06 CUDA | 13.5 Strata DeepSeek engine | 0.1.57-linux-x86_64-cuda-cuda13 Model | DeepSeek-V4.1-Flash-1017 ISTA-DAS 2.25 bpw (IQ2_XS) <p><span>The GPUs are connected through separate PCIe root ports. NVIDIA P2P is currently unavailable, and BAR1 remains at 256 MiB per GPU.</span></p><p><span>All four GPUs previously passed a simultaneous 300-second CUDA GPU-Burn test with zero computational errors at a 220W power limit.</span></p><h2><span>Bug 1: Chunked Prefill freezes during long prompts</span></h2><p><strong><span>Severity: High — prevents practical use with coding agents such as Codex.</span></strong></p><h3><span>Steps to reproduce</span></h3><ol start="1"><li><p><span>Launch the model using all four GPUs with a 128K context window and the default Prefill configuration.</span></p></li><li><p><span>Submit a long prompt through the OpenAI-compatible Responses API. My test used Codex through CC Switch.</span></p></li><li><p><span>Observe the Strata Monitor during Prompt Processing.</span></p></li></ol><h3><span>Actual behavior</span></h3><p><span>For an input containing approximately 27,419 tokens:</span></p><ul><li><p><span>Prefill initially processes around 3,917 tokens.</span></p></li><li><p><span>Progress then stops completely at approximately </span><code><span>3917 / 27419</span></code><span>.</span></p></li><li><p><span>The displayed average tokens/sec continuously decreases as elapsed time increases.</span></p></li><li><p><span>No additional tokens appear to be processed.</span></p></li><li><p><span>The request never reaches normal decoding during the observation period.</span></p></li></ul><p><span>The engine log confirms:</span></p><p><code><span>ds4: prompts in chunks of 4096 tokens</span></code></p><p><span>And:</span></p><p><code><span>ds4: prompt path: the chunked pass from 96 tokens, windows of 16 below</span></code></p><p><span>The stall occurs suspiciously close to the first 4096-token chunk boundary.</span></p><p><span>All four GPUs are initialized and assigned model layers:</span></p><ul><li><p><span>CUDA0: layers 0–9</span></p></li><li><p><span>CUDA1: layers 10–19</span></p></li><li><p><span>CUDA2: layers 20–29</span></p></li><li><p><span>CUDA3: layers 30–39 + head</span></p></li></ul><p><span>The engine also reports:</span></p><p><code><span>ds4: tensor parallel 2 -&gt; 1: the experts' 256-value blocks split n_ff 2304 no other way (each GPU its own layers)</span></code></p><p><span>There are no NVIDIA Xid errors or GPU-disconnect errors in the kernel log.</span></p><h3><span>Working workaround</span></h3><p><span>I restarted the model with the advanced setting:</span></p><p><code><span>--set prefill-chunk=0</span></code></p><p><span>The engine confirmed that the configuration was applied:</span></p><p><code><span>ds4: prompts run in windows of 16 tokens (--prefill-chunk 0)</span></code></p><p><strong><span>With Chunked Prefill disabled, the model resumed normal prompt processing and generation.</span></strong></p><p><span>This was tested with a 512K configured context window.</span></p><p><span>The workaround is significantly slower for long prompts, as the engine itself warns, but it restores functionality.</span></p><p><span>I haven't yet completed a controlled full-length benchmark of the original 27K prompt with this workaround, so I cannot confirm that all long-prompt scenarios are fixed.</span></p><h3><span>Suspected cause</span></h3><p><span>This looks like a possible synchronization, chunk-boundary, or multi-GPU scheduling issue in the Chunked Prefill path.</span></p><p><span>The fact that disabling Chunked Prefill changes the outcome suggests the issue is associated with that execution path rather than general CUDA initialization or model loading.</span></p><p><span>It may be related to the problems discussed in Issues #4090 and #4664, although I haven't confirmed whether the underlying causes are identical.</span></p><div><hr></div><h2><span>Bug 2: </span><code><span>--restart</span></code><span> may fail to release or recalculate GPU memory allocations</span></h2><p><strong><span>Severity: Medium — model startup fails when changing context configuration.</span></strong></p><h3><span>Steps to reproduce</span></h3><ol start="1"><li><p><span>Start the model with a smaller context window, such as 8K or 128K.</span></p></li><li><p><span>Attempt to increase the context to 512K (</span><code><span>--context 524288</span></code><span>) using </span><code><span>strata launch --restart</span></code><span>.</span></p></li><li><p><span>Observe model preparation and the engine smoke test.</span></p></li><li><p><span>Fully stop the existing instance.</span></p></li><li><p><span>Perform a clean launch using the 512K context configuration.</span></p></li></ol><h3><span>Actual behavior</span></h3><p><span>Using </span><code><span>--restart</span></code><span> resulted in:</span></p><p><code><span>CUDA0 has 0.36 GB free of 21.05 GB, but the dense weights of layers 0-9 need 1.44 GB on it</span></code></p><p><span>The installation preparation failed with exit code 1.</span></p><p><span>However, after fully stopping the previous instance and launching again, </span><strong><span>the model successfully initialized with the 512K context configuration</span></strong><span>.</span></p><p><span>This suggests that the restart path may not be releasing all previous GPU allocations or recalculating the memory layout correctly.</span></p><p><span>This is only a hypothesis. I have not yet determined whether the underlying issue is retained CUDA allocations, stale resource planning, or some other lifecycle problem.</span></p><h3><span>Expected behavior</span></h3><p><code><span>--restart</span></code><span> should produce the same allocation result as a clean stop followed by a fresh launch, assuming the model configuration and available resources are identical.</span></p><div><hr></div><h2><span>Additional observation</span></h2><p><span>In one engine log, the launch command included:</span></p><p><code><span>--parallel 4</span></code></p><p><span>Although my earlier Strata launch configuration explicitly requested:</span></p><p><code><span>--parallel 1</span></code></p><p><span>I'm not yet certain whether this was due to a configuration override or a separate issue, but it may be worth checking when investigating the launch/restart behavior.</span></p><h2><span>Current working state</span></h2><p><span>The model is currently able to initialize and respond with:</span></p><ul><li><p><span>4× RTX 3080 20GB</span></p></li><li><p><span>512K configured context window</span></p></li><li><p><span>All six routed experts per token</span></p></li><li><p><code><span>--prefill-chunk 0</span></code></p></li><li><p><span>Local/LAN OpenAI-compatible API</span></p></li></ul><p><span>To clarify, successful initialization at 512K does </span><strong><span>not</span></strong><span> mean I've verified inference with an actual 512K-token prompt.</span></p><p><span>The main unresolved issue is that the default Chunked Prefill implementation appears to stall, while the non-chunked path works.</span></p><p><span>I can provide full engine logs, launch commands, GPU allocation information, and further reproduction tests if needed.</span></p><p><span>Thanks for your work on Strata! It's impressive that a model of this size can run on a workstation with only 80GB of total GPU VRAM.</span></p><p><span>I'd be happy to help test a fix on this four-GPU configuration.</span></p></body></html><!--EndFragment--> </body> </html>
Author
Owner

@github-actions[bot] commented on GitHub (Nov 7, 2026):

Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment /reopen.

Details: CONTRIBUTING.md

<!-- gh-comment-id:6700509757 --> @github-actions[bot] commented on GitHub (Nov 7, 2026): Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment `/reopen`. Details: [CONTRIBUTING.md](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Sign in to join this conversation.
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
Niko1221/Strata#3255
No description provided.