Skip to content

feat(MODEL-MM-indextts2): assemble the S2Mel DiT block (#634) - #722

Merged
localai-bot merged 1 commit into
mainfrom
row/MODEL-MM-indextts2-ditblock
Aug 14, 2026
Merged

feat(MODEL-MM-indextts2): assemble the S2Mel DiT block (#634)#722
localai-bot merged 1 commit into
mainfrom
row/MODEL-MM-indextts2-ditblock

Conversation

@localai-bot

Copy link
Copy Markdown
Collaborator

Composes the primitives on main into gpt-fast's TransformerBlock as the DiT uses it, gated whole against upstream. 7 cases / 34 assertions.

h   = x + attention(attention_norm(x, c))
out = h + feed_forward(ffn_norm(h, c))

Both residuals are full, unlike the macaron halves in the w2v-bert Conformer already on main — two block types with different residual conventions in the same lane, which is what gets ported by muscle memory. The halving mutation goes RED.

SwiGLU gates on W1, not W3. Swapping yields an identically shaped network that still trains; the checkpoint stores them separately, so only values tell. Rotary applies to q and k, never v.

A generator bug the gate caught — and how

Two cases started failing with zero failed assertions: they threw rather than asserted, because kQ was emitted at the wrong size. Cause: the new block section looped for n, q in ff.named_parameters(), shadowing the rotary input q, so the emitted tensor was an FFN weight.

Reading only the assertion line would have shown 12 passed | 0 failed and looked fine. The case count exposed it — and after the fix assertions went 12 → 34, because ~22 had been skipped entirely.

That's this repo's recorded grep assertions: trap, met from the generator side. Mutation results here are therefore reported by case count, not the assertion line.

Mutation evidence

Swapping W1/W3, skipping rotary on K, halving the attention residual — each RED at compile_err=0.

Status

S2Mel's block is complete. Remaining: the talker head, then composition. No e2e render.

FOLLOWING_AGENTS_PROTOCOL

Composes the primitives already on main into gpt-fast's TransformerBlock as the
DiT uses it, and gates the WHOLE block against upstream executed directly.
7 cases / 34 assertions.

  h   = x + attention(attention_norm(x, c))
  out = h + feed_forward(ffn_norm(h, c))

BOTH RESIDUALS ARE FULL, unlike the macaron HALVES in the w2v-bert Conformer
already on main — two block types with different residual conventions in the
same lane, which is the kind of thing ported by muscle memory. The mutation that
halves the attention residual goes RED.

SwiGLU gates on W1, not W3: `w2(silu(w1 x) * w3 x)`. Swapping them yields an
identically shaped network that still trains, and the checkpoint stores them as
separate tensors, so only the values tell. Rotary applies to q and k, NEVER to v.

A GENERATOR BUG THE GATE CAUGHT, and it is the instructive part. Two cases began
FAILING WITH ZERO FAILED ASSERTIONS — they THREW instead of asserting, because
`kQ` had been emitted at the wrong size. Cause: the new block section looped
`for n, q in ff.named_parameters()`, SHADOWING the rotary input `q`, so the
emitted tensor was an FFN weight. Reading only the assertion line would have
shown "12 passed | 0 failed" and looked fine; the CASE count is what exposed it,
and after the fix assertions went 12 -> 34 because ~22 had been skipped entirely.
This is the trap this repo already records about `grep assertions:` hiding thrown
cases, met from the generator side.

Mutation results in this commit are therefore reported by CASE COUNT, not by the
assertion line.

MUTATION EVIDENCE with compile status: swapping W1/W3, skipping rotary on K, and
halving the attention residual each RED at compile_err=0.

S2Mel's block is complete. Remaining: the talker head, then composition. No e2e
claim.

Following-Agents-Protocol: true
AI-Assisted: true
Assisted-by: AGENT:claude-opus-5 [Claude Code]
@localai-bot
localai-bot merged commit a23ba5b into main Aug 14, 2026
10 of 16 checks passed
@localai-bot
localai-bot deleted the row/MODEL-MM-indextts2-ditblock branch August 14, 2026 09:46
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