Repository navigation
feat(runtime): balance complete consumer optimizer windows by estimated cost - #966
Merged
Merged
Conversation
jiapingW
requested review from
FlamingoPg,
FrankLeeeee,
shuaills and
sleepcoo
as code owners
October 14, 2026 03:27
This was referenced Oct 14, 2026
jiapingW
force-pushed
the
codex/pr942-10-consumer-dispatch
branch
from
October 14, 2026 09:00
ff15381 to
cb2ca89
Compare
jiapingW
force-pushed
the
codex/pr942-09-dspine
branch
from
October 14, 2026 09:00
b1705cf to
b326574
Compare
jiapingW
force-pushed
the
codex/pr942-10-consumer-dispatch
branch
from
October 14, 2026 09:45
cb2ca89 to
aa8d222
Compare
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
… into the MoE 8-expert experiment branch Brings is_causal (configurable draft attention range/direction), dspark_flatten_projection / dspark_cache_projection, ddp_bucket_cap_mb, the DDP once-per-window synchronization (sgl-project#958, which replaces this branch's prepare_micro_step fix; the matching test is dropped), the removal of the implicit qwen3-instruct system prompt (sgl-project#959), balanced consumer optimizer windows (sgl-project#966) and the DSpine algorithm. Conflicts in specforge/training/backend.py and controller.py were resolved in favour of the PR. Co-Authored-By: Claude Fable 5.1 <[email protected]>
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…izer quanta in flight Restores the 3.5 s/step measured with these two scheduling settings; neither changes the optimizer windows' sample membership or the loss. Co-Authored-By: Claude Fable 5.1 <[email protected]>
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
… cost-balanced consumer dispatch with the 4-quanta in-flight window Co-Authored-By: Claude Fable 5.1 <[email protected]>
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
… optimizer quanta in flight Co-Authored-By: Claude Fable 5.1 <[email protected]>
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…l-project#963 + sgl-project#966) into the MoE experiment branch The same upstream content was already merged here independently; this records the fork branch's current head as an ancestor. The two MoE config files that spark-Qwen3-8B also carries are kept in this branch's version (the one the running experiment uses). Co-Authored-By: Claude Fable 5.1 <[email protected]>
maocheng23
force-pushed
the
codex/pr942-10-consumer-dispatch
branch
from
October 21, 2026 21:54
aa8d222 to
3aac14a
Compare
maocheng23
changed the base branch from
codex/pr942-09-dspine
to
codex/pr965-04-performance
October 21, 2026 21:56
maocheng23
changed the base branch from
codex/pr965-04-performance
to
codex/pr942-09-dspine
October 21, 2026 22:09
maocheng23
force-pushed
the
codex/pr942-10-consumer-dispatch
branch
from
October 21, 2026 22:10
3aac14a to
aa8d222
Compare
maocheng23
force-pushed
the
codex/pr942-09-dspine
branch
from
October 21, 2026 22:10
244e31d to
b326574
Compare
maocheng23
reviewed
Oct 21, 2026
maocheng23
reviewed
Oct 21, 2026
maocheng23
reviewed
Oct 21, 2026
maocheng23
reviewed
Oct 21, 2026
jiapingW
force-pushed
the
codex/pr942-09-dspine
branch
from
October 22, 2026 03:03
b326574 to
dbacebb
Compare
jiapingW
force-pushed
the
codex/pr942-10-consumer-dispatch
branch
from
October 22, 2026 04:47
aa8d222 to
7aad50d
Compare
maocheng23
reviewed
Oct 22, 2026
maocheng23
approved these changes
Oct 22, 2026
maocheng23
left a comment
Collaborator
There was a problem hiding this comment.
LGTM, good work!
Please merge after CI is passed
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Nov 9, 2026
…l-project#966 (consumer dispatch) onto 475c9b9 Speed-only changes so the dense-6144 run carries the same loss kernels as the dense-1/8 5-epoch run (cde2f05): - sgl-project#961, fused FP32 CE + teacher L1 at logits level: 158cfdd, b0bd4f6, b525e15 (training.fused_logits_loss defaults to true, training.objective_checkpointing to true) - sgl-project#966, cost-balanced consumer dispatch and backpressure fixes: 7aad50d, c124809, c59e3bf, 70061c0, 4f4c4fa, 1e1a4b9, a607703 (runtime.consumer_dispatch stays round_robin) Conflict resolutions against this branch: schema.py and examples/configs/README.md take only the fused_logits_loss lines (no ddp_bucket_cap_mb, which belongs to sgl-project#958); dflash_family_model.py keeps the MoE hooks _take_moe_aux_loss_and_log and on_optimizer_step next to the renamed _selector_token_terms; tests/test_config/test_schema.py keeps the tri-state Liger test and drops the ddp-bucket test. Measured on the dense-6144 run (8x B200, one capture server + six trainers): train compute 2.39 -> 1.99 s/step; objective benchmark (8192 tokens, checkpointing on) 130.8 -> 74.7 ms per micro-step with identical loss.
This was referenced Nov 16, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Uneven anchor/context work makes consumer ranks wait at optimizer boundaries. Add opt-in cost-based consumer dispatch while retaining
round_robinas the default.cost_balanced: group similar samples into microbatches and balance rank loads within each original optimizer window.two_window_bucketed: group samples across two complete windows, then balance each window.two_window_joint_balanced: balance two windows jointly, accepting the proposal only when its estimated total critical-path cost is lower than independent balancing.Capture valid-anchor counts in reference metadata, with token-length fallback for older references. Two-window policies require a high watermark covering two global optimizer windows. Dispatch preserves sample coverage, equal per-rank accumulation counts, deduplication, durable acknowledgements, and incomplete-tail handling. Cross-window regrouping changes optimizer-step membership and can change the training trajectory.
This PR targets
maindirectly and contains only consumer dispatch and its configuration, metadata, documentation, and tests. DSpine and the former attention/projection stack are not prerequisites. Adapted from #942; related to #955. The downstream #967 branch needs a separate restack onto this rewritten branch.Validation: 176 tests passed on H20 using Python 3.12. Coverage includes dispatch, server capture, configuration, recipe wiring/documentation, package architecture, streaming references, and two-process DDP accumulation. Black 24.10.0, isort 5.13.2, and
git diff --checkpassed.The cost model and fixed two-window lookahead are heuristics. No end-to-end throughput or downstream accuracy benchmark was run; lower estimated cost does not guarantee lower wall-clock time. Buffering two windows can increase startup waiting and retained-feature memory.