[PR #4837] [Engine] add vLLM's ignore_eos request field, as server-side continuation #5209

Open
opened 2026-11-07 16:33:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/4837
Author: @gdevenyi
Created: 10/31/2026
Status: 🔄 Open

Base: main ← Head: api/ignore-eos


📝 Commits (1)

  • e899700 Server: ignore_eos (vLLM's request field), opt-in: the reply runs to its token budget over the model's stop tokens, as new generate passes from the server; no engine change; refused with tools, MCP, a structured format and logprobs

📊 Changes

3 files changed (+526 additions, -1 deletions)

View changed files

📝 docs/DETAILS.md (+13 -0)
📝 serve/server.py (+67 -1)
➕ serve/test_ignore_eos.py (+446 -0)

📄 Description

Problem and result

Strata had no way to make a reply run to a fixed length. A client can send vLLM's ignore_eos, but the server ignored it, so "Say hi." ended after about 10 tokens.

With this PR, "ignore_eos": true runs the reply on to its token budget and ends it with length. It is opt-in. With the field false, null or absent, nothing changes.

The main limit: it is slower, and it is not a speed test. Total wall time on engine 0.1.55, 3 runs each, was 2.66x a plain reply at 256 tokens (18.32 s against 6.89 s) and 5.15x at 1024 (135.66 s against 26.36 s). The prompts differ: "Say hi." with ignore_eos, "Write a long essay." plain. At 1024, two of the three ignore_eos runs also ended early (see Failed), so they made fewer tokens in that time. vLLM users often want this field for throughput runs. Do not use these replies for that here.

No issue asks for this, so scope is not agreed in an issue. It is a small opt-in server change. Please say if you want an issue first.

Search for ignore_eos: #2275 and #3411 only name it as a condition of a benchmark. #363 (closed, not merged) timed its change with "a local patch that lets a request ask for a fixed length" (ignore_eos, suffix=0, adapt=0). That patch is not in this repository.

Approach

Why not a native engine flag. The engine stops at EOS by itself at many sites in src/program/generate.cpp, sycl/src/program/generate.cpp, src/qwen35/q36_engine.cu and src/dsv41. A flag would need CUDA, HIP, SYCL and Metal changes, and only CUDA can be built here. This PR changes no C++.

What it does. When the engine ends a pass on a stop token and budget is left, Service._run sends a new generate. The prompt is the last prompt plus what that pass produced, including the stop token. The budget is what is left. The thinking-budget wrap-up continues the same way.

Rules, checked by tests:

  • The stop token counts in completion_tokens and is not in the text.
  • After the first stop token, control tokens such as <|im_start|> are counted and left out of the text, as vLLM's skip_special_tokens does.
  • These get a 400 before generation, naming the field:
    • a non-boolean value;
    • true with no budget above 0;
    • logprobs;
    • tools;
    • strata_mcp;
    • response_format or text.format other than plain text.
  • tools: [] and tool_choice: none count as no tools.
  • Why the tool and format refusals. On the mock engine, a model that repeats its call gave 3 tool_calls with finish length, where the control gave 1. MCP tools did not run. A structured format gave a 502 after the whole budget.
  • A client stop string still ends the reply with stop.
  • The budget is checked against the context as now. fit_max_tokens shortens it, or false answers 400.
  • The repeat guard repeat_stop_tokens (#606) stays on and now counts stop tokens too.
  • The stream's idle clock runs on over a new pass, so a keep-alive still goes out when passes make no text. Tested with KEEPALIVE_S at 0.1.
  • prompt_tokens is the real prompt. cached_tokens comes from the first pass. Time spent reading again on later passes counts in predicted_ms, not prompt_ms.

Routes. /v1/chat/completions, /v1/responses and /v1/messages. --parallel needed no code of its own.

Validation

Revision: this branch on base c62d5e3a. The real runs on engine 0.1.55 ran on commit 3f422dc8. The commit was then amended to 2379625e, which changes one doc bullet only, so serve/server.py is the same file.

Raw results, with local paths scrubbed: https://gist.github.com/gdevenyi/812e4781a015f9caedfbfa8081a139d6

Passed

Without a GPU:

  • python -m unittest serve.test_ignore_eos: 39 tests OK. 30 of the 39 fail on the unchanged server. The 9 that pass there check behaviour that does not change.
  • python -m unittest serve.test_server serve.test_responses serve.test_anthropic_base_url serve.test_chat_tool_results serve.test_context_overflow serve.test_images serve.test_ignore_eos: 476 tests, 1 skipped, 1 failure, listed under Failed.
  • Differential on the mock engine, origin/main against this branch, ids and times normalized: 26 of 26 the same. It covers chat, Anthropic and Responses, stream and whole reply, stop strings, and ignore_eos false and null. Nine cases cover the refused fields with the flag off or absent: tools, empty tools, strata_mcp, response_format, Anthropic tools, Responses tools and text.format.

On a real engine: RTX 5080 16 GB, Qwen3.8-Flash-Next IQ3_S, engine 0.1.55 from release v0.2.9 (the release's asset, its sha256 checked against the release's list), context 65536, 127.0.0.1 only, thinking off unless noted.

The table has every run of these requests, one server for each column. On the base, ignore_eos is ignored, so those rows are normal replies. The base's third plain 1024 run was cut off when its run was interrupted, so it is left out.

Request Runs (base, branch) Base: finish, tokens Base: wall (s) Branch: finish Branch: tokens Branch: wall (s) Branch total wall (s) Passes sent again Tokens read again
"Say hi.", normal 3, 3 stop, 11, 10, 11 0.33, 0.20, 0.26 stop 10 each 0.26, 0.18, 0.19 0.63
"Say hi.", ignore_eos, 256 3, 3 stop, 11, 10, 10 0.23, 0.17, 0.15 length 256 each 4.03, 10.85, 3.44 18.32 17, 82, 12 225, 220, 207
"Write a long essay.", plain, 256 3, 3 length, 256 each 2.73, 2.28, 2.27 length 256 each 2.47, 2.33, 2.09 6.89
"Say hi.", ignore_eos, 1024 3, 3 stop, 10, 11, 10 0.23, 0.21, 0.17 length 1024, 825, 919 68.05, 29.97, 37.64 135.66 335, 436, 470 1023, 1011, 1046
"Write a long essay.", plain, 1024 2, 3 length, 1024 each 8.42, 8.99 length 1024 each 9.18, 8.86, 8.32 26.36
  • The ratios are branch total wall, ignore_eos against plain: 2.66x at 256 and 5.15x at 1024. The prompts differ, and there are 3 runs each. Per run, against the mean plain run, ignore_eos was 1.5x to 4.7x at 256 and 3.4x to 7.7x at 1024.
  • The engine log shows 2,357 parking times over this whole run, of 16.8 to 164.2 ms, median 105.5 ms.
  • A normal request right after each run: stop, 10-11 tokens, cached_tokens 8. Its text varies ("Hi! How can I help you today?", "Hi there! ...") as it does before the runs.
  • Refused with a 400 naming the field, before generation: tools (whole and stream), response_format, logprobs, no budget and a non-boolean value by plain HTTP; tools on /v1/responses and /v1/messages. Through the real SDKs (openai 3.42.0, anthropic 2.3.0): tools on chat, Responses and Messages, and response_format, each raised BadRequestError. A normal request after them: stop, 10 tokens.
  • A streamed run, keep-alive comments counted by reading the raw lines: 157 at 256 tokens (16.51 s); 362, 264 and 348 at 1024 (53.69, 40.68 and 52.20 s). Two runs at 4096: 119 and 393. All ended length. The longest silence was 2.39 s.
  • Through the SDKs: openai stream at 256, length, 256 tokens. Anthropic stream at 256, max_tokens, 256 tokens. Responses at 128, incomplete, max_output_tokens, 128 tokens.
  • /v1/responses at 128 by plain HTTP: incomplete, max_output_tokens, 128 tokens. /v1/messages at 128: max_tokens, 128 tokens.

Earlier, on a local engine build reporting strata 0.1.54 and on older code of this branch, before the refusals and the keep-alive fix. These were not run again on 0.1.55:

  • Another conversation, two rounds, of 3,330 and 3,331 tokens: cached_tokens 3323 and 3324 after an ignore_eos run, the same as after a normal request.
  • Thinking on, 1024: length, 1024 tokens, 38 passes sent again.

A normal request beside ignore_eos on --parallel 2. Same card, model and engine 0.1.55, on commit 3f422dc8, one server, 10 rounds, shuffled inside each round. The rule was written before the runs and is in the raw results. One warm-up round is left out.

  • B: alone.
  • C1: beside one normal essay.
  • D1: beside one ignore_eos reply.

The checks:

  • Essay: "Write a long essay.", 256 tokens, whole if it ends length at 256.
  • Count: "Count from 1 to 500...", temperature 0. A reply has a splice if any integer is not the one before plus 1, from 1. If the text ends in a digit, the last integer is left out, because the token budget cuts it. This is mechanical.
  • "Say hi.": cut if it does not end in punctuation or an emoji. Carried along, no result hangs on it.
Mode Essays whole Count: splice Breaks per reply "Say hi." cut Essay mean wall (s) Essay total wall (s)
B 10/10 0/10 0 0/10 3.23 32.30
C1 10/10 0/10 0 0/10 4.76 47.60
D1 10/10 0/10 0 0/10 7.83 78.25
  • On correctness, no splice was seen. 0/10 has a 95% range of 0 to 28%, so 10 runs cannot show a small harm. So ignore_eos is not refused on --parallel.
  • It does make the neighbour slower. A normal 256-token essay took 1.64x as long beside one ignore_eos reply as beside a normal one, 7.83 s against 4.76 s, permutation p below 0.001. The longest was 8.38 s. Please say if you want it refused on --parallel for this reason.
  • All 30 ignore_eos neighbours in D1 ended length at 256, and all 30 normal essay neighbours in C1 did too.
  • More shapes on 0.1.55, exploratory, count replies on this branch with no ignore_eos anywhere: beside two looping short requests 0/10; beside an essay with other requests between the runs 0/10; on --parallel 4 beside three essays 0/10. So clean on 0.1.55 is not one shape only.
  • The earlier comparison of this kind, on the local 0.1.54 build, sat at the ceiling, with C and D both near 20/20, so it could say little. It also ran two looping ignore_eos neighbours, where the essay was 7.12 s against 6.91 s. Its table is in the raw results.
  • After every run the server was stopped and the GPU was back to 2 MiB, 0 %, with no compute process.

Failed

  • serve.test_server.GpuChoice.test_hip_ordinal: fails on the base too. I ran it there.
  • Reaching the budget. On engine 0.1.55, "Say hi." at 1024 ended before its budget in 2 of 3 whole runs (825 and 919 tokens) and 1 of 3 streamed runs (1018). A streamed run at 4096 ended at 603. The other streamed run at 4096 reached it. Each early end finished length, because the model wrote <|im_end|> 256 times in a row and the repeat guard repeat_stop_tokens stopped it. All runs at 256 and 128 reached their budget. So a fixed length is not promised on long replies with the default guard. On the local 0.1.54 build, all three whole runs at 1024 reached it.

A fault of older engines, not from this change (--parallel). With no ignore_eos anywhere, on server c62d5e3a, a reply loses, repeats or splices tokens when a second request is admitted during it, on released engine 0.1.54 and earlier. It was not reproduced on released engine 0.1.55. The cause is not named here.

Engine Count, alone Count, beside an essay Reversed order
0.1.52, release 6/6
0.1.54, release (v0.2.8) 0/20 16/20
0.1.55, release (v0.2.9) 0/20 0/20 0/8

The 0.1.54 data is in the raw results.

Not run

On real hardware:

  • The 10-second keep-alive itself. It needs 10 s with no text, and the longest silence in six streamed runs was 2.39 s. So the keep-alives counted above came from the engine's own heartbeat, from reading the code. The idle clock over a new pass is tested on the mock engine only, because KEEPALIVE_S is not a setting and lowering it would be a patch.

  • On 0.1.55: thinking on, a second conversation's cached_tokens after a run, and a stop string. They ran on the local 0.1.54 build only, on older code.

  • On 0.1.55: an ignore_eos neighbour looping (D2) and two looping short neighbours beside an essay (C2), and mode A, the base alone. The stack switches were not turned off on 0.1.55.

  • HIP, SYCL and Metal, Windows and macOS.

  • Engines other than 0.1.55, except the 0.1.54 and 0.1.52 runs above.

  • DeepSeek and Qwen3.6. DeepSeek's stop_ids differ from EOS_IDS on the batched path, and that combination is untested.

  • Pictures, --replicas and --split-serve. From reading the code, a pass goes through the same generate; unconfirmed static analysis.

  • ignore_eos with reasoning_loop_recovery.

  • A real-engine run of a stop string hit in normal text after a stop token.

  • The shared Chat settings budget on a real engine. It counts as a budget, from reading the code.

Limits

  • Speed. See above. A longer budget can take many more passes.
  • The text after the first stop token is whatever the model writes next. The answer comes first and is intact in these runs. Then come empty turns, role words, <think> tags or long runs of new lines. On the local 0.1.54 build, a second <think> block went out as content, not reasoning_content.
  • A stop string can be found late. The parser holds new lines back, so "stop": ["\n"] was found only when the budget ran out (256 tokens, 18.41 s on the local 0.1.54 build, finish stop). For that request the [strata] done: log line and the /metrics history still say length.
  • The repeat guard (256 by default) can end a reply before its budget, as length. See Failed for how often. The log line then says to restart the server and report it, which is not needed for an ignore_eos reply.
  • Stricter than vLLM. Here a budget is required and the fields above are refused. In vLLM's source at 7b77ed5, no check ties ignore_eos to logprobs, tools or a structured format, and with no max_tokens it generates up to the model's length. This is unconfirmed static analysis; vLLM was not run. strata_mcp is Strata's own field.
  • The same request does not repeat exactly. At temperature 0 and 256 tokens on the local 0.1.54 build, six runs gave four different texts. They differed after the answer. A seed is sent again with each pass, but two seeded runs already differed in their first words.

🤖 Generated with Claude Code

https://claude.ai/code/session_01W53iURzvDQMjnYemag8uvv


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/4837 **Author:** [@gdevenyi](https://github.com/gdevenyi) **Created:** 10/31/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `api/ignore-eos` --- ### 📝 Commits (1) - [`e899700`](https://github.com/Niko1221/Strata/commit/e8997003b6cd673b7f33561663e030cab9490d64) Server: ignore_eos (vLLM's request field), opt-in: the reply runs to its token budget over the model's stop tokens, as new generate passes from the server; no engine change; refused with tools, MCP, a structured format and logprobs ### 📊 Changes **3 files changed** (+526 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+13 -0) 📝 `serve/server.py` (+67 -1) ➕ `serve/test_ignore_eos.py` (+446 -0) </details> ### 📄 Description ## Problem and result Strata had no way to make a reply run to a fixed length. A client can send vLLM's `ignore_eos`, but the server ignored it, so "Say hi." ended after about 10 tokens. With this PR, `"ignore_eos": true` runs the reply on to its token budget and ends it with `length`. It is opt-in. With the field false, null or absent, nothing changes. **The main limit: it is slower, and it is not a speed test.** Total wall time on engine 0.1.55, 3 runs each, was 2.66x a plain reply at 256 tokens (18.32 s against 6.89 s) and 5.15x at 1024 (135.66 s against 26.36 s). The prompts differ: "Say hi." with `ignore_eos`, "Write a long essay." plain. At 1024, two of the three `ignore_eos` runs also ended early (see Failed), so they made fewer tokens in that time. vLLM users often want this field for throughput runs. Do not use these replies for that here. ## Related discussion No issue asks for this, so scope is not agreed in an issue. It is a small opt-in server change. Please say if you want an issue first. Search for `ignore_eos`: #2275 and #3411 only name it as a condition of a benchmark. #363 (closed, not merged) timed its change with "a local patch that lets a request ask for a fixed length" (`ignore_eos`, `suffix=0`, `adapt=0`). That patch is not in this repository. ## Approach **Why not a native engine flag.** The engine stops at EOS by itself at many sites in `src/program/generate.cpp`, `sycl/src/program/generate.cpp`, `src/qwen35/q36_engine.cu` and `src/dsv41`. A flag would need CUDA, HIP, SYCL and Metal changes, and only CUDA can be built here. This PR changes no C++. **What it does.** When the engine ends a pass on a stop token and budget is left, `Service._run` sends a new generate. The prompt is the last prompt plus what that pass produced, including the stop token. The budget is what is left. The thinking-budget wrap-up continues the same way. **Rules, checked by tests:** - The stop token counts in `completion_tokens` and is not in the text. - After the first stop token, control tokens such as `<|im_start|>` are counted and left out of the text, as vLLM's `skip_special_tokens` does. - These get a 400 before generation, naming the field: - a non-boolean value; - `true` with no budget above 0; - `logprobs`; - `tools`; - `strata_mcp`; - `response_format` or `text.format` other than plain text. - `tools: []` and `tool_choice: none` count as no tools. - Why the tool and format refusals. On the mock engine, a model that repeats its call gave 3 `tool_calls` with finish `length`, where the control gave 1. MCP tools did not run. A structured format gave a 502 after the whole budget. - A client stop string still ends the reply with `stop`. - The budget is checked against the context as now. `fit_max_tokens` shortens it, or `false` answers 400. - The repeat guard `repeat_stop_tokens` (#606) stays on and now counts stop tokens too. - The stream's idle clock runs on over a new pass, so a keep-alive still goes out when passes make no text. Tested with `KEEPALIVE_S` at 0.1. - `prompt_tokens` is the real prompt. `cached_tokens` comes from the first pass. Time spent reading again on later passes counts in `predicted_ms`, not `prompt_ms`. **Routes.** `/v1/chat/completions`, `/v1/responses` and `/v1/messages`. `--parallel` needed no code of its own. ## Validation Revision: this branch on base c62d5e3a. The real runs on engine 0.1.55 ran on commit 3f422dc8. The commit was then amended to 2379625e, which changes one doc bullet only, so `serve/server.py` is the same file. Raw results, with local paths scrubbed: https://gist.github.com/gdevenyi/812e4781a015f9caedfbfa8081a139d6 ### Passed Without a GPU: - `python -m unittest serve.test_ignore_eos`: 39 tests OK. 30 of the 39 fail on the unchanged server. The 9 that pass there check behaviour that does not change. - `python -m unittest serve.test_server serve.test_responses serve.test_anthropic_base_url serve.test_chat_tool_results serve.test_context_overflow serve.test_images serve.test_ignore_eos`: 476 tests, 1 skipped, 1 failure, listed under Failed. - Differential on the mock engine, origin/main against this branch, ids and times normalized: 26 of 26 the same. It covers chat, Anthropic and Responses, stream and whole reply, stop strings, and `ignore_eos` false and null. Nine cases cover the refused fields with the flag off or absent: tools, empty tools, `strata_mcp`, `response_format`, Anthropic tools, Responses tools and `text.format`. On a real engine: RTX 5080 16 GB, Qwen3.8-Flash-Next IQ3_S, engine 0.1.55 from release v0.2.9 (the release's asset, its sha256 checked against the release's list), context 65536, 127.0.0.1 only, thinking off unless noted. The table has every run of these requests, one server for each column. On the base, `ignore_eos` is ignored, so those rows are normal replies. The base's third plain 1024 run was cut off when its run was interrupted, so it is left out. | Request | Runs (base, branch) | Base: finish, tokens | Base: wall (s) | Branch: finish | Branch: tokens | Branch: wall (s) | Branch total wall (s) | Passes sent again | Tokens read again | |---|---|---|---|---|---|---|---|---|---| | "Say hi.", normal | 3, 3 | stop, 11, 10, 11 | 0.33, 0.20, 0.26 | stop | 10 each | 0.26, 0.18, 0.19 | 0.63 | | | | "Say hi.", `ignore_eos`, 256 | 3, 3 | stop, 11, 10, 10 | 0.23, 0.17, 0.15 | length | 256 each | 4.03, 10.85, 3.44 | 18.32 | 17, 82, 12 | 225, 220, 207 | | "Write a long essay.", plain, 256 | 3, 3 | length, 256 each | 2.73, 2.28, 2.27 | length | 256 each | 2.47, 2.33, 2.09 | 6.89 | | | | "Say hi.", `ignore_eos`, 1024 | 3, 3 | stop, 10, 11, 10 | 0.23, 0.21, 0.17 | length | 1024, 825, 919 | 68.05, 29.97, 37.64 | 135.66 | 335, 436, 470 | 1023, 1011, 1046 | | "Write a long essay.", plain, 1024 | 2, 3 | length, 1024 each | 8.42, 8.99 | length | 1024 each | 9.18, 8.86, 8.32 | 26.36 | | | - The ratios are branch total wall, `ignore_eos` against plain: 2.66x at 256 and 5.15x at 1024. The prompts differ, and there are 3 runs each. Per run, against the mean plain run, `ignore_eos` was 1.5x to 4.7x at 256 and 3.4x to 7.7x at 1024. - The engine log shows 2,357 parking times over this whole run, of 16.8 to 164.2 ms, median 105.5 ms. - A normal request right after each run: `stop`, 10-11 tokens, `cached_tokens` 8. Its text varies ("Hi! How can I help you today?", "Hi there! ...") as it does before the runs. - Refused with a 400 naming the field, before generation: `tools` (whole and stream), `response_format`, `logprobs`, no budget and a non-boolean value by plain HTTP; `tools` on `/v1/responses` and `/v1/messages`. Through the real SDKs (openai 3.42.0, anthropic 2.3.0): `tools` on chat, Responses and Messages, and `response_format`, each raised `BadRequestError`. A normal request after them: `stop`, 10 tokens. - A streamed run, keep-alive comments counted by reading the raw lines: 157 at 256 tokens (16.51 s); 362, 264 and 348 at 1024 (53.69, 40.68 and 52.20 s). Two runs at 4096: 119 and 393. All ended `length`. The longest silence was 2.39 s. - Through the SDKs: openai stream at 256, `length`, 256 tokens. Anthropic stream at 256, `max_tokens`, 256 tokens. Responses at 128, `incomplete`, `max_output_tokens`, 128 tokens. - `/v1/responses` at 128 by plain HTTP: `incomplete`, `max_output_tokens`, 128 tokens. `/v1/messages` at 128: `max_tokens`, 128 tokens. Earlier, on a local engine build reporting `strata 0.1.54` and on older code of this branch, before the refusals and the keep-alive fix. These were not run again on 0.1.55: - Another conversation, two rounds, of 3,330 and 3,331 tokens: `cached_tokens` 3323 and 3324 after an `ignore_eos` run, the same as after a normal request. - Thinking on, 1024: `length`, 1024 tokens, 38 passes sent again. **A normal request beside `ignore_eos` on `--parallel 2`.** Same card, model and engine 0.1.55, on commit 3f422dc8, one server, 10 rounds, shuffled inside each round. The rule was written before the runs and is in the raw results. One warm-up round is left out. - B: alone. - C1: beside one normal essay. - D1: beside one `ignore_eos` reply. The checks: - Essay: "Write a long essay.", 256 tokens, whole if it ends `length` at 256. - Count: "Count from 1 to 500...", temperature 0. A reply has a splice if any integer is not the one before plus 1, from 1. If the text ends in a digit, the last integer is left out, because the token budget cuts it. This is mechanical. - "Say hi.": cut if it does not end in punctuation or an emoji. Carried along, no result hangs on it. | Mode | Essays whole | Count: splice | Breaks per reply | "Say hi." cut | Essay mean wall (s) | Essay total wall (s) | |---|---|---|---|---|---|---| | B | 10/10 | 0/10 | 0 | 0/10 | 3.23 | 32.30 | | C1 | 10/10 | 0/10 | 0 | 0/10 | 4.76 | 47.60 | | D1 | 10/10 | 0/10 | 0 | 0/10 | 7.83 | 78.25 | - **On correctness, no splice was seen.** 0/10 has a 95% range of 0 to 28%, so 10 runs cannot show a small harm. So `ignore_eos` is not refused on `--parallel`. - **It does make the neighbour slower.** A normal 256-token essay took 1.64x as long beside one `ignore_eos` reply as beside a normal one, 7.83 s against 4.76 s, permutation p below 0.001. The longest was 8.38 s. Please say if you want it refused on `--parallel` for this reason. - All 30 `ignore_eos` neighbours in D1 ended `length` at 256, and all 30 normal essay neighbours in C1 did too. - More shapes on 0.1.55, exploratory, count replies on this branch with no `ignore_eos` anywhere: beside two looping short requests 0/10; beside an essay with other requests between the runs 0/10; on `--parallel 4` beside three essays 0/10. So clean on 0.1.55 is not one shape only. - The earlier comparison of this kind, on the local 0.1.54 build, sat at the ceiling, with C and D both near 20/20, so it could say little. It also ran two looping `ignore_eos` neighbours, where the essay was 7.12 s against 6.91 s. Its table is in the raw results. - After every run the server was stopped and the GPU was back to 2 MiB, 0 %, with no compute process. ### Failed - `serve.test_server.GpuChoice.test_hip_ordinal`: fails on the base too. I ran it there. - **Reaching the budget.** On engine 0.1.55, "Say hi." at 1024 ended before its budget in 2 of 3 whole runs (825 and 919 tokens) and 1 of 3 streamed runs (1018). A streamed run at 4096 ended at 603. The other streamed run at 4096 reached it. Each early end finished `length`, because the model wrote `<|im_end|>` 256 times in a row and the repeat guard `repeat_stop_tokens` stopped it. All runs at 256 and 128 reached their budget. So a fixed length is not promised on long replies with the default guard. On the local 0.1.54 build, all three whole runs at 1024 reached it. **A fault of older engines, not from this change (`--parallel`).** With no `ignore_eos` anywhere, on server c62d5e3a, a reply loses, repeats or splices tokens when a second request is admitted during it, on released engine 0.1.54 and earlier. It was not reproduced on released engine 0.1.55. The cause is not named here. | Engine | Count, alone | Count, beside an essay | Reversed order | |---|---|---|---| | 0.1.52, release | | 6/6 | | | 0.1.54, release (v0.2.8) | 0/20 | 16/20 | | | 0.1.55, release (v0.2.9) | 0/20 | 0/20 | 0/8 | The 0.1.54 data is in the raw results. ### Not run On real hardware: - The 10-second keep-alive itself. It needs 10 s with no text, and the longest silence in six streamed runs was 2.39 s. So the keep-alives counted above came from the engine's own heartbeat, from reading the code. The idle clock over a new pass is tested on the mock engine only, because `KEEPALIVE_S` is not a setting and lowering it would be a patch. - On 0.1.55: thinking on, a second conversation's `cached_tokens` after a run, and a stop string. They ran on the local 0.1.54 build only, on older code. - On 0.1.55: an `ignore_eos` neighbour looping (D2) and two looping short neighbours beside an essay (C2), and mode A, the base alone. The stack switches were not turned off on 0.1.55. - HIP, SYCL and Metal, Windows and macOS. - Engines other than 0.1.55, except the 0.1.54 and 0.1.52 runs above. - DeepSeek and Qwen3.6. DeepSeek's `stop_ids` differ from `EOS_IDS` on the batched path, and that combination is untested. - Pictures, `--replicas` and `--split-serve`. From reading the code, a pass goes through the same `generate`; unconfirmed static analysis. - `ignore_eos` with `reasoning_loop_recovery`. - A real-engine run of a stop string hit in normal text after a stop token. - The shared Chat settings budget on a real engine. It counts as a budget, from reading the code. ## Limits - **Speed.** See above. A longer budget can take many more passes. - **The text after the first stop token is whatever the model writes next.** The answer comes first and is intact in these runs. Then come empty turns, role words, `<think>` tags or long runs of new lines. On the local 0.1.54 build, a second `<think>` block went out as `content`, not `reasoning_content`. - **A stop string can be found late.** The parser holds new lines back, so `"stop": ["\n"]` was found only when the budget ran out (256 tokens, 18.41 s on the local 0.1.54 build, finish `stop`). For that request the `[strata] done:` log line and the `/metrics` history still say `length`. - **The repeat guard** (256 by default) can end a reply before its budget, as `length`. See Failed for how often. The log line then says to restart the server and report it, which is not needed for an `ignore_eos` reply. - **Stricter than vLLM.** Here a budget is required and the fields above are refused. In vLLM's source at 7b77ed5, no check ties `ignore_eos` to `logprobs`, `tools` or a structured format, and with no `max_tokens` it generates up to the model's length. This is unconfirmed static analysis; vLLM was not run. `strata_mcp` is Strata's own field. - **The same request does not repeat exactly.** At temperature 0 and 256 tokens on the local 0.1.54 build, six runs gave four different texts. They differed after the answer. A `seed` is sent again with each pass, but two seeded runs already differed in their first words. 🤖 Generated with [Claude Code](https://claude.com/claude-code) https://claude.ai/code/session_01W53iURzvDQMjnYemag8uvv --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5209
No description provided.