Skip to content

[staging CI] unslothai/unsloth#19957 - #4779

Closed
danielhanchen wants to merge 5 commits into
upstream-mainfrom
pr-19957-ci
Closed

danielhanchen wants to merge 5 commits into
upstream-mainfrom
pr-19957-ci

Conversation

@danielhanchen

Copy link
Copy Markdown
Owner

Disposable CI run for unslothai#19957. Do not merge; closed after CI.

On an offloaded DiT a batch ran each row through all 42 blocks in turn, so a
streamed block uploaded once per row. The layer loop now runs outer and the
rows inner: each block is called once with every row, so its offload hook
moves the weights once per call, and inside the block each row runs the solo
computation at its own text length, mask and RoPE table. The AdaLN modulation
also runs at batch 1 (once for a shared timestep), so every row is its own
solo render bit for bit instead of carrying a batch-B GEMM's rounding. N=1
keeps the per-sample forward, and UNSLOTH_MOSS_LAYER_MAJOR=0 restores the old
order for every batch.

Resident, compiled, graphed or otherwise hooked blocks keep the per-sample
forward. Concurrent MOSS requests still render one at a time unless the card
has a measured verdict in MEASURED_BATCH_WINS (empty by default).
Measured on an A100-SXM4-80GB with the DiT streamed by block-level group
offload (bf16 eager, 1024 px, 10 steps, 3 ABBA repeats): one layer-major call
for N=2 runs 1.98x and for N=4 2.42x faster than N serial renders (95% CI
lower bounds 1.98x and 2.40x), with block uploads per step dropping from 336
to 84 at N=4. Every batched latent equals its own solo render (G2c n=24,
upper bound 0.0; row 0 identical at N=2 and N=4), so this card gets a serving
verdict. Resident loads measured 0.997x and keep rendering one at a time.
…port

coalesce_prompt_key imported diffusion_moss_image (which needs diffusers at import) outside the
try, so a backend without diffusers raised from the key instead of rendering alone.

[skip ci]
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