Skip to content

scheduler: SparkQwen 0.4.0 width-change amortization, depth-window tests, opt-in copy drafts (ported from Enntity) - #287

Merged
AzeezIsh merged 15 commits into
mainfrom
port/sq-sched
Oct 31, 2026
Merged

AzeezIsh merged 15 commits into
mainfrom
port/sq-sched

Conversation

@AzeezIsh

Copy link
Copy Markdown
Contributor

Summary

SparkQwen 0.4.0's scheduler commits. Ported from Enntity (AGPL-3.0, data-angel):

  • f1fdf272c: amortize width-change startup before MTP arbitration.
  • 0aad51753: tests for the dynamic depth's decision window and start ceiling.
  • 8f3d008ad: copy drafts in place of the MTP head's propose. Opt-in via ATLAS_QWEN_COPY_DRAFTS=1, off by default and off in every SparkQwen profile.

Test plan

  • spark-server bin tests 2961/0. clippy (with and without --tests) is clean.
  • Against SparkQwen 0.4.0's engine: union_check 15/16 (the stream-fence newline is fixed in the next PR), lp_api_probe 13/13, api_parity 26/26.
  • rc16: C1 and C8 greedy identical to the parent; tools 21/21.
  • BFCL ST-995 on this head (running).

Generated with Devin

data-angel and others added 14 commits October 31, 2026 07:41
(cherry picked from commit f1fdf27)

Ported from Enntity/atlas f1fdf27 (AGPL-3.0-only, data-angel)
record/drafts take the window and the start through pure record_in /
drafts_from, and min_drafted(window) names the quarter rule (MIN_DRAFTED of
the default 48). Tests: window parsing bounds; a 16-verify window decides
on the 16th verify and holds with fewer than 4 deepest observations; a start
of 7 begins there (clamped to floor..=max) and demotes on a = 0.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 0aad517)

Ported from Enntity/atlas 0aad517 (AGPL-3.0-only, data-angel)
…PY_DRAFTS)

qwen4_exp drafts with its MTP head, one sequential head pass a draft (up
to seven). Where the context's last 8 tokens occurred earlier, the
tokens that followed them are free drafts. ATLAS_QWEN_COPY_DRAFTS=1
(default off; a SchedLevers lever) makes such a copy the next verify's
drafts in place of the head's propose, reusing copy_drafts' index,
proposal and knobs (ATLAS_DFLASH_COPY_MATCH/_MAX/_REPLY_MATCH/_MISS_MAX).

copy_drafts::mtp:
- lane: the lever, on a model whose every verify row, alone or batched,
  is serial decode's (Model::batch_verify_bit_exact: EXACT_VERIFY +
  BATCH_FAST). Inert on GLM and the inexact lanes.
- propose: after a verify, at the K=2/3/4 verdicts and the batched
  verify's propose, a copy of up to --num-drafts drafts (within the slot's
  capacity) skips the head. Bootstraps and decode rows always run the head
  (the first propose builds the drafter's prompt context). No copies under
  a grammar. Drafts carry COPY_CONF / COPY_REPLY_CONF.
- begin_verify / trim_proposer: the take of a copy marks the round; its
  verdict skips trim_proposer_state, since the head wrote no rows for it.
- settle: copy rounds are booked for the COPY DRAFTS line and skipped by
  the head's depth controllers.
- deep_cap: a LONE request's copy verifies up to the step's ceiling, past
  the head's own dynamic depth (a window the head's deep depth reaches,
  <= 8 rows); in a batch copies keep the ladder.

Exactness: accept/rollback are the head's (k4_apply_verdict, K=2/3), so
every emitted token is the target's pick at its row, and on this lane a
row's pick does not depend on its window or batch, so greedy output with
the lever on equals serial decode. Prefill is untouched.

Long copies past 7 drafts are designed in the module doc (H-snapshot
borrow window, GDN chain past GDN_VERIFY_KMAX, PLE snapshots, row
bounds, a lone capacity from the model), not built: TODO(long-copy).

Tests: copy_drafts::mtp (proposal, ceiling/knob caps, reply confidence,
grammar, lane gating, settle, preemption), and step_mtp on the exact-lane
stub (lone copy past the head's depth with no head propose and no trim,
partial accept rollback, batched mix, decode rows, flag-off and inexact
parity). Not built or run: no CUDA host.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
(cherry picked from commit 8f3d008)

Ported from Enntity/atlas 8f3d008 (AGPL-3.0-only, data-angel)
@AzeezIsh
AzeezIsh changed the base branch from port/sq-vision to main October 31, 2026 23:04
@AzeezIsh
AzeezIsh marked this pull request as ready for review October 31, 2026 23:04
@AzeezIsh
AzeezIsh merged commit f8325ef into main Oct 31, 2026
21 of 22 checks passed
@AzeezIsh

AzeezIsh commented Nov 1, 2026

Copy link
Copy Markdown
Contributor Author

GB10 single-Spark confirmation (sparky, post-merge): this PR was gated as part of integ/train-2026-10-31 (#285 + #284 + #287 + #290 + #293 + #294 + #286 on main 170c3ed) against main at the same base, FP4-Local default recipe profile:

  • controls: FP4-Local byte-identical, Flash-Next NVFP4 byte-identical.
  • BFCL ST-995: train 87.54 / 85.94 (run-1793488879414911145) = base 87.54 / 85.94 (run-1793503255896245487); all 15 subsets identical.
  • agentic-webserver 50: train 47/50, 10.80 s/turn (run-1793478986972058487) vs base 47/50, 10.67 s/turn (run-1793493326878881549). The same 3 iterations (0, 18, 27) fail on both arms ("no Cargo.toml was written"), so that comes from main, not this train. Investigating separately.
  • spark-server tests 3002/0; 0 serve errors.
    Campaign log: docs: FP4-Local post-merge campaign log (2026-10, sparky) #211.

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.

2 participants