Skip to content

common : do not propagate n_seq_decision to speculative (MTP) context - #15

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

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

Conversation

@akudo7

@akudo7 akudo7 commented Sep 26, 2026

Copy link
Copy Markdown

Hi Anirban —

I've been running your parallel-decision work in production: the
POST /v1/decision endpoint on Qwen3.8-27B (2x RTX 3090, fully local),
plugged into a LangGraphJS workflow engine. For closed decision tasks
(routing / classification / scoring) it has been a structural fix —
~18-20x faster per decision vs json_mode, zero output tokens, and it
eliminated three silent data-loss paths we were hitting in production.

This PR: with MTP speculative decoding (--spec-type draft-mtp),
the decision path propagates n_seq_decision into the speculative
context and hits an assert. A one-line guard fixes it. Verified with a
production MTP config: MTP + /v1/decision coexist, no assert crash.

Separately I opened #14 with a hybrid decision extension (closed
fields + one bounded open field in a single call) — feel free to close
it if it is not wanted.

The question before I go further: are you interested in upstreaming
/v1/decision to ggml-org/llama.cpp?
Your patches are already rebased
onto current master (clean apply, compile + functional verification
pass) — happy to prepare a joint PR with proper credit, or you can drive
and I'll support. If not, no pressure: we'll keep running the fork and
contribute fixes here. I'm also writing up the production experience as
an article (links to your repo).

Either way, thanks for the work — it is doing real production duty.

Decision sequences live on the main context only; propagating
n_seq_max = n_parallel + n_seq_decision to the MTP draft context
violates the n_outputs_max assert (n_outputs_max <= cparams.n_outputs_max).
Verified: MTP + /v1/decision coexist after this fix (no assert crash).
@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: 0387f35f-59bd-43b9-baec-17ce68cfa183

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant