[GH-ISSUE #5085] [Engine] 0.1.56: DFlash2 prompt window limit 300K - 4-way concurrent 250K prompts fail with 400 Bad Request #2368

Closed
opened 2026-11-04 01:58:45 +07:00 by bsakaguchi · 3 comments
Owner

Originally created by @wan0791 on GitHub (Nov 3, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/5085

[Engine] 0.1.56: DFlash2 prompt window limit 300K - 4-way concurrent 250K prompts fail with 400 Bad Request

版本 / Version: Strata 0.1.56 (engine package strata-engine-0.1.56-linux-x86_64-hip-rx7900)
App: Strata 0.2.10


中文

Bug 描述

0.1.55 可以处理 4 路并发各 250K 的 prompt(4 × 250K = 1,000,000 tokens)。升级到 0.1.56 后,DFlash2 的 prompt 窗口限制为 300,063 tokens,无法同时处理 4 个 250K 的 prompt。

当 4 路并发各 250K 的 prompt 时,引擎返回 400 Bad Request:

400 invalid request: request exceeds the context window: prompt (300063 tokens) leaves no room to answer in the context (262144); requests are never truncated

而 0.1.55 引擎可以正常处理 4 路并发各 250K 的 prompt,无此限制。

复现步骤

  1. 启动 Strata 0.2.10(引擎 0.1.56)
  2. 发送 4 路并发各 250K 的 prompt(每路 prompt = 250,063 tokens)
  3. 引擎返回 400 Bad Request

期望行为

与 0.1.55 一致,可以处理 4 路并发各 250K 的 prompt。

实际行为

引擎返回 400 Bad Request,提示 "prompt (300063 tokens) leaves no room to answer in the context (262144)"。

环境

  • OS: Ubuntu 24.04
  • GPU: 1× RX 7900 XTX 24GB gfx1100
  • CPU: 2× Xeon E5-2630 v3(Haswell-EP,32C/64T)
  • RAM: 125 GB
  • 引擎: 0.1.56 官方预编译包(自包含 LLVM 22 + hipblaslt)
  • 模型: Qwen3.8-Flash-Next-IQ3_S-uncensored(IQ3_S 54.8GB + DFlash2 1.2GB)
  • 上下文: 262,144 tokens(256K)

备注

  • 单会话 250K prompt 测试通过(250,063 tokens < 262,144 上限),总耗时 158.4s
  • 0.1.56 引擎修复了 RX 7900 XTX 的 bug #3431(每 10 次启动 1 次错误读取所有长提示词和图片,修复后 0 错误/110 次)
  • 0.1.56 的 DFlash2 替代 MTP,短回答提速 8.4%(Strix Halo Qwen3.8 IQ3_S)

English

Bug Description

0.1.55 can handle 4-way concurrent prompts of 250K tokens each (4 × 250K = 1,000,000 tokens). After upgrading to 0.1.56, the DFlash2 prompt window is limited to 300,063 tokens, so it cannot handle 4 concurrent 250K prompts.

When sending 4 concurrent 250K prompts, the engine returns 400 Bad Request:

400 invalid request: request exceeds the context window: prompt (300063 tokens) leaves no room to answer in the context (262144); requests are never truncated

0.1.55 can handle 4-way concurrent 250K prompts without this limitation.

Reproduction Steps

  1. Start Strata 0.2.10 (engine 0.1.56)
  2. Send 4 concurrent prompts of 250K tokens each (each prompt = 250,063 tokens)
  3. Engine returns 400 Bad Request

Expected Behavior

Same as 0.1.55: can handle 4-way concurrent 250K prompts.

Actual Behavior

Engine returns 400 Bad Request with "prompt (300063 tokens) leaves no room to answer in the context (262144)".

Environment

  • OS: Ubuntu 24.04
  • GPU: 1× RX 7900 XTX 24GB gfx1100
  • CPU: 2× Xeon E5-2630 v3 (Haswell-EP, 32C/64T)
  • RAM: 125 GB
  • Engine: 0.1.56 official precompiled package (self-contained LLVM 22 + hipblaslt)
  • Model: Qwen3.8-Flash-Next-IQ3_S-uncensored (IQ3_S 54.8GB + DFlash2 1.2GB)
  • Context: 262,144 tokens (256K)

Notes

  • Single-session 250K prompt test passed (250,063 tokens < 262,144 limit), total time 158.4s
  • 0.1.56 engine fixed RX 7900 XTX bug #3431 (1 in 10 engine starts misread all long prompts and images, fixed to 0 errors in 110 starts)
  • 0.1.56's DFlash2 replaces MTP, short answer speedup 8.4% (Strix Halo Qwen3.8 IQ3_S)
Originally created by @wan0791 on GitHub (Nov 3, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/5085 ## [Engine] 0.1.56: DFlash2 prompt window limit 300K - 4-way concurrent 250K prompts fail with 400 Bad Request **版本 / Version**: Strata 0.1.56 (engine package `strata-engine-0.1.56-linux-x86_64-hip-rx7900`) **App**: Strata 0.2.10 --- ## 中文 ### Bug 描述 0.1.55 可以处理 4 路并发各 250K 的 prompt(4 × 250K = 1,000,000 tokens)。升级到 0.1.56 后,DFlash2 的 prompt 窗口限制为 **300,063 tokens**,无法同时处理 4 个 250K 的 prompt。 当 4 路并发各 250K 的 prompt 时,引擎返回 400 Bad Request: ``` 400 invalid request: request exceeds the context window: prompt (300063 tokens) leaves no room to answer in the context (262144); requests are never truncated ``` 而 0.1.55 引擎可以正常处理 4 路并发各 250K 的 prompt,无此限制。 ### 复现步骤 1. 启动 Strata 0.2.10(引擎 0.1.56) 2. 发送 4 路并发各 250K 的 prompt(每路 prompt = 250,063 tokens) 3. 引擎返回 400 Bad Request ### 期望行为 与 0.1.55 一致,可以处理 4 路并发各 250K 的 prompt。 ### 实际行为 引擎返回 400 Bad Request,提示 "prompt (300063 tokens) leaves no room to answer in the context (262144)"。 ### 环境 - OS: Ubuntu 24.04 - GPU: 1× RX 7900 XTX 24GB gfx1100 - CPU: 2× Xeon E5-2630 v3(Haswell-EP,32C/64T) - RAM: 125 GB - 引擎: 0.1.56 官方预编译包(自包含 LLVM 22 + hipblaslt) - 模型: Qwen3.8-Flash-Next-IQ3_S-uncensored(IQ3_S 54.8GB + DFlash2 1.2GB) - 上下文: 262,144 tokens(256K) ### 备注 - 单会话 250K prompt 测试通过(250,063 tokens < 262,144 上限),总耗时 158.4s - 0.1.56 引擎修复了 RX 7900 XTX 的 bug #3431(每 10 次启动 1 次错误读取所有长提示词和图片,修复后 0 错误/110 次) - 0.1.56 的 DFlash2 替代 MTP,短回答提速 8.4%(Strix Halo Qwen3.8 IQ3_S) --- ## English ### Bug Description 0.1.55 can handle 4-way concurrent prompts of 250K tokens each (4 × 250K = 1,000,000 tokens). After upgrading to 0.1.56, the DFlash2 prompt window is limited to **300,063 tokens**, so it cannot handle 4 concurrent 250K prompts. When sending 4 concurrent 250K prompts, the engine returns 400 Bad Request: ``` 400 invalid request: request exceeds the context window: prompt (300063 tokens) leaves no room to answer in the context (262144); requests are never truncated ``` 0.1.55 can handle 4-way concurrent 250K prompts without this limitation. ### Reproduction Steps 1. Start Strata 0.2.10 (engine 0.1.56) 2. Send 4 concurrent prompts of 250K tokens each (each prompt = 250,063 tokens) 3. Engine returns 400 Bad Request ### Expected Behavior Same as 0.1.55: can handle 4-way concurrent 250K prompts. ### Actual Behavior Engine returns 400 Bad Request with "prompt (300063 tokens) leaves no room to answer in the context (262144)". ### Environment - OS: Ubuntu 24.04 - GPU: 1× RX 7900 XTX 24GB gfx1100 - CPU: 2× Xeon E5-2630 v3 (Haswell-EP, 32C/64T) - RAM: 125 GB - Engine: 0.1.56 official precompiled package (self-contained LLVM 22 + hipblaslt) - Model: Qwen3.8-Flash-Next-IQ3_S-uncensored (IQ3_S 54.8GB + DFlash2 1.2GB) - Context: 262,144 tokens (256K) ### Notes - Single-session 250K prompt test passed (250,063 tokens < 262,144 limit), total time 158.4s - 0.1.56 engine fixed RX 7900 XTX bug #3431 (1 in 10 engine starts misread all long prompts and images, fixed to 0 errors in 110 starts) - 0.1.56's DFlash2 replaces MTP, short answer speedup 8.4% (Strix Halo Qwen3.8 IQ3_S)
Author
Owner

@github-actions[bot] commented on GitHub (Nov 3, 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".
  • Describe it in the issue body: what happened, what you expected, and the exact error if there is one. The issue forms (New issue > Bug report) list what to include.
  • Add the Strata version (Settings > About, or strata --version).
  • Add your graphics card with its VRAM, your RAM and your operating system.

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:6601014603 --> @github-actions[bot] commented on GitHub (Nov 3, 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". - [ ] Describe it in the issue body: what happened, what you expected, and the exact error if there is one. The issue forms (New issue > Bug report) list what to include. - [ ] Add the Strata version (Settings > About, or `strata --version`). - [ ] Add your graphics card with its VRAM, your RAM and your operating system. 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)
Author
Owner

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

Thanks, this follows the format now.

<!-- gh-comment-id:6601659209 --> @github-actions[bot] commented on GitHub (Nov 3, 2026): Thanks, this follows the format now.
Author
Owner

@wan0791 commented on GitHub (Nov 7, 2026):

更正 / Correction:这不是引擎 bug,是我们的配置错误

结论:400 ... prompt (300063 tokens) leaves no room to answer in the context (262144) 是纯粹的上下文上限检查,不是 DFlash2 的 prompt 窗口限制。真实原因是我们侧的 --max-context 当时被设成了 262144(256K),而测试 prompt 有 300,063 token。

证据 / Evidence

配置 prompt tokens 结果
--max-context 262144(报错时) 300,063 ❌ 400,超上限
--max-context 524288(恢复后,0.1.57) 288,063 ✅ 通过,191.7 s,prefill ≈1508 t/s
--max-context 1048576 + --rope-scaling yarn --rope-scale 4 604,498 ✅ 通过,511.2 s,prefill ≈1182 t/s

0.1.55 当时能跑 4×250K,也是因为那时 --max-context 是 524288,不是引擎版本差异。

判断 / Verdict

  • 引擎行为正确:prompt 超过 --max-context 就拒绝,并把两个数字都报出来(prompt 300063 / context 262144),提示其实很到位。
  • 与 DFlash2 / MTP 无关:与我们自己把 --max-context 从 524288 改成 262144 有关。
  • 已在 0.1.57 上恢复 --max-context 524288,问题消失;同机另测 288K(512K 配置)与 604K(1M 配置)prompt 均通过。

抱歉提交了一条误导性的 issue,浪费了排查时间。按 not planned 关闭。


Conclusion: this was a configuration error on our side — --max-context had been lowered from 524288 to 262144 while the test prompt was 300,063 tokens, so the request legitimately exceeded the context window. It is not a DFlash2 prompt-window limitation, and the engine behaved correctly (it named both numbers in the error). After restoring --max-context 524288 on engine 0.1.57, a 288,063-token prompt passes (191.7 s), and a 604,498-token prompt passes with a 1M context. Closing as not planned; sorry for the noise.

<!-- gh-comment-id:6701403753 --> @wan0791 commented on GitHub (Nov 7, 2026): ## 更正 / Correction:这不是引擎 bug,是我们的配置错误 **结论**:`400 ... prompt (300063 tokens) leaves no room to answer in the context (262144)` 是**纯粹的上下文上限检查**,不是 DFlash2 的 prompt 窗口限制。真实原因是我们侧的 `--max-context` 当时被设成了 **262144(256K)**,而测试 prompt 有 300,063 token。 ### 证据 / Evidence | 配置 | prompt tokens | 结果 | |---|---|---| | `--max-context 262144`(报错时) | 300,063 | ❌ 400,超上限 | | `--max-context 524288`(恢复后,0.1.57) | 288,063 | ✅ 通过,191.7 s,prefill ≈1508 t/s | | `--max-context 1048576` + `--rope-scaling yarn --rope-scale 4` | 604,498 | ✅ 通过,511.2 s,prefill ≈1182 t/s | 0.1.55 当时能跑 4×250K,也是因为那时 `--max-context` 是 524288,不是引擎版本差异。 ### 判断 / Verdict - **引擎行为正确**:prompt 超过 `--max-context` 就拒绝,并把两个数字都报出来(prompt 300063 / context 262144),提示其实很到位。 - **与 DFlash2 / MTP 无关**:与我们自己把 `--max-context` 从 524288 改成 262144 有关。 - 已在 0.1.57 上恢复 `--max-context 524288`,问题消失;同机另测 288K(512K 配置)与 604K(1M 配置)prompt 均通过。 抱歉提交了一条误导性的 issue,浪费了排查时间。按 `not planned` 关闭。 --- **Conclusion**: this was a configuration error on our side — `--max-context` had been lowered from 524288 to 262144 while the test prompt was 300,063 tokens, so the request legitimately exceeded the context window. It is not a DFlash2 prompt-window limitation, and the engine behaved correctly (it named both numbers in the error). After restoring `--max-context 524288` on engine 0.1.57, a 288,063-token prompt passes (191.7 s), and a 604,498-token prompt passes with a 1M context. Closing as not planned; sorry for the noise.
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#2368
No description provided.