Skip to content

Add optional tree speculation to the serving runtime - #1

Merged
CAN230921 merged 2 commits into
mainfrom
codex/gdn-two-phase-verify
Oct 29, 2026
Merged

CAN230921 merged 2 commits into
mainfrom
codex/gdn-two-phase-verify

Conversation

@CAN230921

Copy link
Copy Markdown
Owner

Add startup-selectable tree speculation to the normal serving path. The Docker launcher uses SPECULATION=tree; direct entrypoints accept SPARK_SPECULATION=tree or --speculation tree. MTP remains the default, and health/scheduler metadata identifies the selected mode.

Tree sessions preserve private target/DFlash histories, the existing paired prefill cache, SSE/tool framing, reasoning controls and cancellation. Requests run cooperatively; unbranched trees reuse linear verification graphs. Committed graph views are detached regardless of lazy-clone configuration.

Validation:

  • 719 local CPU tests passed, 13 tokenizer tests skipped, 1,189 subtests passed.
  • Two separately started DGX Spark containers using the same current checkpoint passed 14 MTP and 16 tree HTTP checks: authentication, JSON/SSE, virtual tool workflows, four concurrent private requests, 2,048-token cache reuse, bounded reasoning, disconnect cancellation and recovery.
  • Both containers exited cleanly; unrelated services and memory protection were preserved.

This is an experimental opt-in feature. Tree GPU batching, broad quality evaluation and four full 262K contexts remain unverified. Historical in-process TPS figures are not presented as measured speedups of the serving switch.

Share candidate ancestors with BF16 parent-state semantics and explicit commit/discard ownership. Add an eight-node best-first DFlash policy and bound PLE hashing history. Keep tree generation experimental and separate from serving.

Validation: 688 CPU tests (13 tokenizer skips), 36 exact-weight GPU node/state/continuation checks, and 30 virtual Agent workflows. No production promotion or release approval.
Select tree decoding at startup while retaining MTP by default. Keep per-request target/DFlash state, paired prefill-cache reuse, streaming/tools, reasoning limits and cancellation on the existing owner-thread scheduler. Reuse linear verification graphs for chains and detach committed graph views.

Validation: 719 CPU tests passed (13 tokenizer skips); separately started MTP/tree containers passed 14/16 real HTTP checks with the current checkpoint. Tree lanes cooperate without GPU batching; full quality/capacity gates remain open.
@CAN230921
CAN230921 merged commit 904bf85 into main Oct 29, 2026
2 checks passed
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