Repository navigation
fix(server): bind parallel tool results to their call IDs for positional OGA templates - #1069
Merged
zaneni6 merged 1 commit intoNov 19, 2026
Conversation
…ates WP-30: Bind each parallel group before cache lookup and streaming. Opt in the two verified Qwen packages and report association errors against the original messages.
2 tasks done
zaneni6
added a commit
to Allegro-ma-non-troppo/FastFlowLM
that referenced
this pull request
Nov 19, 2026
Resolve the conflict with ROCm#1069 in RestHandler::ensure_model_loaded and rest_handler.hpp: keep this PR's preflighted load (loaded_selection in place of current_backend) and set ROCm#1069's positional_tool_results after the load from the plan's catalog entry and the engine's backend. Co-Authored-By: Claude <noreply@anthropic.com>
tawei-amd
pushed a commit
that referenced
this pull request
Nov 22, 2026
* feat(oga-hipep): Laguna 2.1 and Nemotron 3.5 Lightning - model_list / model_info: laguna2.1-oga-hipep:33b-a3b and :118b-a8b and nemotron3.5-lightning-oga-hipep:30b-a3b, on pinned AMD gpuep packages with the upstream config.json - TemplateChat frontend for the laguna and nemotron-h families, registered on oga-hipep only; text input only - chat: GLM_XML tool calls for Laguna (<tool_call>name<arg_key>k</arg_key><arg_value>v</arg_value></tool_call>): detection, streaming parser and xgrammar structural tags. The grammar holds a string argument, which Laguna writes unquoted, to its minLength and maxLength, with the bounded-string rules of the Gemma 4 grammar, now shared by both. Hy-Memory's template (NPU) also writes <arg_key>, but with <tool_sep> after the name, which this parser does not read: it stays on Hermes, as before. - minja: tojson takes ensure_ascii, which Laguna's chat template writes for every non-string argument, and the tool-call probe recognises Laguna's <arg_key>, though not in Hy-Memory's <tool_sep> dialect, whose tool calls keep the polyfills, as before. - OgaEngine: once a first run gives all-zero logits, a new generator runs a prompt's first token on its own. On hip-ep 0.5.3, Laguna 2.1's BOS in a run of 8 or more tokens leaves the cache wrong. - Laguna 2.1 defaults to a 2048-token context. Its packages grow the KV cache by concatenation (ai.onnx Attention, past_present_share_buffer false), and on hip-ep 0.5.3 each token decoded at a context length the process has not decoded at before keeps 6-19 MiB of GPU memory until the process exits. On a Radeon 8060S with 96 GB of GPU memory, one reply decoded to 2048 tokens takes the process to about 78 GiB (Laguna-S) and 35 GiB (Laguna-XS); to 3072 tokens, Laguna-S spills past the GPU memory into shared memory, where decoding slows down. When that runs out too, Windows resets the GPU (LiveKernelEvent 141) and every request fails with "unspecified launch failure (719)" until flm restarts, as a package that grows its KV cache the same way did at the 32768 default. At 2048 both pass a tool call and its result, multi-turn recall, a reply forced to the cap (finish=length) and a prompt past it (HTTP 400). - positional_tool_results on all three: their chat templates write a tool result without its tool_call_id, so the server puts the results of parallel calls in the order of the calls and refuses a history it cannot place (#1069). The API tests' positional cases run on them too. - tests: chat_tools GLM (string length bounds too), minja and Hy-Memory cases; oga_hipep first-run case. cli.md lists the new tags and explains the 2048 default; changes.py maps the TemplateChat frontend to its families. * ci(hipep): test the TemplateChat families on a PR only when it touches them A family missing from PR_GPU gets its smallest model on every pull request that runs Test Windows HIPEP, so laguna2.1-oga-hipep:33b-a3b and nemotron3.5-lightning-oga-hipep:30b-a3b would join the newest Qwen and Gemma: 4 models and 69 GB instead of 2 and 33 GB. - plan.py: laguna and nemotron-h in PR_GPU and PR_GPU_WHEN_TOUCHED, like gpt-oss. Their models run on a pull request that touches the family (the TemplateChat frontend or their catalog entries) and on the full tier. - README, build-and-test.yml: the new families, and about 500 GB for every oga-hipep model, up from 400.
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
The two positional OGA Qwen templates render tool result bodies in message order without including
tool_call_id. If two calls to the same function finish out of order, the model can receive their results under the wrong arguments even when the client sends the correct IDs.What changed
qwen3.5-oga-hipep:9bandqwen2.5-it-oga-hipep:14b, bind each parallel result to its call ID and order the results by the original call order. This happens after content validation and before prompt-cache lookup or SSE starts, including whentool_choice: "none"disables new calls.error.parampointing to the original request field. Do not match results across turns.Verification
532081fa)10863379)chat_tools,http_guard). Thechat_toolstest also passed with/W4 /permissive-.main.