Skip to content

[3/8] feat: add post-attention and post-MLP layernorm support - #4

Merged
yueming-yuan merged 1 commit into
miles-mainfrom
feat/post-layernorm
Feb 19, 2026
Merged

[3/8] feat: add post-attention and post-MLP layernorm support#4
yueming-yuan merged 1 commit into
miles-mainfrom
feat/post-layernorm

Conversation

@yueming-yuan

Copy link
Copy Markdown
  • Add optional LayerNorm after self-attention and MLP outputs (Qwen3-style)
  • New config fields: post_self_attn_layernorm, post_mlp_layernorm
  • New CLI args: --post-self-attn-layernorm, --post-mlp-layernorm, --use-gated-attention
  • Wired through gpt_layer_specs and transformer_layer forward pass

Add optional LayerNorm after self-attention and MLP outputs, needed
for architectures like Qwen3. Controlled via --post-self-attn-layernorm
and --post-mlp-layernorm CLI flags.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@yueming-yuan yueming-yuan changed the title feat: add post-attention and post-MLP layernorm support [3/8] feat: add post-attention and post-MLP layernorm support Feb 19, 2026
@yueming-yuan
yueming-yuan merged commit b796923 into miles-main Feb 19, 2026
guapisolo pushed a commit that referenced this pull request Feb 26, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

Co-authored-by: Yueming Yuan <yym022502@gmail.com>
guapisolo pushed a commit that referenced this pull request Mar 2, 2026
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

Co-authored-by: Yueming Yuan <yym022502@gmail.com>
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