Skip to content

fix(provider): let Inkling 2 Mini draft on penalty and stop-string rows - #2686

Closed
jonathan308 wants to merge 1 commit into
fix/mtp-exact-acceptance-all-modelsfrom
fix/inkling-mtp-penalty-stop-rows-stacked
Closed

jonathan308 wants to merge 1 commit into
fix/mtp-exact-acceptance-all-modelsfrom
fix/inkling-mtp-penalty-stop-rows-stacked

Conversation

@jonathan308

@jonathan308 jonathan308 commented Nov 24, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Stacked on #2678 (3fc0080346, exact acceptance for every model); land after it.

Inkling 2 Mini's DSpark drafter now also drafts for requests with a presence or frequency penalty or with stop strings. Before, those requests decoded without the drafter: only the catalog Qwen 3.5/3.6 builds and Gemma 4 26B QAT were in SDKFeatureDefaults.penaltyRowBuilds / stopStringRowBuilds. This PR adds the served Inkling identities (Inkling2ModelIdentity.servedModelIDs) to both lists. Provider only: no SDK change, no pin move.

  • Penalty rows: the SDK's penalty-aware verification is drafter-agnostic. Each verify position is penalized with the row's confirmed output plus the earlier drafts, before the target token is picked or sampled (DefaultSamplerV2.verifyWindow, applyWindowPenalties). Penalty rows accept exactly. This is the path the catalog Qwen 3.5 builds use, also a recurrent captured-verify target with a request-stateful drafter.
  • Stop-string rows: finalize confirms each committed token through the row's own detokenizer, which carries Inkling's answer-channel stop scope. It ends the row at the first match and rolls back the rest.
  • Repetition penalty stays refused, unchanged: mtpHistoryEligible requires a repetition penalty of 1 on every build.
  • DARKBLOOM_MTP_PENALTY_ROWS=0 / DARKBLOOM_MTP_STOP_STRING_ROWS=0 still turn these rows off. Both lists are applied after the Inkling engine profile in EngineV2SlotFactory, so they take effect for Inkling.

Red control: #2685 (the tests alone on the same base). It must fail at exactly the changed tests in MTPPenaltyRowsSwitchTests and MTPStopStringRowsSwitchTests.

Linked issue

Closes #

Test plan

  • MTPPenaltyRowsSwitchTests: Inkling turns on penalty speculation, while near-miss ids (a case variant, the bare name) don't. The startup summary names it. Presence/frequency rows count as penalty rows; a repetition-penalty row doesn't.
  • MTPStopStringRowsSwitchTests: Inkling turns on stop-string speculation (near-miss ids don't), and the summary names it.
  • python3 scripts/changelog.py check; python3 scripts/docs-impact-check.py --base 3fc0080346 (coverage OK)
  • CI (dev) on the exact head; red control fails at exactly the changed tests
  • Hardware on/off identity on the B4 app (Inkling, drafter on with exact acceptance vs DARKBLOOM_CBV2_MTP=0). Twelve seeded requests: 4 presence at T 0.5, 2 frequency at T 0, 4 stop mid-answer (T 0.5 and T 0), 2 controls. Pass = same reasoning+content sha256, finish reason and token count, and mtp_tokens_proposed_total rising on the drafter-on arm. Penalty and stop parts reported separately.

Components touched

  • provider-swift (Swift CLI)
  • native runtime / MLX
  • landing (Next.js)
  • enclave (Swift)
  • CI / provider release
  • docs

Protocol / interface changes

  • No protocol/interface changes
  • Yes — described above and matching side updated

Documentation impact

  • Canonical documentation updated: docs/reference/configuration.md (both switches), docs/provider/cli-reference.md, docs/architecture/inference.md, docs/reference/inkling2-mini-support.md (Drafter)
  • No documentation needed — reason:

Changelog

  • Added changelog.d/inkling-penalty-stop-rows-draft.md.
  • No user-visible change, or an explicitly authorized release/history change.

Notes for reviewers

Before And After

flowchart LR
  R[Inkling request with presence/frequency penalty or stop] -->|before| O[drafter off]
  R -->|after| D[DSpark drafts; verify applies penalties per position / finalize stops at first match]
  P[repetition penalty] --> O2[drafter off, unchanged]
Loading

Refactor Pass

Refactor pass: no change justified.


Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

Requests with a presence or frequency penalty or with stop strings never used
Inkling's DSpark drafter: only the catalog Qwen 3.5/3.6 builds and Gemma 4
26B QAT were in SDKFeatureDefaults.penaltyRowBuilds / stopStringRowBuilds.
Add the served Inkling identities to both lists. The SDK's penalty-aware
verification and per-token stop confirmation are drafter-agnostic; penalty
rows accept exactly. Repetition penalty rows stay target-only.
@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 3:58pm UTC
darkbloom-status Ready Ready Preview Nov 24, 2026 3:58pm UTC
eigen-homepages-darkbloom Ready Ready Preview Nov 24, 2026 3:58pm UTC

Request Review

@jonathan308

Copy link
Copy Markdown
Collaborator Author

Closing: this branch's head (90d995e) is already contained in dev.

@jonathan308 jonathan308 closed this Dec 2, 2026

This branch was successfully deployed

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