Skip to content

[Spec] Deprecate Spec V1#25464

Merged
hnyls2002 merged 3 commits into
mainfrom
lsyin/draft-executor-abc
Jun 8, 2026
Merged

[Spec] Deprecate Spec V1#25464
hnyls2002 merged 3 commits into
mainfrom
lsyin/draft-executor-abc

Conversation

@hnyls2002

@hnyls2002 hnyls2002 commented May 16, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Remove the V1 monolithic speculative workers: eagle_worker.py, multi_layer_eagle_worker.py, standalone_worker.py (~2.3k lines deleted)
  • EAGLE / EAGLE3 / STANDALONE / MULTI_LAYER_EAGLE now always run the V2 worker — overlap scheduling drives it asynchronously; the non-overlap (--disable-overlap-schedule) path drives the same V2 worker synchronously
  • NGRAM and FROZEN_KV_MTP are unchanged
  • Drop the v1/v2 branch in SpeculativeAlgorithm.create_worker and the implicit is_spec_v2 == overlap coupling — is_spec_v2 now means "uses the V2 worker/schema", independent of scheduling mode

Background — why V1 can be removed now

V1 was retained only because the V2 path lacked feature parity. The remaining gaps have since landed on main:

With parity in place and the scheduler able to drive the V2 worker on the non-overlap path, the V1 implementations are redundant.

Non-overlap (synchronous) V2 path

  • Scheduler.run_batch gains a synchronous V2 branch: resolve inputs, run forward_batch_generation inside a forward-isolation context, then re-apply spec_info / seq_lens and copy results to CPU
  • _overlap_forward_isolation generalized to _forward_isolation(batch, *, overlap); the non-overlap path skips the 2-iter tensor pinning (single stream, no batch_record_buf)

Test

  • E2E: test_spec_eagle.py, test_spec_eagle_triton.py, test_spec_eagle_topk.py, test_spec_standalone.py, test_spec_eagle_parity.py
  • Attention draft-runner unit tests (dense / mla / dsa) and test_streaming_session_extra.py

CI States

Latest PR Test (Base): ❌ Run #27131714984
Latest PR Test (Extra): ❌ Run #27131714815

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Warning

You have reached your daily quota limit. Please wait up to 24 hours and I will start processing your requests again!

@hnyls2002

Copy link
Copy Markdown
Collaborator Author

/tag-and-rerun-ci

@hnyls2002 hnyls2002 changed the title [Spec] Add SpecResourceContext; remove V1 monolithic spec workers [PoC][Spec] Add SpecResourceContext; remove V1 monolithic spec workers May 16, 2026
@hnyls2002
hnyls2002 force-pushed the lsyin/draft-executor-abc branch from be855fd to f638592 Compare May 16, 2026 21:17
@giuliotosato

Copy link
Copy Markdown

hopefully it will be merged soon

@hnyls2002
hnyls2002 force-pushed the lsyin/draft-executor-abc branch from d15c28f to 1e9b41e Compare June 8, 2026 10:31
@hnyls2002 hnyls2002 changed the title [PoC][Spec] Add SpecResourceContext; remove V1 monolithic spec workers [Spec] Deprecate Spec V1 Jun 8, 2026
@hnyls2002
hnyls2002 merged commit 28c1a3c into main Jun 8, 2026
222 of 239 checks passed
@hnyls2002
hnyls2002 deleted the lsyin/draft-executor-abc branch June 8, 2026 20:10
Oasis-Git added a commit to Oasis-Git/sglang that referenced this pull request Jun 8, 2026
7 commits from main. Notable:
- sgl-project#27528 Fix GPT-OSS MXFP4 hidden size reshape on SM10X — upstream
  landed the same fix I had locally for the prepad bug in
  forward_normal; dropped my local commit f3c169b85 before merging so
  the upstream version comes in cleanly.
- sgl-project#25464 Deprecate Spec V1 — removed
  python/sglang/srt/speculative/{eagle_worker,multi_layer_eagle_worker,
  standalone_worker}.py. We had local edits on eagle_worker.py for
  the cuda_graph_bs -> cuda_graph_bs_decode rename; accepted the
  deletion (V2 was already the runtime path; no remaining call sites
  for V1 in srt/).
- Other content (dsv4 ROCm fix, EAGLE SWA pool, TRTLLM target verify,
  NPU CI, LMSYS blog) auto-merged without conflicts.

Stale-import surface re-checked post-merge: no leftover imports of
piecewise_context_manager, the old piecewise_cuda_graph_runner, the
old cuda_graph_runner module, or the deleted V1 spec workers. No
stale server_args.cuda_graph_bs / disable_piecewise_cuda_graph
accesses in python/sglang/srt/.

Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
jeynmann pushed a commit to jeynmann/sglang that referenced this pull request Jun 9, 2026
JustinTong0323 added a commit to JustinTong0323/sglang that referenced this pull request Jun 14, 2026
The Spec V1 deprecation (sgl-project#25464) deleted eagle_worker.py, which carried
the only setter for forward_batch.reuse_mtp_topk_indices. The receiver
plumbing (deepseek_nextn, ForwardBatch fields, TBO filter) from sgl-project#27114
survived but went dead. Re-add the setup/reset block to the V2
EagleDraftWorker.draft_forward so DSA/NSA topk indices are shared across
MTP draft steps again (topk==1 only).
jmamou added a commit to jmamou/sglang that referenced this pull request Jun 17, 2026
standalone_worker.py was deleted upstream (Spec V1 deprecated in sgl-project#25464).
Port _validate_vocab_compatibility to StandaloneWorkerV2 in
standalone_worker_v2.py and update the test accordingly.
timmy-feng added a commit to modal-projects/sglang that referenced this pull request Jun 26, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants