Skip to content

Inkling 2: DARKBLOOM_INKLING_MTP_COUPLED turns on coupled drafting (default off) - #2706

Closed
jonathan308 wants to merge 6 commits into
fix/mtp-repetition-penalty-rowsfrom
perf/inkling-mtp-coupled-switch
Closed

jonathan308 wants to merge 6 commits into
fix/mtp-repetition-penalty-rowsfrom
perf/inkling-mtp-coupled-switch

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

DARKBLOOM_INKLING_MTP_COUPLED turns on coupled drafting for Inkling 2 Mini. It is off by default: with the variable unset, nothing changes.

The SDK change is CBv2MTPConfig.coupledProposals (mlx-swift-lm #550, in the pin this PR is based on). With it on, Inkling 2's DSpark drafter proposes, for a sampled row under exact acceptance, the keyed race that the row's verify draw runs at each output index, instead of the draft's argmax.

  • Output is unchanged: exact acceptance emits only the target's own draws. Only acceptance, and so speed, can move.
  • Who it applies to: Inkling2MTPProfilePolicy.coupledProposals reads the switch for the served identities only (Inkling2ModelIdentity.servedModelIDs). On words (1, true, yes, on) turn it on. Off words (0, false, no, off) keep it off. Anything else keeps the default, coupledByDefault = false.
  • Default flip: if the B5 measurement shows ≥5 % more decode at both 1 and 8 streams with identical outputs, the flip is the one line coupledByDefault, and only on an orchestrator ruling.
  • Config: engineConfig passes the switch, the draft cap and the SDK's adaptive / maxSpeculativeRows parameters through Inkling2DSparkDrafter.defaultMTPConfig. It doesn't build a CBv2MTPConfig by hand.
  • Background provider: the LaunchAgent forwards the variable.

Stacked on #2696 (fix/mtp-repetition-penalty-rows, head 8090f6e9ce), which is stacked on P9 #2705 (perf/sdk-pin-0119, the SDK pin for 0.10.18). The branch also carries #2692's commit (DARKBLOOM_INKLING_MTP_MAX_DRAFT), which this builds on and which enters the release with this stack; this PR's own change is commit 78818f29db plus its merges.

Linked issue

None.

Test plan

  • CI (dev) on this head: Inkling2MTPCoupledSwitchTests covers:
    • off by default;
    • on and off words;
    • other models never couple;
    • the profile carries the switch and nothing else in it moves;
    • LaunchAgent forwarding.
  • Red control Red control for #2706: tests without the change (do not merge) #2709 fails at exactly the new behaviour tests.
  • B5 hardware exactness cell, arms A drafter off / B coupling off / C coupling on: 12 seeded requests must be identical across the three arms.
  • scripts/changelog.py check; scripts/docs-impact-check.py --base cd6d475f7b.

Refactor pass: no change justified.

Components touched

  • provider-swift (Swift CLI)
  • docs

Protocol / interface changes

  • Yes — one new provider environment variable, DARKBLOOM_INKLING_MTP_COUPLED (default off). No wire or release change.

Documentation impact

  • Canonical documentation updated:
    • docs/reference/configuration.md (row);
    • docs/architecture/inference.md;
    • changelog fragment changelog.d/inkling-mtp-coupled-switch.md.

…nd cap

Inkling 2 Mini's DSpark profile (Inkling2DSparkDrafter.defaultMTPConfig)
drafts up to 7 tokens per round, with the adaptive depth policy picking
each round's depth below that. There was no way to lower the cap without
a build, so comparing caps needed one build per value.

DARKBLOOM_INKLING_MTP_MAX_DRAFT now sets it (Inkling2MTPProfilePolicy):
unset or blank keeps 7, a whole number is clamped to 1...7, anything else
keeps 7 with a warning. The verify envelope follows the cap through
defaultMTPConfig(maxDraftTokens:). The acceptance setting still applies.
Every draft is verified exactly, so tokens do not depend on the cap.
The LaunchAgent forwards the value.

Tests: Inkling2MTPMaxDraftTests (parse, clamp, unrecognized values,
engine profile per cap, LaunchAgent forwarding).
Docs: configuration reference row, Inkling 2 Mini reference, inference
architecture; changelog fragment.
…efault off)

The SDK's CBv2MTPConfig.coupledProposals lets Inkling 2's DSpark drafter
propose, for a sampled row under exact acceptance, the keyed race its
verify draw runs at each output index instead of the draft's argmax.
Output is unchanged (exact acceptance emits only the target's draws);
only acceptance can move.

Inkling2MTPProfilePolicy.coupledProposals reads the switch for the
served identities only (Inkling2ModelIdentity.servedModelIDs): on words
turn it on, off words keep it off, anything else keeps the default
(coupledByDefault = false). engineConfig passes it, with the cap and the
SDK's adaptive and speculating-row parameters, through
Inkling2DSparkDrafter.defaultMTPConfig. The LaunchAgent forwards it.

Tests: Inkling2MTPCoupledSwitchTests (default off, on/off words, other
models never couple, the profile carries the switch and nothing else
moves, LaunchAgent forwarding).
Docs: configuration reference row, inference architecture; changelog
fragment.
@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@vercel

vercel Bot commented Nov 24, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
d-inference-landing Ready Ready Preview Nov 24, 2026 6:53pm UTC
darkbloom-status Ready Ready Preview Nov 24, 2026 6:53pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 24, 2026 6:53pm UTC

Request Review

…pled switch

The Inkling 2 Mini reference's Drafter row keeps both edits: #2696's
drafting rows and acceptance sentence with its sources, and the
DARKBLOOM_INKLING_MTP_MAX_DRAFT mention with Inkling2MTPProfilePolicy.
jonathan308 added a commit that referenced this pull request Nov 24, 2026
The Drafter row resolves as in #2706: both edits kept.
@jonathan308
jonathan308 changed the base branch from perf/sdk-pin-0119 to fix/mtp-repetition-penalty-rows November 24, 2026 16:59
@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@github-actions github-actions Bot removed the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
jonathan308 added a commit that referenced this pull request Nov 24, 2026
…nkling logprob-row drafting

# Conflicts:
#	docs/architecture/inference.md
#	docs/reference/configuration.md
#	provider-swift/Sources/ProviderCore/Config/SDKFeatureDefaults.swift
#	provider-swift/Sources/ProviderCore/Service/LaunchAgent.swift
jonathan308 added a commit that referenced this pull request Nov 24, 2026
jonathan308 added a commit that referenced this pull request Nov 24, 2026
…on rows) into Inkling logprob-row drafting
jonathan308 added a commit that referenced this pull request Nov 24, 2026
@jonathan308 jonathan308 added the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@github-actions github-actions Bot removed the run-ci Trigger one-shot PR CI run (auto-removed when run starts) label Nov 24, 2026
@jonathan308

Copy link
Copy Markdown
Collaborator Author

Closing: this branch's head (3185edc) is already contained in dev.

@jonathan308 jonathan308 closed this Dec 2, 2026

This branch was successfully deployed

3 active deployments
Preview – eigen-homepages-darkbloom — 3185edc5 Deployed Nov 24, 2026 by vercel[bot]
Preview – d-inference-landing — 3185edc5 Deployed Nov 24, 2026 by vercel[bot]
Preview – darkbloom-status — 3185edc5 Deployed Nov 24, 2026 by vercel[bot]
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