Skip to content

Adapt constrained decoding to the Qwen runtime update - #4

Merged
Satchitananda merged 3 commits into
mainfrom
bench/qwen38-comparison
Sep 6, 2026
Merged

Satchitananda merged 3 commits into
mainfrom
bench/qwen38-comparison

Conversation

@Satchitananda

@Satchitananda Satchitananda commented Sep 6, 2026 •

Copy link
Copy Markdown
Owner

Intent and behavior

Adapt constrained decoding to the Qwen runtime update: propagate throwing cache creation, forward the complete prefill policy, and expose iterator state. Both lazy and jump-forward iterators preserve supplied caches. Generation examples handle rejected tool calls. This compatibility change does not add speculative decoding to constrained generation.

Validation and review

  • Fresh isolated build passed. Full Structured suite: 33 tests passed, zero failures.
  • New parameterized regressions cover both iterators: exact cache-error propagation, supplied-cache identity/bypass, prefill chunking/progress forwarding, and state propagation through generated tokens.
  • Restoring the old prefill forwarding reproduced failures in both iterator variants; the current implementation passes. Swift syntax, swift-format and whitespace checks pass.
  • Review found no remaining runtime blocker. README documents the runtime contract and includes the rejectedToolCall enum case. No compiler/concurrency escape hatch was added.

Dependencies and scope

Requires LM #5 and the matching MLX upstream-sync fork. The matcher composition follow-up is #5. Original user lockfile modifications were preserved; tests used an isolated worktree and matching Metal library.

No model defaults, downloads, app storage, credentials, signing, permissions, telemetry or egress change. Tests use synthetic models and temporary state. The owner stopped the separate replacement benchmark for a later restart; runtime readiness does not claim that experiment or model promotion is complete.

@Satchitananda
Satchitananda marked this pull request as ready for review September 6, 2026 19:13
@Satchitananda
Satchitananda merged commit b334fac into main Sep 6, 2026
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