Repository navigation
Conversation
Fix DDP accumulation synchronization and expose bucket tuning. Add opt-in fused DFlash CE, Domino Liger kernels and projection caching, balanced consumer dispatch, and no-system Qwen3 template alignment. Include regression tests and training documentation. Validation: 148 tests passed, 12 GPU tests skipped, 75 subtests passed with CUDA disabled.
Integrate PR sgl-project#917 functionality while preserving DFlash and Domino optimizations. Add DSpine Liger support, flattened vocabulary projection, CE-only accumulation prepass, and balanced consumer dispatch. Include L20N training recipes and regression coverage. Validation: 150 CPU tests and 125 subtests passed; 18 GPU-dependent tests skipped. Synced files verified against the L20N-7 training checkout.
jiapingW
requested review from
FlamingoPg,
FrankLeeeee,
shuaills,
sleepcoo and
zyksir
as code owners
October 8, 2026 05:34
This was referenced Oct 14, 2026
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…nce-head skeleton Adopt the hyperparameters of the published Qwen3-8B dense DSpark run (jiapingW/Qwen3-8b-dspark-SpecForge): block 16, confidence head off, 0.1 CE + 0.9 L1, loss_decay_gamma 7, AdamW 6e-4 cosine, NO_SHARD DDP, Liger kernels, 6 epochs, global batch 132 on 6 ranks. Its is_causal, dspark_flatten_projection, dspark_cache_projection and ddp_bucket_cap_mb come from the unmerged PR sgl-project#942 and are deliberately not used. - configs/qwen3-8b-dspark-noconf-b16.json (dense) and configs/qwen3-8b-dspark-moe-noconf-b16.json (8 x 4096 top-1 MoE) replace configs/qwen3-8b-dspark-moe.json - recipes renamed to *-noconf-b16-*; tests, README and runbook follow
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…ystem prompt Follow the published jiapingW run now that PR sgl-project#942 is merged: the draft is configs/qwen3-8b-dspark-dense-1-8-causal-noconf-b16.json (its causal config with intermediate_size 1536), the yaml sets dspark_flatten_projection, dspark_cache_projection and ddp_bucket_cap_mb 128, and the corpus cache is rebuilt without a system prompt. 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
… 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
…atten/cache projection, bucket 128, cost-balanced dispatch) configs/qwen3-8b-dspark-moe-8x1536-top1-causal-noconf-b16.json adds is_causal: true to the 8 x 1536 top-1 MoE config, mirroring configs/qwen3-8b-dspark-causal-noconf-b16.json from PR sgl-project#942. The recipe switches to it and sets ddp_bucket_cap_mb 128, dspark_flatten_projection / dspark_cache_projection true and runtime.consumer_dispatch cost_balanced as in the PR's reference recipe. The launcher uses a new dataset cache directory because PR sgl-project#942 drops the implicit qwen3-instruct system prompt. 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
…merge 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
… to exp_read.me Same base as the dense-1/8 branch (PR sgl-project#942 stack sgl-project#957-sgl-project#963 merged there, DDP-wrapped draft lookup for MoE metrics, managed-local NCCL port pin); the experiment log is exp_read.me like on dense-1/8. 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
yushengsu-thu
added a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…yers 1-7 of the sgl-project#942 split), matching the dense-1/8 branch The combined PR sgl-project#942 merge was reverted in the previous commit; this takes the split stack instead (sgl-project#957 streaming-read fixes, sgl-project#958 DDP sync once per accumulation window, sgl-project#959 no implicit qwen3-instruct system prompt, sgl-project#960 is_causal, sgl-project#961 fused DFlash head, sgl-project#962 selective checkpoint contexts, sgl-project#963 shared flatten_vocab_projection / cache_vocab_projection), so the MoE arm carries exactly the same upstream code as the dense-1/8 arm. Conflicts in specforge/training/backend.py and controller.py resolved in the stack's favour. Co-Authored-By: Claude Fable 5.1 <[email protected]>
yushengsu-thu
pushed a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…ed cost Split from PR sgl-project#942 (source 211b87f).
yushengsu-thu
pushed a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
Split from PR sgl-project#942 (source 211b87f).
yushengsu-thu
pushed a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Oct 15, 2026
…ed cost Split from PR sgl-project#942 (source 211b87f).
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]>
This was referenced Oct 21, 2026
khazic
pushed a commit
to khazic/SpecForge_lao
that referenced
this pull request
Oct 22, 2026
…reads Split from PR sgl-project#942 (source 211b87f).
khazic
pushed a commit
to khazic/SpecForge_lao
that referenced
this pull request
Oct 22, 2026
Split from PR sgl-project#942 (source 211b87f).
khazic
pushed a commit
to khazic/SpecForge_lao
that referenced
this pull request
Oct 22, 2026
Split from PR sgl-project#942 (source 211b87f).
yushengsu-thu
pushed a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Nov 9, 2026
Split from PR sgl-project#942 (source 211b87f). (cherry picked from commit 00f7af2)
yushengsu-thu
pushed a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Nov 9, 2026
…ed cost Split from PR sgl-project#942 (source 211b87f). (cherry picked from commit 7aad50d)
yushengsu-thu
pushed a commit
to yushengsu-thu/SpecForge
that referenced
this pull request
Nov 18, 2026
Split from PR sgl-project#942 (source 211b87f). (cherry picked from commit d3cdb81)
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.
Replacement stack
This combined PR is split into the following ten stacked PRs. Review and merge them in order. #963 combines the Domino and DSpark optimizations with shared projection controls; #964 is superseded. The original branch and description below remain available as provenance.
Each PR targets the preceding branch and documents actual dependencies. #962 provides selective checkpoint contexts; #963 shares
cache_vocab_projectionandflatten_vocab_projectionbetween Domino and DSpark. #965 now targets #963. DSpine registration remains independent. New recipes omitmax_checkpointsand resolve to unlimited retention (0).Combined #963 layer: 58 tests passed. The prior full stack at
eaa14f102d6aran 405 targeted integration tests with 2 skips and zero failures/errors. Current scheduling/recipe revision ate35167c693d6: 135 targeted regression tests passed; pre-commit passed. #966 usestwo_window_bucketedandtwo_window_joint_balanced, independently of the training method. These results do not claim full GitHub CI or end-to-end speedups.Motivation
Improve disaggregated speculative-model training efficiency and make attention configuration explicit and maintainable across DFlash, Domino, DSpine, and DSpark. This PR combines distributed training fixes, DSpine integration, vocabulary-projection optimizations, and portable RTX PRO5000 training recipes, with regression coverage using the repository's
unittestrunner.Description updated for PR head
211b87fc7d707e3a628cb95de5c73340af863c04.Modifications
Training and runtime
no_sync()around both forward and backward; expose DDP bucket sizing.Attention semantics
layer_types:full_attentionfor global range orsliding_attentionfor local range) from direction (is_causal: bidirectional or causal).is_causalis omitted. With an explicit boolean, sliding-window limits apply to both context and draft positions; legacy sliding masks retain the causal draft prefix without applying the window to that prefix.is_causal: false. The checked-in Qwen3-8B DSpine config now explicitly declaresis_causal: true; this does not change the existing global-causal training computation.Consumer dispatch
Document and validate four
runtime.consumer_dispatchpolicies:round_robin(default)cost_balanceddomino_balanceddspine_balancedcost_balancedwindows; otherwise fall back. DSpine only.The heuristic uses effective anchor counts and sequence lengths, including microbatch padding. It is not a real-time GPU utilization scheduler or a guarantee of wall-clock improvement.
Two optimizer windows does not mean
accumulation_steps=2. For these TP=1 recipes, one global optimizer batch isconsumer DP ranks × batch_size × accumulation_steps; the dual-window policies buffer twice that amount but still perform two separate optimizer updates. With 32 ranks and batch size 2, accumulation 2 means 128 samples per update and 256 samples buffered; accumulation 1 means 64 per update and 128 buffered. The dispatch optimization remains applicable with accumulation 1, independently of the DSpine CE prepass used for gradient accumulation.Dual-window policies require
in_flight_high_watermarkto cover at least two global batches. They preserve per-rank sample counts, complete accumulation windows, sample coverage, and durable acknowledgement semantics, but can change optimizer-batch membership and the exact training trajectory. Extra buffering can increase startup/supply-wait latency. Even within-window reordering is not a bitwise training-trajectory guarantee.Recipes, documentation, and tests
rtx-pro5000; document them as RTX PRO5000 examples. The 32-consumer/8-producer examples retain their training hyperparameters.shared/must refer to the same shared storage on every node;cache/andruns/are node-local. Service addresses remain configurable examples. These run identifiers do not rename existing checkpoints.qwen3-instructdefault system prompt empty and update both standard-conversation and tool-use token/loss-mask ground truths accordingly.unittest.TestCase, usingsubTest, standard temporary directories, and unittest assertions/skips. Preserve the parameter combinations and numerical tolerances; no pytest dependency is required by these tests.training.domino_cache_projection, extend the DSpark config inventory, and add relative-path and explicit-DSpine-causality regression checks..deployment/ignored. Local deployment/evaluation scripts and their dedicated acceptance-aggregation test are not part of the PR's final diff.Related Issues
Accuracy Test
Local validation uses Python 3.11, PyTorch 2.13.0+cu130, and Transformers 5.12.1. Results are separated by revision and scope rather than presented as a full-suite pass:
13f3bd613f3bd613f3bd6211b87fThe main regression command at
13f3bd6was:The latest config follow-up was checked with:
Coverage includes causal isolation, dense/Flex masks, native cached inference, legacy resume compatibility, loss/gradient comparisons, DSpine accumulation and distributed normalization, configuration portability, and template ground truths.
Previously recorded DSpark full-shape optimization validation used synthetic features with length 8192, batch/GPU 2, accumulation 2, 512 anchors, block size 16, and objective chunk size 128. Gradient relative L2 was 0.0078301 and gradient cosine 0.99996935, across 60 parameter tensors (1,126,417,664 elements). BF16 flattening is not bitwise identical. The recorded DSpine isolated projection test had logit/gradient relative L2 0 and gradient cosine 1.0 for its tested synthetic input.
These numerical tests are not downstream task-accuracy results. No fresh end-to-end acceptance-length or task-accuracy benchmark has been run on the latest PR head.
At the description update on 2026-10-08, latest-head lint passed; the full CI unit-test job was still running. A full-suite pass is not claimed here.
Benchmark & Profiling
Previously recorded measurements on NVIDIA RTX PRO5000 72GB Blackwell; these are not fresh measurements of the latest commit and not 32-GPU end-to-end speedup claims:
(128, 15, 4096, 151936)The short DSpark comparison corresponds to 18.92% higher throughput. A separate length-4096 synthetic profile measured 3.6273 s per DSpark step, including approximately 1.2107 GPU-seconds of vocabulary projection and 1.0150 GPU-seconds of vocabulary-loss/elementwise work; no-kernel time was approximately 0.0074 s. This motivated projection/cache changes, not a claim that producer starvation explained the measured slowdown.
Evidence was recorded in local
dspark-optimization-validation-20261007-summary.json,dspark-domino-profile-20261007-summary.json, anddspine-optimization-validation/summary.json. Raw traces, local validation scripts, run records, and checkpoints are intentionally outside the repository. Controlled final-head end-to-end benchmarks and downstream accuracy evaluation remain follow-up work; no universal performance improvement is claimed.Checklist
13f3bd6; changed-file checks passed for211b87f; latest-head CI lint passed.)