Pull requests / #3397

#3397 [Engine] propose DSpark speculative decoding plan

open · draft · @j-luwierski · 0 コメント · GitHub で見る

NVIDIA / CUDAModels & quantsLinux

本文

## Problem and result

Open issue [#3304](https://github.com/Niko1221/Strata/issues/3304) asks whether Strata can use speculative decoding with a separate drafter. Strata currently offers MTP and DFlash/DFlash2 but has no DSpark artifact or runtime path. This PR proposes an initial implementation plan so maintainers can agree on a checkpoint, target model, and backend before feature work starts. The PR itself changes no runtime behavior; if the plan is accepted, the proposed result is an opt-in DSpark drafter that leaves the current MTP default and target-only path unchanged.

## Related discussion

- [Issue #3304](https://github.com/Niko1221/Strata/issues/3304) asks about speculative decoding in Strata.
- Existing DFlash and DFlash2 support provides a runtime and artifact reference. DSpark adds a semi-autoregressive Markov head and a confidence head; confidence-scheduled verification is an additional system-level step.

## Approach

1. **Agree on the first supported artifact and scope.** Select a published DSpark checkpoint compatible with a Strata target, pin its revision and hashes, document its tensor/feature contract, and agree on the initial target model and backend before implementation.
2. **Add artifact conversion and validation.** Extend the existing DFlash artifact path to recognize DSpark-only tensors and metadata, reject unsupported geometry or mismatched target/tokenizer combinations, and add converter/loader fixtures.
3. **Implement the drafter.** Reuse the parallel DFlash backbone where contracts match, then add DSpark's Markov head for intra-block dependencies and confidence head for per-position acceptance estimates. Compare intermediate outputs against the reference implementation.
4. **Integrate proposal verification behind an opt-in setting.** Preserve the existing MTP default and target-only behavior. Start with fixed-length proposals and the current verifier; verify accepted-prefix commits, rejection replacement, context limits, rewind, and prompt/conversation snapshot behavior.
5. **Add confidence scheduling as a separate milestone.** First evaluate a static confidence cutoff. Then consider a load-aware prefix scheduler only after its decisions can be shown causal and its benefit can be measured under concurrent serving.
6. **Validate and measure.** Add deterministic parity, malformed-artifact, cache/rollback, and output-equivalence checks. Compare target-only, MTP, DFlash/DFlash2, and DSpark on the same prompts, build, hardware, and settings. Report acceptance by draft position, accepted tokens per verifier pass, latency, throughput, memory use, and all unrun backends separately.

## Validation

**Passed:** On Linux, git fetch origin main updated origin/main to c093ac26; git switch --create codex/dspark-plan origin/main created this branch from that revision; git commit --allow-empty -m '[Engine] propose DSpark speculative decoding plan' created 6edb36b; and git push --set-upstream fork codex/dspark-plan pushed it. For PR #3397, the title-area and intake checks passed and GitHub reports no base-branch conflicts. Repository issue/PR searches found the related open issue #3304 and no DSpark PR.

**Failed:** None observed.

**Not run:** No code or tests changed, so no engine build, unit test, parity check, GPU run, or performance measurement was run. Compatibility with any Strata target or backend remains unverified.

## Limits

This is a plan-only draft with one empty commit and no changed files. Maintainer agreement is requested on the first checkpoint/target pair and backend scope before implementation. No default change or performance claim is proposed.

関連リンク

インストール・モデル・リリースへのサイト内リンク。