Skip to content

parallel-decision : hybrid decision — closed fields + one bounded open field in a single call - #14

Open
akudo7 wants to merge 1 commit into
thecodacus:parallel-decisionfrom
akudo7:jev-hybrid-decision
Open

akudo7 wants to merge 1 commit into
thecodacus:parallel-decisionfrom
akudo7:jev-hybrid-decision

Conversation

@akudo7

@akudo7 akudo7 commented Sep 26, 2026

Copy link
Copy Markdown

Extends /v1/decision to handle hybrid schemas: closed fields
(enum / boolean / bounded integer / grid number) are scored as before,
plus one bounded open field ({"type":"string","max_tokens":N},
1-1024) generated on the trunk in the same call — one prefill total
(closed scoring + bounded generation share the context).

Motivation: workflows that need a decision and a short bounded text
(tool name + args, verdict + one-sentence reason) currently need two
calls (decision + generation). Hybrid does it in one, which also
removes the tail latency of the second call.

  • at most one open field per request (rejected otherwise)
  • closed-only requests are unaffected (existing behavior unchanged)
  • response: the open field entry carries {value, generated, tokens, truncated}; timings gains generation_ms

Verified on Qwen3.8-27B (2x RTX 3090): smoke 10/10; production A/B on
four use cases — 9.2x / 4.65x / 6.97x speedup with output parity on
clear inputs.

Happy to adjust the design (naming, response shape, limits) to whatever
you prefer — or close it if you would rather keep the endpoint
closed-only.

…n field in a single call

Extends /v1/decision to score closed fields (enum / boolean / bounded
integer / grid number) and generate one bounded open field (string with
max_tokens 1-1024) in a single call / single prefill.

- schema: open field = {"type":"string","max_tokens":N}, at most one per request
- engine: closed fields are scored as before; the open field is generated
  on the trunk after the scoring pass, bounded by max_tokens
- server: /v1/decision accepts hybrid schemas; the response carries the
  open field text plus a truncated flag when max_tokens is hit
- README: hybrid section + examples

Verified on Qwen3.8-27B (2x RTX 3090): smoke 10/10; production A/B on
four use cases — 9.2x / 4.65x / 6.97x speedup with output parity on
clear inputs.
@coderabbitai

coderabbitai Bot commented Sep 26, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Advanced

Run ID: c486f30a-2e31-4651-ab48-e7e72bb10493

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@github-actions github-actions Bot added documentation Improvements or additions to documentation server labels Sep 26, 2026
ananta888 added a commit to ananta888/llama.cpp-vision-decision that referenced this pull request Sep 26, 2026
…upstream PR thecodacus#14)

A schema may add one open field {"type":"string","max_tokens":N}
(1-1024). The closed fields are scored as before; then the open field is
generated on each context's trunk in the same call, after the chosen
closed values, so the text is conditioned on them (e.g. a tool argument
on the chosen tool). One prefill; the response carries value, tokens and
truncated, timings gain generation_ms, usage generated_tokens.

Adapted to this fork: generation starts at the trunk's next position
(M-RoPE images), after the context cache stored the trunk, the prefix is
decoded in batch-sized chunks, and a schema needs at least one closed
field. Closed-only requests are unchanged.

Upstream: thecodacus/llama.cpp PR thecodacus#14 (d0ec6f9, akudo7).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant