Skip to content

[model,sft] feat: support packed conditioning dropout for BAGEL and SenseNova - #399

Merged
Jayce-Ping merged 3 commits into
feat/p23-av-dropoutfrom
feat/p23-packed-dropout
Nov 24, 2026
Merged

Jayce-Ping merged 3 commits into
feat/p23-av-dropoutfrom
feat/p23-packed-dropout

Conversation

@Jayce-Ping

Copy link
Copy Markdown
Collaborator

Purpose

Add SFT conditioning policies for BAGEL and SenseNova-U1/U1.5. This stack stage declares the published recipes and implements their selected native prefixes. The SFT trainer and user-facing switch are connected by the next stage.

  • BAGEL draws per eligible caption and per VAE/ViT representation of every ordered reference. A dropped visual segment reserves its original RoPE position. A dropped caption contributes zero tokens. FSDP2 peers can retain different segments and all peers receive an error before prefill if the sharded batch has unequal input-reference counts.
  • SenseNova T2I drops the generation caption template. For edits, the published recipe yields 80% full, 10% image-only and 10% unconditional. Image-only and unconditional reuse the native CFG prompt layout, including removal of the instruction and thinking markers.
  • Numeric probability controls the chance of any dropout per record. A numeric value of 1 always selects a nonempty mask for an eligible record. Supervised output media stays under the existing output codec.
  • Native qualification covers the named upstream releases, named local copies and identifiable HF snapshots. Cached pixels retain source ordering and context-dependent keys are assembled from the selected inputs.

Validation

The selected plan covers both model families on single-node, two-GPU FSDP2, with Torch 2.11 and real FlashAttention 2.8.3. Different ranks take different dropout branches. The controls compare the forward elementwise against unsharded native execution, backpropagate the selected loss and check finite nonzero gradients. The CPU suite checks native and numeric distributions, ordered packed KVs, native CFG parity and checkpoint admission. Catalog commands and hash-bound assertion logs are included in the external evidence artifact.

Exact source 901b20da Result
BAGEL native FSDP2, BF16, two GPUs Maximum elementwise velocity error 0.0 on both ranks; 59 finite gradient shards per rank with a nonzero training signal. Both ranks rejected mismatched original reference counts.
SenseNova native FSDP2 with a separately sharded vision model, BF16, two GPUs Maximum elementwise velocity error 0.0 on both ranks; 43 finite gradient shards per rank with a nonzero training signal. The ranks used different reference counts and dropout branches.
Packed-contract CPU catalog 29 passed, no skips.
Focused change-routing regressions 35 passed. Unknown forward calls and modified pre-existing tests retain their broad validation routes.

The actual parent is #398. The submitted bundle contains rank observations, assertion logs and JUnit reports. External evidence workflow

@Jayce-Ping
Jayce-Ping added this pull request to stack #401 November 24, 2026 08:24
@Jayce-Ping
Jayce-Ping merged commit 25e6820 into main Nov 24, 2026
7 checks passed
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.

1 participant