Repository navigation
Conversation
…k impl (sgl-project#34201) Co-authored-by: hnyls2002 <lsyincs@gmail.com> (cherry picked from commit 201c4b9)
(cherry picked from commit a16b162)
… decoding (cherry picked from commit ee22ac0)
(cherry picked from commit 4df763c)
Author
|
Status update: modal-projects/miles#13 replaces modal-projects/miles#11 and supports unfiltered sampling only. It needs no change from this PR.
Generated by Claude Code |
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.
Score centering needs the behavior-policy probabilities for every committed token. This dependency branch enables complete DFlash filtered-support capture and lets Miles verify that the loaded worker supports stochastic verification before collecting training rollouts.
The base is pinned
sglang-milescommit2b7313dc21a57251f568553247d36d78e585a614. The fork base branch preserves that snapshot, so this review contains only the explicit dependencies below.stitch-sglang-v0.5.20is a patch reference, not the integration baseline. Companion implementation: modal-projects/miles#11, stacked on upstream score-centering PR sgl-project#3732.Changes
4df763c9de4152606b03d70350bc4bd8572506f5. These expose a common filtering order and change its default totop_k_first. Experiments explicitly select the same order in both arms; changing the default is not mathematically required by score centering.dflash_sampling_verify_availablefrom the loaded worker ininternal_states. Miles combines this capability with effective acceptance thresholds and environment checks; ordinary model-logprob requests retain their existing semantics.sampling_mask_max_tokens, reportingOVERFLOWinstead of truncating it.p >= 1) exactly during renormalization. A live mixed batch exposed AIR pruning low-probability tokens when float32 input mass rounded above one. An exact fixture reproduced the discrepancy; ordinary sampling retained those tokens. The shared helper and DFlash sparse path now use the per-row identity guard.Validation
Final tested revision:
79f36a8a1b49f84d8ade21b8f9a4cae0db6d6b4d.4.40e-6; independent float64 probability-reference maximum L1 error1.85e-6; unchanged gates2e-59.32e-14joint: 36 cold/warm comparisons across 18 prefixes, maximum recorded probability L16.04e-8, maximum logprob difference2.38e-7, identical support2.28x(K32),2.20x(K128),1.91x(filtered); three repeats of eight concurrent 256-token responses, with ranges and outliers retainedThe real-model test uses pinned target/draft revisions, BF16, FA3 full attention, float32 Mamba state, and explicit
top_k_first. Live DFlash2 selects the chain/rejection verifier; synthetic CUDA tests cover that and the distinct target-only path. The tested image's unchangedsglang-router 0.3.2passes the required metadata through; this does not establish compatibility with a separately rebuilt newer gateway.Same-prefix model-forward comparisons show material differences across decode, prefill, and cache paths: maximum recorded-probability L1
0.1050for spec-source replay, with differences also present in regular-source controls. Passing the exact-verifier checks does not establish model numerical equivalence, training-quality parity, or universal model/draft compatibility. All four companion Miles training arms (regular/DFlash2 × unfiltered/filtered) passed three-step integration audits: nonzero gradients, finite score-centering metrics, two successful target handoffs per arm, and valid metadata on 650,816 generated token rows. Both DFlash2 arms preserve private draft weights across updates. Matching prompts and initial language weights were checked from artifacts. These short runs do not establish training-quality parity.The recorded results include the numerical limitations and full training table. Reproduction commands and interpretation criteria are in the companion experiment README. The complete inference bundle preserves all 526 artifact files, including failed runs, raw traces, timings, controls, and source manifests; SHA256
f17a3c4545c5ffd4e9779956f7f2ed8bcff2f2f8750a147f12ecf4d543f5a3c8.