Skip to content

Bind additionalStates on the pipelined constrained-generation path (#316) - #338

Open
stikves wants to merge 1 commit into
apple:mainfrom
stikves:sukru/fix-issue-316
Open

stikves wants to merge 1 commit into
apple:mainfrom
stikves:sukru/fix-issue-316

Conversation

@stikves

@stikves stikves commented Oct 10, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #316.

Bind additionalStates on the pipelined constrained-encode path (matching the
plain-decode and prefill paths), so bundles that declare more than two states —
e.g. sliding-ring key/value caches — no longer fail the first constrained encode
with "Missing state view". No-op for standard two-state bundles.

The pipelined engine's constrained-encode step built its async state views with
only the growing key/value cache and omitted additionalStates, so bundles that
declare more than two states (e.g. Muse Glimmer's sliding-ring key/value pair)
failed the first constrained encode with "Missing state view". Bind
additionalStates the same way the plain-decode and prefill paths do. It is a
no-op for standard two-state models, so existing bundles are unaffected.

Fixes apple#316.
@stikves
stikves force-pushed the sukru/fix-issue-316 branch from a0310b5 to fb20a47 Compare October 10, 2026 23:19
@stikves
stikves marked this pull request as ready for review October 10, 2026 23:19
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.

[Swift runtime] Pipelined constrained generation binds only the K/V pair, so bundles with more states fail with "Missing state view"

1 participant