Conversation
…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.
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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. Comment |
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>
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.
Extends
/v1/decisionto 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.
{value, generated, tokens, truncated};timingsgainsgeneration_msVerified 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.